简体   繁体   中英

Waiting until the whole page load

Using the following we can expect/know that the whole page has loaded.

Sys.sleep(5)

or

remDr$executeScript("return document.readyState == 'complete';")

or

remDr$setTimeout(type = "page load", milliseconds = 10000)

However sometimes the load of page it takes longer the a general exception stops the problem. A way is to set a timer so after checking if the page loaded or not increase the time to wait or not.

Is there any simpler solution?

Try This:

$(window).on("load", function{
    //Your code here...
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM