Created
October 11, 2013 06:28
-
-
Save DominikDary/6930396 to your computer and use it in GitHub Desktop.
This file contains 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
''' | |
@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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is testapp:0.7.0 now