WaitForURL fails with a timeout

6 posts, 0 answers
  1. Edward
    Edward avatar
    2 posts
    Member since:
    Oct 2014

    Posted 06 Nov 2014 Link to this post

    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 --- 
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 11 Nov 2014 Link to this post

    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!
  3. Edward
    Edward avatar
    2 posts
    Member since:
    Oct 2014

    Posted 11 Nov 2014 in reply to Boyan Boev Link to this post

    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
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 14 Nov 2014 Link to this post

    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!
  5. Larry
    Larry  avatar
    2 posts
    Member since:
    Apr 2014

    Posted 07 Mar Link to this post

    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.
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 10 Mar Link to this post

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