![](/img/trans.png)
[英]ImportError: cannot import name 'Chromedriver' from 'selenium' error using ChromeDriver and Chrome through Selenium
[英]ImportError: cannot import name 'webdriver' from 'selenium' error using Selenium and WebDriver through Python
我想用 selenium 編寫一個程序,所以我想測試它,但是:
from selenium import webdriver
當我運行這個程序時,它說:
ImportError: cannot import name 'webdriver' from 'selenium'
此錯誤消息...
ImportError: cannot import name 'webdriver' from 'selenium'
...暗示當您嘗試從selenium
模塊導入webdriver
時出現ImportError
。
當您嘗試執行該行時,會觀察到此ImportError
:
from selenium import webdriver
無需安裝Selenium 。
使用 Selenium 的第一步是使用以下命令安裝Selenium Python 綁定:
pip install -U selenium
或使用以下命令升級Selenium Python 綁定:
pip install -U selenium
您可以在以下位置找到一些相關的討論:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.