In my Vaadin web application tested by Selenium IDE (not Vaadin Testbench - I am aware of it, but I dont wanna use it) I want to verify, that error message pop-up was NOT triggered => so the test can continue running.
I have no problem with identifying the pop-up. Its locator is
css=div.v-Notification.failure
and I have checked that Selenium IDE recognizes presence of this element correctly.
But there is a problem with delay in my webapp. When Selenium IDE clicks a GUI element, the request for data is sent to ESB. When the ESB is turned off or some error occurs, webapp is notified and it displays the error popup. However, this doesn't occure immideately, processing of the request takes some time.
So testing assertElementNotPresent
always passes, as the pop up is not yet generated right after GUI click. I know the article about AJAX testing in Selenium, but it doesn't help me in this case either, because waitForElementNotPresent
also immideately assumes the pop up is not there, although it appears just a few moments later... And obviously I can't use opposite waitForElementPresent
, because I want my test to continue when the error pop up is not there.
The only thing that is "working" is hardcoded pause
step in test, but this is not the good way (refer to linked article, if you doubt why...also I don't want my test suite to take ages with a lot of pauses).
Any other ideas or approaches, that could enlight me a bit?