Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Settings using geckodriver 0.12 #470

Closed
fredericOfTestfabrik opened this issue Feb 14, 2017 · 3 comments
Closed

Proxy Settings using geckodriver 0.12 #470

fredericOfTestfabrik opened this issue Feb 14, 2017 · 3 comments

Comments

@fredericOfTestfabrik
Copy link

Firefox Version

51

#geckodriver Version
0.12.0

Platform

Windows/OSX/

I have an issue using setting a proxy for Firefox using the RemoteWebDriver from Selenium.

I read and tried several related issues, which recommended setting the proxy settings as required capabilities inside the desired capabilities, as well as explicitly using the required capabilities of the RemoteWebDriver. Unfortunately none of them worked. Firefox is not using the proxy settings.

Is there a way to set proxy settings using a RemoteWebDriver? I did not read that newer versions of geckodriver fix this, so i did not assume that upgrading would help me.

Best Regards
Frederic

@andreastt
Copy link
Contributor

If you upgrade to Firefox Nightly and the latest geckodriver, you should be able to send the proxy configuration object as part of desiredCapabilities.

@minusnine
Copy link
Contributor

I'm still having a problem with setting a proxy in this way.

Geckodriver version: 0.14.0
Firefox version: firefox-54.0a1 from yesterday.

Test case:
https://github.com/tebeka/selenium/blob/topic/add-proxy-test/remote_test.go#L1190

This test case starts a test webserver that returns a page containing "You are viewing a proxied page," instantiates a new session, executes a WebDriver Get URL call to a different host, and then gets the page's source. The source should include

Trace Geckodriver log:
https://gist.github.com/minusnine/49ed95ae7444c90e1b8678de5cb19fef

Summary log lines:
1487182473789 webdriver::server DEBUG Got request POST AbsolutePath("/session")
1487182473789 webdriver::command DEBUG Got request body {"capabilities":{"desiredCapabilities":{"browserName":"firefox","firefox_binary":"vendor/firefox-nightly/firefox","proxy":{"proxyType":"manual","httpProxy":"127.0.0.1","httpProxyPort":"34382"}}}}
...
1487182474925 geckodriver::marionette DEBUG → 105:[0,1,"newSession",{"capabilities":{"desiredCapabilities":{},"requiredCapabilities":{}},"sessionId":null}]
...
1487182476369 webdriver::server DEBUG Got request POST AbsolutePath("/session/da4b8d58-0033-4071-8ead-fa6c8da1fdb8/url")
1487182476369 webdriver::command DEBUG Got request body {"url":"http://127.0.0.1:43978"}

@lock
Copy link

lock bot commented Aug 17, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants