This is a migrated thread and some comments may be shown as answers.

Need help with Wait for Step

7 Answers 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Licensing
Top achievements
Rank 1
Licensing asked on 25 Sep 2015, 07:07 PM

I have an application that has a loading div called PleaseWaitGrid. I want to create a step that waits for this element to disappear inorder to move on to the next step. I have tried Wait for not exists with no luck. I've attached a screen show of what I am talking about. Can anyone help me out with this? Thank you in advance.

 

7 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 25 Sep 2015, 08:59 PM
Hi,

In general, waiting for a "loading please wait" to go away is very brittle and is considered "bad practice". The reason for this is Test Studio watches for it using a polling mechanism. It checks every 200ms. If the loading div comes and goes within a single 200ms time slice, Test Studio will miss it all together.

Unfortunately there are no event handles to these types of overlay div's that can be hooked into so you can sure to catch when they appear and/or disappear.

Now, after saying all that, it is still possible to work with them. There are 2 basic ways they operate:
  1. Some systems show and hide the overlay div. The div element is always present in the browsers DOM, just not always visible and any one moment in time. This could be why a "Wait for not exists" does not work as you expected. Instead you want to use a "Wait for not visible" step.
  2. Add/remove the overlay div from the browsers DOM. In this scenario a "Wait for not exist" should work.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Licensing
Top achievements
Rank 1
answered on 25 Sep 2015, 09:21 PM
Thank you Cody, how do I go about creating a Wait for not visable step? I can only create visable and collapse. Thanks again.
0
Cody
Telerik team
answered on 28 Sep 2015, 03:30 PM
Hi,

Just expand your existing "Wait for visible" step and uncheck the "IsVisible" checkbox. That will change it to Wait for Not Visible - see attached screen shot.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Licensing
Top achievements
Rank 1
answered on 28 Sep 2015, 04:24 PM
Cody, I cannot locate this step "Wait for Visible". The only step I can create are thats remotely close is, "Wait for PleaseWaitGrid's visibility is Visible/Collapse". I do not see the option to create a step called "Wait - element is visiable" Any seggustions as to why I cannot create this step. So frustrating.
0
Cody
Telerik team
answered on 28 Sep 2015, 06:07 PM
Hi,

Oh you must be testing a Silverlight or WPF application. What I previously described only applies to HTML based applications. In Silverlight and WPF "Collapsed" means hidden i.e. not visible. Does that help?

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Licensing
Top achievements
Rank 1
answered on 28 Sep 2015, 08:32 PM
Ah yes, that works. Thank you so much for your help Cody.
0
Cody
Telerik team
answered on 28 Sep 2015, 08:49 PM
Hello,

Excellent! Thank you for the update.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Licensing
Top achievements
Rank 1
Answers by
Cody
Telerik team
Licensing
Top achievements
Rank 1
Share this question
or