Skip to content

[rust] Include "internet explorer" as IE name in Selenium Manager#11825

Merged
diemol merged 2 commits intotrunkfrom
se_mgr_iexplorer_name
Mar 28, 2023
Merged

[rust] Include "internet explorer" as IE name in Selenium Manager#11825
diemol merged 2 commits intotrunkfrom
se_mgr_iexplorer_name

Conversation

@bonigarcia
Copy link
Copy Markdown
Member

Description

I have just discovered that the latest versions of Selenium WebDriver and Selenium Grid (i.e., 4.8.3) use the name "internet explorer" to resolve IEDriverServer (see below). That name was not used before, and so, it was not in the internal IEDriverServer name list. Therefore, the driver is not being resolved. This PR fixes this issue simply by adding the name "internet explorer" to the list.

Selenium WebDriver:

Mar 28, 2023 8:53:52 AM org.openqa.selenium.remote.service.DriverFinder getPath
WARNING: Unable to obtain IEDriverServer using Selenium Manager: Unsuccessful command executed: [C:\Users\boni\AppData\Local\Temp\selenium-manager197971403549005902491557364755525\selenium-manager.exe, --browser, internet explorer, --output, json]
Invalid browser name: internet explorer
Build info: version: '4.8.3', revision: 'e5e76298c3'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.15'
Driver info: driver.version: InternetExplorerDriver

Selenium Grid:

C:\Users\boni\Downloads>java -jar selenium-server-4.8.2.jar standalone --selenium-manager true
08:37:46.765 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
08:37:46.770 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
08:37:48.747 INFO [NodeOptions.getSessionFactories] - Detected 16 available processors
08:37:48.773 INFO [NodeOptions.discoverDrivers] - Driver(s) already present on the host: 0
08:37:53.554 WARN [DriverFinder.getPath] - Unable to obtain IEDriverServer using Selenium Manager: Unsuccessful command executed: [C:\Users\boni\AppData\Local\Temp\selenium-manager1883349654670015646822990841438590\selenium-manager.exe, --browser, internet explorer, --output, json]
Invalid browser name: internet explorer
Build info: version: '4.8.2', revision: '826dbfc730'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.15'
Driver info: driver.version: unknown
08:37:53.575 INFO [NodeOptions.discoverDrivers] - Driver(s) available through Selenium Manager: 3
08:37:53.597 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 16 times (SM)
08:37:53.602 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 16 times (SM)
08:37:53.608 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome","goog:chromeOptions": {"args": [ "--remote-allow-origins=*" ] } } 16 times (SM)
08:37:53.671 INFO [Node.<init>] - Binding additional locator mechanisms: relative
08:37:53.688 INFO [GridModel.setAvailability] - Switching Node b13d7595-964c-4020-bdbc-89da5e8207e4 (uri: http://192.168.56.1:4444) from DOWN to UP
08:37:53.689 INFO [LocalDistributor.add] - Added node b13d7595-964c-4020-bdbc-89da5e8207e4 at http://192.168.56.1:4444. Health check every 120s
08:37:54.386 INFO [Standalone.execute] - Started Selenium Standalone 4.8.2 (revision 826dbfc730): http://192.168.56.1:4444

Motivation and Context

Outputs before this commit:

C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --browser "internet explorer"
   Compiling selenium-manager v1.0.0-M3 (C:\Users\boni\Documents\dev\selenium\rust)
    Finished dev [unoptimized + debuginfo] target(s) in 7.53s
     Running `target\debug\selenium-manager.exe --browser "internet explorer"`
ERROR   Invalid browser name: internet explorer
error: process didn't exit successfully: `target\debug\selenium-manager.exe --browser "internet explorer"` (exit code: 65)

Output after this commit:

C:\Users\boni\Documents\dev\selenium\rust>cargo run -- --browser "internet explorer"
   Compiling selenium-manager v1.0.0-M3 (C:\Users\boni\Documents\dev\selenium\rust)
    Finished dev [unoptimized + debuginfo] target(s) in 3.35s
     Running `target\debug\selenium-manager.exe --browser "internet explorer"`
INFO    C:\Users\boni\.cache\selenium\IEDriverServer\win32\4.8.1\IEDriverServer.exe

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bonigarcia bonigarcia added the C-rust Rust code is mostly Selenium Manager label Mar 28, 2023
Copy link
Copy Markdown
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @bonigarcia!

@diemol diemol merged commit 34bd790 into trunk Mar 28, 2023
@diemol diemol deleted the se_mgr_iexplorer_name branch March 28, 2023 15:56
yashcho pushed a commit to yashcho/selenium that referenced this pull request Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-rust Rust code is mostly Selenium Manager

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants