docker-android/example/android/python/msite_simple_default_browser.py

27 lines
784 B
Python
Raw Normal View History

2017-01-30 14:29:47 +00:00
import unittest
from appium import webdriver
class MSiteDefaultBrowserAndroidUITests(unittest.TestCase):
def setUp(self):
desired_caps = {
'platformName': 'Android',
'deviceName': 'Android Emulator',
'appPackage': 'com.android.browser',
'appActivity': 'com.android.browser.BrowserActivity',
2017-03-01 12:30:36 +00:00
'avd': 'nexus_5_5.0'
2017-01-30 14:29:47 +00:00
}
self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
2017-01-31 10:22:32 +00:00
def test_open_url(self):
2017-01-30 14:29:47 +00:00
self.driver.get('http://targeturl.com')
def tearDown(self):
self.driver.quit()
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(MSiteDefaultBrowserAndroidUITests)
unittest.TextTestRunner(verbosity=2).run(suite)