hubcap forward

Navigate forward one entry in the browser’s session history.

When to use

Use forward to go to the next page in the tab’s history, equivalent to pressing the browser’s forward button. This only works after a back navigation. Use goto to navigate to a specific URL instead.

Usage

hubcap forward

Arguments

None.

Flags

None.

Output

FieldTypeDescription
successbooleanWhether the navigation completed
{
  "success": true
}

Errors

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

Examples

Go forward one page:

hubcap forward

Go back and then forward, confirming the URL is restored:

ORIGINAL=$(hubcap url | jq -r '.url')
hubcap back
hubcap forward
hubcap url | jq -r '.url'  # should match $ORIGINAL

Chain forward with a wait for network idle:

hubcap forward && hubcap waitidle

See also

  • back - navigate back in browser history
  • goto - navigate to a specific URL
  • reload - reload the current page