Robot Task Activities - Web Macro
The Web Macro activities drive a web browser from a Robot Task: they navigate, click, fill in fields, extract data, and download and upload files.

These activities use the same browser and the same step settings as the Web Macro Task. See Task Net - Web Macro.
Required nesting
Web Macro activities run only when they are nested correctly:
- Every Web Macro activity, including Launch New Instance, must be inside an Open Browser activity
- Every other Web Macro activity must also be inside a Launch New Instance activity
Sequence
Open browser
Do
Launch new instance
Actions
Create tab
Navigate to URL
Click element
...
Rather than building this by hand, record the actions in a Web Macro Task and copy them into the Robot Task. See Recording Web Macro for Robot Task.
Each Web Macro activity has its own settings window, with a Wait tab:
- Wait before execute: the wait in milliseconds before the activity runs
- Wait after execute: the wait in milliseconds after the activity runs
Open Browser
Opens the browser window. This is the outermost Web Macro activity.
- Click Edit action in the shortcut menu to record Web Macro actions
- Click Browser settings in the shortcut menu to open the browser settings window, which has the same options as the Web Macro Task
The browser settings include:
- Load images: load the images on the page. Clearing it makes pages load faster
- Store cookies: keep cookies between runs
- Block popups: block popup windows
- Lite mode: run the browser with fewer features
- Disable WebSecurity: turn off the browser's web security restrictions
- Override User-Agent: send a custom User-Agent string
- Override referer: send a custom referer value
- Accept-Language: the Accept-Language header sent with requests, for example
en-US - Google API: the GoogleClientID, GoogleAPIKey and GoogleClientSecret values
Launch New Instance
Launches a new web instance. All other Web Macro activities go inside this activity's Actions body.
Click Edit action to open the settings window.
Click Element
Clicks a web element.
- Allow to ignore the element: continue the sequence if no element is found at the path, instead of failing
- Wait element: how long, in seconds, the activity waits for the element to appear
- Relative: find the element by its path
- Frame path: the CSS selector of the frame that holds the element, when the element is inside a frame
- Element path: the path to the element, as a CSS selector or XPath
- By position: click the element at its X and Y position
- By search: find the element by searching, which helps when the element's path changes between runs
How By search works: all elements that match the Selector are collected, the Attribute value of each is read and tested against the Regex value, and the element at the Position in the filtered results is used.
For all three ways to find an element, see Element Path.
Allow to ignore the element is the error handling option for Web Macro activities. Web Macro activities do not have the Error settings property. See Error Handling.
Checked Element
Checks or clears a web element, such as a check box. The settings are the same as for Click Element, plus:
- State: the state to set
Copy Link
Copies the link of a web element to the clipboard. The Source tab has the same element settings as Click Element.
To save the link to a variable instead, use the Variable tab:
- Job Variable: save the link to this Job Variable
- User Variable: save the link to this User Variable
- Variable type: the data type of the variable, for example "String"
Copy Value
Copies the value of a web element to the clipboard. The element settings are the same as for Click Element.
Download File
Downloads a file from a URL, or clicks a web element that starts a download.
- Force download: download the file straight from a URL
- Original file/path: the URL of the file
- Credential: the Credential used to reach the folder the file is saved to
- Folder: the folder the file is saved to
- File mask: the file name to save as
- Overwrite options: what to do if the file already exists
Without a direct URL, clear Force download to turn on the Element tab, then fill in the element settings for the link or button that starts the download.
Extract Data
Extracts data from a web element.
Extract Table
Extracts an HTML table from the page. Use this to put a table straight into a List Variable for row-by-row processing.
Inject JS Script
Runs JavaScript code in the page. Type the code on the Inject JS tab.
Use this for actions the other activities cannot do, such as scrolling an element into view or reading a value the page calculates.
Key Event
Sends a key event to the page.
Respond to JS Dialog
Responds to a JavaScript alert, confirm or prompt window.
- Input dialog: the text to enter when a prompt window opens
- Button dialog: the button to click when the window opens: "Yes/Ok" or "No/Cancel"
Click Mask value to hide the text, for example when it is a password.
Populate Field
Fills in a web element with a value. The element is set on the Source tab and the value on the Populate tab.
- Value: the value to fill in
- Mask value: hide the value, for example when it is a password
- Milliseconds per character: the wait in milliseconds between characters, which simulates typing
- Is Enter: press Enter after filling in the field
For help with finding form fields when a page changes their order, see Web Input - Element Path.
Print Page
Prints the web page.
- Select printer: the printer to use, from the printers installed on the computer
- Printer settings: the page range, number of copies, duplex and orientation
Save Page Source
Saves the source of the web page to a variable. Choose the Job Variable or User Variable that receives the page source.
Navigate to URL
Goes to a URL.
- URL: the URL to go to
Create Tab
Creates a new tab. The settings window has only the Wait tab.
Take Screenshot
Takes a screenshot of the web page and saves it to a file.
- Credential: the Credential used to reach the folder
- Folder: the folder the image is saved to
- File name: the file name of the image
- Overwrite options: what to do if the file already exists
- Screenshot type: "Window" captures the visible part of the page, and "Page" captures the whole page
Upload File
Clicks a web element and uploads a file. Fill in the File filter fields to choose the files to upload.
The file filter has the tabs Location, Content, Date, Size, Attributes, Result and Test. Its settings include:
- Credentials: the Credential used to reach the folder
- Folder: the folder to look for files in
- Include sub folders: search the subfolders too
- Exclude folder(s): folders to skip
- Include file mask: the mask for the files to upload, with the Is regex and Case sensitive options
- Use file exclusion: turn on an exclusion mask, with its own Is regex option
Set Proxy
Uses the proxy server set in the activity to reach the web page.
Tips
- Record the sequence in a Web Macro Task first, then copy it into the Robot Task. That is much faster than building the nesting by hand, and the structure is always right. See Recording Web Macro for Robot Task
- Replace recorded position-based paths with attribute-based CSS selectors before the Task goes into production. Recorded positions stop working the first time the page layout changes
- Set Wait element rather than adding fixed waits between activities. The activity continues as soon as the element appears
- Check Allow to ignore the element on activities where a missing element is acceptable, such as closing a cookie banner that may or may not be shown
- Use Mask value on any Populate Field or Respond to JS Dialog activity that handles a password, so that the value is hidden
- Clearing Load images in the browser settings makes pages with many images load noticeably faster