UiPath Documentation
activities
latest
false
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.
UiPath logo, featuring letters U and I in white

UIAutomation-Aktivitäten

Letzte Aktualisierung 16. Apr. 2026

Offen

Öffnet eine Desktopanwendung oder eine Webbrowserseite zur Verwendung in der UI-Automatisierung.

Diese API wird durch Aufrufen des UiAutomation-Diensts verwendet, basierend auf dem folgenden Format: uiAutomation.API(). Beispiel: uiAutomation.Open().

Definition

Namespace: UiPath.UIAutomationNext.API.Contracts

Assembly: UiPath.UIAutomationNext.API.Contracts (in UiPath.UIAutomationNext.API.Contracts dll)

Überladungen

ÜberladenBeschreibung
Open(String, TargetAppOptions, String, String)Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, die durch den Bildschirmnamen aus dem Objekt-Repository identifiziert wird.
Open(TargetAppModel, TargetAppOptions)Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, identifiziert durch das TargetAppModel -Objekt.
Open(String, String, String, NAppOpenMode, NWindowResize, NInteractionMode)Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, die durch den Bildschirmnamen aus dem Objekt-Repository identifiziert wird, zusammen mit anderen Anpassungen der App oder Webseite.

Open(String, TargetAppOptions, String, String)

Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, die durch den Bildschirmnamen aus dem Objekt-Repository identifiziert wird.

Open(
    string screenName,  
    TargetAppOptions targetAppOptions, 
    [string appName],
    [string appVersion])
Open(
    string screenName,  
    TargetAppOptions targetAppOptions, 
    [string appName],
    [string appVersion])

screeName String : Der Name des Bildschirms, auf den Sie sich konzentrieren möchten, als String, der im Object-Repository aufgezeichnet wurde.

targetAppOptions : Zusätzliche Optionen und Einstellungen für das Anhängen an die Anwendung oder Webseite:

* `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](https://docs.uipath.com/studio/docs/chromium-api).
  + `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](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
    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 if `FilePath` or `URL`
    are provided)
  + `Always` (open another instance of the
    application even if one is already open, only works if
    `FilePath` or `URL` are
    provided)
* `WindowResize NWindowResize` - choose
  the size of the window:
  + `None`
  + `Maximize`
  + `Restore`
  + `Minimize`
* `UserDataFolderMode
  BrowserUserDataFolderMode` - The
  `UserDataFolderMode` 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 if `UserDataFolderPath` 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 in `UserDataFolderPath` or an auto
    generated path if `UserDataFolderPath` 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` - input
  `True` if you want to open the browser in
  incognito mode. By default it's set to `False`.
* `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.
* `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](https://docs.uipath.com/de/studio/docs/chromium-api).
  + `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](https://docs.uipath.com/de/activities/other/latest/user-guide/project-settings-ui-automation)
    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 if `FilePath` or `URL`
    are provided)
  + `Always` (open another instance of the
    application even if one is already open, only works if
    `FilePath` or `URL` are
    provided)
* `WindowResize NWindowResize` - choose
  the size of the window:
  + `None`
  + `Maximize`
  + `Restore`
  + `Minimize`
* `UserDataFolderMode
  BrowserUserDataFolderMode` - The
  `UserDataFolderMode` 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 if `UserDataFolderPath` 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 in `UserDataFolderPath` or an auto
    generated path if `UserDataFolderPath` 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` - input
  `True` if you want to open the browser in
  incognito mode. By default it's set to `False`.
* `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 : Der Name der Anwendung, an die angehängt werden soll. Dieser Parameter gilt für Desktopanwendungen.

appVersion String : Die Version der Anwendung, an die angehängt werden soll. Dieser Parameter gilt für Desktopanwendungen.

Open(TargetAppModel, TargetAppOptions)

Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, identifiziert durch das TargetAppModel -Objekt.

Open(
    TargetAppModel targetApp,
    [TargetAppOptions targetAppOptions])
Open(
    TargetAppModel targetApp,
    [TargetAppOptions targetAppOptions])

targetApp TargetAppModel : Die Zielanwendung oder Webseite, an die angehängt werden soll. Es ist ein Objekt vom Typ TargetAppModel , das Informationen über die Anwendung bereitstellt:

* `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.
* `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 : Zusätzliche Optionen und Einstellungen für das Anhängen an die Anwendung oder Webseite:

* `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](https://docs.uipath.com/studio/docs/chromium-api).
  + `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](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
    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 if
    `FilePath` or `URL` are
    provided)
  + `Always` (open another instance of the
    application even if one is already open, only works if
    `FilePath` or `URL` are
    provided)
