Last active
May 26, 2020 14:56
-
-
Save Alona-T/06027e306c9a2ed5924f65da364ecfd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case ENV['SERVER'] | |
when 'LOCAL' | |
................. | |
when 'BROWSERSTACK' | |
case ENV['PLATFORM'] | |
when 'ANDROID' | |
case ENV['DEVICE_NAME'] | |
when "SamsungS10E" | |
caps = {} | |
caps['build'] = 'Ruby Appium Sample' | |
caps['name'] = 'single_test' | |
caps['device'] = 'Samsung Galaxy S10e' | |
caps['platformName'] = 'android' | |
caps['browserstack.debug'] = true | |
caps['app'] = 'bs://your app from API responce' | |
appium_driver = Appium::Driver.new({ | |
'caps' => caps, | |
'appium_lib' => { | |
:server_url => "http://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub" | |
}}, true) | |
when "GooglePixel" | |
caps = {} | |
caps['build'] = 'Ruby Appium Sample' | |
caps['name'] = 'single_test' | |
caps['device'] = 'Google Pixel 3' | |
caps['platformName'] = 'android' | |
caps['browserstack.debug'] = true | |
caps['app'] = 'bs://your app from API responce' | |
appium_driver = Appium::Driver.new({ | |
'caps' => caps, | |
'appium_lib' => { | |
:server_url => "http://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub" | |
}}, true) | |
end | |
when 'iOS' | |
case ENV['DEVICE_NAME'] | |
when "iPhone11Pro" | |
caps = {} | |
caps['build'] = 'Ruby Appium Sample' | |
caps['name'] = 'single_test' | |
caps['device'] = 'iPhone 11 Pro' | |
caps['os_version'] = '13' | |
caps['platformName'] = 'iOS' | |
caps['browserstack.debug'] = true | |
caps['app'] = 'bs://your app from API responce' | |
appium_driver = Appium::Driver.new({ | |
'caps' => caps, | |
'appium_lib' => { | |
:server_url => "http://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub" | |
}}, true) | |
when "iPhone 7" | |
caps = {} | |
caps['build'] = 'Ruby Appium Sample' | |
caps['name'] = 'single_test' | |
caps['device'] = 'iPhone 7' | |
caps['os_version'] = '13' | |
caps['platformName'] = 'iOS' | |
caps['browserstack.debug'] = true | |
caps['app'] = 'bs://your app from API responce' | |
appium_driver = Appium::Driver.new({ | |
'caps' => caps, | |
'appium_lib' => { | |
:server_url => "http://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub" | |
}}, true) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment