Subscribe

UiPath Activities

The UiPath Activities Guide

Use Application/Browser

UiPath.UIAutomationNext.Activities.NApplicationCard

Description

Opens a desktop application or web browser page to use in UI automation. After you add the activity and indicate the application or web page to use, add the activities to perform in the application inside the Use Application/Browser activity. If the application is not already open, it is opened when the project is executed.

Note:

Starting with UIAutomation v20.10.x, multiple Use Application/Browser activities can be nested into each other. This enables you to automate multiple applications simultaneously.

Properties

Common

  • Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
  • DisplayName - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate the application.
  • 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

  • Unified Target Application - Double-click this category to configure the following settings:
    • Arguments - If the application is not a web browser, you can specify parameters to pass to the target application at startup. You can use this property to open a specific file with the application. For example, if the target application is Acrobat Reader, you can open a specific workbook by providing the full path to the file. To open the file C:\Sample.pdf, enter "C:\Sample.pdf". Certain application types are automatically identified and autofill the Arguments property, such as Java apps, Office Suite apps, Adobe Acrobat, or Windows File Explorer.
    • File path - If the application is not a web browser, specifies the full path of the executable file to open. If a file path is specified, the URL property is cleared.

      Note:

      When the defined File path is dynamic, clicking Indicate target on screen in child activities generates an error if the target application is not already open.

    • Selector - An XML fragment that stores the attributes of a user interface element.
    • URL - If the application is a web browser, specifies the URL of the web page to open. If a URL is specified, the File path property is cleared.

Input/Output Element

  • Input Element - The target element you want to use with this application, stored in an UIElement object. This object can be retrieved from the Output Element property of another UIAutomation activity. You can use this property field to pass the target element from a previous activity to this one without having to indicate it again. This field supports only UIElement variables.
  • Output Element - Outputs the target element indicated in this activity to an UIElement variable which can then be reused in other activities. This field supports only UIElement variables.

Misc

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

Options

  • Close - Select when to close the target application after the automation executes all the activities added inside this activity: Never (never close the application), IfOpenedByAppBrowser (close only if the application was opened by the automation), or Always (close the application every time).
  • Input mode - Select which method the Robot should use to interact with the target application:
    • Window Messages - Sends the mouse and keyboard input through Win32 messages. Recommended for desktop apps. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.
    • Hardware Events - Uses the hardware driver to perform the action. This is the slowest method, it cannot work in the background, but it is compatible with all desktop apps.
    • Simulate - Simulates the action using accessibility APIs. Recommended in browser automation, Java apps, or SAP. More reliable than Hardware Events. Sends all text in a single action. Works even if the target application is not in focus. Please test if your target application UI element supports this.

  • Open - Select when to open the target application for the execution of the automation: Never (never open the application), IfNotOpen (open only if the application is closed, this is the default selection), or Always (open another instance of the application even if one is already open).
  • Resize window - Defines whether the application/browser is resized when initialized.
    • None – No resize is applied to the application/browser.
    • Maximize – The application/browser is maximized when initialized.
    • Restore to current size – The application/browser is resized and moved to the position and size it had when indicated, if possible.
  • Window attach mode - Defines where inner activities search for their target elements.
    • Application instance - Inner activities search the indicated application instance, including all parent and child windows (alerts, popups, etc). Other instances of the application are excluded.
    • Single window - Inner activities search only in the indicated window.

Options - Browser

  • Incognito/private window - If selected, opens the new browser session in incognito/private mode. By default, this check box is cleared.
  • User Data Folder Mode - The UserDataFolderMode you want to set. It is used to start the browser with a specific user data folder.
    • UserDataFolderMode.Automatic - Picture In Picture mode uses a different folder than the default mode, automatically generated if UserDataFolderPath is not set.
    • UserDataFolderMode.DefaultFolder - Uses the default browser folder, no matter if it runs in the main or PIP session.
    • UserDataFolderMode.CustomFolder - Uses the folder specified in UserDataFolderPath or an auto generated path if UserDataFolderPath is not set.
  • User Data Folder Path - The user data folder that the browser uses. Defaults to %LocalAppData%\UiPath\PIP Browser Profiles\BrowserType if not set.

UiPath.UIAutomationNext.Activities.NApplicationCard

Description

Opens a desktop application or web browser page to use in UI automation. After you add the activity and indicate the application or web page to use, add the activities to perform in the application inside the Use Application/Browser activity. If the application is not already open, it is opened when the project is executed.

Note:

Starting with UIAutomation v20.10.x, multiple Use Application/Browser activities can be nested into each other. This enables you to automate multiple applications simultaneously.

To learn how to use this activity, see Tutorial: Working with UI Automation.

Configuring the Activity

In the Body of the Activity

  • Click Indicate Application to identify the application by moving the mouse to its window and clicking it. If the target is a browser web page, navigate to the page before you indicate the application.
  • After you indicate the target:
    • Manage the target by clicking Menu Options button and selecting the following options:
      • Indicate target on screen - Indicate the application again.
      • Highlight Target - View the indicated application on your screen surrounded in a box.
      • Show informative screenshot - View a screenshot of the target application or web page.
    • Configure application launch settings:
      • If the application is a web browser, you can click Plus plus button on the right side of the Browser URL field, and then use one of the options in the menu to edit the URL of the web page to open.
      • If the application is not a web browser, you can click Plus plus button on the right side of the Application path field, and then use one of the options in the menu to edit the full path of the executable file to open. For applications installed in user mode, the automation does not save the actual path that includes the username, a relative path is used and displayed in the field as User Folder.

        Note:

        When the path defined in the Application path field is dynamic, clicking Indicate target on screen in child activities generates an error if the target application is not already open.

      • If the application is not a web browser, you can specify parameters to pass to the target application at startup from the Application arguments field. For example, if the target application is Acrobat Reader, you can open a specific PDF file by providing the full path to the file. To open the file C:\Sample.pdf, click Plus plus button > Text, and then enter C:\Sample.pdf in the Text Builder. Certain application types are automatically identified and autofill the Arguments property, such as Java apps, Office Suite apps, Adobe Acrobat, or Windows File Explorer.

In the Properties Panel

Common

  • Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
  • DisplayName - The name displayed for the activity in the Designer panel. A display name is automatically generated when you indicate the application.
  • Timeout - Specify for which to wait for the activity to be executed before throwing an error. The default value is 30 seconds.

Input

  • Unified Target Application - Double-click this category to configure the following settings:

Input/Output Element

  • Input Element - The target element you want to use with this application, stored in an `UIElement` object. This object can be retrieved from the **Output Element** property of another UIAutomation activity. You can use this property field to pass the target element from a previous activity to this one without having to indicate it again. This field supports only `UIElement` variables.
  • Output Element - Outputs the target element indicated in this activity to an `UIElement` variable which can then be reused in other activities. This field supports only `UIElement` variables.

Misc

  • Private - If selected, the data used in the activity is not logged by StudioX.

Options

  • Close - Select when to close the target application after the automation executes all the activities added inside this activity: Never (never close the application), IfOpenedByAppBrowser (close only if the application was opened by the automation), or Always (close the application every time).
  • Input mode - Select which method the Robot should use to interact with the target application:
    • Window Messages - Sends the mouse and keyboard input through Win32 messages. Recommended for desktop apps. Usually more reliable than Hardware Events. Sends all text in a single action. Works even if target app is not in focus. Please test if your target application UI element supports this.
    • Hardware Events - Uses the hardware driver to perform the action. This is the slowest method, it cannot work in the background, but it is compatible with all desktop apps.
    • Simulate - Simulates the action using accessibility APIs. Recommended in browser automation, Java apps, or SAP. More reliable than Hardware Events. Sends all text in a single action. Works even if the target application is not in focus. Please test if your target application UI element supports this.

  • Open - Select when to open the target application for the execution of the automation: Never (never open the application), IfNotOpen (open only if the application is closed, this is the default selection), or Always (open another instance of the application even if one is already open)
  • Resize window - Defines whether the application/browser is resized when initialized.
    • None – No resize is applied to the application/browser.
    • Maximize – The application/browser is maximized when initialized.
    • Restore to current size – The application/browser is resized and moved to the position and size it had when indicated, if possible.
  • Window attach mode - Defines where inner activities search for their target elements.
    • Application instance - Inner activities search the indicated application instance, including all parent and child windows (alerts, popups, etc). Other instances of the application are excluded.
    • Single window - Inner activities search only in the indicated window.

Options - Browser

  • Incognito/private window - If selected, opens the new browser session in incognito/private mode. By default, this check box is cleared.
  • User Data Folder Mode - The UserDataFolderMode you want to set. It is used to start the browser with a specific user data folder.
    • UserDataFolderMode.Automatic - Picture In Picture mode uses a different folder than the default mode, automatically generated if UserDataFolderPath is not set.
    • UserDataFolderMode.DefaultFolder - Uses the default browser folder, no matter if it runs in the main or PIP session.
    • UserDataFolderMode.CustomFolder - Uses the folder specified in UserDataFolderPath or an auto generated path if UserDataFolderPath is not set.
  • User Data Folder Path - The user data folder that the browser uses. Defaults to %LocalAppData%\UiPath\PIP Browser Profiles\BrowserType if not set.

Updated 28 days ago


Use Application/Browser


Suggested Edits are limited on API Reference Pages

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