Created
January 9, 2014 10:01
-
-
Save DominikDary/8331957 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
import unittest | |
from selenium import webdriver | |
class Bug167(unittest.TestCase): | |
def setUp(self): | |
desired_capabilities = {'aut': 'io.selendroid.testapp:0.7.0','androidTarget':'ANDROID19'} | |
self.driver = webdriver.Remote( | |
desired_capabilities=desired_capabilities, | |
command_executor="http://127.0.0.1:5555/wd/hub" | |
) | |
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) | |
self.driver.find_element_by_id('buttonStartWebView').click() | |
self.driver.find_element_by_class_name("android.webkit.WebView") | |
self.driver.switch_to_window("WEBVIEW") | |
field = self.driver.find_element_by_id("name_input") | |
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