Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages for debugging #232

Merged
merged 1 commit into from
May 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/webdrivers/chrome_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ChromeFinder
class << self
def version
version = send("#{System.platform}_version", location)
raise VersionError, 'Failed to find Chrome version.' if version.nil? || version.empty?
raise VersionError, 'Failed to determine Chrome version.' if version.nil? || version.empty?

Webdrivers.logger.debug "Browser version: #{version}"
version[/\d+\.\d+\.\d+\.\d+/] # Google Chrome 73.0.3683.75 -> 73.0.3683.75
Expand All @@ -18,7 +18,7 @@ def location
chrome_bin = user_defined_location || send("#{System.platform}_location")
return chrome_bin unless chrome_bin.nil?

raise BrowserNotFound, 'Failed to find Chrome binary.'
raise BrowserNotFound, 'Failed to determine Chrome binary location.'
end

private
Expand Down