Wait.ForVisible method does not work stably

4 posts, 0 answers
  1. Kevin
    Kevin avatar
    9 posts
    Member since:
    Jul 2012

    Posted 13 Mar 2013 Link to this post

    Hi team,
    i tried to invoke wait.ForVisible method for some element, but found it is not stable, maybe caused by the bad network condition. i want to know if there are some solutions to make it better, i need the scirpts keep waiting for the element diplay on the page, is there a default setting  like timeout in this method so i can redefine it?
  2. Plamen
    Plamen avatar
    8 posts

    Posted 13 Mar 2013 Link to this post

    Hello Kevin,

    There are two types of Waits: Global and 'per step'. When an element is located (before it's acted upon) using the implied Find under the hood, Test Studio uses the Global setting value defined in the Quick Execution Options or the corresponding ElementWaitTimeout value in the Test List Settings.  

    You can override the global setting on a per step basis if you set UseStepWaitOnElementsTimeout to True in the test step properties. Once enabled you can set the WaitOnElementsTimeout property for that step and that value will be used instead of the global value. See this article for more information.

    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Mohsin
    Mohsin avatar
    1 posts
    Member since:
    Jun 2013

    Posted 30 Jun 2013 Link to this post

    Hi Plaman,
               Hope you will be going great. I am new to automations and I choosed telerik test studio.
    My scenario is, how to wait for popup window(which is a form) to load completely and then click span step should execute.
    right now the button clicked to open form and it doesn't wait for form to load complete, I need it to wait for form to load complete or may verify its appearance/visibility and then further steps... click span and fill form etc steps should execute.
    right now acc. to cmd, it clicks on button of open form and very after that it starts searching for the field in form, it doesn't wait for form to load completely, between that the timeout of that clickspan occurs and it fails the test.

    how to wait for pop up window to appear completely.
    Note: I have tried increasing time figure in coded steps but its not working.
    So whats the solution please Anxiously waiting for your reply.

    Kind Regards
    Mohsin Aheer.
  4. Velin Koychev
    Velin Koychev avatar
    88 posts

    Posted 03 Jul 2013 Link to this post

    Hi Mohsin,

    The best way you can do this is to try adding a Wait step for the last element that needs to be loaded or the one that you are searching for. 
    Another alternative is to try using a standard execution delay in order to add a hard delay. Here's a short video of how it works.

    In some cases Test Studio does not automatically call jQuery/Javascript events and you might have to add coded steps to fire the events. Please take a look at the following articles about jQuery and Javascript events. Please also check this article on waiting for AJAX postback to complete.

    If none of these helps, please:
    1. Record a Jing video demonstrating the entire process, so we can better understand what is happening. 
    2. Please provide us with a copy of your test and grant us access to your application so we can reproduce the issue on our end and give you a solution. 

    Looking forward to hearing from you.

    Velin Koychev
    Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
    Reserve your seat today!
Back to Top