mirror of
https://github.com/budtmo/docker-android.git
synced 2026-07-28 06:32:17 +00:00
Updated Sample and End2End Tests
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import unittest
|
||||
|
||||
from time import sleep
|
||||
|
||||
from appium import webdriver
|
||||
|
||||
|
||||
@@ -13,13 +15,24 @@ class MSiteChromeAndroidUITests(unittest.TestCase):
|
||||
'deviceName': 'Android Emulator',
|
||||
'appPackage': 'com.android.chrome',
|
||||
'appActivity': 'com.google.android.apps.chrome.Main',
|
||||
'browserName': 'chrome',
|
||||
'ignore-certificate-errors': True
|
||||
'browserName': 'chrome'
|
||||
}
|
||||
self.driver = webdriver.Remote('http://127.0.0.1:4444/wd/hub', desired_caps)
|
||||
self.driver = webdriver.Remote('http://10.161.128.186:4444/wd/hub', desired_caps)
|
||||
|
||||
def test_open_url(self):
|
||||
self.driver.get('http://targeturl.com')
|
||||
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()
|
||||
sleep(2)
|
||||
|
||||
def tearDown(self):
|
||||
self.driver.quit()
|
||||
|
||||
Reference in New Issue
Block a user