cancel
Showing results for 
Search instead for 
Did you mean: 

"frame.contentDocument.readyState" function not working

SOLVED
Occasional Contributor

"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-pag...  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)

image.png

after page fully loaded (classname=spinner)

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Leader

Re: "frame.contentDocument.readyState" function not working

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

View solution in original post

2 REPLIES 2
Community Leader

Re: "frame.contentDocument.readyState" function not working

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

View solution in original post

Highlighted
Occasional Contributor

Re: "frame.contentDocument.readyState" function not working

Ok. i will try using wait property to solve this issue. Thanks Lino . Smiley Happy