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

WaitForURL fails with a timeout

5 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 06 Nov 2014, 04:16 PM
Hi,

On one of my tests the steps include clicking on various links and waiting to see that the correct URL is loaded. These seem to fail (seemingly randomly, or at least according to a pattern that I can't figure out).


The scenario is as follows:

1. load index
2. wait for menu to exist
3. click on link in menu
4. confirm that browser navigates to topic page (waitforurl)
5. wait for a link to exist and then click on it
6. repeat 4 and 5 for a sub-topic page.
7. confirm that browser nagivates to article page (wait forurl)

The tests fail at 4 and 7. I can see in the browserUI that the page has correctly loaded, and finished loading within the wait period.

All I can guess is that perhaps some element on our page is confusing the picture somehow (either an iframe element or a modal window).

The exception is reproduced below:

Thanks,
Ed

-----------------------------------------------------------------------------------------------------------------------------------------

ArtOfTest.Common.Design.Exceptions.ExecutionException: Wait for condition has timed out ---> System.TimeoutException: Wait for condition has timed out at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target) at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType) at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout) at ArtOfTest.WebAii.Core.Browser.WaitForUrl(String url, Boolean isPartial, Int32 timeout) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.WaitForUrlActionDescriptor.Execute(Browser browser) at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order) --- End of inner exception stack trace --- 

5 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 11 Nov 2014, 12:27 PM
Hi Edward,

Could you please send us your test so we can review it.

The navigation step waits until browser is fully loaded, why do you use WaitForUrl step?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Edward
Top achievements
Rank 1
answered on 11 Nov 2014, 12:35 PM
Hi Boyan,

We use WaitForUrl after clicking on a link on a page which takes user to another page, to confirm that the correct URL has loaded. 

Clicking the links does not create a NavigateTo event.

Ed
0
Boyan Boev
Telerik team
answered on 14 Nov 2014, 10:56 AM
Hi Ed,

Thank you for the additional information.

Please try increasing the WiatTimeout of the step (20000). Is it possible that the new URL loads more than 5 secs? 

If the issue persists please give us a direct access to that URL so we can debug the issue and give you a solution.

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Larry
Top achievements
Rank 1
answered on 07 Mar 2016, 08:16 PM
We are randomly experiencing the same error.  What makes this very peculiar is that when I view the Step Failure Details image, the image is of the page that TestStudio is actually waiting for.
0
Boyan Boev
Telerik team
answered on 10 Mar 2016, 11:20 AM
Hi Larry,

Thank you for contacting us.

In order to help you best please give us more detailed information. What issue exactly do you experience?

Do you click on a link and navigate to another page? Does Test Studio record this as a navigate step?

Is your application publicly accessible so we can reproduce the issue?

Hope to hear from you soon.

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