diff --git a/rb/lib/selenium/webdriver/common/platform.rb b/rb/lib/selenium/webdriver/common/platform.rb index 44b2f30ff0370..65f498e8b5c0b 100644 --- a/rb/lib/selenium/webdriver/common/platform.rb +++ b/rb/lib/selenium/webdriver/common/platform.rb @@ -86,6 +86,10 @@ def linux? os == :linux end + def unix? + os == :unix + end + def wsl? return false unless linux? diff --git a/rb/lib/selenium/webdriver/common/selenium_manager.rb b/rb/lib/selenium/webdriver/common/selenium_manager.rb index 91a20ee7bfd50..103b3aa90a0d2 100644 --- a/rb/lib/selenium/webdriver/common/selenium_manager.rb +++ b/rb/lib/selenium/webdriver/common/selenium_manager.rb @@ -83,7 +83,13 @@ def binary "#{directory}/macos/selenium-manager" elsif Platform.linux? "#{directory}/linux/selenium-manager" + elsif Platform.unix? + WebDriver.logger.warn('Selenium Manager binary may not be compatible with Unix; verify settings', + id: %i[selenium_manager unix_binary]) + "#{directory}/linux/selenium-manager" end + rescue Error::WebDriverError => e + raise Error::WebDriverError, "Unable to obtain Selenium Manager binary for #{e.message}" end) validate_location(location)