Get tab URL
Read the address of the current tab, or of every tab that matches a pattern.
Only in
WarpX Browser
Use it to record where the run is, or to collect the addresses of the tabs open in the profile's browser. The result goes into a variable, into the table, or both.
Settings
- Select tab
Active tab reads the address the tab the run works in shows right now. All tabs reads the addresses of the open tabs that match the query below, as a list.
ExampleAll tabs- Match Patterns (optional)when Select tab is All tabs
Which tabs to include, with
*for any text. Leave it and Tab title (optional) empty to list every open tab of the profile's browser.Examplehttps://shop.example.com/*- Tab title (optional)when Select tab is All tabs
Only tabs whose title matches, with
*for any text. It is matched against the whole title, and case does not matter, so*order*findsOrder 1042 - Example Shop. With both boxes filled in, a tab must match both.Example*Order*- Assign to variable
Stores the result in a variable as well.
ExampleChecked- Variable namewhen Assign to variable is ticked
The variable to write to. Read it later as
{{variables.shopTabs}}.ExampleshopTabs- Insert to table
Writes the result into a table column. It is ticked when you add the block.
ExampleChecked- Select columnwhen Insert to table is ticked
The column to write to. If you pick none, the result goes to the default
columncolumn, unless the workflow's Insert into the default column setting is off.Exampletab_urls
Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.
What it hands on
Writes one address (Active tab) or a list of addresses (All tabs) to the table column and the variable you chose. Leaves by its single output.
Example: List the shop pages open in a profile
- Start
- Open URL
- Click element
- Get tab URL
- HTTP Request
- Add Get tab URL after the blocks that open the pages.
- Set Select tab to All tabs and Match Patterns (optional) to
https://shop.example.com/*. - Tick Assign to variable and set Variable name to
shopTabs. - Add HTTP Request to send
{{variables.shopTabs}}to your server.
Good to know
- Active tab reads the page as it is when the block runs. After a link click, a form submit or a redirect, you get the address the page moved to.
- All tabs reads every tab of the profile's browser, including popups and tabs the workflow did not open.
- With no tab open, Active tab fails with
no-tab.
See also
- Switch tab — Move the run to another open tab, found by its address, its title or its position.
- Open URL — Load a web address in the current tab or a new one, and wait for it to load.
- JavaScript code — Run your own JavaScript in the page, and pass data back to the workflow.
- Insert data — Set variables and add values to the workflow's table, several at once.