Skip to main content

Retrieve tabs/windows

Retrieve the tabs and windows currently available in an existing browser session. The result includes the title, current URL, active/focused state, and page identifiers that can be used by subsequent Web Automation Wrk Actions.

Application

  • Web - Sessions

Inputs (what you have)

NameDescriptionData TypeRequired?Example
Browser session IDThe unique identifier of the browser instance. Can be retrieved from "Open web session" Wrk ActionText (Short)Yesfb9bc380-146c-420e-9130-50ce93614e05

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library section. These variables in the Data Library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NameDescriptionData TypeRequired?Example
Browser tabsJSON list containing each currently available page. Each item should include the browser context index, page index, page/tab title, current URL, and whether the page is currently active/focusedText (Long)Yes
Unsuccessful messageIf unsuccessful, a message stating what went wrongText (Long)No
Unsuccessful screenshotIf unsuccessful, a screenshot of the websiteFileNo

Example Tabs / windows JSON:

[
{
"contextIndex": 0,
"pageIndex": 0,
"title": "Wrk",
"url": "https://www.wrk.com/",
"isActive": true
},
{
"contextIndex": 0,
"pageIndex": 1,
"title": "Login",
"url": "https://example.com/login",
"isActive": false
}
]

Outcomes

NameDescription
SuccessThis status is selected when the list of tabs/windows was retrieved successfully (including an empty list)
UnsuccessfulThis status is selected when an error occurred while retrieving tabs/windows from the provided browser session
Impossible to completeThis status is selected when unable to connect to the session

Requirements

  • N/A