browser Proxy setting

409 views
Skip to first unread message

bejoy john

unread,
Mar 14, 2013, 5:18:34 PM3/14/13
to robotframe...@googlegroups.com
We need to use system proxy to run our selenium code. Trying to evaluate Robot framework and trying to run a basic demo.

it fails to load the page because the firefox opens with no proxy. But our corp network has to use system proxy. which I used to do in java as given below.
 Proxy p = new Proxy();
            p.setProxyType(ProxyType.SYSTEM);
            fp.setProxyPreferences(p);
            fp.setAssumeUntrustedCertificateIssuer(true);
            driver = new FirefoxDriver(fp);


Is there any way I can replicate the same using the keyword driven infrastructure. or some how access external library.

Thanks

Markus Bernhardt

unread,
Mar 14, 2013, 6:12:25 PM3/14/13
to john....@gmail.com, robotframe...@googlegroups.com
Hi John,

in theory you can specify all that parameters via the desired_capabilities in the open browser keyword. 


In practice it only works for everything, like webdriver_assume_untrusted_issuer=true, except the proxy, because the proxy information is a nested object, and the parser of the Selenium2Library cannot handle that. See:


There is a kind of fall back solution that mostly works:.

If you are executing your tests with python, you can set the following environment variables:
http_proxy=http://<host>:<port>
HTTP_PROXY=http://<host>:<port>

If you are executing your tests with jython, you can set the following parameters:
-Dhttp.proxyHost=<host>
-Dhttp.proxyPort=<port>

Hope that helps somehow.

Queers,
Markus

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

bejoy john

unread,
Mar 15, 2013, 10:22:40 AM3/15/13
to robotframe...@googlegroups.com, john....@gmail.com
Thanks for reply Markus.

I came up with a alternate solution: 
I was able to modify the network proxy setting (to 5) directly in the  pref.js. under the firefox profile. 

And it was always running in chrome. Looks like I am all set :) .. 

Thanks
Bejoy John/
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages