lib/webdrivers/chrome_finder.rb in webdrivers-4.1.1 vs lib/webdrivers/chrome_finder.rb in webdrivers-4.1.2
- old
+ new
@@ -44,10 +44,12 @@
envs.each do |root|
option = "#{ENV[root]}\\#{dir}\\#{file}"
return option if File.exist?(option)
end
end
+
+ nil
end
def mac_location
directories = ['', File.expand_path('~')]
files = ['/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
@@ -57,10 +59,12 @@
files.each do |file|
option = "#{dir}/#{file}"
return option if File.exist?(option)
end
end
+
+ nil
end
def linux_location
directories = %w[/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /opt/google/chrome]
files = %w[google-chrome chrome chromium chromium-browser]
@@ -69,9 +73,11 @@
files.each do |file|
option = "#{dir}/#{file}"
return option if File.exist?(option)
end
end
+
+ nil
end
def win_version(location)
System.call("powershell (Get-ItemProperty '#{location}').VersionInfo.ProductVersion")&.strip
end