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
|
.binary_path=(path) ⇒ Object
44
45
46
47
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 44
def self.binary_path=(path)
Platform.assert_executable(path)
@binary_path = path
end
|
.launcher(*args) ⇒ Object
Instance Method Details
#launch(server_url) ⇒ Object
49
50
51
52
53
54
55
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 49
def launch(server_url)
create_extension
create_profile
launch_chrome server_url
pid
end
|
#quit ⇒ Object
57
58
59
|
# File 'lib/selenium/webdriver/chrome/launcher.rb', line 57
def quit
@process.stop
end
|