Module: Browsenator

Defined in:
lib/browsenator.rb,
lib/browsenator/local.rb,
lib/browsenator/local/chrome.rb,
lib/browsenator/local/safari.rb,
lib/browsenator/local/firefox.rb,
lib/browsenator/local/window_size.rb,
lib/browsenator/remote/browserstack.rb,
lib/browsenator/remote/browserstack/desktop/ie.rb,
lib/browsenator/remote/browserstack/desktop/edge.rb,
lib/browsenator/remote/browserstack/desktop/chrome.rb,
lib/browsenator/remote/browserstack/desktop/safari.rb,
lib/browsenator/remote/browserstack/mobile/iphone8.rb,
lib/browsenator/remote/browserstack/desktop/screen_size.rb,
lib/browsenator/remote/browserstack/mobile/google_pixel.rb,
lib/browsenator/remote/browserstack/browserstack_credentials.rb,
lib/browsenator/remote/browserstack/mobile/samsung_galaxy_s8.rb

Defined Under Namespace

Modules: Local, Remote

Class Method Summary collapse

Class Method Details

.for(platform, opts = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/browsenator.rb', line 7

def self.for(platform, opts = {})
  remote = opts.delete(:remote)

  case remote
  when false, nil
    Local.for(platform, opts)
  when :browserstack
    Remote::Browserstack.for(platform, opts)
  else
    raise ArgumentError, "Unknown remote: #{remote.inspect}"
  end
end