2016-01-26 69 views
0

我在與chromeDriver在Windows 7上運行的硒,我發現了以下錯誤麻煩:錯誤使用硒chromedriver 7 64位

Jan 27, 2016 11:52:57 AM org.openqa.selenium.os.UnixProcess checkForError 
SEVERE: org.apache.commons.exec.ExecuteException: 
Execution failed (Exit value: -559038737. Caused by java.io.IOException: 
Cannot run program "C:\testproject\target\resources\chromedriver.exe" 
(in directory "."): CreateProcess error=193, %1 is not a valid Win32 application) 

雙擊Eclipse之外司機給出了一個窗口錯誤(不是有效的Win32應用程序)

是否有一些技巧讓它在64位Windows 7環境中工作?

+0

我應該說「雙擊eclipse之外的驅動程序*也會給出一個Windows錯誤」。 –

+0

當使用路徑:「webdriver.chrome.driver」和驅動程序chromedriver.exe離開站點時:http://chromedriver.storage,導致錯誤(在Java中)的代碼是:new ChromeDriver();,; googleapis.com/index.html?path=2.20/ –

+0

您確定您下載了Windows版ChromeDriver,而不是Linux版嗎?並且它已正確下載/解壓縮? –

回答

0

經過一番閱讀後,似乎ChromeDriver可執行文件需要在您的PATH上。僅僅指出webdriver.chrome.driver是不夠的,因爲大概其他進程需要能夠找到它。

https://sites.google.com/a/chromium.org/chromedriver/getting-started(下「幫助的webdriver找到下載的可執行ChromeDriver」),也https://splinter.readthedocs.org/en/0.1/setup-chrome.html

+0

您也可以使用指向ChromeDriver的參數啓動Selenium服務器:java -jar selenium-server-standalone-2.48.2.jar -Dwebdriver.chrome.driver = chromedriver .exe' –

0

今天,在今天硒正常運行之前,我遇到了同樣的錯誤。我發現這個錯誤是由我的電腦殺毒軟件引起的,關閉殺毒軟件後一切正常。