Skip to content

ScrollLoop

Repeatedly evaluates listSelector and runs the loadMore sequence. After each loop, if removeOldElements is true, it will delete elements selected by listSelector after they have already been extracted, to minimize memory consumption. The result is a sequence containing the concatenation of all the elements selected by listSelector.

Syntax

Browser.ScrollLoop
   ·  [listSelector]
   ·  [loadMore]
   ·  [removeOldElements]

Parameters

listSelector
The selector that selects the elements to be returned and which will be deleted from the page after each loop.
loadMore
A sequence that loads more elements.
removeOldElements
true to remove the old elements after new elements have loaded, or false to keep them. Should pass false only if passing true breaks the page's scrolling mechanism.

Return Value

A sequence containing the concatenation of the elements selected by listSelector.

Remarks

The process, and hence the resulting sequence, ends either when loadMore returns an empty sequence, or when no new elements have been found after running the loadMore sequence.