運(yùn)行我的JAVA Webdriver代碼時(shí)出現(xiàn)錯(cuò)誤。與ChromeDriver有關(guān)
從此處->在下載下下載最新版本的Chrome驅(qū)動(dòng)程序。
下載zip文件并解壓縮內(nèi)容。內(nèi)容將包含您需要使用的exe。您也可以使用-進(jìn)行設(shè)置
System.setProperty('webdriver.chrome.driver', 'C:://you_path_for_exe//chromedriver.exe');解決方法
當(dāng)我嘗試運(yùn)行以下代碼時(shí),出現(xiàn)與錯(cuò)誤有關(guān)的信息ChromeDriver。
我對(duì)此 并不陌生, 但是 我可以看到代碼到達(dá)了第11行,但隨后失敗了 。
線程“主”中的異常java.lang.IllegalStateException:驅(qū)動(dòng)程序可執(zhí)行文件不存在:org上位于com.google.common.base.Preconditions.checkState(Preconditions.java:199)的C:Matts Learning ChromeDriver ChromeDriver。位于org.openqa.selenium.chrome.ChromeDriverService的org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:116)的openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:121)在org.openqa.selenium.remote.service.DriverService$ Builder.build(DriverService.java)處訪問$000(ChromeDriverService.java:32)在org.openqa.selenium.chrome.ChromeDriverService$ Builder.findDefaultExecutable(ChromeDriverService.java:137):296),網(wǎng)址:org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)。位于TestTiscaliLogin.main的openqa.selenium.chrome.ChromeDriver。(ChromeDriver.java:116)(TestTiscaliLogin.java:13)
相關(guān)文章:
1. javascript - 如何將一個(gè)div始終固定在某個(gè)位置;無論屏幕和分辨率怎么變化;div位置始終不變2. html - vue項(xiàng)目中用到了elementUI問題3. javascript - 原生canvas中如何獲取到觸摸事件的canvas內(nèi)坐標(biāo)?4. javascript - vscode alt+shift+f 格式化js代碼,通不過eslint的代碼風(fēng)格檢查怎么辦。。。5. javascript - 求解答:實(shí)例對(duì)象調(diào)用constructor,此時(shí)constructor內(nèi)的this的指向?6. javascript - 有什么比較好的網(wǎng)頁版shell前端組件?7. java - 如何寫一個(gè)intellij-idea插件,實(shí)現(xiàn)編譯時(shí)修改源代碼的目的8. javascript - [js]為什么畫布里不出現(xiàn)圖片呢?在線等9. java 中Long 類型如何轉(zhuǎn)換成Double?10. html5 - 有可以一次性把所有 css外部樣式轉(zhuǎn)為html標(biāo)簽內(nèi)style=" "的方法嗎?
