Need help with Wait for Step

8 posts, 0 answers
  1. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 25 Sep 2015 Link to this post

    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.

     

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 25 Sep 2015 Link to this post

    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!
  3. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 25 Sep 2015 in reply to Cody Link to this post

    Thank you Cody, how do I go about creating a Wait for not visable step? I can only create visable and collapse. Thanks again.
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 Sep 2015 Link to this post

    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!
  5. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 28 Sep 2015 in reply to Cody Link to this post

    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.
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 Sep 2015 Link to this post

    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!
  7. Licensing
    Licensing avatar
    11 posts
    Member since:
    Dec 2011

    Posted 28 Sep 2015 in reply to Cody Link to this post

    Ah yes, that works. Thank you so much for your help Cody.
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 Sep 2015 Link to this post

    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!
Back to Top