Reputation: 1
I a long running feature in the app. (entire test can take over 45 min) I test this feature and also run selenium to do some automated data creation in the test environment. Due to the nature of the system and code often times there are error messages that can be random based on data or just time of day. What I want to know is there a way to fail the test if any popup window is displayed. (I have three areas in the test where I have 20 minute timeout function but the error messages are displayed almost immediately so I want to bail out if any error message is displayed.)
Upvotes: 0
Views: 120
Reputation: 167
You could add assertions for "popup window is not displayed". There are a couple ways I could see doing this:
This approach would cause a test to be marked as failed, but it wouldn't stop the tests from running.
I have dealt with a similar scenario using selenium with javascript, where tests run asynchronously. I'm not familiar with testing in C#.
Upvotes: 1