Subscribe

UiPath Activities

The UiPath Activities Guide

Keyboard Shortcuts

UiPath.UIAutomationNext.Activities.NKeyboardShortcuts

Description

Sends one or more keyboard shortcuts to a UI element. This activity must be added inside a Use Application/Browser activity.

To learn how to use this activity, see Tutorial: Filling Out PDF Forms in Acrobat Reader with Data from Excel.

📘

Note:

Due to the nature of this activity, it cannot be used in background mode.

Configuring the Activity

In the Body of the Activity

  • Select Options buttonOptions button > Indicate target on screen to indicate the UI element where to send the keyboard shortcuts. If no target element is indicated, the shortcuts are sent to the parent application/browser.
  • Click Record shortcut, and then press the key combination to send to the target element on your keyboard. The recorded shortcut is displayed in the body of the activity.
  • After you record a shortcut:
    • To add more shortcuts, click Record shortcut again and press the desired key or keys on your keyboard. The shortcuts are sent in the order in which they appear in the body of the activity.
    • To change the order in which the recorded shortcuts are sent, drag and drop the recorded keys to change their position in the body of the activity.
    • To remove an added shortcut,click Remove Remove KeyRemove Key.
  • To configure the target after indicating it, click Menu Options buttonOptions button to access the following options:
    • Indicate target on screen - Indicate the target again.
    • Edit Target - Open the selection mode to configure the target.

For more information about indicating and configuring targets, see About the UIAutomationNext Activities Pack.

Properties

Common

  • Continue on error - If selected, the automation continues even when the activity throws an error. If not selected, the execution of the project stops when an error is thrown. This option is not selected by default.
  • Delay after - Delay (in seconds) between the time this activity is completed and the time the next activity begins any operations. The default value is 0.3 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.
  • DisplayName - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate a target.
  • Timeout - Specify a number of seconds for which to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

Input

  • Shortcuts - The keyboard shortcuts to be sent.
  • Target - Before indicating on screen the application you want to automate, this field is set to (null). Once the target is indicated, all properties regarding the element that was indicated are displayed.
    • Target.Check element visibility - If selected, checks whether the UI element is visible or not. By default, this check box is cleared.
    • Target.Click Offset - Specifies an offset for the click activity, which can be further configured.
      • Target.Click Offset.Anchoring Point - Describes the starting point of the cursor to which offsets from OffsetX and OffsetY properties are added. The following options are available: TopLeft, TopRight, BottomLeft, BottomRight, and Center. By default, Center is selected.
      • Target.Click Offset.OffsetX - Horizontal displacement of the cursor position according to the option selected in the Position field. This field supports only Int32 variables.
      • Target.Click Offset.OffsetY - VerticaldDisplacement of the cursor position according to the option selected in the Position field. This field supports only Int32 variables.
    • Target.Fuzzy selector - The parameters for the fuzzy selector.
    • Target.Native text - The text that is used to identify the target element.
    • Target.Selector - The selector that is generated for the indicated element.
    • Target.Targeting methods - The selector types that you want to use for identifying the element. This property can be set to any combination of Selector, Fuzzy selector, or Image.
    • Target.Wait for page load - Before performing the action, wait for the application to become ready to accept input. The following options are available:
      • None - Does not wait for the target to be ready.
      • Interactive - Waits until only a part of the app is loaded.
      • Complete - waits for the entire app to be loaded.
    • Target.Window selector (Application instance) - The selector that is used for the application window. Only applicable when the window attach mode is set to Application instance.
  • Verify execution - At runtime, verifies if the action performed by the activity was correct. This is done either by verifying if the text specified in the Verify execution.Expected text property is found in the indicated UI element after the activity is executed, or by indicating an element that should appear or disappear after the action is performed, which is monitored and verified after the activity is executed. This feature can be enabled from the Project Settings, or from the body of the activity, by selecting Add Auto-Verification from the context menu.
    • Verify execution.Display name - The display name of the verification action. This field is autofilled based on the verification action and element you have chosen. Once Verify Execution is set up, this display name becomes visible in the lower part body of the activity, in the Workflow Designer.
    • Verify execution.Retry - When selected, the type is retried for the duration of the activity timeout, if the expected outcome was not achieved. By default, this check box is selected.
    • Verify execution.Target - This target is used to indicate the element that you want to verify at runtime. For more information on the property fields that can be expanded under this property, see the Target section above, as the functionality of the properties is the same.
    • Verify execution.Timeout - The amount of time (in seconds) to wait for the verification element to appear/disappear. If the Retry checkbox is selected, the action is performed again, followed by the verification, for the duration specified in the Timeout property of the activity.
    • Verify execution.Verify element - Defines what change you want to check the verification target for. The available options are Appeared - checks whether the element appears, Disappeared - check whether the element disappears, Text Changed - checks whether there are any changes in the text of the element, Visually Changed - checks whether there are any image changes of the element.

Input/Output Element

  • Input Element - The UI element on which the activity is executed, stored in an UIElement object. This field supports only UIElement objects. This object can be obtained from the Output Element property field of other UIAutomation activities.
  • Output Element - Outputs a target UI Element and stores it in a UIElement object, which can be further used to target the same element with other activities.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Options

  • Activate - If selected, the target UI element is brought to the foreground and activated before sending the shortcuts. This option is selected by default.
  • Click before typing - Select whether to click the specified UI element before sending the shortcuts. The options are None (do not click), Single (execute a single click), or Double (execute a double click).
  • Delay between shortcuts - Delay (in seconds) between consecutive keyboard shortcuts. You can choose a predetermined value from the drop-down menu associated with this property field. The default value is 0.5 seconds.

Updated 12 days ago


Keyboard Shortcuts


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.