Created
August 15, 2014 10:22
-
-
Save loa/e3f15ee2f433ce4d29c1 to your computer and use it in GitHub Desktop.
Selenium Webdriver - Smoke test
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
#!/usr/bin/env python | |
from selenium import webdriver | |
import unittest | |
import sys | |
class ExampleTestCase(unittest.TestCase): | |
hub_address="http://selenium:4444" | |
def setUp(self): | |
desired_cap = webdriver.DesiredCapabilities.FIREFOX | |
desired_cap['platform'] = 'LINUX' | |
self.driver = webdriver.Remote("%s/wd/hub" % self.hub_address, desired_cap) | |
def test_grid_overview(self): | |
self.driver.get("%s/grid/console" % self.hub_address) | |
self.assertEqual(self.driver.title, "Grid Console") | |
def test_google(self): | |
self.driver.get("http://google.com") | |
self.assertEqual(self.driver.title, "Google") | |
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