我试图使用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