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

UI Automation Activities

Last updated Dec 4, 2024

DeviceBuilder Class

Use this class to configure the device that you want to connect with.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

Syntax

public class DeviceBuilderpublic class DeviceBuilder
The DeviceBuilder type exposes the following members.

Constructors

DeviceBuilder(
	    string appiumUrl,
	    string displayName
)DeviceBuilder(
	    string appiumUrl,
	    string displayName
)
DeviceBuilder
Initializes a new instance of the DeviceBuilder class.
appiumUrl String
The Appium URL.
displayName String
The name of the device

Methods

These are the methods that you can use to build your device.

Build

Create a Device object.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.Build()

public Device Build()public Device Build()

Return Value

A Device object that you use to create a connection.

WithCapabilities

Configure additional desired capabilities for the device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.WithCapabilities

WithCapabilities(
	    Dictionary<string, string> capabiltiies
)WithCapabilities(
	    Dictionary<string, string> capabiltiies
)
capabilities Dictionary < String, String>
Additional desired capabilities for a device.
Visit Appium capabilities to learn about the additional capabilities that you can configure.

Return value

DeviceBuilder

Returns an updated device builder.

WithCapability

Configure a single capability for the device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.WithCapability(string, string)

WithCapability(
	    string key,
	    string value
)WithCapability(
	    string key,
	    string value
)
key String
The name of the capability that you want to configure.
Visit Appium capabilities to learn about the additional capabilities that you can configure.
value String
Enter the value of the capability.

Return value

DeviceBuilder

Returns an updated device builder.

WithDeviceName

Specify the name of the device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.DeviceName(string)

WithDeviceName(
	    string deviceName
)WithDeviceName(
	    string deviceName
)
deviceName String
The name of a particular device to automate. (for example, iPhone 13).

Return value

DeviceBuilder

Returns an updated device builder.

WithHttpHeaders

Add custom http headers to the default one that Appium generates to allow for an easier mobile testing experience behind a proxy. Custom Http headers allow mobile testing to work with proxies that accept only certain headers, by specifically adding them. The custom headers that you add don't overwrite the already existent header, but they add to the collection of values that the header can support.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.WithHttpHeaders(string)

WithHttpHeaders(
	Dictionary<string, string> headers
)WithHttpHeaders(
	Dictionary<string, string> headers
)
headers Dictionary < String, String>
The names and values of the custom headers that you want to add.

Return value

DeviceBuilder

Returns an updated device builder.

WithPlatformName

Specify the platform name of a device.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.WithPlatformName(PaltformType)

WithPlatformName(
	    PlatformType type
)WithPlatformName(
	    PlatformType type
)
type PlatformType
The type of platform hosting the app or browser.

Return value

DeviceBuilder

Returns an updated device builder.

WithPlatformVersion

Specify the version of the device's platform.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

DeviceBuilder.WithPlatformVersion(string)

WithPlatformVersion(
	    string version
)WithPlatformVersion(
	    string version
)
version String
The version of a platform. (For example, iOS 16)

Return value

DeviceBuilder

Returns an updated device builder.

  • Definition
  • Syntax
  • Constructors
  • Methods
  • Build
  • WithCapabilities
  • WithCapability
  • WithDeviceName
  • WithHttpHeaders
  • WithPlatformName
  • WithPlatformVersion

Was this page helpful?

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