Appium自动化测试报错'WebDriver' object has no attribute 'find_element_by_id'
问题:Appium自动化测试报错'WebDriver' object has no attribute 'find_element_by_id'
原因:在新版本的Selenium Webdriver中,find_element_by_*系列的方法已经被废弃
解决:使用新的方法find_element()结合By类进行元素定位。
需要从selenium.webdriver.common.by导入By类,然后使用find.element()方法,并传递By.ID作为第一个参数,以及想要查找的元素的ID作为第二个参数
举例:


浙公网安备 33010602011771号