Class: Selenium::WebDriver::Chrome::Launcher::WindowsLauncher
Instance Attribute Summary
#pid
Class Method Summary
collapse
Instance Method Summary
collapse
binary_path, #initialize, #launch, launcher
Class Method Details
.possible_paths ⇒ Object
118
119
120
121
122
123
124
125
126
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 118
def self.possible_paths
[
registry_path,
"#{ENV['USERPROFILE']}\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe",
"#{ENV['USERPROFILE']}\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
"#{Platform.home}\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe",
"#{Platform.home}\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
].compact
end
|
.registry_path ⇒ Object
128
129
130
131
132
133
134
135
136
137
138
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 128
def self.registry_path
require "win32/registry"
reg = Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe")
reg[""]
rescue LoadError
nil
rescue Win32::Registry::Error
nil
end
|
Instance Method Details
#quit ⇒ Object
140
141
142
143
144
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 140
def quit
@process.kill if Platform.engine == :ruby
super
end
|