Skip to end of metadata
Go to start of metadata

This test assumes you have set your Sauce Labs authentication credentials as environment variables

You can also clone this script directly from GitHub.

Authentication over HTTP instead of HTTPS

Unlike other languages, the Selenium bindings for Python don't support connecting over HTTPS. In the code example, you can see that connection to Sauce Labs is over HTTP, while the code examples for other languages are over HTTPS. This issue is documented, along with a proposed fix, in the Selenium issue tracker: https://github.com/SeleniumHQ/selenium/issues/420

include

from appium import webdriver

desired_caps = {}
desired_caps['platformName'] = 'iOS'
desired_caps['appiumVersion'] = '1.4.16'
desired_caps['platformVersion'] = '8.4'
desired_caps['deviceName'] = 'iPhone 6'
desired_caps['browserName'] = ''
desired_caps['name'] = 'Sample Test'
desired_caps['app'] = 'https://s3.amazonaws.com/appium/TestApp8.4.app.zip'

driver = webdriver.Remote('http://YOUR_SAUCE_USERNAME:YOUR_ACCESS_KEY@ondemand.saucelabs.com:80/wd/hub', desired_caps)

# Test Actions here...

driver.quit()