I am using a Chrome Driver and trying to test a webpage.
Normally it runs fine, but sometimes I get exceptions:
org.openqa.selenium.UnhandledAlertE
DesiredCapabilities firefox = DesiredCapabilities.firefox(); firefox.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
You can use UnexpectedAlertBehaviour.ACCEPT or UnexpectedAlertBehaviour.DISMISS
UnexpectedAlertBehaviour.ACCEPT
UnexpectedAlertBehaviour.DISMISS