SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.21k stars 8.11k forks source link

[šŸ› Bug]: Selenium Manager is encountering an issue with the setProxyAutoconfigUrl() method. #14503

Open dineshkumar-kanniyammal opened 2 days ago

dineshkumar-kanniyammal commented 2 days ago

What happened?

An error occurs when trying to set a proxy auto-configuration URL using setProxyAutoconfigUrl() in a FirefoxOptions object. The geckodriver is not able to launch, and the following error is thrown:

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: geckodriver, error Command failed with code: 2, executed: [--browser, firefox, --browser-version, 129.0, --proxy, --language-binding, java, --output, json] error: a value is required for '--proxy ' but none was supplied

For more information, try '--help'.

How can we reproduce the issue?

FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setBrowserVersion("129.0");

Proxy proxy = new Proxy();
proxy.setProxyAutoconfigUrl("http://web-proxy/proxy.pac");

firefoxOptions.setProxy(proxy);

new FirefoxDriver(firefoxOptions);

Relevant log output

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: geckodriver, error Command failed with code: 2, executed: [--browser, firefox, --browser-version, 129.0, --proxy, --language-binding, java, --output, json]
error: a value is required for '--proxy <PROXY>' but none was supplied

For more information, try '--help'.

Operating System

Macos

Selenium version

selenium-server-4.23.0.jar

What are the browser(s) and version(s) where you see this issue?

Firefox version 130.0

What are the browser driver(s) and version(s) where you see this issue?

geckodriver 0.35.0

Are you using Selenium Grid?

No response

github-actions[bot] commented 2 days ago

@dineshkumar-kanniyammal, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

pujagani commented 2 days ago

Thank you for sharing the details. I will be able to reproduce the issue. I am trying to now figure out the best way to address this.