user1627133
user1627133

Reputation: 11

Unexpected event handling in webdriver/ selenium

Is it possible for selenium to wait for an user input if an unexpected event occurs in the script(like a message box/ new window/ warning / alert or any other interruption)? For example if some new functionality is added to the code and when selenium script is run, the test shouldn't break but should wait for manual intervention where the condition in the new functionality occurs.

Upvotes: 1

Views: 863

Answers (1)

Dhivya
Dhivya

Reputation: 699

As we are automating the testing its meaningless if there requires user interruption, you have to handle all the unexpected events too.. I will try to give you one solution for that unexpected message box you can check whether the close button of that message box is visible or not and if it is visible then you can close that box..

Upvotes: 1

Related Questions