Skip to content

Instantly share code, notes, and snippets.

@rafalf
Created October 24, 2016 15:50
Show Gist options
  • Save rafalf/22653ea09d83f3ea2674259371863665 to your computer and use it in GitHub Desktop.
Save rafalf/22653ea09d83f3ea2674259371863665 to your computer and use it in GitHub Desktop.
appium test
class ChromeTests(unittest.TestCase):
def setUp(self):
desired_caps = {
'platformName': 'Android',
'platformVersion': '5.1.1',
'deviceName': 'Android Emulator',
'browserName': 'Chrome'
}
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
def tearDown(self):
self.driver.quit()
def test_find_single_element(self):
self.driver.get('www.google.com')
self.driver.find_element_by_link_text('Google Search').click()
if __name__ == "__main__":
suite = unittest.TestLoader().loadTestsFromTestCase(ChromeTests)
unittest.TextTestRunner(verbosity=2).run(suite)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment