lib/selenium/webdriver/chrome/launcher.rb in selenium-webdriver-0.0.27 vs lib/selenium/webdriver/chrome/launcher.rb in selenium-webdriver-0.0.28
- old
+ new
@@ -22,12 +22,12 @@
launcher
end
def initialize(opts = {})
- super()
@default_profile = opts[:default_profile]
+ @secure_ssl = !!opts[:secure_ssl]
end
def self.binary_path
@binary_path ||= (
path = possible_paths.find { |f| File.exist?(f) }
@@ -79,37 +79,41 @@
unless @default_profile
args << "--user-data-dir=#{Platform.wrap_in_quotes_if_necessary tmp_profile_dir}"
end
+ unless @secure_ssl
+ args << "--ignore-certificate-errors"
+ end
+
args << server_url
@process = ChildProcess.new(*args).start
end
def ext_path
@ext_path ||= ZipHelper.unzip("#{WebDriver.root}/selenium/webdriver/chrome/extension.zip")
end
def tmp_extension_dir
- @tmp_extension_dir ||= begin
+ @tmp_extension_dir ||= (
dir = Dir.mktmpdir("webdriver-chrome-extension")
Platform.make_writable(dir)
FileReaper << dir
dir
- end
+ )
end
def tmp_profile_dir
- @tmp_profile_dir ||= begin
+ @tmp_profile_dir ||= (
dir = Dir.mktmpdir("webdriver-chrome-profile")
Platform.make_writable(dir)
FileReaper << dir
dir
- end
+ )
end
class WindowsLauncher < Launcher
def self.possible_paths
[
@@ -147,10 +151,13 @@
end
class MacOSXLauncher < UnixLauncher
def self.possible_paths
- ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "#{Platform.home}/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"]
+ [
+ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
+ "#{Platform.home}/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
+ ]
end
end
end # Launcher
end # Chrome