Skip to content

Instantly share code, notes, and snippets.

@testingbot
Created April 11, 2012 20:10
Show Gist options
  • Save testingbot/2362106 to your computer and use it in GitHub Desktop.
Save testingbot/2362106 to your computer and use it in GitHub Desktop.
testingbot python
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