Use Google app to access the page link when you test the page
Def setUp (Self):
Print"Set up env for Android testing ...")
Self.desired_caps = {
' PlatformName ':' Android ',
' Platformversion ':' 5.1.1 ',
' DeviceName ':' Kiw-tl00 ',
' Browsername ':‘‘,
' Apppackage ':' Com.android.chrome ',
' Appactivity ':' Org.chromium.chrome.browser.ChromeTabbedActivity ',
Unicodekeyboard ': Resetkeyboard ': ' true '
}
self.driver = Webdriver. Remote (command_executor= "http:/ /localhost:4723/wd/hub ', desired_capabilities= Self.desired_caps)
self.driver.get ( http://release.thy360.com/o2o_weixin/index.html#/tab/ Platformhome ')
self.driver.implicitly_wait (30)
Now that you have entered the linked Web page from the app, the next location XPath is on the Web page, so you need to switch to the Web page using the statementself.driver.switch_to.context (' webview_1 ') Self.driver.switch_to.context ()
If it is from the app to the Web () fill in "Webview_1", if the web to go to the app, fill "Native_app"
Appium processing app and Web page conversion