You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems that currently selenium2lib doesn't support testing via IE proxy. I have some tests works fine without proxy in IE, however, when I configured proxy, then I got following errors:
WebDriverException: Message: '\n\n<title>404 Not Found</title>\n\n
Not Found
\n
The requested URL /hub/session was not found on this server.
\n\n
I am wondering whether any one has solutions for this already?
Currently there is no support in Selenium2Lib for passing in profiles when creating a browser. That is something that I have been planning to add but just haven't had the time yet. If you want to hack it you can change the _make_browser function in the browsermanagement.py class. Otherwise I hope to have a fix checked in by end of next week.
Cheers,
Jeremy
On Jan 16, 2012, at 10:06 PM, adwu73 wrote:
it seems that currently selenium2lib doesn't support testing via IE proxy. I have some tests works fine without proxy in IE, however, when I configured proxy, then I got following errors:
WebDriverException: Message: '\n\n<title>404 Not Found</title>\n\n
Not Found
\n
The requested URL /hub/session was not found on this server.
\n\n
I am wondering whether any one has solutions for this already?
Thanks!
Adam
Reply to this email directly or view it on GitHub: #32
Thanks for your feedback. Since I am not quite familiar witht the difference of IE driver and Remote driver, I would like to wait for your fix instead.
I need to use this feature so, so I will go ahead to add this feature in. Since Selenium 1 set the proxy during Start Server process, and Open Browser won't take proxy use parameters, I will add a new keyword Set Proxy to init the proxy setting, and Open Browser will use the proxy info accordingly.
I have just committed some changes to S2L that allows the open_browser keyword to open remote connections. You have to do the following.
Start the selenium_standalone_server.jar
Open browser ie remote_url=http://127.0.0.1/wd/hub desired_capabilities=httpProxy:yourproxy,ftpProxy:yourproxy
that should do it. I don't have a proxy server setup so I didn't test the proxy setup but I did test pretty extensively the ability to use the selenium removing and the desired_capabilities so let me know if it works for you.
To answer your question if you just want to make a change for your self just make the change and rerun pybot the change and the pyc file will automatically be regenerated.
As a more general solution I think we could probably make a small change to the _parse_capabilities_string function so it would ignore the second : . I'll try to find some time to get that implemented ASAP.
Activity
adwu73 commentedon Jan 17, 2012
it seems that the issue lies in following code in _browsermanagement.py
There is no handling of proxy. According this wiki: http://seleniumhq.org/docs/04_webdriver_advanced.html
we should set proxy like this:
PROXY = "localhost:8080"
webdriver.DesiredCapabilities.INTERNETEXPLORER['proxy'] = {
"httpProxy":PROXY,
"ftpProxy":PROXY,
"sslProxy":PROXY,
"noProxy":None,
"proxyType":"MANUAL",
"class":"org.openqa.selenium.Proxy",
"autodetect":False
}
you have to use remote, otherwise you'll have to code it yourself in python to
dynamically changing the system proxy preferences
driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.INTERNETEXPLORER)
I will try to provide a fix soon
j1z0 commentedon Jan 17, 2012
Hey Adam,
Currently there is no support in Selenium2Lib for passing in profiles when creating a browser. That is something that I have been planning to add but just haven't had the time yet. If you want to hack it you can change the _make_browser function in the browsermanagement.py class. Otherwise I hope to have a fix checked in by end of next week.
Cheers,
Jeremy
On Jan 16, 2012, at 10:06 PM, adwu73 wrote:
adwu73 commentedon Jan 18, 2012
Hi Jeremy,
Thanks for your feedback. Since I am not quite familiar witht the difference of IE driver and Remote driver, I would like to wait for your fix instead.
Regards!
Adam
adwu73 commentedon Feb 8, 2012
I need to use this feature so, so I will go ahead to add this feature in. Since Selenium 1 set the proxy during Start Server process, and Open Browser won't take proxy use parameters, I will add a new keyword Set Proxy to init the proxy setting, and Open Browser will use the proxy info accordingly.
j1z0 commentedon Feb 12, 2012
Hey Adam,
I have just committed some changes to S2L that allows the open_browser keyword to open remote connections. You have to do the following.
that should do it. I don't have a proxy server setup so I didn't test the proxy setup but I did test pretty extensively the ability to use the selenium removing and the desired_capabilities so let me know if it works for you.
Cheers,
Jeremy
adwu73 commentedon Jul 6, 2012
this capability has been provided in 1.0.01
rajsarodaya commentedon Sep 5, 2013
I had this use case where in I was supposed to pass an entire URL in desired capability.
Since there were two semicolons in the name:value pair (app:https://apk-recovery.googlecode.com/files/apiDemos.apk), it didn't worked as expected.
I have done some alteration in the _browsermanagement.py file so that the separator is altered to " ! " instead of " : ".
Please tell me what need to be done so that new _browsermanagement.pyo & _browsermanagement.pyc files can be created.
j1z0 commentedon Sep 5, 2013
To answer your question if you just want to make a change for your self just make the change and rerun pybot the change and the pyc file will automatically be regenerated.
As a more general solution I think we could probably make a small change to the _parse_capabilities_string function so it would ignore the second : . I'll try to find some time to get that implemented ASAP.
Cheers,
Jeremy
rajsarodaya commentedon Sep 5, 2013
Thanks for the fix Jeremy.
For now it is working as per need.
--Raj.