Class: Selenium::WebDriver::Chrome::Launcher
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Chrome::Launcher
show all
- Includes:
- FileUtils
- Defined in:
- lib/selenium/webdriver/chrome/launcher.rb
Defined Under Namespace
Classes: MacOSXLauncher, UnixLauncher, WindowsLauncher
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(opts = {}) ⇒ Launcher
Returns a new instance of Launcher.
26
27
28
29
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 26
def initialize(opts = {})
@default_profile = opts[:default_profile]
@secure_ssl = !!opts[:secure_ssl]
end
|
Instance Attribute Details
#pid ⇒ Object
Returns the value of attribute pid.
9
10
11
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 9
def pid
@pid
end
|
Class Method Details
.binary_path ⇒ Object
31
32
33
34
35
36
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 31
def self.binary_path
@binary_path ||= (
path = possible_paths.find { |f| File.exist?(f) }
path || raise(Error::WebDriverError, "Could not find Chrome binary. Make sure Chrome is installed (OS: #{Platform.os})")
)
end
|
.launcher(*args) ⇒ Object
Instance Method Details
#launch(server_url) ⇒ Object
38
39
40
41
42
43
44
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 38
def launch(server_url)
create_extension
create_profile
launch_chrome server_url
pid
end
|
#quit ⇒ Object
46
47
48
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 46
def quit
@process.ensure_death
end
|