I want to handle this exception in JAVA & SELENIUM
In my code i did this:
Alert alert = driver.switchTo().alert(); alert.accept();
driver.findElement(By.xpath("//*[@id=\"btnGoConfirm\"]")).click();
The problem is that sometimes the popup does not appear and the exception in thrown because it cannot click on anything at all, do you get me?
How should i handle this particular situation?