Skip to main content
Browser

Get the last page opened

Get the last page opened

Returns a reference to the browser's most recently opened tab. Useful for working with windows or tabs the page created itself when a link or button was clicked.

Tip

This action's output appears automatically in the Browser or page ID field of the browser actions that follow, which makes chaining easy.


Options

Browser or page ID

The browser opening action whose most recent tab is fetched.

Returns

Javascript code

js
actions["action-id"]._page // the most recent tab's active page (Session)
actions["action-id"]._browser // the browser instance (Session)

Field selection

This action's output is available in the Browser or page ID field of the browser actions that follow.

Rules and conditions

  • Browser or page ID is required.
  • With only one tab in the browser, it returns a reference to the current one.