Time out error

2 posts, 1 answers
  1. Gaurav
    Gaurav avatar
    21 posts
    Member since:
    Apr 2011

    Posted 21 Apr 2011 Link to this post

    Hi Team,

    I am trying trial version of Develop edition. I am creating script on silverlight application. I have recorded the script and converted all thet code in MSTest format. My recorded steps are like this

    Step 1. Login in to the silverlight application
    Step 2. Enter values in form appears after login.

    Problem I am facing : Some times it throws time our error when it takes time to find objects on form(Step 2 above) after login. This issue occurs when login process takes some time.

    To avoid this problem i have written code (for Step 2 as mentioned above) as below:

    <after login>

    Pages.Application.FrameContentFrame.Timeout = 1000000;

    Pages.Application.FrameContentFrame.SilverlightApp.Timeout = 1000000;

    Pages.Application.FrameContentFrame.SilverlightApp.FirstNameTextbox.Wait.ForExists(5000000);


    But still some times it throws time out error for object 'FrameContentFrame'. Please suggest me perfect solution. Also direct me to some links(blog/forums) where i can go through advance level of commands( like changing tool setting, configuration for execution, wait, time delay etc) if possible.
  2. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 25 Apr 2011 Link to this post

    Hello Gaurav,

    First I'd like to better understand your need for converting our web tests into coded unit tests in the MSTest format. We highly recommend keeping our web tests in their native .aii format. You can actually execute our .aii tests from MSTest as demonstrated in this video. Another advantage is you can set the WaitOnElementsTimeout parameter on each step as needed, as shown in the attached screenshot.

    The problem you're running into in your code is that these lines of code do not work as expected:

    Pages.Application.FrameContentFrame.Timeout = 1000000;
    Pages.Application.FrameContentFrame.SilverlightApp.Timeout = 1000000;

    The framework will actually perform a Get of the element within the webpage prior to setting the Timeout property. Unfortunately this "under the cover" Get operation has a fixed 5 second timeout built into it, essentially overriding the 1000000 timeout you're attempting to set.

    The right way to wait for a frame to exist is something like this:

    FrameInfo frameInfo = new FrameInfo("", "content", "", "", 0, true);
    ActiveBrowser.WaitForFrame(frameInfo, 10000);


    You can determine the correct parameters to use for the FrameInfo constructor by looking them up in your Pages.g.cs file and copying them from the FrameContentFrame definition in that file.

    Greetings,
    Cody
    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