TryLockDeviceByInfo Method
Checks whether a device is available in the Digital Lab (UFT Mobile) lab and, if so, locks it so that only the current UFT Developer test can perform actions on it.
If this method fails, the test continues without an exception.

C# Syntax

public static bool TryLockDeviceByInfo( 
   IDeviceInfo deviceInfo,
   out IDevice device


An interface (IDeviceInfo) containing information about the device to lock.
If the method returns True, this parameter contains the locked IDevice. If the method returns False, the parameter contains a null value.

Return Value

True if the locking operation succeeded, otherwise false.