Forum Discussion

nsag_1512's avatar
nsag_1512
Occasional Contributor
6 years ago

"frame.contentDocument.readyState" function not working

Test Complete Version: 12.60.5545.7 x64
Hi all,

I am using this method https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/waiting-for-pages.html  to wait the page fully loaded before peform an action. But it does not wait the page full loaded . I plan to use the loader classname to detect whther the loader still exist or not. How can i use the below object to detect the loader state? any suggestion.

 

Thanks .

while page is loading  (classname= spinner loader)

after page fully loaded (classname=spinner)

  • Wait for page will not work with the loader because the loader is using AJAX and Javascript injection to get modified.

    Wait only waits for the page to get notified that the browser finished rendering the page.  ALL AJAX calls could happen after the page has signaled that it finished the rendering.

    Unfortunately there is no event like "On AJAXCallCompleted" so you actually have to use something like "WaitProperty" to wait on a specific property or an array of properties on the page to change for you to be notified.

     

    Hope that helps

    -Lino

  • LinoTadros's avatar
    LinoTadros
    Community Hero

    Wait for page will not work with the loader because the loader is using AJAX and Javascript injection to get modified.

    Wait only waits for the page to get notified that the browser finished rendering the page.  ALL AJAX calls could happen after the page has signaled that it finished the rendering.

    Unfortunately there is no event like "On AJAXCallCompleted" so you actually have to use something like "WaitProperty" to wait on a specific property or an array of properties on the page to change for you to be notified.

     

    Hope that helps

    -Lino

    • nsag_1512's avatar
      nsag_1512
      Occasional Contributor

      Ok. i will try using wait property to solve this issue. Thanks Lino . :smileyhappy: