Browse the docs

Open a page in a background tab

Opens an address in a tab you don't look at, waits for it, and gives later steps its tab id.

Open url in a background tab

Details #

Opens url in a background tab of a connected browser, never the front tab, so you keep working. It waits until the page is loaded (the default), idle (loaded, and its text has stopped changing) or until selector appears. The result is the tab's id; later steps take it as their tab.

The tab closes when the run ends unless keep is on. Neither Safari nor Chrome can open a tab you can't see: it is in the tab strip while it's open.

Parameters #

ParameterTypeRequiredValuesWhat it does
urltextYesRequired, http or https.
browserone ofsafari chrome front, timeout.
intotextThe variable that receives the tab id.
keepyes / noLeave the tab open after the run.
pacenumberSeconds to wait between visits to one site.
sampleany value
selectortextWhat to wait for, with wait: selector.
timeoutnumber
waitone ofloaded idle selectorloaded, idle or selector.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Read a heading from a page nobody has open
Do
  1. Open “example.com” in a background tab
  2. Read the text of “h1”
Open in Switchboard to try it

Gotchas #

  • Needs a connected browser extension.

  • A page that never finishes loading fails the step after timeout seconds (20 by default).