Replies: 1 comment
-
There's no such event in the browser, and there never will be. This moment of "fully loaded" page, for some it can be after all html and css is loaded, for some when JS files are loaded, for some when JS made a couple of AJAX requests and completely idling, and finally for some network idle is impossible due to websockets. You better bet on the content on the page to check if it's done loading or not. When any Ferrum method returns it did it's best to wait for all needed events to get the control back to you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a follow on question from the discussion in #122, in the discussion, there's a great recommendation:
However, it is not clear to me what is the best way to do this. At first, I added helper methods that looked at each frame to make sure that it was done loading. For one of my pages, this is sufficient and I never have a
pending connections
errors. However, on another page that I'm loading, this often isn't enough. I think it's still downloading images. At first, I put asleep 10
but have had to slowly grow it tosleep 40
Is there a better API to ask ferrum if my code should keep waiting?
Beta Was this translation helpful? Give feedback.
All reactions