【robot framework】運行時報錯"WebDriverException: Message: 'chromedriver' executable needs to be in PATH"


報錯提示找不到chromedriver,因為我用的瀏覽器是chrome,因此需要下載瀏覽器驅動chromedriver;

【下載地址】:http://chromedriver.storage.googleapis.com/index.html

1. 不同的chrome版本對應的瀏覽器驅動不一樣,通過在chrome瀏覽器中輸入chrome://help(或者點擊瀏覽器的幫助-->關於Google Chrome)來查看瀏覽器的版本;

2. 在網上找到chromedriver與chrome的對應表,可以參考博客:https://blog.csdn.net/huilan_same/article/details/51896672

3. 下載對應chrome版本的chromedriver,下載后解壓;

4. 將chromedriver.exe拷貝到chrome的安裝目錄(通過右鍵點擊chrome瀏覽器圖標-->屬性-->目標獲取chrome的安裝目錄),我的是:C:\Users\Administrator\AppData\Local\Google\Chrome\Application,並將該目錄放到windows環境變量PATH中,之后再次運行,OK!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM