Answered

How to add wait until something disappear

Hello,

I have a page which loading data in a table, there will be a spinner before data is loaded. I want to put a wait time and the time should be dynamic based on the amount of time until the spinner disappears.

For example, if spinner takes 10 seconds, the step should wait 10 seconds and if the spinner takes 40 seconds, the step should wait 40 seconds.

Can we do this with any combination of commands?

 

0
4 comments
Avatar
Joseph Hamdan

Hi Hasib,

You can use Verify_Element command and make use of the Attempts and Intervals fields.

For example, if we want to use the loading spinner element as a locator for this command, we can disable the checkbox "Exist" and this command will keep looking to make sure this element does not exist on the page. Attempt #1 will start the initial check, wait for Interval (10,30,40 seconds) and then perform another check on attempt #2, and so on. Once the spinner has disappeared, the step should pass shortly after.

Regards,

Subject7 Team

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Thank you Joseph,
Does the interval, overwrites the default locator time-out? 

0
Comment actions Permalink
Avatar
Joseph Hamdan

Hasib,

Yes, you should have no problems if the interval is higher than the locator timeout set in your User Preferences.

Regards,

Subject7 Team

0
Comment actions Permalink
Avatar
Hasib Rostaiee

Thank you, I will use this and let you know if any issue.

0
Comment actions Permalink

Please sign in to leave a comment.