Set timeout for NavigateTo method

6 posts, 1 answers
  1. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 20 Jan 2012 Link to this post

    I use following code to open my site:
    [CodedStep(@"Navigation to Form")]
    public void NavigationToForm()
    {
      ActiveBrowser.NavigateTo((string)Data["ContributorPath"]);
      ActiveBrowser.Window.Maximize();
    }
    Sometimes site can't be opened fast so test is failed with timeout error.
    I try to add Wait action, but test is failed on first step.
    [CodedStep(@"Wait for url")]
       public void WaitForUrl()
       {
         // Wait for url
         ActiveBrowser.WaitForUrl((string)Data["ContributorPath"], true, 60000);
       }
    How I should do it?
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 20 Jan 2012 Link to this post

    Hi Alexander,

    I'm sorry you are running into this problem. Is this an HTML or a Silverlight Application? What is the exception? 

    If this is a Silverlight application you can try to increase the Silverlight Connect Timeout settings in Project Settings->Recording Options. If this is an HTML, you can increase the global "Client (Frame/Window) ready timeout". See the bottom of this page on how to set it in Quick Execution Options.

    Please, let me know if you are still unable to resolve this!
     
    Kind regards,
    Plamen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 20 Jan 2012 Link to this post

    This is HTML application. This step is initial opening of my application.
    How could I increase timeout in VS?
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 20 Jan 2012 Link to this post

    Hello Alexander,

    If you are running your test from Quick Execution, check the first screenshot to see where to find the "Client (Frame/Window) ready timeout" settings. If you are running your test as part of a Test List, you need to increase the ClientReadyTimeout value from the Test List Settings(see screenshot).

    Kind regards,
    Plamen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011
  6. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 20 Jan 2012 Link to this post

    Hello Alexander,

    You need to add this file manually by right-clicking on the solution and selecting "Add>New Item... --> Test Settings". Here's a quick video showing how you can do that.  

    All the best,
    Plamen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top