But when image disappears from DOM, Katalon throws StaleElementReferenceException. Seems like waitForElementNotVisible method work only for objects that are permanently existing in HTML code of the page. But my intentions are to have method which determine element visibility from user’s perspective: user just wants to confirm that they doesn’t see that element in the application anymore (no matter what the reason is).
So, the question is: is there a way to use Katalon-native methods to implement my needs? Or should I implement that mechanism on my own?
Thanks, but what if the element will become hidden instead of just disappearing from the DOM? THe logic I would like to be implemented is as following: element is treated “disappeared” when it is:
becomes invisible
is removed from the HTML page code
Both situations look similar to the user, and when we use BDD approach, we would like to behave as a user when testing application. So, the step would be “The I confirm element disappear in 10 seconds”. And when it comes to implementation, it’s great to have a method which returns TRUE for both situations: whether element is invisible or it is not present in DOM.