Skip to content

Instantly share code, notes, and snippets.

@DominikDary
Created October 11, 2013 06:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominikDary/6930396 to your computer and use it in GitHub Desktop.
Save DominikDary/6930396 to your computer and use it in GitHub Desktop.
'''
@author: Dominik Dary
'''
import unittest
from selenium import webdriver
class FindElementTest(unittest.TestCase):
def setUp(self):
desired_capabilities = {'aut': 'io.selendroid.testapp:0.6.0-SNAPSHOT'}
self.driver = webdriver.Remote(
desired_capabilities=desired_capabilities,
command_executor="http://127.0.0.1:5555/wd/hub"
)
self.driver.implicitly_wait(30)
def test_find_element_by_id(self):
self.driver.get('and-activity://io.selendroid.testapp.HomeScreenActivity')
self.assertTrue("and-activity://HomeScreenActivity" in self.driver.current_url)
my_text_field = self.driver.find_element_by_id('my_text_field')
my_text_field.send_keys('Hello Selendroid')
self.assertTrue('Hello Selendroid' in my_text_field.text)
def tearDown(self):
self.driver.quit()
if __name__ == '__main__':
unittest.main()
@jerryfeng
Copy link

It is testapp:0.7.0 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment