Skip to content

Commit

Permalink
[rb] allow Selenium Manager to work with Unix
Browse files Browse the repository at this point in the history
Include warning since user must set compatibility mode in a supported Unix flavor
fixes #13161
  • Loading branch information
titusfortner committed Nov 26, 2023
1 parent c535217 commit 6814b9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rb/lib/selenium/webdriver/common/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def linux?
os == :linux
end

def unix?
os == :unix
end

def wsl?
return false unless linux?

Expand Down
6 changes: 6 additions & 0 deletions rb/lib/selenium/webdriver/common/selenium_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6814b9d

Please sign in to comment.