Issue 6101 in selenium: Help to set no proxy for InternetExplorerDriver

5 views
Skip to first unread message

sele...@googlecode.com

unread,
Aug 13, 2013, 2:34:49 PM8/13/13
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 6101 by phongsal...@gmail.com: Help to set no proxy for
InternetExplorerDriver
http://code.google.com/p/selenium/issues/detail?id=6101

Hi all,

My IE Browser was set proxy before. I want to set direct connection (no
proxy) when initializing a new InternetExplorerDriver instance in run time.
I can do it with FirefoxProfile but not with DesiredCapabilities. The code
below just set specified proxy but not set no proxy.
Could you please help me to set no proxy for InternetExplorerDriver?


String PROXY = "localhost:8080";

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(PROXY)
.setFtpProxy(PROXY)
.setSslProxy(PROXY);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);


Selenium version: 2.33
OS: Win 7 64 bit
Browser: IE
Browser version: 8,9

Thanks in advance.



--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sele...@googlecode.com

unread,
Aug 13, 2013, 2:48:00 PM8/13/13
to selenium-develope...@googlegroups.com

Comment #1 on issue 6101 by phongsal...@gmail.com: Help to set no proxy for
InternetExplorerDriver
http://code.google.com/p/selenium/issues/detail?id=6101

AuI would have something like that:

Proxy proxy = Proxy.NO_Proxy;
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);

sele...@googlecode.com

unread,
Aug 13, 2013, 3:19:32 PM8/13/13
to selenium-develope...@googlegroups.com
Updates:
Status: Invalid

Comment #2 on issue 6101 by james.h....@gmail.com: Help to set no proxy for
InternetExplorerDriver
http://code.google.com/p/selenium/issues/detail?id=6101

This is a question, not an issue. Issues should be directed to the
user-facing mailing lists. However, the following code should work:

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setProxyType(org.openqa.selenium.Proxy.ProxyType.DIRECT);

sele...@googlecode.com

unread,
Aug 13, 2013, 10:22:16 PM8/13/13
to selenium-develope...@googlegroups.com

Comment #3 on issue 6101 by phongsal...@gmail.com: Help to set no proxy for
InternetExplorerDriver
http://code.google.com/p/selenium/issues/detail?id=6101

The code didn't work. The failure as below


Aug 14, 2013 9:09:57 AM
org.openqa.selenium.browserlaunchers.WindowsProxyManager
backupRegistrySettings
INFO: Backing up registry settings...
Exception in thread "main" java.lang.RuntimeException: Bug extracting
hudsuckr
at
org.openqa.selenium.browserlaunchers.WindowsProxyManager.extractHudsuckr(WindowsProxyManager.java:575)
at
org.openqa.selenium.browserlaunchers.WindowsProxyManager.runHudsuckr(WindowsProxyManager.java:585)
at
org.openqa.selenium.browserlaunchers.WindowsProxyManager.backupHudsuckrSettings(WindowsProxyManager.java:624)
at
org.openqa.selenium.browserlaunchers.WindowsProxyManager.backupRegistrySettings(WindowsProxyManager.java:286)
at
org.openqa.selenium.ie.InternetExplorerDriver.prepareProxy(InternetExplorerDriver.java:296)
at
org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:180)
at
org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
at
org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:147)
at acccm.Testing.TID02.main(TID02.java:52)
Caused by: java.io.IOException: Unable to locate: hudsuckr/hudsuckr.exe
at org.openqa.selenium.io.FileHandler.locateResource(FileHandler.java:86)
at org.openqa.selenium.io.FileHandler.copyResource(FileHandler.java:55)
at
org.openqa.selenium.browserlaunchers.WindowsProxyManager.extractHudsuckr(WindowsProxyManager.java:572)
... 8 more


MY CODE:

String ieDriverPath = Constants.PROJECT_PATH
+ "\\src\\lib\\handler\\IEDriverServer.exe";
DesiredCapabilities ieCapabilities = new DesiredCapabilities();

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setProxyType(org.openqa.selenium.Proxy.ProxyType.DIRECT);
ieCapabilities.setCapability(CapabilityType.PROXY, proxy);

System.setProperty("webdriver.ie.driver", ieDriverPath);
WebDriver webDriver = new InternetExplorerDriver(ieCapabilities);
webDriver.manage().timeouts().implicitlyWait(Constants.SE_WAIT_IN_SECOND,
TimeUnit.SECONDS);


Please help me to fix that problem. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages