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

[🐛 Bug]: Selenium Manager should error if browser-path is wrong #13352

Closed
titusfortner opened this issue Dec 22, 2023 · 4 comments
Closed

Comments

@titusfortner
Copy link
Member

What happened?

I used an incorrect browser-path & it ignored it and downloaded a new version.

How can we reproduce the issue?

opts = Selenium::WebDriver::Options.firefox(binary: '/bad/path')
driver = Selenium::WebDriver.for :firefox, options: opts

Relevant log output

2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Executing Process ["/Users/titusfortner/.rbenv/versions/3.0.6/lib/ruby/gems/3.0.0/gems/selenium-webdriver-4.16.0/bin/macos/selenium-manager", "--browser", "firefox", "--browser-path", "/bad/path", "--output", "json", "--debug"] 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] geckodriver not found in PATH 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Running command: /bad/path -v 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Output: "" 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Running command: "/bad/path" -v 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Output: "" 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Running command: '/bad/path' -v 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Output: "" 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Running command: /bad/path -v 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Output: "" 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] firefox not found in the system 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Required browser: firefox 121.0 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] firefox 121.0 already exists 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] firefox 121.0 is available at /Users/titusfortner/.cache/selenium/firefox/mac64/121.0/Firefox.app/Contents/MacOS/firefox 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Required driver: geckodriver 0.33.0 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] geckodriver 0.33.0 already in the cache 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Driver path: /Users/titusfortner/.cache/selenium/geckodriver/mac64/0.33.0/geckodriver 
2023-12-21 18:35:08 DEBUG Selenium [:selenium_manager] Browser path: /Users/titusfortner/.cache/selenium/firefox/mac64/121.0/Firefox.app/Contents/MacOS/firefox 
2023-12-21 18:35:08 DEBUG Selenium [:driver_service] Executing Process ["/Users/titusfortner

Operating System

Mac

Selenium version

trunk

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

n/a

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

n/a

Are you using Selenium Grid?

n/a

@vlad8x8
Copy link
Contributor

vlad8x8 commented Jun 19, 2024

Hi @titusfortner what browser path you are going to define as wrong?

@titusfortner
Copy link
Member Author

Sorry, I linked the wrong issue, but they are related. If a user provides some combination of name/version/path and they are not compatible, it should error instead of trying to guess what to use.

bonigarcia added a commit that referenced this issue Sep 17, 2024
…14381)

* [rust] Selenium Manager errors when browser-path is wrong (#13352)

* [rust] Remove test data with incorrect browser path in macOS

* Revert "[rust] Remove test data with incorrect browser path in macOS"

This reverts commit 79c22d6.

* [rust] Escape browser path before checking existence

* Revert "[rust] Escape browser path before checking existence"

This reverts commit b876e22.

* [rust] Remove test data with incorrect browser path in macOS

* [rust] Force window-sys crate version in Windows

* Revert "[rust] Force window-sys crate version in Windows"

This reverts commit a968a40.
@bonigarcia
Copy link
Member

Done via #14381.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Selenium Manager Sep 17, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

No branches or pull requests

3 participants