I’ve been trying to handle alert in Selenium using chrome 54.0.2840.87 (currently the latest chrome version) and chromedriver 2.25 (currently the latest chromedriver) without success. I’ve made sure this is an alert and not a popup (There’s no inspect element option).
Also I’ve made sure that there’s no timing issue, by placing a breakpoint before the code which handle the alert, but it gives exception: org.openqa.selenium.NoAlertPresentException: no alert open
This is the code I’ve been trying to use, without success:
driver.switchTo().alert().accept();
Also tried to wait for the alert to be present using the code, without success:
wait.until(ExpectedConditions.alertIsPresent());
Also tried to use javascript executeScript to accept the alert without success:
((JavascriptExecutor)m_driver).executeScript("window.confirm = function(msg){return true;};");
Link to the alert I’ve received: https://i.stack.imgur.com/n8FcE.png
Thanks for your help.