Skip to content

Instantly share code, notes, and snippets.

@jsmoxon
Created September 12, 2012 23:33
Show Gist options
  • Save jsmoxon/3710764 to your computer and use it in GitHub Desktop.
Save jsmoxon/3710764 to your computer and use it in GitHub Desktop.
Setup Method
import unittest
from selenium import webdriver
class Selenium2OnSauce(unittest.TestCase):
def setUp(self):
desired_capabilities = webdriver.DesiredCapabilities.IPHONE
desired_capabilities['version'] = '5.0'
desired_capabilities['platform'] = 'MAC'
desired_capabilities['name'] = 'Testing Selenium 2 in Python at Sauce'
self.driver = webdriver.Remote(
desired_capabilities=desired_capabilities,
command_executor="http://username:API_KEY@ondemand.saucelabs.com:80/wd/hub"
)
self.driver.implicitly_wait(30)
def test_sauce(self):
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment