![](/img/trans.png)
[英]Python - Web Scraping - Selenium - AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath
[英]AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath' in robotframework
它向我顯示 AttributeError 錯誤:'WebDriver' object 在機器人框架中沒有屬性'find_elements_by_xpath',我正在使用 pycharm
現在不推薦使用find_element_by_name
、 find_element_by_xpath
、 find_element_by_id
等所有方法。
您應該使用find_element(By.
代替。
所以,而不是
driver.find_element_by_xpath("your_xpath")
應該是現在
driver.find_element(By.XPATH, "your_xpath")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.