- self.driver.find_element_by_name('分享样式1').click()
- self.driver.find_element_by_name('UMS sina icon').click()
- sleep(2)
- print self.driver.contexts
- context_name = 'WEBVIEW_1'
- self.driver.switch_to.context(context_name)
- sleep(2)
- self.driver.find_elements_by_xpath('//input[@id="userId"]')[0].send_keys('test@126.com')
- self.driver.find_elements_by_xpath('//input[@id="passwd"]')[0].send_keys('test')
- self.driver.find_elements_by_xpath('//a[@class="btnP"]')[0].click()
- sleep(2)
- self.driver.switch_to.context('NATIVE_APP')
- self.driver.find_element_by_name('UMS nav button send').click()
appium切换Native_app和webview_1
最新推荐文章于 2024-02-21 21:46:46 发布