In selenium framework 2.25, I see that we have the UnexpectedAlertBehaviour enum type, but I don\'t know how to use it.
Try to do like this:
DesiredCapabilities ff = DesiredCapabilities.firefox(); ff.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR UnexpectedAlertBehaviour.ACCEPT);