Skip to content

Commit 6814b9d

Browse files
committed
[rb] allow Selenium Manager to work with Unix
Include warning since user must set compatibility mode in a supported Unix flavor fixes #13161
1 parent c535217 commit 6814b9d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

rb/lib/selenium/webdriver/common/platform.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def linux?
8686
os == :linux
8787
end
8888

89+
def unix?
90+
os == :unix
91+
end
92+
8993
def wsl?
9094
return false unless linux?
9195

rb/lib/selenium/webdriver/common/selenium_manager.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ def binary
8383
"#{directory}/macos/selenium-manager"
8484
elsif Platform.linux?
8585
"#{directory}/linux/selenium-manager"
86+
elsif Platform.unix?
87+
WebDriver.logger.warn('Selenium Manager binary may not be compatible with Unix; verify settings',
88+
id: %i[selenium_manager unix_binary])
89+
"#{directory}/linux/selenium-manager"
8690
end
91+
rescue Error::WebDriverError => e
92+
raise Error::WebDriverError, "Unable to obtain Selenium Manager binary for #{e.message}"
8793
end)
8894

8995
validate_location(location)

0 commit comments

Comments
 (0)