I got an issue with Selenium throwing timeout exception
because of a pop up window
unexpected alert open
not provide any stacktrace inform
If you need to take action on each alert in your tests individually, the driver gives you the option to switch to the alert and decide to either accept or dismiss it.
driver.switchTo().alert().accept();
When you want all the alerts handled in the same way, you can set a global capability at the start of the test execution to ACCEPT, INGORE or DISMISS alerts by default when they appear.
capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
Alternatively, you could use Robot class to send an Enter key event, which would accept the alert.
Robot r = new Robot();
r.keyPress(KeyEvent.VK_ENTER);
r.keyRelease(KeyEvent.VK_ENTER);