我試圖用Selenium Webdriver
啓動Chrome和使用下面的代碼:如何在Selenium webdriver中打開chrome?
System.setProperty("webdriver.chrome.driver",
"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
WebDriver driver=new ChromeDriver();
driver.get("http://www.yahoo.com");
Chrome瀏覽器打開,但沒有進一步進行。可能是以下錯誤的原因:
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
我認爲zip文件可用於32位,但我使用的是64位機器。無論如何,我下載仍然得到相同的錯誤 – Shyamala
@Shyamala似乎目前沒有WinD64位的ChromeDriver。 [不知道,可能是Win-32 bit works] –
您是否嘗試過我選擇複選框的解決方案?嘗試我的用例,而不是Thread.sleep() –