how to check if page finished loading in RSelenium

后端 未结 3 628
我寻月下人不归
我寻月下人不归 2021-01-13 05:36

Imagine that you click on an element using RSelenium on a page and would like to retrieve the results from the resulting page. How does one check to make sure t

3条回答
  •  忘掉有多难
    2021-01-13 05:56

    Set ImplicitWaitTimeout and then search for an element on the page. From ?remoteDriver

    setImplicitWaitTimeout(milliseconds = 10000)

    Set the amount of time the driver should wait when searching for elements. When searching for a single element, the driver will poll the page until an element is found or the timeout expires, whichever occurs first. When searching for multiple elements, the driver should poll the page until at least one element is found or the timeout expires, at which point it will return an empty list. If this method is never called, the driver will default to an implicit wait of 0ms.

提交回复
热议问题