Appium 运行 android_contact.py 例子时报错,请大侠指点小女子

小花花 · 2014年05月09日 · 最后由 恒温 回复于 2014年05月10日 · 1421 次阅读
ERROR: test_add_contacts (__main__.ContactsAndroidTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python33\Scripts\android_contact.py", line 55, in test_add_contacts
    self.driver.find_element_by_name("Save").click()
  File "C:\Python33\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 295, in find_element_by_name
    return self.find_element(by=By.NAME, value=name)
  File "C:\Python33\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 655, in find_element
    {'using': by, 'value': value})['value']
  File "C:\Python33\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 166, in execute
    self.error_handler.check_response(response)
  File "C:\Python33\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 164, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: 'An element could not be located on the page using the given search parameters.' 

----------------------------------------------------------------------
Ran 1 test in 77.345s

FAILED (errors=1)
共收到 1 条回复 时间 点赞
in test_add_contacts
   self.driver.find_element_by_name("Save").click()

这段代码找不到元素啊

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册