я получаю UnhandledBrowserException при попытке ниже код в хроме:UnReachableBrowserException в темэ с Selenium WebDriver
общественного класса MyClass {
public static void main(String[] args) {
// declaration and instantiation of objects/variables
System.setProperty("webdriver.chrome.driver", "C://Program Files (x86)//Google//Chrome//Application//chrome.exe");
WebDriver driver= new ChromeDriver();
String baseURL = "http://newtours.demoaut.com";
String expectedTitle = "Welcome: Mercury Tours";
String actualTitle = "";
// launch Firefox and direct it to the Base URL
driver.get(baseURL);
// get the actual value of the title
actualTitle = driver.getTitle();
/*
* compare the actual title of the page witht the expected one and print
* the result as "Passed" or "Failed"
*/
if (actualTitle.contentEquals(expectedTitle)){
System.out.println("Test Passed!");
} else {
System.out.println("Test Failed");
}
//close Firefox
driver.close();
// exit the program explicitly
System.exit(0);
}
Он запускает новую сессию в хроме, но затем бросает исключение. Любая помощь будет высоко оценен.
Возможный дубликат [UnreachableBrowserException пытается запустить в Selenium WebDriver, используя IEDriver] (http://stackoverflow.com/questions/17066424/unreachablebrowserexception-trying-to-launch-in-selenium- может webdriver-using-iedrive) – Guy
Исключение публикации всегда приятно. – SkorpEN