我登录后,点击【个人中心】图标,进入个人中心页面后,发现获取不到页面元素,打印出的 page_source 是上一个页面的内容,但是 NATIVE_APP 只有一个,且没有 webview,这种问题怎么解决呢?
环境:appium1.9.1
语言:Python2.7
Error
Traceback (most recent call last):
File "E:\workspace\python2.7\lib\unittest\case.py", line 329, in run
testMethod()
File "F:\autotest\AutoTestDesk\TestCases\Ksh\yakDriver\homePage.py", line 38, in test1
driver.find_element_by_id('com.just.busdriver:id/iv_back')
File "F:\autotest\AutoTestDesk\selenium\webdriver\remote\webdriver.py", line 359, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "E:\workspace\python2.7\lib\site-packages\appium\webdriver\webdriver.py", line 222, in find_element
'value': value})['value']
File "F:\autotest\AutoTestDesk\selenium\webdriver\remote\webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "E:\workspace\python2.7\lib\site-packages\appium\webdriver\errorhandler.py", line 29, in check_response
raise wde
NoSuchElementException: Message: An element could not be located on the page using the given search parameters.