Created
April 11, 2012 20:10
-
-
Save testingbot/2362106 to your computer and use it in GitHub Desktop.
testingbot python
This file contains hidden or 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 SimpleTest(unittest.TestCase): | |
def setUp(self): | |
desired_capabilities = webdriver.DesiredCapabilities.FIREFOX | |
desired_capabilities['version'] = '11' | |
desired_capabilities['api_key'] = 'xx' | |
desired_capabilities['api_secret'] = 'xx' | |
desired_capabilities['platform'] = 'WINDOWS' | |
desired_capabilities['name'] = 'Testing Selenium 2 in Python' | |
self.driver = webdriver.Remote( | |
desired_capabilities=desired_capabilities, | |
command_executor="http://hub.testingbot.com:4444/wd/hub" | |
) | |
self.driver.implicitly_wait(30) | |
def test_one(self): | |
self.driver.get('http://testingbot.com') | |
print self.driver.title | |
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