- Overview
- UI Automation
- Applications and technologies automated with UI Automation
- Project compatibility
- UI-ANA-016 - Pull Open Browser URL
- UI-ANA-017 - ContinueOnError True
- UI-ANA-018 - List OCR/Image Activities
- UI-DBP-006 - Container Usage
- UI-DBP-013 - Excel Automation Misuse
- UI-DBP-030 - Forbidden Variables Usage In Selectors
- UI-PRR-001 - Simulate Click
- UI-PRR-002 - Simulate Type
- UI-PRR-003 - Open Application Misuse
- UI-PRR-004 - Hardcoded Delays
- UI-REL-001 - Large Idx in Selectors
- UI-SEC-004 - Selector Email Data
- UI-SEC-010 - App/Url Restrictions
- UI-USG-011 - Non Allowed Attributes
- UX-SEC-010 - App/Url Restrictions
- UX-DBP-029 - Insecure Password Use
- UI-PST-001 - Audit Log Level in Project Settings
- UiPath Browser Migration Tool
- Clipping region
- Computer Vision Recorder
- Activate
- Anchor Base
- Attach Browser
- Attach Window
- Block User Input
- Callout
- Check
- Click
- Click Image
- Click Image Trigger
- Click OCR Text
- Click Text
- Click Trigger
- Close Application
- Close Tab
- Close Window
- Context Aware Anchor
- Copy Selected Text
- Element Attribute Change Trigger
- Element Exists
- Element Scope
- Element State Change Trigger
- Export UI Tree
- Extract Structured Data
- Find Children
- Find Element
- Find Image
- Find Image Matches
- Find OCR Text Position
- Find Relative Element
- Find Text Position
- Get Active Window
- Get Ancestor
- Get Attribute
- Get Event Info
- Get From Clipboard
- Get Full Text
- Get OCR Text
- Get Password
- Get Position
- Get Source Element
- Get Text
- Get Visible Text
- Go Back
- Go Forward
- Go Home
- Google Cloud Vision OCR
- Hide Window
- Highlight
- Hotkey Trigger
- Hover
- Hover Image
- Hover OCR Text
- Hover Text
- Image Exists
- Indicate On Screen
- Inject .NET Code
- Inject Js Script
- Invoke ActiveX Method
- Key Press Trigger
- Load Image
- Maximize Window
- Microsoft Azure Computer Vision OCR
- Microsoft OCR
- Microsoft Project Oxford Online OCR
- Minimize Window
- Monitor Events
- Mouse Trigger
- Move Window
- Navigate To
- OCR Text Exists
- On Element Appear
- On Element Vanish
- On Image Appear
- On Image Vanish
- Open Application
- Open Browser
- Refresh Browser
- Replay User Event
- Restore Window
- Save Image
- Select Item
- Select Multiple Items
- Send Hotkey
- Set Clipping Region
- Set Focus
- Set Text
- Set To Clipboard
- Set Web Attribute
- Show Window
- Start Process
- System Trigger
- Take Screenshot
- Tesseract OCR
- Text Exists
- Tooltip
- Type Into
- Type Secure Text
- Use Foreground
- Wait Attribute
- Wait Element Vanish
- Wait Image Vanish
- Application Event Trigger
- Check/Uncheck
- Check App State
- Check Element
- Click
- Click Event Trigger
- Drag and Drop
- Extract Table Data
- For Each UI Element
- Get Attribute
- Get Browser Data
- Get Text
- Get URL
- Go to URL
- Highlight
- Hover
- Inject Js Script
- Keyboard Shortcuts
- Keypress Event Trigger
- Mouse Scroll
- Navigate Browser
- Select Item
- Set Browser Data
- Set Runtime Browser
- Set Text
- Take Screenshot
- Type Into
- Use Application/Browser
- Perform browser search and retrieve results using UI Automation APIs
- Web Browsing
- Find Images
- Click Images
- Trigger and Monitor Events
- Create and Override Files
- HTML Pages: Extract and Manipulate Information
- Window Manipulation
- Automated List Selection
- Find and Manipulate Window Elements
- Manage Text Automation
- Load and Process Images
- Manage Mouse Activated Actions
- Automate Application Runtime
- Automated Run of a Local Application
- Browser Navigation
- Web Automation
- Trigger Scope Example
- Enable UI Automation support in DevExpress
- Computer Vision Local Server
- Mobile Automation
- Release notes
- Project compatibility
- Get Log Types
- Get Logs
- Get Page Source
- Get Device Orientation
- Get Session Identifier
- Install App
- Manage Current App
- Manage Other App
- Open DeepLink
- Open URL
- Mobile Device Connection
- Directional Swipe
- Draw Pattern
- Positional Swipe
- Press Hardware Button
- Set Device Orientation
- Take Screenshot
- Take Screenshot Part
- Element Exists
- Execute Command
- Get Attribute
- Get Selected Item
- Get Text
- Set Selected Item
- Set Text
- Swipe
- Tap
- Type Text
- Terminal
UI Automation Activities
Open
Opens a desktop application or web browser page to use in UI automation.
uiAutomation.API()
. For example,
uiAutomation.Open()
.
Namespace: UiPath.UIAutomationNext.API.Contracts
Assembly: UiPath.UIAutomationNext.API.Contracts (in UiPath.UIAutomationNext.API.Contracts dll)
Overload | Description |
---|---|
Open(String, TargetAppOptions, String,
String) | Opens a specific desktop application or web page to use in UI automation, identified by the screen name from the Object Repository. |
Open(TargetAppModel, TargetAppOptions) | Opens a specific desktop application or web page to use in UI
automation, identified by the TargetAppModel
object.
|
Open(String, String, String, NAppOpenMode, NWindowResize,
NInteractionMode) | Opens a specific desktop application or web page to use in UI automation, identified by the screen name from the Object Repository, along with other customizations of the app or web page. |
Opens a specific desktop application or web page to use in UI automation, identified by the screen name from the Object Repository.
Open(
string screenName,
TargetAppOptions targetAppOptions,
[string appName],
[string appVersion])
Open(
string screenName,
TargetAppOptions targetAppOptions,
[string appName],
[string appVersion])
screeName
String- The name of the screen you want to focus on, as a String recorded inside the Object Repository.
targetAppOptions
- Additional options and settings for attaching to the application or web
page:
Timeout Double
- 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. When indicating a window in a Remote Desktop environment, the Timeout default setting is set to 60 seconds.InteractionMode NInteractionMode
:HardwareEvents
- Uses the hardware driver to perform the action. This is the slowest API, 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.DebuggerApi
- Performs actions using debugger APIs. Works only for Chromium elements. Sends all text in one go. Works even if target app is not in focus. For more details, check out this page.WindowMessages
- 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.Background
- Runs actions in the background. Tries to use either Simulate or Chromium API where possible, while complex APIs (image, native text) run as usual, in the foreground. It is highly recommended to use this API with the Verify Execution feature.
OpenMode NAppOpenMode
- choose when to open the app:Never
(never open the application)IfNotOpen
(open only if the application is closed, this is the default selection, only works ifFilePath
orURL
are provided)Always
(open another instance of the application even if one is already open, only works ifFilePath
orURL
are provided)
WindowResize NWindowResize
- choose the size of the window:None
Maximize
Restore
Minimize
UserDataFolderMode BrowserUserDataFolderMode
- TheUserDataFolderMode
you want to set. It is used to start the browser with a specific user data folder.Automatic
- Picture In Picture mode uses a different folder than the default mode, automatically generated ifUserDataFolderPath
is not set.DefaultFolder
- Uses the default browser folder, no matter if it runs in the main or PIP session.CustomFolder
- Uses the folder specified inUserDataFolderPath
or an auto generated path ifUserDataFolderPath
is not set.
UserDataFolderPath String
- The user data folder that the browser uses. Defaults to%LocalAppData%\UiPath\PIP Browser Profiles\BrowserType
if not set.IsIncognito Boolean
- inputTrue
if you want to open the browser in incognito mode. By default it's set toFalse
.WebDriverMode NWebDriverMode
- Indicates how the WebDriver is used when opening a new browser session. The following options are available:Disabled
- Disables the use of WebDriver.WithGUI
- The GUI of the browser is displayed.Headless
- The browser is launched silently, with no GUI.
appName
String- The name of the application to attach to. This parameter is applicable for desktop applications.
appVersion
String- The version of the application to attach to. This parameter is applicable for desktop applications.
TargetAppModel
object.
Open(
TargetAppModel targetApp,
[TargetAppOptions targetAppOptions])
Open(
TargetAppModel targetApp,
[TargetAppOptions targetAppOptions])
targetApp
TargetAppModel
- The target application or web page to attach to. It is an object of type
TargetAppModel
that provides information about the application:Selector
- An XML fragment that stores the attributes of a user interface element.FilePath
- If the application is not a web browser, specifies the full path of the executable file to open.Arguments
- If the application is not a web browser, you can specify parameters to pass to the target application at startup.Url
- If the application is a web browser, specifies the URL of the web page to open.Title
- The title of the application or browser.
targetAppOptions
- Additional options and settings for attaching to the application or web
page:
Timeout Double
- 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. When indicating a window in a Remote Desktop environment, the Timeout default setting is set to 60 seconds.InteractionMode NInteractionMode
:HardwareEvents
- Uses the hardware driver to perform the action. This is the slowest API, 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.DebuggerApi
- Performs actions using debugger APIs. Works only for Chromium elements. Sends all text in one go. Works even if target app is not in focus. For more details, check out this page.WindowMessages
- 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.Background
- Runs actions in the background. Tries to use either Simulate or Chromium API where possible, while complex APIs (image, native text) run as usual, in the foreground. It is highly recommended to use this API with the Verify Execution feature.
OpenMode NAppOpenMode
- choose when to open the app:Never
(never open the application)IfNotOpen
(open only if the application is closed, this is the default selection, only works ifFilePath
orURL
are provided)Always
(open another instance of the application even if one is already open, only works ifFilePath
orURL
are provided)
WindowResize NWindowResize
- choose the size of the window:None
Maximize
Restore
Minimize
UserDataFolderMode BrowserUserDataFolderMode
- TheUserDataFolderMode
you want to set. It is used to start the browser with a specific user data folder.Automatic
- Picture In Picture mode uses a different folder than the default mode, automatically generated ifUserDataFolderPath
is not set.DefaultFolder
- Uses the default browser folder, no matter if it runs in the main or PIP session.CustomFolder
- Uses the folder specified inUserDataFolderPath
or an auto generated path ifUserDataFolderPath
is not set.
UserDataFolderPath String
- The user data folder that the browser uses. Defaults to%LocalAppData%\UiPath\PIP Browser Profiles\BrowserType
if not set.IsIncognito Boolean
- inputTrue
if you want to open the browser in incognito mode. By default it's set toFalse
.WebDriverMode NWebDriverMode
- Indicates how the WebDriver is used when opening a new browser session. The following options are available:Disabled
- Disables the use of WebDriver.WithGUI
- The GUI of the browser is displayed.Headless
- The browser is launched silently, with no GUI.
Opens a specific desktop application or web page to use in UI automation, identified by the screen name from the Object Repository, along with other customizations of the app or web page.
Open(
string screenName,
[string appName],
[string appVersion],
[NAppOpenMode openMode],
[NWindowResize windowResize],
[NInteractionMode interactionMode])
Open(
string screenName,
[string appName],
[string appVersion],
[NAppOpenMode openMode],
[NWindowResize windowResize],
[NInteractionMode interactionMode])
screeName
String- The name of the screen you want to focus on, as a String recorded inside the Object Repository.
appName
String- The name of the application to attach to. This parameter is applicable for desktop applications.
appVersion
String- The version of the application to attach to. This parameter is applicable for desktop applications.
openMode
NAppOpenMode
- 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, only works if theUrl
parameter is configured)Always
- (open another instance of the application even if one is already open, only works if theUrl
parameter is configured).
NWindowResize
- Choose the size of the window:
None
Maximize
Restore
Minimize
NInteractionMode
- Choose which API the Robot should use to interact with the target
application:
HardwareEvents
- Uses the hardware driver to perform the action. This is the slowest API, 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.DebuggerApi
- Performs actions using debugger APIs. Works only for Chromium elements. Sends all text in one go. Works even if target app is not in focus. For more details, check out this page.WindowMessages
- 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.Background
- Runs actions in the background. Tries to use either Simulate or Chromium API where possible, while complex APIs (image, native text) run as usual, in the foreground. It is highly recommended to use this API with the Verify Execution feature.
To operate WebDriverMode in a headless configuration, these steps can serve as a guide.
uiAutomation.Open
to open a new application in the browser of
your choice - in this instance, Edge. After that, use the Options
class in the overload to specify certain browser options. Among these options, set
webDriverMode
to NWebDriverMode.Headless
.
The corresponding code looks like this:
var screen = uiAutomation.Open(Descriptors.NewApplication.Edge, Options.AppOpen().WithBrowserOptions(webDriverMode: NWebDriverMode.Headless));
var screen = uiAutomation.Open(Descriptors.NewApplication.Edge, Options.AppOpen().WithBrowserOptions(webDriverMode: NWebDriverMode.Headless));
This code functions to set your WebDriver to Headless mode, enabling the browser automation without the browser being visibly open.