class Browsenator::Remote::Browserstack
Attributes
caps[R]
Public Class Methods
for(platform, opts = {})
click to toggle source
# File lib/browsenator/remote/browserstack.rb, line 16 def for(platform, opts = {}) return platform_class[platform].new(opts).open if platform_class.key?(platform) raise ArgumentError, "Unknown Browserstack platform: #{platform.inspect}" end
Private Class Methods
platform_class()
click to toggle source
# File lib/browsenator/remote/browserstack.rb, line 24 def platform_class { chrome: Desktop::Chrome, safari: Desktop::Safari, edge: Desktop::Edge, ie: Desktop::IE, samsung_galaxy_s8: Mobile::SamsungGalaxyS8, google_pixel: Mobile::GooglePixel, iphone8: Mobile::Iphone8 } end
Public Instance Methods
open()
click to toggle source
# File lib/browsenator/remote/browserstack.rb, line 37 def open Watir::Browser.new :remote, options end
Private Instance Methods
options()
click to toggle source
# File lib/browsenator/remote/browserstack.rb, line 45 def options { url: "http://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub", desired_capabilities: caps } end