Web Browser - Tab details

Declaration

<AMWEBBROWSER ACTIVITY="details" SESSION="text" RESULTDATASET="text" />

Related Topics   

Description

Retrieves the Tab Id, Title, URL, and Domain details of the currently active web browser tab and then creates and populates a dataset with the results.

NOTE:
  • The Web Browser action is not backwards compatible with the Web Browser (Legacy) action.
  • This activity is compatible with Chrome, Edge, and Firefox browsers only – Internet Explorer is not supported.
  • The browser you specify must be updated to the latest version and installed on the target system to ensure the Web Browser action functions correctly.
  • Unlike other session-based actions where sessions are optional, the use of a session in the Web Browser action is required as each created session explicitly links to a specific web browser instance. A session is created using the Web Browser - Create session or Web Browser - Open activity. Numerous sessions are supported within a single task, however, since Web Browser actions are performed interactively (and not in the background), each session must run concurrently to avoid sending interactions to the wrong browser window.

Practical usage

See Description.

Parameters

Browse

Property Type Required Default Markup Description
Session name Text Yes BrowserSession1 SESSION="mySession" Specifies the name of an existing session to associate with this activity. Numerous sessions can exist within a single task allowing activities to be performed on several web browsers simultaneously.
NOTE:
  • This activity supports Web Browser sessions in Chrome, Edge, and Firefox browsers only – Internet Explorer is not supported.
  • Firefox does not require a separate extension to be installed with this version of the Web Browser action.

Interaction

Property Type Required Default Markup Description
Create and populate dataset Text Yes (Empty) RESULTDATASET="theDataset" The name of a dataset to create and populate with the tab's details. For information regarding the individual dataset fields this activity creates, see Datasets.

Description

Error Causes

On Error

Additional Information

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name Type Return Value
theDataset.Tab Id Text Returns the Window Handle ID of the tab.
theDataset.Title Text Returns the title of the tab.
theDataset.URL Text Returns the URL of the tab.
theDataset.Domain Text Returns the domain of the tab.

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task opens the Edge browser to https://www.fortra.com and then creates and populates a dataset with the results.

Copy
<AMWEBBROWSER URL="https://www.fortra.com" BROWSER="edge" SESSION="BrowserSession1" />
<AMWEBBROWSER ACTIVITY="details" SESSION="BrowserSession1" RESULTDATASET="theDataset" />