Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

How to wait for fully website loaded, including iframes?

Post Reply
User avatar
salvadordf
Posts: 4575
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to wait for fully website loaded, including iframes?

Post by salvadordf »

Hi,

You can use the TChromium.OnLoadingStateChange event and check the isLoading parameter.
User avatar
Zjm-VIP
Posts: 2
Joined: Fri Apr 17, 2020 8:22 am

Re: How to wait for fully website loaded, including iframes?

Post by Zjm-VIP »

i have used the TChromium.OnLoadingStateChange event and check the isLoading parameter.
but i Found the isLoading parameter alwaly is true;
User avatar
salvadordf
Posts: 4575
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to wait for fully website loaded, including iframes?

Post by salvadordf »

That's probably caused by a resource that never finishes loading.

You can also check if the main document is fully loaded if you use the TChromium.OnLoadEnd event and check frame.IsMain. You can improve this if you keep a list of frames that started downloading and compare it with the frames that reach TChromium.OnLoadEnd.

However, all this might not work if the web page you need is trying to load something from a slow server.

There are many web pages that add content dynamically and they never finish loading.
Search for "infinite scroll web page" to know more details.
User avatar
Zjm-VIP
Posts: 2
Joined: Fri Apr 17, 2020 8:22 am

Re: How to wait for fully website loaded, including iframes?

Post by Zjm-VIP »

谢谢您的耐心解答
Post Reply