Table of Contents

Class MobileLab

The OpenText Functional Testing Lab, where users, applications, and devices are managed.

Inheritance
MobileLab
Namespace: HP.LFT.SDK.Mobile
Assembly: HP.LFT.SDK.dll
Syntax
public static class MobileLab

Properties

MobileCenterAddress

Returns the URI of the OpenText Functional Testing Lab as defined in the LFTRuntime configuration, or null if it is not defined.

Declaration
public static Uri MobileCenterAddress { get; }
Property Value
Type Description
Uri

MobileCenterUserName

Returns the user name of the OpenText Functional Testing Lab as defined in the LFTRuntime configuration, or null if it is not defined.

Declaration
public static string MobileCenterUserName { get; }
Property Value
Type Description
string

Methods

GetDeviceList()

Returns information (a list of IDeviceInfo interfaces) about all the devices in OpenText Functional Testing Lab

Declaration
public static IDeviceInfo[] GetDeviceList()
Returns
Type Description
IDeviceInfo[]

Information (a list of IDeviceInfo interfaces) about all the devices in OpenText Functional Testing Lab

LockDevice(DeviceDescription)

Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDevice(DeviceDescription description)
Parameters
Type Name Description
DeviceDescription description

The DeviceDescription defined in OpenText Functional Testing Lab

Returns
Type Description
IDevice

LockDevice(DeviceDescription, ApplicationDescription[])

Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall)
Parameters
Type Name Description
DeviceDescription description

The DeviceDescription defined in OpenText Functional Testing Lab

ApplicationDescription[] appsToInstall

An ApplicationDescription array representing additional applications to install.

Returns
Type Description
IDevice

LockDevice(DeviceDescription, ApplicationDescription[], DeviceSource)

Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall, DeviceSource deviceSource)
Parameters
Type Name Description
DeviceDescription description

The DeviceDescription defined in OpenText Functional Testing Lab

ApplicationDescription[] appsToInstall

An ApplicationDescription array representing additional applications to install.

DeviceSource deviceSource

A DeviceSource representing the source of the device to use.

Returns
Type Description
IDevice

LockDevice(DeviceDescription, DeviceSessionOptions)

Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDevice(DeviceDescription description, DeviceSessionOptions deviceSessionOptions)
Parameters
Type Name Description
DeviceDescription description

The DeviceDescription defined in OpenText Functional Testing Lab

DeviceSessionOptions deviceSessionOptions

A DeviceSessionOptions object supplying session options.

Returns
Type Description
IDevice

LockDeviceById(string)

Obtains a device from the OpenText Functional Testing Lab by deviceID and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDeviceById(string deviceId)
Parameters
Type Name Description
string deviceId

The device ID used by OpenText Functional Testing Lab

Returns
Type Description
IDevice

LockDeviceByInfo(IDeviceInfo)

Obtains a device from the OpenText Functional Testing Lab by device information and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDeviceByInfo(IDeviceInfo deviceInfo)
Parameters
Type Name Description
IDeviceInfo deviceInfo

An interface (IDeviceInfo) containing information about the device to lock.

Returns
Type Description
IDevice

The locked device.

Remarks

If the lock operation fails, the LockDeviceByInfo method throws an exception.

LockDeviceByName(string)

Obtains a device from the OpenText Functional Testing Lab by device name and locks it, so that only the current test can perform actions on it.

Declaration
public static IDevice LockDeviceByName(string deviceName)
Parameters
Type Name Description
string deviceName

The name that OpenText Functional Testing Lab uses to identify the device.

Returns
Type Description
IDevice

TryLockDeviceByInfo(IDeviceInfo, out IDevice)

Checks whether a device is available in the OpenText Functional Testing Lab and, if so, locks it so that only the current test can perform actions on it.

Declaration
public static bool TryLockDeviceByInfo(IDeviceInfo deviceInfo, out IDevice device)
Parameters
Type Name Description
IDeviceInfo deviceInfo

An interface (IDeviceInfo) containing information about the device to lock.

IDevice device

If the method returns True, this parameter contains the locked IDevice. If the method returns False, the parameter contains a null value.

Returns
Type Description
bool

True if the locking operation succeeded, otherwise false.

Remarks

If this method fails, the test continues without an exception.