Interface IDevice
A mobile device.
public interface IDevice : ITestObject, ITestObjectDescriber, IDisposable, IEnvironment
- Inherited Members
- Extension Methods
Properties
FleetType
The fleetType of the device as defined in OpenText Functional Testing Lab
string FleetType { get; }
Property Value
Id
The ID of the device in OpenText Functional Testing Lab
string Id { get; }
Property Value
Location
The location of the device as defined in OpenText Functional Testing Lab
string Location { get; }
Property Value
Manufacturer
The manufacturer of the device.
string Manufacturer { get; }
Property Value
Model
The model name of the device.
string Model { get; }
Property Value
Name
The name of the device as defined in OpenText Functional Testing Lab
string Name { get; }
Property Value
OSType
The operating system currently running on the device.
string OSType { get; }
Property Value
OSVersion
The operating system version currently running on the device.
string OSVersion { get; }
Property Value
Source
The Source to take the device from. DeviceSource
DeviceSource Source { get; }
Property Value
Methods
Back()
Presses the device's Back button. (Android Only)
void Back()
CloseViewer()
Closes the RDP window for the device (if open).
void CloseViewer()
GetLogs()
Get device logs collected since the device was locked.
string GetLogs()
Returns
- string
The device logs
GetVitals()
Get an accumulation of the device vitals from the time the device was locked, in one second intervals.
string GetVitals()
Returns
- string
The device vitals
Home()
Presses the device's Home button. (Android Only)
void Home()
IsViewerOpen()
Checks if the RDP window for the device is open.
bool IsViewerOpen()
Returns
Menu()
Presses the device's Menu button. (Android Only)
void Menu()
NetworkVirtualizationStart(string)
Starts the Network Virtualization service using the specified network profile.
void NetworkVirtualizationStart(string profile)
Parameters
profilestringThe 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.
NetworkVirtualizationStop()
Stops the Network Virtualization service.
void NetworkVirtualizationStop()
OpenViewer()
Opens an RDP window for the device.
void OpenViewer()
Pan(Point, Point)
Performs a Pan gesture on the device with default PanArgs.
void Pan(Point start, Point end)
Parameters
startPointThe Point at which to start the pan gesture.
endPointThe Point at which to end the pan gesture.
Pan(Point, Point, PanArgs)
Performs a Pan gesture on the device.
void Pan(Point start, Point end, PanArgs args)
Parameters
startPointThe Point at which to start the pan gesture.
endPointThe Point at which to end the pan gesture.
argsPanArgsPanArgs arguments that define the behavior of the pan operation.
RecentApps()
Opens the list of recent applications. (Android Only)
void RecentApps()
SendKey(Keys)
Simulates pressing a special key in the device keyboard.
void SendKey(Keys key)
Parameters
keyKeysThe key to be pressed.
SendKey(Keys, int)
Simulates pressing a special key in the device keyboard, with the option to define the time to keep the key pressed.
void SendKey(Keys key, int duration)
Parameters
keyKeysThe key to be pressed.
durationintThe time (in milliseconds) to keep the key pressed. The default is 0 (zero).
SendKey(string)
Simulates pressing a custom device key.
void SendKey(string keyID)
Parameters
keyIDstringThe ID of the key as defined by the device manufacturer.
SendKey(string, int)
Simulates pressing a custom device key, with the option to define the time to keep the key pressed.
void SendKey(string keyID, int duration)
Parameters
keyIDstringThe ID of the key as defined by the device manufacturer.
durationintThe time (in milliseconds) to keep the key pressed. The default is 0 (zero).
SendString(string)
Simulates entering text (a string) using the device keyboard.
void SendString(string text)
Parameters
textstringThe text to send to the device.
SendString(string, int)
Simulates entering text (a string) using the device keyboard, with the option to send each of the string characters in intervals of n milliseconds.
void SendString(string text, int interval)
Parameters
textstringThe text to send to the device.
intervalintThe 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.
SetOrientation(DeviceOrientation)
Sets the device orientation.
void SetOrientation(DeviceOrientation orientation)
Parameters
orientationDeviceOrientationThe DeviceOrientation to set on the device.
Shake()
Performs a Shake gesture on the device. (iOS Only)
void Shake()
SimulateGPSRelocate(double, double)
Simulates a change in the device's GPS location. (Android Only)
void SimulateGPSRelocate(double latitude, double longitude)
Parameters
latitudedoubleThe latitude coordinate of the location.
longitudedoubleThe longitude coordinate of the location.
SimulateIncomingCall(string)
Simulates an incoming call.
void SimulateIncomingCall(string from)
Parameters
fromstringThe caller ID of the incoming call.
SimulateIncomingCall(string, EventResponseArgs)
Simulates an incoming call with an optional simulated user response.
void SimulateIncomingCall(string from, EventResponseArgs eventResponseArgs)
Parameters
fromstringThe caller ID of the incoming call.
eventResponseArgsEventResponseArgsThe simulated user response (EventResponseArgs) to the incoming call that interrupts the flow of the application.
SimulateIncomingSMS(string, string)
Simulates an incoming SMS.
void SimulateIncomingSMS(string from, string text)
Parameters
fromstringThe caller ID of the incoming SMS message.
textstringThe text of the incoming SMS message.
SimulateIncomingSMS(string, string, EventResponseArgs)
Simulates an incoming SMS with an optional simulated user response.
void SimulateIncomingSMS(string from, string text, EventResponseArgs eventResponseArgs)
Parameters
fromstringThe caller ID of the incoming SMS message.
textstringThe text of the incoming SMS message.
eventResponseArgsEventResponseArgsThe simulated user response (EventResponseArgs) to the incoming SMS that interrupts the flow of the application.
SvStartScenario(string)
Starts a specific service virtualization scenario.
void SvStartScenario(string svScenarioId)
Parameters
svScenarioIdstringThe ID of the relevant scenario, as returned by SvUploadScenario(string, string)
SvStopScenario(string)
Stops a specific service virtualization scenario.
void SvStopScenario(string svScenarioId)
Parameters
svScenarioIdstringThe ID of the relevant scenario, as returned by SvUploadScenario(string, string)
SvUploadScenario(string, string)
Uploads scenario definition files to the device and makes them available in the current session.
string SvUploadScenario(string svServiceId, string scenarioFilesFolder)
Parameters
svServiceIdstringThe ID of the relevant service, as returned by SvUploadService(string)
scenarioFilesFolderstringThe full path to the folder that contains the scenario definition files.
Returns
- string
A string representing the ID of the uploaded scenario.
SvUploadService(string)
Uploads a service definition file to the device and makes it available in the current session.
string SvUploadService(string serviceFileContents)
Parameters
serviceFileContentsstringThe contents of the service definition text file as a string.
Returns
- string
A string representing the ID of the uploaded service.
Swipe(SwipeDirection)
Swipes the device in the specified direction starting from the leading edge of the element or device.
void Swipe(SwipeDirection direction)
Parameters
directionSwipeDirectionThe SwipeDirection.
Swipe(SwipeDirection, Location)
Swipes the device in the specified direction starting from the specified location.
void Swipe(SwipeDirection direction, Location startLocation)
Parameters
directionSwipeDirectionThe SwipeDirection.
startLocationLocationThe Location coordinates at which to start the swipe.
Touch(Point)
Touches the device at the specified point. (Android Only)
void Touch(Point point)
Parameters
Touch(int, int)
Touches the device at the specified coordinates. (Android Only)
void Touch(int x, int y)
Parameters
Unlock()
Unlocks the device in OpenText Functional Testing Lab if the device is not locked by another device object. This method also closes the RDP window.
void Unlock()
UploadMedia(VideoData, string)
Upload a video to the device for video simulation. The file is deleted when the device is released.
void UploadMedia(VideoData videoData, string mediaID)
Parameters
videoDataVideoDataVideo file data. Supported formats: MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
mediaIDstringThe unique ID of the uploaded video. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
UploadMedia(VideoData, string, MediaUploadOptions)
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.
void UploadMedia(VideoData videoData, string mediaID, MediaUploadOptions options)
Parameters
videoDataVideoDataVideo file data. Supported formats: MP4, 3GP (Android only), MKV (Android only), MOV (iOS only), M4V (iOS only).
mediaIDstringThe unique ID of the uploaded video. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
optionsMediaUploadOptionsUpload options.
UploadMedia(Image, string)
Upload an image to the device for camera simulation. The file is deleted when the device is released.
void UploadMedia(Image image, string mediaID)
Parameters
imageImageThe image file. Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only).
mediaIDstringThe unique ID of the uploaded media. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
UploadMedia(Image, string, MediaUploadOptions)
Upload an image to the device for camera simulation, with the option to save the file. The file is deleted when the device is released.
void UploadMedia(Image image, string mediaID, MediaUploadOptions options)
Parameters
imageImageImage file. Supported formats: JPG, GIF, PNG, BMP, TIF (iOS only).
mediaIDstringThe unique ID of the uploaded image. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
optionsMediaUploadOptionsUpload options.
UploadMedia(string, string)
Upload a media file to the device for camera or video simulation. The files are deleted when the device is released.
void UploadMedia(string mediaUrl, string mediaID)
Parameters
mediaUrlstringThe 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).
mediaIDstringThe unique ID of the uploaded media. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
UploadMedia(string, string, MediaUploadOptions)
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.
void UploadMedia(string mediaUrl, string mediaID, MediaUploadOptions options)
Parameters
mediaUrlstringThe 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).
mediaIDstringThe unique ID of the uploaded media. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
optionsMediaUploadOptionsUpload options.
UploadMedia(Uri, string)
Upload a media file to the device for camera or video simulation. The files are deleted when the device is released.
void UploadMedia(Uri mediaUrl, string mediaID)
Parameters
mediaUrlUriThe 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).
mediaIDstringThe unique ID of the uploaded media. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
UploadMedia(Uri, string, MediaUploadOptions)
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.
void UploadMedia(Uri mediaUrl, string mediaID, MediaUploadOptions options)
Parameters
mediaUrlUriThe 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).
mediaIDstringThe unique ID of the uploaded media. The ID is used to start the simulation using IApplication.StartCameraSimulationMode.
optionsMediaUploadOptionsUpload options.