Skip to content

Instantly share code, notes, and snippets.

@DylanLacey
Created July 25, 2017 08:02
Show Gist options
  • Save DylanLacey/16cb5094fbfce5b8b333b6f033966017 to your computer and use it in GitHub Desktop.
Save DylanLacey/16cb5094fbfce5b8b333b6f033966017 to your computer and use it in GitHub Desktop.
Appium Lib v9+ with Test Object
require "appium_lib"
def desired_capabilities
{
caps: {
# Required: Must be present to authenticate
"testobject_api_key": 'SOMETHING',
platformName: 'Android',
deviceName: 'LG Nexus 5X',
phoneOnly: 'false',
tabletOnly: 'false',
privateDevicesOnly: 'false'
},
appium_lib: {
# Required: Either the US or the European DC
server_url: "https://us1.appium.testobject.com/wd/hub"
}
}
end
begin
@driver = Appium::Driver.new(desired_capabilities)
@driver.start_driver
ensure
@driver.driver_quit
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment