我試圖使用selenium weDriver加載chrome配置文件。配置文件加載正常,但嘗試加載URL時失敗。如果另一個chrome實例打開,Selenium chromedriver不會啓動URL
我注意到這個問題發生在有另一個chrome實例打開時,不管它是否被webDriver打開。我有硒2.53.1。
System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:/Users/useName/AppData/Local/Google/Chrome/User Data");
options.addArguments("--start-maximized");
driver = new ChromeDriver(options);
driver.get("www.google.com") // here is where it fails. It works fine if I close all chrome browsers before I run the test
那不是possible.But你可以調整根據您的需要圍繞[看看這個](http://stackoverflow.com/q/27630091/3122133) – Madhan