Document is not ready to retrieve its markup

6 posts, 0 answers
  1. Gail
    Gail avatar
    9 posts
    Member since:
    Mar 2014

    Posted 27 Mar 2014 Link to this post

    I am currently using Testing Framework with Firefox 28.0.  I have noticed that the ActiveBrowser.Wait... functions slow page load considerably.  I frequently get the error, "Document is not ready to retrieve its markup."  The only way I could consistently avoid this error when I needed to wait for an element was to first call ActiveBrowser.WaitUntilReady(), and then call  ActiveBrowser.WaitForElement(...) to wait for the element I was actually looking for.  I needed a high timeout on the WaitForElement(...) call, also. 

    Is there a better way to avoid this problem?  I can switch to a different browser if that would help.
  2. Gail
    Gail avatar
    9 posts
    Member since:
    Mar 2014

    Posted 28 Mar 2014 in reply to Gail Link to this post

    I found something that helped.  There are two pages I'm working with.  The first is a quick-loading login page.  The second is a longer-loading home page.  If I use MouseClick instead of Click on the login page's submit button, the WaitUntilReady and the WaitForElement for the home page go much faster.

    I would appreciate any suggestions/explanations.  I am using Testing Framework ArtOfTest.WebAii version 2013.2.1327.0.
  3. Gail
    Gail avatar
    9 posts
    Member since:
    Mar 2014

    Posted 28 Mar 2014 in reply to Gail Link to this post

    I spoke too soon.  If I use MouseClick instead of Click to submit the login page, I am back to getting an exception about 1 out of every 3 trials.  Using Click, I can run as many times as I'm willing to try it (at least 10) with no exception, but the trials take longer.

    I hope someone has words of wisdom for me.  At this point I will be recommending against the use of this product.
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 01 Apr 2014 Link to this post

    Hi Gail,

    I am not able to replicate the symptoms you describe. Maybe I don't have a slow enough loading home page. The timing of my tests show this:
    // 789 straight clicks no Wait For
    // 202 MouseClick to login, no Wait For

    // 838 straight click plus WaitForElement
    // 923 MouseClick, WaitUntilReady, WaitForElement

    One thing I can comment on, a MouseClick that changes the page (like a Login button) needs to be followed up by a WaitUntilReady. The regular .Click has a built-in WaitUntilReady already. Doing another one after it is redundant.

    To investigate further we need access to a web application that is giving you this problem.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. Gail
    Gail avatar
    9 posts
    Member since:
    Mar 2014

    Posted 01 Apr 2014 Link to this post

    The problem turned out to be FireFox.  Once I switched to IE (and configured my browser) the page loaded at its normal speed.  Also I no longer needed the WaitUntilReady prior to the WaitForElement.

    Thanks
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 02 Apr 2014 Link to this post

    Hi Gail,

    I am glad to hear you found a working solution for you. If in the future you decide you want to investigate further why Firefox isn't working as expected, we'll be happy to look deeper into it. Our first step would be reproducing the problem on our local machines so that we can analyze it and determine the root cause.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top