* `WindowResize NWindowResize` - choose the size
  of the window:
  + `None`
  + `Maximize`
  + `Restore`
  + `Minimize`
* `UserDataFolderMode BrowserUserDataFolderMode`
  - The `UserDataFolderMode` 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 if `UserDataFolderPath` 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 in
    `UserDataFolderPath` or an auto generated
    path if `UserDataFolderPath` 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` - input
  `True` if you want to open the browser in
  incognito mode. By default it's set to `False`.
* `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.
* `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](https://docs.uipath.com/de/studio/docs/chromium-api).
  + `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](https://docs.uipath.com/de/activities/other/latest/user-guide/project-settings-ui-automation)
    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 if
    `FilePath` or `URL` are
    provided)
  + `Always` (open another instance of the
    application even if one is already open, only works if
    `FilePath` or `URL` are
    provided)
* `WindowResize NWindowResize` - choose the size
  of the window:
  + `None`
  + `Maximize`
  + `Restore`
  + `Minimize`
* `UserDataFolderMode BrowserUserDataFolderMode`
  - The `UserDataFolderMode` 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 if `UserDataFolderPath` 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 in
    `UserDataFolderPath` or an auto generated
    path if `UserDataFolderPath` 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` - input
  `True` if you want to open the browser in
  incognito mode. By default it's set to `False`.
* `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.

Open(String, String, String, NAppOpenMode, NWindowResize, NInteractionMode)

Öffnet eine bestimmte Desktopanwendung oder Webseite zur Verwendung in der UI-Automatisierung, die durch den Bildschirmnamen aus dem Objekt-Repository identifiziert wird, zusammen mit anderen Anpassungen der App oder Webseite.

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 : Der Name des Bildschirms, auf den Sie sich konzentrieren möchten, als String, der im Object-Repository aufgezeichnet wurde.

appName String : Der Name der Anwendung, an die angehängt werden soll. Dieser Parameter gilt für Desktopanwendungen.

appVersion String : Die Version der Anwendung, an die angehängt werden soll. Dieser Parameter gilt für Desktopanwendungen.

openMode NAppOpenMode : Wählen Sie aus, wann die Zielanwendung für die Ausführung der Automatisierung geöffnet werden soll:

* `Never` (never open the application)
* `IfNotOpen` (open only if the application is closed,
  this is the default selection, only works if the
  `Url` parameter is configured)
* `Always` - (open another instance of the application
  even if one is already open, only works if the `Url`
  parameter is configured).
* `Never` (never open the application)
* `IfNotOpen` (open only if the application is closed,
  this is the default selection, only works if the
  `Url` parameter is configured)
* `Always` - (open another instance of the application
  even if one is already open, only works if the `Url`
  parameter is configured).

NWindowResize : Wählen Sie die Größe des Fensters:

* `None`
* `Maximize`
* `Restore`
* `Minimize`
* `None`
* `Maximize`
* `Restore`
* `Minimize`

NInteractionMode : Wählen Sie aus, welche API der Roboter verwenden soll, um mit der Zielanwendung zu interagieren:

* `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](https://docs.uipath.com/studio/docs/chromium-api).
* `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](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
  feature.
* `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](https://docs.uipath.com/de/studio/docs/chromium-api).
* `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](https://docs.uipath.com/de/activities/other/latest/user-guide/project-settings-ui-automation)
  feature.

Ausführen von WebDriverMode als monitorlos

Um WebDriverMode in einer monitorlosen Konfiguration zu betreiben, können diese Schritte als Anleitung dienen.

Beginnen Sie mit der Definition einer Variablen für Ihren Bildschirm. Verwenden Sie die Funktion uiAutomation.Open, um eine neue Anwendung im Browser Ihrer Wahl zu öffnen – in diesem Fall: Edge. Verwenden Sie anschließend die Klasse Options in der Überladung, um bestimmte Browseroptionen anzugeben. Legen Sie unter diesen Optionen webDriverMode auf NWebDriverMode.Headless fest.

Der entsprechende Code sieht folgendermaßen aus:

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));

Dieser Code versetzt Ihren WebDriver in den monitorlosen Modus und ermöglicht so die Browser-Automatisierung, ohne dass der Browser sichtbar geöffnet ist.

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support

Möchten Sie lernen? UiPath Academy

Haben Sie Fragen? UiPath-Forum

Auf dem neuesten Stand bleiben