activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation Activities

Last updated Jun 5, 2025

Connect

Connects a device to an application.

Definition

Namespace: UiPath.MobileAutomation.API.Contracts

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

Overloads

OverloadDescription
Connect(Device, Application, ConnectionOptions)Connects a device and application objects.
Connect(string, string, ConnectionOptions)Connects a device and application both as configured in Mobile Device Manager.

Connect(Device, Application, ConnectionOptions)

Connects a device and application objects.

Connect(
	    Device device,
	    Application application = null,
	    ConnectionOptions options = null
)Connect(
	    Device device,
	    Application application = null,
	    ConnectionOptions options = null
)
device Device
The device object that you want to connect.
application Application
The application object, as configured in Mobile Device Manager.
options ConnectionOptions (Optional)
Options to further configure the connection.

Connect(string, string, ConnectionOptions)

Connects a device and application both as configured in Mobile Device Manager.

Connect(
	    string name,
	    string applicationName = null,
	    ConnectionOptions options = null
)Connect(
	    string name,
	    string applicationName = null,
	    ConnectionOptions options = null
)
name String
The name of the device, as configured in Mobile Device Manager.
applicationName String
The name of the application, as configured in Mobile Device Manager.
options ConnectionOptions (Optional)
Options to further configure the connection.

Return value

Connection

A connection object, through which you can use the mobile automation coded automation APIs.

MobileOptions.ConnectOptions Class

Use the MobileOptions.ConnectOptions class to further configure your mobile device connection in coded automations.

Definition

Namespace: UiPath.MobileAutomation.API.Models

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

Syntax

public class ConnectOptions : MobileOptionspublic class ConnectOptions : MobileOptions

Constructors

public ConnectOptions()public ConnectOptions()
MobileOptions.ConnectOptions
Initializes a new instance of the MobileOptions.ConnectOptions class.

Properties

UseExistingSession Boolean
If set to true, Studio reuses the existing connection from Mobile Device Manager to execute the coded automation coded automation API, only if the connection details match. Using the existing connection can reduce execution time.
MirroringEnabled Boolean
If the mirroringEnabled parameter is set to true, the execution flow will be mirrored in the opened Mobile Device Manager (MDM). However, even if this parameter is not explicitly set, the execution will still be mirrored in the opened MDM if the UseExistingSession parameter is set.
SingleInstance Boolean
This parameter is used to manage multiple mobile device connections. When set to true, the parameter inspects any open connections in the MDM that share the same connection details and close them. When set to false, all existing connections remain open.
Mobile device connections are considered the same if they match the following information, which is not case sensitive:
  • URL
  • Platform name
  • Device name
  • Platform version
WaitForPageUpdate Boolean
If set to true, after an action is performed, the system waits for both the screenshot and the control tree to be updated before moving on to the next action. When set to false, the system immediately moves to the next action.

Classes

LoggingModel:
  • Syntax: public class LoggingModel : ConnectOptions
  • Constructors: public LoggingModel()
  • Properties:
    • IgnoreConditionalFields Boolean
      If set to true, ignores conditional fields.
    • LoggingEnabled Boolean
      If set to true, enables logging for the connection.
    • FolderPath String
      Enter the folder path on your machine, where you want to save the logs.
    • VideoRecordingEnabled Boolean
      If set to true, enables the video recording of the run.
    • RecordingTimeLimit Int32
      Specify the maximum number of seconds allowed for video recording.
    • VideoQuality VideoQuality
      Choose the video quality type of the recording. You can choose from the following options:
      • VideoQuality.Low
      • VideoQuality.Normal
      • VideoQuality.High
      • VideoQuality.Photo
    • CollectScreenshot Collect
      Choose to either never collect screenshots during a run, or collect screenshots only after the execution of a coded automation API. You can choose between the following options:
      • Collect.AfterActivity
      • Collect.Never
    • CollectPageSource Collect
      Choose to either never collect page source during a run, or collect page source only after the execution of a coded automation API. You can choose between the following options:
      • Collect.AfterActivity
      • Collect.Never

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2025 UiPath. All rights reserved.