Package com.hp.lft.sdk.mobile
Interface Device
- All Superinterfaces:
- Environment,- TestObject,- TestObjectDescriber
A mobile device.
- 
Method SummaryModifier and TypeMethodDescriptionvoidback()Presses the device's Back button (Android Only).voidCloses the RDP window for the device (if open).Returns fleetType of the device as defined in OpenText Functional Testing Lab.getId()Returns the ID of the device in OpenText Functional Testing Lab.Returns location of the device as defined in OpenText Functional Testing Lab.getLogs()Returns the device logs collected from the moment the device was locked.Returns the manufacturer of the device.getModel()Returns the model name of the device.getName()Returns name of the device as defined in OpenText Functional Testing Lab.Returns the operating system currently running on the device.Returns the operating system version currently running on the device.The source to take the device fromReturns Service Virtualization Server infoReturns an accumulation of the device vitals from the time the device was locked, in one second intervals.voidhome()Presses the device's Home button (Android Only).booleanChecks if the RDP window for the device is open.voidmenu()Presses the device's Menu button (Android Only).voidnetworkVirtualizationStart(String profile) Starts the Network Virtualization service using the specified network profile.voidStops the Network Virtualization servicevoidOpens an RDP window for the device.voidPerforms a Pan gesture on the device.voidPerforms a Pan gesture on the device.voidOpens the list of recent applications (Android Only).voidSimulates pressing a special key in the device keyboard.voidSimulates pressing a special key in the device keyboard, with the option to define the time to keep the key pressed.voidSimulates pressing a custom device key.voidSimulate pressing a custom device key, with the option to define the time to keep the key pressed.voidsendString(String text) Simulates entering text (a string) using the device keyboard.voidsendString(String text, int interval) Simulates entering text (a string) using the device keyboard, with the option to send each of the string characters in intervals of n milliseconds.voidsetOrientation(DeviceOrientation orientation) Sets the device orientation.voidshake()Performs a Shake gesture on the device (iOS Only).voidsimulateGPSRelocate(double latitude, double longitude) Simulates a change in the device's GPS location (Android Only).voidsimulateIncomingCall(String from) Simulates an incoming call.voidsimulateIncomingCall(String from, EventResponseArgs eventResponseArgs) Simulates an incoming call with an optional simulated user response.voidsimulateIncomingSMS(String from, String text) Simulates an incoming SMS.voidsimulateIncomingSMS(String from, String text, EventResponseArgs eventResponseArgs) Simulates an incoming SMS with an optional simulated user response.voidsvStartScenario(String svScenarioId) Starts a specific service virtualization scenario.voidsvStopScenario(String svScenarioId) Stops a specific service virtualization scenario.svUploadScenario(String svServiceId, String scenarioFilesFolder) Uploads scenario definition files to the device and makes them available in the current session.svUploadService(String serviceFileContents) Uploads a service definition file to the device and makes it available in the current session.voidswipe(SwipeDirection direction) Swipes the device in the specified direction starting from the leading edge of the element or device.voidswipe(SwipeDirection direction, Location startLocation) Swipes the device in the specified direction starting from the specified location.voidtouch(int x, int y) Touches the device at the specified coordinates (Android Only).voidTouches the device at the specified point (Android Only).voidunlock()Unlocks the device in OpenText Functional Testing Lab if it is not locked by another device object.voiduploadMedia(VideoData videoData, String mediaID) Upload a video to the device for video simulation.voiduploadMedia(VideoData videoData, String mediaID, MediaUploadOptions options) Upload a video to the device for video simulation, with the option to save the file.voiduploadMedia(RenderedImage image, ImageFormat imageFormat, String mediaID) Upload an image to the device for camera simulation.voiduploadMedia(RenderedImage image, ImageFormat imageFormat, String mediaID, MediaUploadOptions options) Upload an image to the device for camera simulation, with the option to save the file.voiduploadMedia(String mediaUrl, String mediaID) Upload a media file to the device for camera or video simulation.voiduploadMedia(String mediaUrl, String mediaID, MediaUploadOptions options) Upload a media file to the device for camera or video simulation, with the option to save the file.voiduploadMedia(URL mediaUrl, String mediaID) Upload a media file to the device for camera or video simulation.voiduploadMedia(URL mediaUrl, String mediaID, MediaUploadOptions options) Upload a media file to the device for camera or video simulation, with the option to save the file.Methods inherited from interface com.hp.lft.sdk.TestObjectcallFTMethod, callFTMethod, exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExistsMethods inherited from interface com.hp.lft.sdk.TestObjectDescriberdescribe
- 
Method Details- 
getIdReturns the ID of the device in OpenText Functional Testing Lab.- Returns:
- the ID of the device in OpenText Functional Testing Lab.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getModelReturns the model name of the device.- Returns:
- the model name of the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getManufacturerReturns the manufacturer of the device.- Returns:
- the manufacturer of the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getOSTypeReturns the operating system currently running on the device.- Returns:
- the operating system currently running on the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getOSVersionReturns the operating system version currently running on the device.- Returns:
- the operating system version currently running on the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getNameReturns name of the device as defined in OpenText Functional Testing Lab.- Returns:
- the name of the device as defined in OpenText Functional Testing Lab.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getSourceThe source to take the device from- Returns:
- the DeviceSourceto take the device from
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getFleetTypeReturns fleetType of the device as defined in OpenText Functional Testing Lab.- Returns:
- the fleetType of the device as defined in OpenText Functional Testing Lab.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getLocationReturns location of the device as defined in OpenText Functional Testing Lab.- Returns:
- the location of the device as defined in OpenText Functional Testing Lab.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
homePresses the device's Home button (Android Only).- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
backPresses the device's Back button (Android Only).- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
panPerforms a Pan gesture on the device.- Parameters:
- start- the location at which to start the pan gesture.
- end- the location at which to end the pan gesture.
- Throws:
- GeneralLeanFtException- if error occurs during execution.
 
