We have quite a bunch of Robot Framework tests for our application. We experience random occurrences of failed tests. One of the scenario’s that occurs is that a pop-up is displayed in an overlay with a message that a general exception has occurred. There is a button on this pop-up to display the details.
What I would like to do is that I can start a keyword when a test fails because of a time-out. Because when this happens, I would like to be able to search for the modal pop-up and if it is available, I would like to expand the details and take a screenshot.
Would something like this be possible? Preferably without changing all the tests that we have but instead have this as a suite event or something like that.
Thanks in advance.
P.S. In addition I would like to have insights in the console logs, but as I read in some other threads this is a challenge on its own…
You were spot on with your suggestion to refresh browser cache. I will use this in combination with ‘Register keyword to run on failure’ to try to get additional info when when our tests run into a problem situation.