Robot Framework provides native solution how to wait for element to be visible and vice versa. But using such keywords as
Wait Until Element Is Not Visible
or Wait Until Element Is Visible
with timeout often fails with stale element exception.
And I try not to use these keywords in my test scripts to avoid possible undesirable flakiness.
Often enough I need to know when the loader element has already disappeared and I can continue to perform further actions and verifications.
In such cases I use a kind of Wait Until Element Is Not Visible
workaround.
This keyword can be modified a little bit to accept ‘15’ or any other value - seconds to wait - as a parameter: