When using the methods below, we can determine if the entire page has finished loading.
Sys.sleep(5)
or
remDr$executeScript("return document.readyState == 'complete';")
or
remDr$setTimeout(type = "page load", milliseconds = 10000)
However, there are times when the page takes longer to load, causing a general exception to occur. One approach is to set a timer to check if the page has finished loading and adjust the wait time accordingly.
Is there a simpler solution available?