Focus Element
Description
Sets the focus to the specified element
This activity requires an active display and an unlocked user session to successfully simulate interactions with UI components. For more detailed information, please refer to the relevant section in the Desktop Automation Notes.
Properties
Input
- Automation Mode – Defines the method of automating UI elements through hardware drivers or the Send Windows Messages API. The default option is Drivers.
Mode | Description |
---|---|
Drivers | Utilizes hardware drivers to simulate interactions directly with UI components. It requires an active display and an unlocked user session to operate. |
Window Messages | Utilizes the Send Windows Messages API for automation, eliminating the need for an active display or unlocked session. Note: This mode is compatible only with certain types of applications that support window message-based automation and may not work with others, such as WPF applications. |
Simulate | Utilizes a Windows automation library to simulate interactions directly with UI components. It operates without an active display or an unlocked user session. |
-
Delay After – Specify the delay time in milliseconds to apply after executing the activity. By default, it applies a delay of 300 milliseconds.
-
Delay Before – Specify the delay time in milliseconds to apply before executing the activity. By default, it applies a delay of 200 milliseconds.
-
Window Instance - Holds the window instance identified through Window Selector. You can also type in the window instance for automation.
-
Search Parameters – Holds the information of the UI element identified through Element Selector.
Misc
- DisplayName – Add a display name to your activity.
- Private – By default, activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.
Optional
- Timeout – Specify the maximum duration the activity waits for a response to perform the requested operation. It triggers a timeout error if it does not receive a response within the specified time. By default, it sets the timeout to 30 seconds.
- Continue On Error – It Specifies whether the automation should continue even when the activity throws an error. If True, the activity continues without throwing any exceptions. If False, the activity throws an exception. The default value is False.
If this activity is inside the Try-Catch block, and the value of this property is True, it would catch no error.
Example
Download Example