Elen Elen - 1 year ago 173
R Question

Document complete in RSelenium

Instead of using:


to wait the dom to load is there any wait to wait until this command


give result
so the dom is ready

Answer Source

Selenium already implements polling of the document.readyState via the timeouts set of methods. RSelenium has the setTimeout methods. Increasing the timeout for page load should result in Selenium allowing more time for the operation to complete.

The problem comes when webpages don't finish loading. Some webpage are continuously loading calling themselves with delay. In this case you can check for the presence of an element in the DOM for example.


How I can check whether a page is loaded completely or not in web driver?


Selenium WebDriver : Wait for complex page with JavaScript(JS) to load

for further discussion. With RSelenium you can of course run JavaScript e.g.

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

For modern webpages the issue of detecting when a page load is deemed to have completed can be problematic and solutions case specific.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download