Class: Capybara::Apparition::Browser::Launcher

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/apparition/browser/launcher.rb,
lib/capybara/apparition/browser/launcher/local.rb,
lib/capybara/apparition/browser/launcher/remote.rb

Defined Under Namespace

Classes: Local, Remote

Class Method Summary collapse

Class Method Details

.start(options) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/capybara/apparition/browser/launcher.rb', line 9

def self.start(options)
  browser_options = options.fetch(:browser_options, {})

  if options.fetch(:remote, false)
    Remote.start(
      browser_options
    )
  else
    Local.start(
      headless: options.fetch(:headless, true),
      browser_options: browser_options
    )
  end
end