IDevice Interface
A mobile device.

C# Syntax

Public Properties
  Name Description
Property DisplayName The object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
Property Id The ID of the device in Mobile Center.  
Property Manufacturer The manufacturer of the device.  
Property Model The model name of the device.  
Property Name The name of the device as defined in Mobile Center.  
Property OSType The operating system currently running on the device.  
Property OSVersion The operating system version currently running on the device.  
Property Parent The 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)
Property Source The Source to take the device from. DeviceSource  
Top
Public Methods
  Name Description
Method Back Presses the device's Back button. (Android Only)  
Method CloseViewer Closes the RDP window for the device (if open). Calling this method does not release the device if it is locked.  
Method Describe<TChild> Creates a child test object of this test object. (Inherited from HP.LFT.SDK.ITestObjectDescriber)
Method Dispose (Inherited from System.IDisposable)
Method Exists Checks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
Method FindChildren<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)
Method GetDescription Returns 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)
Method GetLogs Get device logs collected since the device was locked.  
Method GetSnapshot Captures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
Method GetTextLocations Returns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
Method GetVisibleText Returns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
Method GetVitals Get an accumulation of the device vitals from the time the device was locked, in one second intervals.  
Method Highlight Highlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
Method HighlightMatches<TChild> Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
Method Home Presses the device's Home button. (Android Only)  
Method IsViewerOpen Checks if the RDP window for the device is open.  
Method Menu Presses the device's Menu button. (Android Only)  
Method NetworkVirtualizationStart Starts the Network Virtualization service using the specified network profile.  
Method NetworkVirtualizationStop Stops the Network Virtualization service.  
Method OpenViewer Opens an RDP window for the device. If a window for the device is already open, another window will not open.  
Method RecentApps Opens the list of recent applications. (Android Only)  
Method SendKey Overloaded. Simulates pressing a special key in the device keyboard.  
Method SendString Overloaded. Simulates entering text (a string) using the device keyboard.  
Method SetDescription Replaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
Method SetOrientation Sets the device orientation.  
Method Shake Performs a Shake gesture on the device. (iOS Only)  
Method SimulateGPSRelocate Simulates a change in the device's GPS location. (Android Only)  
Method SimulateIncomingCall Overloaded. Simulates an incoming call.  
Method SimulateIncomingSMS Overloaded. Simulates an incoming SMS.  
Method

SvUploadScenario

(Supported in LeanFT versions 14.51 and later)

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

(Supported in LeanFT versions 14.51 and later)

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

(Supported in LeanFT versions 14.51 and later)

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

(Supported in LeanFT versions 14.51 and later)

Stops a specific service virtualization scenario.

C# Syntax

                                void SvStopScenario(string svScenarioId)

Parameters

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

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

Method Touch Overloaded. Touches the device at the specified coordinates. (Android Only)  
Method Unlock Unlocks the device in Mobile Center if the device is not locked by another device object. This method also closes the RDP window.  
Method UploadMedia Overloaded. Upload a media file to the device for camera or video simulation. The files are deleted when the device is released.  
Method VerifyImageExists Checks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
Method VerifyImageMatch Checks 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