Applicable driver not found; attempting to install with Selenium
(認知有限,如有不妥,還望告知,歡迎討論。)
背景情況: Win10, JS +?Selenium,在執(zhí)行npm test的時候報錯
完整報錯信息:
Applicable driver not found; attempting to install with Selenium Manager (Beta)
報錯相關代碼:
解決方法:
經(jīng)排查(在www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/#use-the-latest-version-of-selenium 看到),我的機子沒有安裝chromedriver,所以需要先安裝chromedriver。
先檢查本機的chrome版本,

版本

選擇windows的版本下載

4. 然后解壓放到本機的這個位置

并將這個位置路徑配置到環(huán)境變量里

5.保存上述配置,重新打開終端,執(zhí)行npm test, 成功打開chrome瀏覽器。

=END=
Reference:
[1]?blog.csdn.net/wennie11/article/details/106327648
[2] chromedriver.storage.googleapis.com/index.html
[3]?blog.csdn.net/zhoukeguai/article/details/113247342
[4]?www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/#use-the-latest-version-of-selenium
標簽: