Updated Sample and End2End Tests

This commit is contained in:
butomo1989
2017-06-02 14:49:55 +02:00
parent dcf196ec4a
commit 47e968927a
5 changed files with 40 additions and 8 deletions
+2 -1
View File
@@ -121,7 +121,8 @@ def appium_run(avd_name: str):
subprocess.check_call('xterm -T "{title}" -n "{title}" -e \"{cmd}\"'.format(title=title, cmd=cmd), shell=True)
def create_node_config(avd_name: str, browser_name: str, appium_host: str, appium_port: int, selenium_host: str, selenium_port: int):
def create_node_config(avd_name: str, browser_name: str, appium_host: str, appium_port: int, selenium_host: str,
selenium_port: int):
"""
Create custom node config file in json format to be able to connect with selenium server.
+1 -1
View File
@@ -4,7 +4,7 @@ from unittest import TestCase
from appium import webdriver
class TestE2EApp(TestCase):
class TestE2EAndroidApk(TestCase):
def setUp(self):
desired_caps = {
+11
View File
@@ -18,5 +18,16 @@ class TestE2EChrome(TestCase):
def test_open_url(self):
self.driver.get('http://google.com')
# Handle Welcome Home
self.driver.switch_to.context('NATIVE_APP')
self.driver.find_element_by_id('terms_accept').click()
self.driver.find_element_by_id('negative_button').click()
# Search for Github
self.driver.switch_to.context('CHROMIUM')
search = self.driver.find_element_by_name('q')
search.send_keys('butomo1989 docker-android')
search.submit()
def tearDown(self):
self.driver.quit()