RSelenium icon indicating copy to clipboard operation
RSelenium copied to clipboard

Setting Timeouts

Open jhwu824 opened this issue 10 years ago • 2 comments

Hi,

I haven't been able to find examples of using setImplicitWaitTimeout or setTimeout. I'm not sure if the function sets timeout for specific actions (like navigating to a page), or if it's supposed to be a global timeout. Setting remDr$setTimeout(type = 'page load', milleseconds = 10000) at the beginning of the document did not seem to stop my pages from hanging. I'd appreciate any guidance on this. Thanks!

jhwu824 avatar Oct 16 '15 19:10 jhwu824

setImplicitWaitTimeout affect the maximum waiting time for finding element before throwing error, while setTimeout depends on what option you put, "page load", "script", or "implicit". The "implicit" option I think has the same effect as setImplicitWaitTimeout, while "page load" is maximum time to wait for page loading before throwing error or stopping, and "script" I think is maximum time to wait for script running before it stop. CMIIW.

msaidf avatar Oct 26 '16 04:10 msaidf

Setting remDr$setTimeout(type = 'page load', milleseconds = 10000) at the beginning of the document did not seem to stop my pages from hanging.

I think that is exactly the purpose of setTimeout, when your session encounters page hanging, it will stop rather than continue running. The page hanging is the web server or connection problem, not R problem.

msaidf avatar Oct 26 '16 04:10 msaidf