Urgent--Changing Proxy settings of firefox on runtime

612 views
Skip to first unread message

kaush

unread,
Jul 10, 2012, 2:49:51 AM7/10/12
to seleniu...@googlegroups.com
Hi All,
 
i am using webdriver with mozilla.I am facing an issue that each time when webdriver opens up the mozilla , i have to change the proxy settings of browser to connect to the internet from "No proxy required " to "auto detect proxy settings to this network" or "manually select proxy" then only it opens the specific URL.
Can this be done with firefoz profile or anything else.Pls Help.
 
 
Thanks,
Kaush
 

Krishnan Mahadevan

unread,
Jul 10, 2012, 2:54:47 AM7/10/12
to seleniu...@googlegroups.com
org.openqa.selenium.Proxy proxy = new Proxy();
//set your settings
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(CapabilityType.PROXY, proxy);
FirefoxDriver driver = new FirefoxDriver(dc);

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/S72hPXxqogkJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

kaush

unread,
Jul 10, 2012, 4:57:12 AM7/10/12
to seleniu...@googlegroups.com
Thanks alot for you reply Krishnan.
 
I did the following way

org.openqa.selenium.Proxy proxy =

new Proxy();

proxy.setProxyType(ProxyType.

AUTODETECT);

 

DesiredCapabilities dc = DesiredCapabilities.firefox();

dc.setCapability(CapabilityType.

PROXY, proxy);

FirefoxDriver driver =

new FirefoxDriver(dc);

 

But it is throwing me Error -"failed to connect to binary FirefoxBinary"

Can you help me again.

 

Thanks,

Kaush

kaush

unread,
Jul 10, 2012, 5:20:01 AM7/10/12
to seleniu...@googlegroups.com
Hi Krishnan,
 
Its working nice now.Thankx alot.
Error was coming due to a memory issue:)

On Tuesday, July 10, 2012 12:19:51 PM UTC+5:30, kaush wrote:
Reply all
Reply to author
Forward
0 new messages