Appium [已解决] Appium + Android + Python 报错 ‘An element could not be located on the page using the given search parameters.’

淽沐 · 2014年05月06日 · 最后由 wangst 回复于 2016年11月14日 · 3463 次阅读

ERROR: test_godeye_main_usercenter (TestCases.Test_Usercenter.Test_Usercenter)

Traceback (most recent call last):
File"/Users/guocg/Documents/workspace/AppiumAndrTest/src/TestCases/Test_Usercenter.py", line 50, in test_usercenter self.driver.find_element_by_id('cate_icon1').click()
File "/Library/Python/2.7/site-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 199, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/Library/Python/2.7/site-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 655, in find_element
{'using': by, 'value': value})['value']
File "/Library/Python/2.7/site-packages/selenium-2.41.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 166, in execute
self.error_handler.check_response(response)
File "build/bdist.macosx-10.9-intel/egg/appium/webdriver/errorhandler.py", line 28, in check_response
raise wde
NoSuchElementException: Message: u'An element could not be located on the page using the given search parameters.'


Ran 1 test in 11.674s

FAILED (errors=1)

共收到 4 条回复 时间 点赞

等待元素的问题

求答案,我也遇到相同的问题

我的环境是 Appium+Android+java 也遇到这个问题。请问是怎么解决的,初学菜鸟一枚。

wangst [该话题已被删除] 中提及了此贴 11月14日 12:44
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册