Class: RainforestRubyRuntime::Drivers::BrowserStack
- Inherits:
-
Object
- Object
- RainforestRubyRuntime::Drivers::BrowserStack
- Defined in:
- lib/rainforest_ruby_runtime/drivers/browser_stack.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ BrowserStack
constructor
A new instance of BrowserStack.
Constructor Details
#initialize(options) ⇒ BrowserStack
Returns a new instance of BrowserStack.
8 9 10 |
# File 'lib/rainforest_ruby_runtime/drivers/browser_stack.rb', line 8 def initialize() = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/rainforest_ruby_runtime/drivers/browser_stack.rb', line 6 def end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/rainforest_ruby_runtime/drivers/browser_stack.rb', line 12 def call url = "https://#{ENV['BROWSER_STACK_USERNAME']}:#{ENV['BROWSER_STACK_PASSWORD']}@hub.browserstack.com/wd/hub" capabilities = ::Selenium::WebDriver::Remote::Capabilities.new browsers.first capabilities['browserstack.debug'] = 'true' ::.register_driver :browser_stack do |app| ::::Selenium::Driver.new(app, browser: :remote, url: url, desired_capabilities: capabilities) end end |