Open topic with navigation

# LockDevice Method (SrfLab)

Obtains a device from the Mobile Center lab and locks it, so that only the current LeanFT test can perform actions on it. This method has multiple overloads.

In this topic:

## LockDevice(DeviceDescription)

Obtains a device from the Mobile Center lab and locks it, so that only the current LeanFT test can perform actions on it.

C# Syntax

    public static IDevice LockDevice(
       DeviceDescription description
    )

Parameters

description
  The HP.LFT.SDK.Mobile.DeviceDescription defined in Mobile Center.

Back to top

## LockDevice(DeviceDescription,ApplicationDescription[])

Obtains a device from the Mobile Center lab and locks it, so that only the current LeanFT test can perform actions on it.

C# Syntax

    public static IDevice LockDevice(
       DeviceDescription description,
       ApplicationDescription[] appsToInstall
    )

Parameters

description
  The HP.LFT.SDK.Mobile.DeviceDescription defined in Mobile Center.
appsToInstall
  An HP.LFT.SDK.Mobile.ApplicationDescription array representing additional applications to install.

Back to top

## LockDevice(DeviceDescription,ApplicationDescription[],DeviceSource)

Obtains a device from the Mobile Center lab and locks it, so that only the current LeanFT test can perform actions on it.

C# Syntax

    public static IDevice LockDevice(
       DeviceDescription description,
       ApplicationDescription[] appsToInstall,
       DeviceSource deviceSource
    )

Parameters

description
  The HP.LFT.SDK.Mobile.DeviceDescription defined in Mobile Center.
appsToInstall
  An HP.LFT.SDK.Mobile.ApplicationDescription array representing additional applications to install.
deviceSource
  A HP.LFT.SDK.Mobile.DeviceSource representing the source of the device to use.

Back to top

## LockDevice(DeviceDescription, DeviceSessionOptions)

Supported in LeanFT versions 14.52 and later.

Obtains a device from the Mobile Center lab and locks it, so that only the current LeanFT test can perform actions on it.

C# Syntax

    public static IDevice LockDevice(
       deviceDescription description,
       deviceSessionOptions deviceSessionOptions
    )

Parameters

description
  The HP.LFT.SDK.Mobile.DeviceDescription defined in Mobile Center.
deviceSessionOptions
  A HP.LFT.SDK.Mobile.DeviceSessionOptions object supplying session options.

Back to top