IDevice Interface
A mobile device.

C# Syntax

Public Properties
 NameDescription
PropertyDisplayNameThe object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
PropertyIdThe ID of the device in UFT Mobile.  
PropertyManufacturerThe manufacturer of the device.  
PropertyModelThe model name of the device.  
PropertyNameThe name of the device as defined in UFT Mobile.  
PropertyOSTypeThe operating system currently running on the device.  
PropertyOSVersionThe operating system version currently running on the device.  
PropertyParentThe parent test object of this test object. The child object must be obtained using the Describe method, otherwise, it returns null. (Inherited from HP.LFT.SDK.ITestObject)
PropertySourceThe Source to take the device from. DeviceSource  
Top
Public Methods
 NameDescription
MethodBackPresses the device's Back button. (Android Only)  
MethodCloseViewerCloses the RDP window for the device (if open). Calling this method does not release the device if it is locked.  
MethodDescribe<TChild>Creates a child test object of this test object. (Inherited from HP.LFT.SDK.ITestObjectDescriber)
MethodDispose (Inherited from System.IDisposable)
MethodExistsChecks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
MethodFindChildren<TChild>Returns all the child test objects that match the specified test object type and description filter. For example, you can use this method to retrieve all Web buttons on a Page with type="submit". (Inherited from HP.LFT.SDK.ITestObject)
MethodGetDescriptionReturns a clone of the description for this test object. The test object must be obtained using the Describe method, otherwise, this method returns null. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetLogsGet device logs collected since the device was locked.  
MethodGetSnapshotCaptures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetTextLocationsReturns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
MethodGetVisibleTextReturns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetVitalsGet an accumulation of the device vitals from the time the device was locked, in one second intervals.  
MethodHighlightHighlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightMatches<TChild>Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
MethodHomePresses the device's Home button. (Android Only)  
MethodIsViewerOpenChecks if the RDP window for the device is open.  
MethodMenuPresses the device's Menu button. (Android Only)  
MethodNetworkVirtualizationStartStarts the Network Virtualization service using the specified network profile.  
MethodNetworkVirtualizationStopStops the Network Virtualization service.  
MethodOpenViewerOpens an RDP window for the device. If a window for the device is already open, another window will not open.  
MethodRecentAppsOpens the list of recent applications. (Android Only)  
MethodSendKeyOverloaded. Simulates pressing a special key in the device keyboard.  
MethodSendStringOverloaded. Simulates entering text (a string) using the device keyboard.  
MethodSetDescriptionReplaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
MethodSetOrientationSets the device orientation.  
MethodSimulateGPSRelocateSimulates a change in the device's GPS location. (Android Only)  
MethodSimulateIncomingCallOverloaded. Simulates an incoming call.  
MethodSimulateIncomingSMSOverloaded. Simulates an incoming SMS.  
Method

SvUploadScenario

Uploads scenario definition files to the device and makes them available in the current session.

C# Syntax

string SvUploadScenario(string svServiceId, string scenarioFilesFolder)

Parameters

svServiceId
The ID of the relevant service, as returned by SvUploadService.
scenarioFilesFolder
The full path to the folder that contains the scenario definition files.

Return value

A string representing the ID of the uploaded scenario.

Method

SvUploadService

Uploads a service definition file to the device and makes it available in the current session.

C# Syntax

string SvUploadService(string serviceFileContents)

Parameters

serviceFileContents
The contents of the service definition text file as a string.

Return value

A string representing the ID of the uploaded service.

Method

SvStartScenario

Starts a specific service virtualization scenario.

C# Syntax

void SvStartScenario(string svScenarioId)

Parameters

svScenarioId
The ID of the relevant scenario, as returned by SvUploadScenario.
Method

SvStopScenario

Stops a specific service virtualization scenario.

C# Syntax

void SvStopScenario(string svScenarioId)

Parameters

svScenarioId
The ID of the relevant scenario, as returned by SvUploadScenario.
MethodSwipe

Overloaded. Swipes the device in the specified direction starting from a specific location.  

MethodTouchOverloaded. Touches the device at the specified coordinates. (Android Only)  
MethodUnlockUnlocks the device in UFT Mobile if the device is not locked by another device object. This method also closes the RDP window.  
MethodUploadMediaOverloaded. Upload a media file to the device for camera or video simulation. The files are deleted when the device is released.  
MethodVerifyImageExistsChecks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
MethodVerifyImageMatchChecks whether a snapshot of this object and the supplied image are a match, given the specified pixel and RGB tolerance values. (Inherited from HP.LFT.SDK.ITestObject)
Top