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
0
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:
Regards,
Cody
Telerik
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:
- 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.
- Add/remove the overlay div from the browsers DOM. In this scenario a "Wait for not exist" should work.
Regards,
Cody
Telerik
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
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
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
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
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
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
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
Hello,
Excellent! Thank you for the update.
Regards,
Cody
Telerik
Excellent! Thank you for the update.
Regards,
Cody
Telerik