Created
September 13, 2012 00:39
-
-
Save jsmoxon/3711029 to your computer and use it in GitHub Desktop.
Simple Pre-Run Executable Example
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 | |
class Selenium2OnSauce(unittest.TestCase): | |
def setUp(self): | |
desired_capabilities = webdriver.DesiredCapabilities.CHROME | |
# desired_capabilities['version'] = '' | |
desired_capabilities['platform'] = 'VISTA' | |
desired_capabilities['name'] = 'Clicking links at jackmoxon.com on Chrome' | |
desired_capabilities['prerun'] = URL TO EXACT Executable | |
desired_capabilities['prerun-args'] = '--silent -a -q' | |
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_check_links(self): | |
... | |
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