- 
panPerforms a Pan gesture on the device.- Parameters:
- start- the location at which to start the pan gesture.
- end- the location at which to end the pan gesture.
- args- additional arguments for the pan operation.
- Throws:
- GeneralLeanFtException- if error occurs during execution.
 
- 
recentAppsOpens the list of recent applications (Android Only).- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
setOrientationSets the device orientation.- Parameters:
- orientation- the- DeviceOrientationto set on the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
touchTouches the device at the specified coordinates (Android Only).- Parameters:
- x- the x coordinate to touch.
- y- the y coordinate to touch.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
touchTouches the device at the specified point (Android Only).- Parameters:
- point- the point to touch.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
swipeSwipes the device in the specified direction starting from the leading edge of the element or device.- Parameters:
- direction- the- SwipeDirection.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
swipeSwipes the device in the specified direction starting from the specified location.- Parameters:
- direction- the- SwipeDirection.
- startLocation- the- Locationcoordinates at which to start the swipe.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
simulateGPSRelocateSimulates a change in the device's GPS location (Android Only).- Parameters:
- latitude- the latitude coordinate of the location.
- longitude- the longitude coordinate of the location.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
simulateIncomingCallSimulates an incoming call.- Parameters:
- from- the caller ID of the incoming call.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
simulateIncomingCallvoid simulateIncomingCall(String from, EventResponseArgs eventResponseArgs) throws GeneralLeanFtException Simulates an incoming call with an optional simulated user response.- Parameters:
- from- the caller ID of the incoming call.
- eventResponseArgs- the simulated user response- EventResponseArgsto the incoming call that interrupts the flow of the application.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
simulateIncomingSMSSimulates an incoming SMS.- Parameters:
- from- the caller ID of the incoming SMS message.
- text- the text of the incoming SMS message.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
simulateIncomingSMSvoid simulateIncomingSMS(String from, String text, EventResponseArgs eventResponseArgs) throws GeneralLeanFtException Simulates an incoming SMS with an optional simulated user response.- Parameters:
- from- the caller ID of the incoming SMS message.
- text- the text of the incoming SMS message.
- eventResponseArgs- the simulated user response- EventResponseArgsto the incoming SMS that interrupts the flow of the application.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
networkVirtualizationStartStarts the Network Virtualization service using the specified network profile.- Parameters:
- profile- the name of the profile containing the conditions that you want to apply to the virtualized network. The profile must be set up on the Network Virtualization product.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
networkVirtualizationStopStops the Network Virtualization service- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
shakePerforms a Shake gesture on the device (iOS Only).- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
openViewerOpens an RDP window for the device. If a window for the device is open already, another window will not open.- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
closeViewerCloses the RDP window for the device (if open). Calling this method does not release the device locking.- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
isViewerOpenChecks if the RDP window for the device is open.- Returns:
- true if the RDP window is open, false otherwise.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getLogsReturns the device logs collected from the moment the device was locked.- Returns:
- the device logs collected from the moment the device was locked.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getVitalsReturns an accumulation of the device vitals from the time the device was locked, in one second intervals.- Returns:
- the device vitals collected since the device was locked.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
unlockUnlocks the device in OpenText Functional Testing Lab if it is not locked by another device object. This method also closes the RDP window.- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendStringSimulates entering text (a string) using the device keyboard.- Parameters:
- text- The text to send to the device.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendStringSimulates entering text (a string) using the device keyboard, with the option to send each of the string characters in intervals of n milliseconds.- Parameters:
- text- The text to send to the device.
- interval- The time (in milliseconds) to wait before injecting each subsequent character. The value must be between 200 and 3000, or 0 (default), otherwise an exception is thrown.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendKeySimulates pressing a special key in the device keyboard.- Parameters:
- key- The key to be pressed.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendKeySimulates pressing a special key in the device keyboard, with the option to define the time to keep the key pressed.- Parameters:
- key- The key to be pressed.
- duration- The time (in milliseconds) to keep the key pressed. The default is 0 (zero).
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendKeySimulates pressing a custom device key.- Parameters:
- keyId- The ID of the key as defined by the device manufacturer.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
sendKeySimulate pressing a custom device key, with the option to define the time to keep the key pressed.- Parameters:
- keyId- the ID of the key as defined by the device manufacturer.
- duration- The time (in milliseconds) to keep the key pressed. The default is 0 (zero).
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediaUpload a media file to the device for camera or video simulation. The files are deleted when the device is released.- Parameters:
- mediaUrl- The URL, including the extension, of the media file (image or video). Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only), MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded media. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediavoid uploadMedia(URL mediaUrl, String mediaID, MediaUploadOptions options) throws GeneralLeanFtException Upload a media file to the device for camera or video simulation, with the option to save the file. The files are deleted when the device is released.- Parameters:
- mediaUrl- The URL, including the extension, of the media file (image or video). Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only), MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded media. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- options- Upload options.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediaUpload a media file to the device for camera or video simulation. The files are deleted when the device is released.- Parameters:
- mediaUrl- The URL, including the extension, of the media file (image or video). Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only), MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded media. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediavoid uploadMedia(String mediaUrl, String mediaID, MediaUploadOptions options) throws GeneralLeanFtException Upload a media file to the device for camera or video simulation, with the option to save the file. The files are deleted when the device is released.- Parameters:
- mediaUrl- The URL, including the extension, of the media file (image or video). Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only), MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded media. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- options- Upload options.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediavoid uploadMedia(RenderedImage image, ImageFormat imageFormat, String mediaID) throws GeneralLeanFtException Upload an image to the device for camera simulation. The file is deleted when the device is released.- Parameters:
- image- The image file.
- imageFormat- The image format type. Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only).
- mediaID- The unique ID of the uploaded media. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediavoid uploadMedia(RenderedImage image, ImageFormat imageFormat, String mediaID, MediaUploadOptions options) throws GeneralLeanFtException Upload an image to the device for camera simulation, with the option to save the file. The files are deleted when the device is released.- Parameters:
- image- The image file.
- imageFormat- The image format type. Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only).
- mediaID- The unique ID of the uploaded image. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- options- Upload options.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediaUpload a video to the device for video simulation. The file is deleted when the device is released.- Parameters:
- videoData- Video file data. Supported formats: MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded video. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
uploadMediavoid uploadMedia(VideoData videoData, String mediaID, MediaUploadOptions options) throws GeneralLeanFtException Upload a video to the device for video simulation, with the option to save the file. The file is deleted when the device is released.- Parameters:
- videoData- Video file data. Supported formats: MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
- mediaID- The unique ID of the uploaded video. The ID is used to start the simulation using Application.StartCameraSimulationMode.
- options- Upload options.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
svUploadServiceUploads a service definition file to the device and makes it available in the current session.- Parameters:
- serviceFileContents- The contents of the service definition text file as a string.
- Returns:
- A string representing the ID of the uploaded service.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
svUploadScenarioString svUploadScenario(String svServiceId, String scenarioFilesFolder) throws GeneralLeanFtException Uploads scenario definition files to the device and makes them available in the current session.- 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.
- Returns:
- A string representing the ID of the uploaded scenario.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
svStartScenarioStarts a specific service virtualization scenario.- Parameters:
- svScenarioId- The ID of the relevant scenario, as returned by- svUploadScenario
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
svStopScenarioStops a specific service virtualization scenario.- Parameters:
- svScenarioId- The ID of the relevant scenario, as returned by- svUploadScenario
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
getSvInfoReturns Service Virtualization Server info- Returns:
- Object of type SvInfo, containing Service Virtualization information
- Throws:
- GeneralLeanFtException- if error occurs during execution.
 
 
-