hubcap scrollbottom

Scroll to the bottom of the page.

When to use

Use scrollbottom to scroll the page all the way to the end. Useful for triggering lazy-loaded content or infinite scroll. Use scrollto to scroll to a specific element, or scrolltop to return to the top.

Usage

hubcap scrollbottom

Arguments

None.

Flags

None.

Output

FieldTypeDescription
scrolledbooleanWhether the scroll action completed
{
  "scrolled": true
}

Errors

ConditionExit codeStderr
Chrome not connected2error: connecting to Chrome: ...
Timeout3error: timeout

Examples

Scroll to the bottom:

hubcap scrollbottom

Trigger infinite scroll by scrolling to the bottom and waiting for new content:

hubcap scrollbottom && hubcap waitidle && hubcap scrollbottom && hubcap waitidle

Scroll to the bottom and count the total number of items loaded:

hubcap scrollbottom && hubcap waitidle && hubcap count ".item"

See also

  • scrolltop - scroll to the top of the page
  • scrollto - scroll to a specific element
  • scroll - scroll by a relative amount