Edit a task recorded with the Universal Recorder
After recording a task, edit the Capture actions to change the window, capture a different object, select a new action, enable background processing, enter a different wait time, or save the output to a variable.
Select the List view to see the full details of each action.
- Change the application window in which you want to perform the operation, or add a wildcard to the window title.
- Change the properties of the captured objects.
- Specify the action you want to perform on the captured objects.
- Introduce a delay before the next action is performed.
- Specify the variable you want to use to store the output.
To add a Capture action to the task, see Using the Capture action.
To edit a recorded task, follow these steps:
- Open the bot that contains the recorded actions you want to edit.
- Click the Capture action that you want to edit.
Make the following changes, as necessary:
- Change the window selection to the Currently active window option.
wildcard character (*) in the Window title field to search
for window titles that can change. You can specify one or more wildcards (*) at the
start, middle, or end of the value.
For example, to perform an operation on any window that has Microsoft in the title, use a wildcard to indicate any string by adding it before or after the value: *Microsoft*. The bot first searches for the exact window title (Microsoft), and if it does not find a match, it searches for windows with the term Microsoft anywhere in the title.
You can use a regular expression (regex) to identify a window title. Select the regular expression either as a String or Pattern for each regular expression condition and enter the value. By default, the Window title field is case-sensitive. You can enable Case insensitive regex flag to identify a window title that is not case-sensitive.
For example, you can enter the String value as ((\w*)-Notepad for all the window title names starting with
((\w*)-Notepad, or use Pattern such as ((\w)\s)*document-Notepad for only those window titles that match this pattern.Note: During runtime, verify that the TaskBot identifies the correct window. If it does not, do the following:
- Open the application or browser window.
- Drag a action above the action.
- Insert a string variable into the Assign the window title to variable field.
- Drag a action below the action.
- In the Window field, insert the window variable generated by the action.
- In the New window title field, insert the string variable from the Get active window title action.
- Click Save.
Select the Resize window option to specify the window
This option delivers a more reliable bot. It resizes the window to the dimensions at which the task was recorded, which enhances the bot's ability to identify the target object.
Note: This option is only available for windows that can be resized. It is not available for the Desktop or Taskbar options.
- If the window is maximized when you record the task, this option is unselected.
- If the window is not at the maximum size when you record the task, this option is selected by default and the width and height fields auto-fill with the window dimensions.
Review the Object properties table.
The bot uses the selected properties to identify the object control at runtime.
Verify that the Control Type matches your
For example, when capturing a table from a website, ensure the Control Type and HTML Tag values are TABLE.If the Control Type does not match your intended object, recapture the object control.
Select and assign values to the object properties that you want to
include in the object search.
For a more reliable bot, we recommend that you select only the properties that have static values (such as Name, Class, Type, HTML ID, and DOMXPATH), and deselect the properties that have dynamic values (such as HTML Href, Path or Value), which are subject to change and cause bot errors.You can use the wild card character (*) and variables in object property values to re-use the same action to capture different objects in different scenarios.
- Verify that the Control Type matches your intended object.
Select the Action from the drop-down list.
For a full list of possible actions by object, see Actions performed on objects captured with Universal Recorder.
- If you record a click and
keystrokes in a text box with a Control Type of
PASSWORD_TEXT, the Recorder does not capture the keystrokes entered into the field. Instead, the action selects the Set text option and offers options to securely input the password. We recommend that you store the password in the Credential Vault and insert it into the action as a credential. Credentials and credential variables in the Bot editor
If you navigate to the text box using the TAB keystroke instead of a click in an MSAA or SAP application, the Recorder is able to identify fields with a Control Type of
- If the selected Action supports background processing, a Run in the background option appears. Background processing
- If you record a click and keystrokes in a text box with a Control Type of
Enter a value in the Wait for control field to specify
the number of seconds the bot must wait for the object control to
appear on the application window.
We recommend setting a delay time when using the Set text action to enter keystrokes into a text field.
Assign the output to a variable.
The Control Room suggests a descriptive default variable name based on the action you selected in step 8. For example, if you selected Get property, the suggested output variable is
PropertyValue. If you create several output variables, subsequent variable names are appended with an "-1" to avoid duplication.
- Perform the Steps 3 through 9 for the other actions that you want to edit in the bot.
- Click Save.
- Open the Capture action.
- Click the Anchor tab.
- Click Capture anchor.
The browser or application window activates with the main object highlighted (the object that you previously captured). A dialog box appears, verifying whether the action has correctly identified the main object.
- If the correct object is highlighted, click Yes, Select
Otherwise, click No, I need to correct it to select the correct object.
- Select a nearby object to the target object that is easier for the bot to find.
The object is highlighted with an anchor icon on the right of the object.
- Click Save.