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

Wait.ForVisible method does not work stably

3 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 13 Mar 2013, 05:41 AM
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?

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 13 Mar 2013, 08:35 AM
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.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mohsin
Top achievements
Rank 1
answered on 30 Jun 2013, 08:56 AM
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.
Pages.Curepet1.SelectSpan.Wait.ForExists(800000);
So whats the solution please Anxiously waiting for your reply.

Thanks
Kind Regards
Mohsin Aheer.
0
Velin Koychev
Telerik team
answered on 03 Jul 2013, 01:31 PM
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.


Regards,
Velin Koychev
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
Tags
General Discussions
Asked by
Kevin
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Mohsin
Top achievements
Rank 1
Velin Koychev
Telerik team
Share this question
or