SeleniumHQ / selenium

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

[🚀 Feature]: Selenium Manager support browserName recognized by each driver #11352

Closed titusfortner closed 1 year ago

titusfortner commented 1 year ago

Feature and motivation

Right now --browser only supports iexplorer and it seems like it should be easy to support both. All of the Selenium code right now is either "IE" or "InternetExplorer". I had to hack a workaround in Python code, (though hopefully we change this soon anyway).

Usage example

selenium-manager --browser ie
github-actions[bot] commented 1 year ago

@titusfortner, 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!

diemol commented 1 year ago

👍 this makes sense

titusfortner commented 1 year ago

So, looking at actual implementations, what we really want is "internet explorer" here (https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/remote/Browser.java#L41)

and for that matter MicrosoftEdge: https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/remote/Browser.java#L32

I'm guessing we can't have spaces on command line, so maybe internet-explorer or internet_explorer?

bonigarcia commented 1 year ago

Completed with #11420.

titusfortner commented 1 year ago

I'm still having issues with multiple browser names on my mac, so I'm reopening to track

This is mac64 built from se_mgr_browser_path branch

sl-1495:macos titusfortner$ /Users/titusfortner/code/selenium/rb/bin/macos/selenium-manager --browser iexplorer
INFO    /Users/titusfortner/.cache/selenium/IEDriverServer/win32/4.7.0/IEDriverServer
sl-1495:macos titusfortner$ /Users/titusfortner/code/selenium/rb/bin/macos/selenium-manager --browser internetexplorer
ERROR   Invalid browser/driver name
sl-1495:macos titusfortner$ /Users/titusfortner/code/selenium/rb/bin/macos/selenium-manager --browser ie
ERROR   Invalid browser/driver name
sl-1495:macos titusfortner$ /Users/titusfortner/code/selenium/rb/bin/macos/selenium-manager --browser internet-explorer
ERROR   Invalid browser/driver name
titusfortner commented 1 year ago

and this was a mistake on my part, working as intended in the latest branches.