Skip to content

Instantly share code, notes, and snippets.

@alexglow
Last active August 29, 2015 13:56
Show Gist options
  • Save alexglow/9184944 to your computer and use it in GitHub Desktop.
Save alexglow/9184944 to your computer and use it in GitHub Desktop.
Sauce test with Selenium relay
import unittest
from selenium import webdriver
from time import sleep
class Selenium2OnSauce(unittest.TestCase):
def setUp(self):
desired_capabilities = webdriver.DesiredCapabilities.INTERNETEXPLORER
desired_capabilities['platform'] = 'Windows 2008'
desired_capabilities['version'] = '9'
desired_capabilities['name'] = 'test se relay'
self.driver = webdriver.Remote(
desired_capabilities=desired_capabilities,
command_executor="http://USERNAME:API-KEY@localhost:4445/wd/hub"
)
self.driver.implicitly_wait(30)
def test_sauce(self):
self.driver.get('www.google.com')
def tearDown(self):
self.driver.quit()
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment