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
Proxies: Whats works and what doesn't #1019
Comments
I’m not entirely up to speed in this area and @whimboo will probably be able to give a better answer, but generally everything to do with proxies and the proxy configuration object apart from HTTP proxy authentication should work in the latest Firefox Nightly, possibly also in 57, with geckodriver 0.19.0. The error message you mention, |
@fredericOfTestfabrik I use the Java client bindings and also have to use several proxies. Currently, the Proxy object does not work (for me) using Java client bindings v3.6.0, GeckoDriver v0.19.0, and Firefox v56.0 (stable). It hasn't worked for me for some time now (since v3.3.x approx). For a brief period I was able to use the capability "requiredCapabilities" and setting its value to a JsonObject that defined the proxy. This is no longer viable. Currently I use FirefoxProfile.setPreference() and set appropriate "network.proxy.*" preferences, as such:
This is working well for me for the time being. Waiting on Firefox v57 (stable) for alleged fix that will allow for using the Proxy object again. |
It sounds to me like a bug needs to be filed on Selenium to get the |
Yes, by using Firefox 57 beta and geckodriver 0.19 everything should work for proxies. If you have problems with the proxy capabilities please let me know, and as best also attach a trace level log. Thanks. |
@andreastt Forgive my ignorance, but how does one utilize the |
@schmidtkp Sorry, I don’t know exactly how, or even if exposed, in the Java client bindings. The resultant JSON Object should look like this: {"moz:firefoxOptions":
{"prefs": {
"foo": "bar"
}
} |
It's exposed in Java bindings with the FirefoxOptions class. |
Thank you for the Information. The prefs workaround works flawlessly in Firefox 54 and 55 using geckodriver 0.18 and 0.19 |
Great. That's wonderful to hear. Looks like we can close this issue. |
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. |
System
I am trying to evaluate how Firefox can be configured to use a proxy during a selenium service. The only Version that works for me right now is FF47. as this version does not use the new geckodriver.
Using a google search, I get multiple contradicting approaches. Some say you can configure it using Profiles (which is not an option for me), others say you can do it using a specifically built capability. The latest info I could find in this repo was, that proxies will start working with Firefox 57.
As of now, using the Proxy Object from Selenium 3.6 in the capabilities, I only get the following error:
org.openqa.selenium.WebDriverException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonObject
Command duration or timeout: 1.63 seconds
Build info: version: '3.6.0-TF-0.1', revision: 'eb50837', time: '2017-10-13T12:16:32.25Z'
System info: host: 'dhcp75-39.start.uni-saarland.de', ip: '134.96.75.39', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_102'
Driver info: driver.version: RemoteWebDriver
....
Unfortunately, I could not find any official Documentation or Guide on what works and how it works.
To summarize my question in one sentence:
Which Firefox Version can use proxies with Selenium 3.6, how do I configure it and which geckodriver version do I need?
The text was updated successfully, but these errors were encountered: