-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle alerts #1788
Comments
I found a temporary solution to solve my problem: let hasAlert = function () {
try {
browser.getTitle();
}
catch (error) {
return error.seleniumStack.type === 'UnexpectedAlertOpen';
}
return false;
} |
@christian-bromann What is the desired behaviour here? Right now |
I just tested this against master, and it seems that 8b12008 has fixed this issue. I tested all three functions ( The current behaviour on master for all three functions (as mentioned in the previous paragraph): throw an exception with the Based on that, I would say this could be closed... unless throwing errors is not expected behaviour. If it is expected behaviour @christian-bromann, comment so and I can add something to the docs around an exception being thrown if no alert was present. |
@jankcat, thanks for your investigation! |
The problem
There are no any exceptions for the following commands:
alertAccept
,alertDismiss
,alertText
.This test will be finished in an hour. At least, this situation looks like a big problem for me and other people who don't know about that.
In accordance with the WebDriver protocol these errors should be handled
The log
1788.zip
The text was updated successfully, but these errors were encountered: