Class: AutomationHelpers::Drivers::V4::Browserstack
- Inherits:
-
Object
- Object
- AutomationHelpers::Drivers::V4::Browserstack
- Defined in:
- lib/automation_helpers/drivers/v4/browserstack.rb
Overview
The Browserstack Driver that will connect to a hosted grid This requires a series of pre-set values to be passed in
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#browserstack_options ⇒ Object
readonly
Returns the value of attribute browserstack_options.
-
#device_options ⇒ Object
readonly
Returns the value of attribute device_options.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(browser, browserstack_options, device_options = {}, options = Options.for(browser)) ⇒ Browserstack
constructor
#### Initial setup options.
-
#register ⇒ Nil
Register a new driver with the default selenium name for use in a remote browserstack setup.
Constructor Details
#initialize(browser, browserstack_options, device_options = {}, options = Options.for(browser)) ⇒ Browserstack
#### Initial setup options
-
browser (required) - When instantiating, the first argument must be the symbol that represents what browser to use
-
browserstack_options (required) - A Hash of all required options that will be parsed and used to setup the driver
-
:build_name (String) -> The build name to be stored on browserstack servers
-
:project_name (String) -> The project name to be stored on browserstack servers
-
:session_name (String) -> The session name to be stored on browserstack servers
-
:browserstack_debug_mode (Boolean) -> Set this to true to run in browserstack debug mode (Note this runs slower!)
-
:config (String) -> This is an underscore separated key that distils the granular running information i.e. Windows_7_86 means run on Windows Operating System, OS Version 7, Browser Version 86 i.e. OSX_Mojave_12 means run on Mac Operating System, OS Version Mojave, Browser Version 12 i.e. Windows_10_92 means run on Windows Operating System, OS Version 10, Browser Version 92
-
:username (String) -> The username for Browserstack
-
:api_key (String) -> The api key for Browserstack
-
-
device_options (optional) - A Hash of all device specific options that can customise your device
-
:device_name (String) -> The name of your device
-
:os_version (String) -> The operating system for your device
-
-
options (optional) -> You can instantiate an Options payload that can be used when registering your driver
37 38 39 40 41 42 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 37 def initialize(browser, , = {}, = Options.for(browser)) @browser = browser = = = end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
17 18 19 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 17 def browser @browser end |
#browserstack_options ⇒ Object (readonly)
Returns the value of attribute browserstack_options.
17 18 19 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 17 def end |
#device_options ⇒ Object (readonly)
Returns the value of attribute device_options.
17 18 19 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 17 def end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
17 18 19 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 17 def end |
Instance Method Details
#register ⇒ Nil
Register a new driver with the default selenium name for use in a remote browserstack setup
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/automation_helpers/drivers/v4/browserstack.rb', line 47 def register .register_driver :selenium do |app| ::Selenium::Driver.new( app, browser: :remote, capabilities: [desired_capabilities, ], url: browserstack_hub_url ) end end |