Returns when the required load state has been reached. To wait for an element on the page, use locator.waitFor([options]). Shortcut for main frame's frame.check(selector[, options]). 09-15-2020 07:59 AM. I need to find a way to tell it to keep scrolling until the final content loads. When called, the function executes callback and returns a Promise which resolves to the return value of callback. The problem with this approach is that it will either work by specifying a number of scrolls or by telling it to keep going forever with a while True loop. Regardless of the visibility state of the element, click is dispatched.