關於 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.
代碼中少了 webdriver.chrome.driver", "C:/selemiumlib/chromedriver.exe
應該為這樣
System.setProperty("webdriver.chrome.driver", "C:/selemiumlib/chromedriver.exe");
//System.setProperty("webdriver.chrome.bin","C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");
System.setProperty("webdriver.chrome.bin","C:/Users/Admin/AppData/Local/Google/Chrome/Application/chrome.exe");
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);
driver.get("http://www.baidu.com");
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
driver.close();
System.setProperty("webdriver.chrome.driver", "C:/selemiumlib/chromedriver.exe");
不添加這一行其實也可以,但要注意系統中chrome應該只有一個,否則報錯

正在研究一個系統里有不同版本的chrome的調用方法
