Using Browser's Proxy Configuration In Robot Framework

4,090 views
Skip to first unread message

Jerico Ramirez

unread,
Mar 6, 2012, 9:14:11 AM3/6/12
to robotframework-users
Good Day!

I am running test scripts that need manual proxy configuration. When I
run the automated script, the browser uses a different profile thus it
runs under the system's proxy config. How would I be able to run my
scripts under the proxy configuration that we configured?

BTW, we use python PL for our variables etc.

Thank you

Jerico

greg

unread,
Mar 6, 2012, 9:36:30 AM3/6/12
to robotframe...@googlegroups.com
Look at the selenium keyword "Start Selenium Server" and use a custom firefox profile.

antonio III cabreira

unread,
Mar 8, 2012, 10:04:43 AM3/8/12
to robotframework-users
Follow up question on this, I was able to set the custom firefox
profile that selenium runs that has the proxy values in place. The
problem I am encountering is, how can I enter the proxy credentials?
Can I set the credentials also as part of the setup of the firefox
profile?

Janne Härkönen

unread,
Mar 8, 2012, 3:14:47 PM3/8/12
to antonio.c...@gmail.com, robotframework-users
Hello Antonio,

On Thu, Mar 8, 2012 at 5:04 PM, antonio III cabreira
<antonio.c...@gmail.com> wrote:
> Follow up question on this, I was able to set the custom firefox
> profile that selenium runs that has the proxy values in place. The
> problem I am encountering is, how can I enter the proxy credentials?
> Can I set the credentials also as part of the setup of the firefox
> profile?

I think that the proxy authentication credentials can only be entered
when Selenium server is started. See
http://seleniumhq.org/docs/05_selenium_rc.html#proxy-configuration for
details.

If you are using Start Selenium Server -keyword, you can define the
proxy information like this:

| Start Selenium Server | -Dhttp.proxyHost=proxy.com |
-Dhttp.proxyPort=8080 | -Dhttp.proxyUser=username |
-Dhttp.proxyPassword=password |

When defining the proxy this way, there should be no need for the
custom profile.

hope this helps,
--J

David

unread,
Mar 8, 2012, 4:26:11 PM3/8/12
to robotframework-users
Would be interesting to know how and if this can be done with
Selenium2Library (other than a custom profile).

On Mar 8, 12:14 pm, Janne Härkönen <janne.harko...@iki.fi> wrote:
> Hello Antonio,
>
> On Thu, Mar 8, 2012 at 5:04 PM, antonio III cabreira
>

Jeremy Johnson

unread,
Mar 8, 2012, 9:05:10 PM3/8/12
to robotframework-users

Currently the only way to do it is s2l is with a custom profile.
Although other people have requested the start server keyword be
implemented in s2l so I think we will try to get that done soon.

Jeremy
Message has been deleted

antonio III cabreira

unread,
Mar 9, 2012, 7:16:16 AM3/9/12
to jer...@softworks.com.my, robotframework-users
Hi,

The way I run my selenium server is upon startup. I placed it as a shortcut in the startup folder. So I dont use the Start Selenium Server keyword. Is there a way for this kind of setup for the proxy to work?

I also tried using the one that J suggested. First I stopped the selenium server from running then included the following code in my script:
Start Selenium Server  -firefoxProfileTemplate  C:\\robot_framework\\browser_profiles  -Dhttp.proxyUser=te...@test1.com  -Dhttp.proxyPassword=Password

I also tried Start Selenium Server  -Dhttp.proxyHost=proxytest.com  -Dhttp.proxyPort=8081  -Dhttp.proxyUser=s...@test.com -Dhttp.proxyPassword=Password1

I was asked for my proxy username and password in both approaches. What part of the implementation did I get wrong?

Thanks!

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


antonio III cabreira

unread,
Mar 9, 2012, 7:27:08 AM3/9/12
to jer...@softworks.com.my, robotframework-users
I also tried removing the browser template that I am using that has the pre defined proxy settings and used the following code:
Start Selenium Server   -Dhttp.proxyHost=proxytest.com  -Dhttp.proxyPort=8081   -Dhttp.proxyUser=te...@test.com  -Dhttp.proxyPassword=Password

It seems that the proxy settings did not take effect.

Christian Rudolf Tan

unread,
Nov 27, 2014, 4:42:43 AM11/27/14
to robotframe...@googlegroups.com, jer...@softworks.com.my
HI guys! did your test work? I am doing some research on this also. my test would involve requesting and getting data from the proxy.
I hope someone can give me some idea on what to do. 

Thanks!
To unsubscribe from this group, send email to robotframework-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages