TestProject Forum
Powered by leading experts in the test automation community

Wait till the loader goes away

got a situation, I have a card/grid on a page.
when user logs in, the page gets loaded but there is another loader in the card which can take few secs to a min to fetch the details. I am looking for some kind of wait till the loader goes away, I don’t want to use pause as the time varies.
In appium,i was using waitForInvisibilityOfElementWithTimeout(element, 45) , how can I achieve such wait ? (wait till the loader goes away. )
I did check the forum, all I found was code used in Appium /selenium. Thanks!

Hello, you can use the is Invisible action with the adaptive wait, it will wait for that time until the item is invisible.
If it is invisible it will pass if it visible it will fail after the given adaptive time.
So you can give it some value for adaptive time, where it will wait for the item to become invisible and then the step will pass.

Another thing you can do is to add an Is Visible validation on one of the basic elements in the page after the loader disappears.
For example some text of image that should be visible after the loader is finished.

Hi Ran , I did see in one of the forum to use invisibility , But I couldn’t find it in the actions, is it an addon? if yes which one ?

That is for web tests only, I see you are using a mobile test.
In your case you can just use the element action is visible on some basic element that should appear after the loader is gone.

I tried that as well but somehow it’s returning true even on the loader,it would be good to have a ‘wait till invisibility of element’ action.

Hi, can you please contact me on our chat so I can help you troubleshoot this.
Regards, Ran.