Test Execution Issues in FireFox 11 - Document not ready to retrieve markup

6 posts, 1 answers
  1. John
    John avatar
    12 posts
    Member since:
    Dec 2011

    Posted 23 Mar 2012 Link to this post

    All of my previously working FireFox based tests are now failing about 25% of the time with the following error. The only solution I have found is to add a 2 second delay before each action and setting the steps to 'FireFox' only. Even this doesn't always work.

    Suggestions?

    Overall Result: Fail
    ------------------------------------------------------------
    '3/23/2012 3:20:06 PM' - Using .Net Runtime version: '4.0.30319.239' for tests execution.
    '3/23/2012 3:20:06 PM' - Starting execution....
    ------------------------------------------------------------
    ------------------------------------------------------------
    '3/23/2012 3:20:09 PM' - Using 'FireFox' version '11.0' as default browser.
    '3/23/2012 3:20:27 PM' - 'Fail' : 1. Execute test 'FireFox & IE - Login - Nav to Main'
     
    >>> Test-as-Step 'Fragments\FireFox & IE - Login - Nav to Main.tstest' log starts:
     
    Overall Result: Fail
    ------------------------------------------------------------
    '3/23/2012 3:20:09 PM' - Using 'FireFox' version '11.0' as default browser.
    '3/23/2012 3:20:10 PM' - 'Pass' : 1. Navigate to : '/'
    '3/23/2012 3:20:11 PM' - 'Pass' : 2. Click 'LoginToPBISLink'
    '3/23/2012 3:20:13 PM' - 'Pass' : 3. Click 'CoordinatorTab'
    '3/23/2012 3:20:18 PM' - 'Pass' : 4. Enter text 'X' in 'UserNameField'
    '3/23/2012 3:20:20 PM' - 'Pass' : 5. Keyboard (KeyPress) - Tab (1 times) on 'PasswordField'
    '3/23/2012 3:20:23 PM' - 'Pass' : 6. Enter text '123456' in 'PasswordField'
    '3/23/2012 3:20:24 PM' - 'Pass' : 7. Click 'OtherBlueLoginButton'
    '3/23/2012 3:20:26 PM' - 'Pass' : 8. Wait for '2000' msec.
    '3/23/2012 3:20:27 PM' - 'Fail' : 9. Verify element 'WhiteLoginButton' 'is' visible.
    ------------------------------------------------------------
    Failure Information:
    ~~~~~~~~~~~~~~~
    ExecuteCommand failed!
    InError set by the client. Client Error:
    mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.
    BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'edfba8f1-05b9-49db-b989-af663bd68d67',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.')
    InnerException: none.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 28 Mar 2012 Link to this post

    Hello John,
    it might be that Test Studio is trying to invoke invoke actions on the page and the DOM is not yet ready. I would like you to try a couple of things which might resolve the issue:
    A) Set step 7) to non-simulated click if it's set to SimulateRealClick
    B) Change step 9) to a WaitForExists instead of VerifyExists. WaitForExists is closer to what you want to do, I believe. It's also much more reliable.

    Let me know if this doesn't help and you still require additional assistance with this.

    Kind regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. John
    John avatar
    12 posts
    Member since:
    Dec 2011

    Posted 28 Mar 2012 Link to this post

    Stoich,

    A) SimulateRealClick was already turned off
    B) I had created the VerifyExists step as a verify but changed its role to Wait. I re-created the step as a wait and it didn't seem to make much difference.

      What's odd is that it doesn't do it every time, I have a test that logs in and out 10 times and sometimes it will pass, sometimes it will fail on attempt 5, 7, etc. The only way for me to get it to work is to add a 3 second delay before EVERY page load.

      Any suggestions? I really don't want to go back through all my tests and add delays...

    Thanks,
    -- John
  4. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 30 Mar 2012 Link to this post

    Hi John,
    the fact that the fixed delays help leads me to think that in fact the browser is not ready. You can try replacing the fixed delay with:
    ActiveBrowser.WaitUntilReady();

    Kind regards,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Daniela
    Daniela avatar
    1 posts
    Member since:
    Oct 2011

    Posted 06 Jul 2012 Link to this post

    Hi,

    I also receive this error with FF 10. You can see the log below:

    Overall Result: Fail
    ------------------------------------------------------------
    '6.7.2012 г. 11:23:59 ч.' - Using .Net Runtime version: '4.0.30319.1' for tests execution.
    '6.7.2012 г. 11:23:59 ч.' - Starting execution....
    '6.7.2012 г. 11:24:01 ч.' - Detected custom code in test. Locating test assembly: daportal_nl.dll.
    '6.7.2012 г. 11:24:01 ч.' - Assembly Found: D:\SVN6\daportal.nl\bin\daportal_nl.dll
    '6.7.2012 г. 11:24:01 ч.' - Loading code class: 'daportal_nl.Registration___Bizmail__FireFox__1_'.
    ------------------------------------------------------------
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:01 ч.' - Detected DataDriven Test. Starting data iterations.
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:01 ч.' - [Iteration #1: (Company=Test message)(Name=Please ignore it)(Function=QA)(Address=St.Stambolov 50)(PostCode=4000)(Locality=Brussel)(Country=PL)(Phone=+359334)(Email=daniela.bogdanova@certipost.com)(VAT=123456789)(EAN=9999999999999)(Email_notif=daniela.bogdanova@certipost.com)(Bizmail_price=250)(Bizconnect_price=700)(Prtnrdynadro_price=150)(Bizmail_training=150)(Bizconnect_training=250)(Bizmail_total=550)(Bizconnect_total=1100)]
    ------------------------------------------------------------
    Overall Result: Fail
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:01 ч.' - Using 'FireFox' version '10.0.1' as default browser.
    '6.7.2012 г. 11:24:02 ч.' - 'Pass' : 1. Navigate to : 'http://www.staging.daportal.nl/DynadroPublic/registreer/reg01_gegevens.jsp'
    '6.7.2012 г. 11:24:02 ч.' - 'Pass' : 2. Enter text 'orm' in 'FldBedrijfText' - DataDriven: [$(Company)]
    '6.7.2012 г. 11:24:03 ч.' - 'Pass' : 3. Enter text 'did' in 'FldNaamText' - DataDriven: [$(Name)]
    '6.7.2012 г. 11:24:03 ч.' - 'Pass' : 4. Enter text 'qa' in 'FldFunctieText' - DataDriven: [$(Function)]
    '6.7.2012 г. 11:24:03 ч.' - 'Pass' : 5. Enter text 'stst' in 'FldAdresText' - DataDriven: [$(Address)]
    '6.7.2012 г. 11:24:03 ч.' - 'Pass' : 6. Enter text '1000' in 'FldZipText' - DataDriven: [$(PostCode)]
    '6.7.2012 г. 11:24:04 ч.' - 'Pass' : 7. Enter text 'brussel' in 'FldPlaatsText' - DataDriven: [$(Locality)]
    '6.7.2012 г. 11:24:04 ч.' - 'Pass' : 8. Select 'ByValue' option 'PL' on 'FldLandSelect' - DataDriven: [$(Country)]
    '6.7.2012 г. 11:24:04 ч.' - 'Pass' : 9. Enter text '+3594' in 'FldTelefoonText' - DataDriven: [$(Phone)]
    '6.7.2012 г. 11:24:05 ч.' - 'Pass' : 10. Enter text 'aaa@' in 'FldEmailText' - DataDriven: [$(Email)]
    '6.7.2012 г. 11:24:05 ч.' - 'Pass' : 11. Enter text '0123' in 'FldBtwText' - DataDriven: [$(VAT)]
    '6.7.2012 г. 11:24:05 ч.' - 'Pass' : 12. Enter text '999' in 'FldEanText' - DataDriven: [$(EAN)]
    '6.7.2012 г. 11:24:05 ч.' - 'Pass' : 13. Enter text 'dan@' in 'FldNotifText' - DataDriven: [$(Email_notif)]
    '6.7.2012 г. 11:24:06 ч.' - 'Pass' : 14. Check 'FldAkkoordCheckBox' to be 'True'
    '6.7.2012 г. 11:24:07 ч.' - 'Pass' : 15. Click 'BtnvolgendImage'
    '6.7.2012 г. 11:24:07 ч.' - 'NotRun' : 16. Comment: Step 2
    '6.7.2012 г. 11:24:07 ч.' - 'Pass' : 17. Check 'BzmaboRadio' to be 'True'
    '6.7.2012 г. 11:24:07 ч.' - 'Pass' : 18. Verify 'InnerText' 'Contains' '— 250 euro' on 'x250EuroLabelTag' - DataDriven: [$(Bizmail_price)]
    '6.7.2012 г. 11:24:08 ч.' - 'Pass' : 19. Verify element 'DALabelTag' 'is' visible.
    '6.7.2012 г. 11:24:08 ч.' - 'Pass' : 20. Verify checked value is 'True' on 'PrtnrdynadroCheckBox'
    '6.7.2012 г. 11:24:08 ч.' - 'Pass' : 21. Verify 'TextContent' 'Contains' '— 150 euro' on 'x150EuroLabelTag' - DataDriven: [$(Prtnrdynadro_price)]
    '6.7.2012 г. 11:24:08 ч.' - 'Pass' : 22. Verify 'TextContent' 'Contains' 'Bizmail training' on 'BizmailLabelTag'
    '6.7.2012 г. 11:24:09 ч.' - 'Pass' : 23. Check 'BizmailtrainingCheckBox' to be 'True'
    '6.7.2012 г. 11:24:09 ч.' - 'Pass' : 24. Verify 'InnerText' 'Contains' '— 150 euro' on 'x150EuroLabelTag0' - DataDriven: [$(Bizmail_training)]
    '6.7.2012 г. 11:24:09 ч.' - 'Pass' : 25. Click 'BtnvolgendImage'
    '6.7.2012 г. 11:24:09 ч.' - 'NotRun' : 26. Comment: step3 - overview
    '6.7.2012 г. 11:24:09 ч.' - 'Pass' : 27. Verify 'TextContent' 'Contains' '250 Euro' on 'x250EuroDiv' - DataDriven: [$(Bizmail_price)]
    '6.7.2012 г. 11:24:09 ч.' - 'Pass' : 28. Verify 'TextContent' 'Contains' '150 Euro' on 'x150EuroDiv' - DataDriven: [$(Prtnrdynadro_price)]
    '6.7.2012 г. 11:24:10 ч.' - 'Pass' : 29. Verify 'TextContent' 'Contains' '150 Euro' on 'x150EuroDiv0' - DataDriven: [$(Bizmail_training)]
    '6.7.2012 г. 11:24:10 ч.' - 'Pass' : 30. Verify 'TextContent' 'Contains' '550 Euro' on 'x550EuroDiv' - DataDriven: [$(Bizmail_total)]
    '6.7.2012 г. 11:24:11 ч.' - 'Pass' : 31. Verify element 'FregAnnuleerPngImage' 'is' visible.
    '6.7.2012 г. 11:24:12 ч.' - 'Pass' : 32. Wait for element 'FregAkkoordPngImage' 'is' visible.
    '6.7.2012 г. 11:24:13 ч.' - 'Fail' : 33. [Registration__Bizmail_FireFox1_CodedStep1] : Click 'FregAkkoordPngImage'
    ------------------------------------------------------------
    Failure Information:
    ~~~~~~~~~~~~~~~
    Exception thrown executing coded step: '[Registration__Bizmail_FireFox1_CodedStep1] : Click 'FregAkkoordPngImage''.
    InnerException:
    ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
    InError set by the client. Client Error:
    mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.
    BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'13ba64b5-0951-472b-9cee-e30b25d3a82d',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.')
    InnerException: none.
     
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Core.Browser.RefreshDomTree()
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
       at daportal_nl.Registration___Bizmail__FireFox__1_.Registration__Bizmail_FireFox1_CodedStep1() in d:\SVN6\daportal.nl\Bizmail - Bizconnect\Registration - Bizmail (FireFox)(1).tstest.cs:line 107
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:13 ч.' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:13 ч.' - Overall Result: Fail
    '6.7.2012 г. 11:24:13 ч.' - Duration: [0 min: 12 sec: 81 msec]
    ------------------------------------------------------------
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:13 ч.' - Overall Result: Fail
    '6.7.2012 г. 11:24:13 ч.' - Duration: [0 min: 12 sec: 87 msec]
    ------------------------------------------------------------
    '6.7.2012 г. 11:24:14 ч.' - Test completed!


    I tried to fix it as adding the code that Stoich has suggested, but it looks it doesn't work for Click action. Actually clicking on the button has been performed (I receive confirmation mail for the action) but the test fails.

    Do you have any other suggestions how it can be fixed?

    Best regards,
    Daniela
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 Jul 2012 Link to this post

    Hi Daniela,
    I apologize for the late response.

    The error message basically means that the page and its corresponding javascript is not correctly loaded at the time the test step is trying to access it.

    I'm not sure why this is happening: go ahead and send us your entire test. If you don't want to share it in a public forum - you can open a ticket in our support system. As a paying customer you're entitled to access to our support system. Support tickets are completely confidential. As a side note - we have a guaranteed 24 hour response time on our support tickets.

    Meanwhile, you can try the following things:
    1) Put a fixed delay before step 33
    2) Re-record step 33 as a regular step (as opposed to a coded step) and set it to SimulateRealClick from the step properties:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/modifying-tests/change-test-step-properties.aspx

    3) Increase the Ajax time out on the newly re-recorded step 23 - also from the step properties

    Greetings,
    Stoich
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top