In selenium framework 2.25, I see that we have the UnexpectedAlertBehaviour enum type, but I don’t know how to use it.
In selenium framework 2.25, I see that we have the UnexpectedAlertBehaviour enum type, but
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this portion of documentation on your issue:
This may be useful for other people as well:
v2.25.0
=======
WebDriver:
Added API for dealing with BASIC and DIGEST authentication
dialogs. Currently not implemented in any drivers.
Warn users that the IE driver will no longer use the DLL in the
next release.
Deprecated browser specific WebElement subclasses.
Added support for “requiredCapabilities” to the remote webdrivers
and implemented basic support for these in the firefox
driver. Failure to fulfull a required capability will cause a
SessionNotCreatedException to be thrown.
Added the ability to determine how unhandled alerts should be
handled. This is handled by the “unexpectedAlertBehaviour”
capability, which can be one of “accept”, “dismiss” or
“ignore”. Java code should use the UnexpectedAlertBehaviour
enum. This is only implemented in Firefox for now.
Allow native events to be configured in Firefox and
(experimentally) in IE using the “nativeEvents” capability.
Updated supported versions of Firefox to 17.
…..
Whole list provided here
An here is the source
As I see you use unexpectedAlertBehaviour to decide whether alert is unhandled and if it is so, you’ll decide how to handle it.
I suppose it should be something like (my assumption):