Device

Mobile. Device

new Device(propsopt ) → {Device}

The description of a Mobile Device test object.
Parameters:
NameTypeAttributesDescription
propsObject <optional>
Initializes the description using the supplied property bag.
Returns:
the description object that was initialized.
Type
Device

Methods

fleetType(fleetTypeopt ) → {string|Description}

Supported in UFT Developer version 24.2 and later

The device fleetType on Digital Lab (UFT Mobile).
Parameters:
NameTypeAttributesDescription
fleetTypestring <optional>

When provided, this method acts as a setter and sets the fleetType value.

The fleetType is relevant only when the device is hosted by OpenText or stored on an AWS farm. (DeviceSource=hosted or amazon_device_farm)

Possible values: any (default), public, or private.

Returns:
If no parameter is provided, the method acts as a getter and returns the current stored fleetType value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

id(idopt ) → {string|Description}

The device ID used by Digital Lab (UFT Mobile).
Parameters:
NameTypeAttributesDescription
idstring <optional>
When provided, this method acts as a setter and sets the identifier value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored identifier value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

location(locationopt ) → {string|Description}

Supported in UFT Developer version 24.2 and later

The public device's geographical location, as defined in Digital Lab (UFT Mobile).
Parameters:
NameTypeAttributesDescription
modelstring <optional>

When provided, this method acts as a setter and sets the location value.

The location is relevant only when the DeviceSource is hosted and the fleetType is public.

Possible values: any (default) or a string representing the geographic location.

Returns:
If no parameter is provided, the method acts as a getter and returns the current stored location value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

manufacturer(manufactureropt ) → {string|Description}

The device manufacturer name
Parameters:
NameTypeAttributesDescription
manufacturerstring <optional>
When provided, this method acts as a setter and sets the manufacturer value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored manufacturer value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

model(modelopt ) → {string|Description}

The device model name
Parameters:
NameTypeAttributesDescription
modelstring <optional>
When provided, this method acts as a setter and sets the model value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored model value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

name(nameopt ) → {string|Description}

The logical name that Digital Lab (UFT Mobile) uses to identify the device.
Parameters:
NameTypeAttributesDescription
namestring <optional>
When provided, this method acts as a setter and sets the name value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored name value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

osType(osTypeopt ) → {string|Description}

The operating system currently running on the device.
Parameters:
NameTypeAttributesDescription
osTypestring <optional>
When provided, this method acts as a setter and sets the osType value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored osType value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

osVersion(osVersionopt ) → {string|Description}

The operating system version currently running on the device.

The following symbols are supported:

>, >=, <, <=

For example:

osVersion(">4.0")

osVersion(">=4.1")

Parameters:
NameTypeAttributesDescription
osVersionstring <optional>
When provided, this method acts as a setter and sets the osVersion value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored osVersion value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description