Last active
August 29, 2015 13:56
-
-
Save alexglow/9184944 to your computer and use it in GitHub Desktop.
Sauce test with Selenium relay
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
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