定位元素,出现个问题,一直没有调通:

Traceback (most recent call last):
  File "E:/appium-test/test_opensdk20181227.py", line 32, in <module>
    driver.find_elements_by_class_name('android.widget.Button').click()
AttributeError: 'list' object has no attribute 'click'

记录下这个坑:看到没,就是这个s的问题

解决方法:

   将”driver.find_elements_by_xpath“改为“driver.find_element_by_xpath”即可解决。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