Perfecto extensions

Perfecto provides support for extended RemoteWebDriver commands. You can use these commands as extensions to the existing API. For a quick overview, see the following tables. For details on the commands, see the function (extension) categories in this section. 

For a description of code samples that show how to execute Perfecto extensions, see Execute proprietary functions.

Restriction: Perfecto extensions are supported for real devices only.

AI extensions

Command Description

Perfecto:ai-validate

Use Perfecto's AI Validation command in Appium tests while running tests on Perfecto mobile devices.

Audio extensions

Command Description

mobile:audio:text

Convert audio to text by applying powerful neural network models.

mobile:audio-text:validation

Accepts an audio file that may be recorded from a device and creates a text file that contains the textual translation of the audio file.

mobile:audio:validation

Receives an audio file, may have been recorded from a device, uses the parameters to trim off any silence from the beginning or end of the audio.

mobile:audio:inject

Plays an audio file into the device audio-in. Supported file types: MP3 and WAV.

mobile:audio.recording:start

Starts recording the audio output from the device and creates a WAV file.

mobile:audio.recording:stop

Stops recording the audio output from the device, closes the file, and stores in the media storage server at the URL declared at the start of audio recording.

mobile:text:audio

Accepts either a text file or text string and returns an audio file.

mobile:voice:assist

Sends text String to the device's Voice Assistant (Siri) and allows the assistant to complete the action.

Applications extensions

Command Description

mobile:application:close

Close an application on the device.

mobile:application:back

Moves the application to the background for a specified duration.

mobile:application:clean

Brings the application to its initial installation state.

mobile:application:install

Install an application from the repository on the device.

mobile:application:open

Start an application on the device.

mobile:application:reset

Uninstall all applications from the device.

mobile:application:uninstall

Uninstall an application from the device.

mobile:activity:start

Start an activity (application component) on the device.

mobile:activity:sync

Verifies the Android package or activity (application component) has started on the device.

mobile:notifications:open

Opens the notifications shade.

Browser extensions

Command Description

mobile:browser:clean

Clears the browser content.

mobile:browser:execute

Executes a JavaScript script on the device browser application.

mobile:browser:goto

Opens the browser application and browses to the specified location.

mobile:browser:navigate

Directs the browser page back and forward.

mobile:browser:open

Opens the browser.

mobile:browser:sync

Verifies the browser application is running and page is loaded.

Camera extensions

Command Description

mobile:image.injection:start

Retrieves an image from the repository.

mobile:image.injection:stop

Stops Perfecto from supplying an image to the application when the application tries to retrieve a camera image.

Device extensions

Command Description

mobile:handset:log

Retrieve a log file from the device

mobile:handset:rotate

Set the rotation position of the device

mobile:keyboard:display

Control the virtual keyboard display

mobile:device:info 

Retrieves the specified device property value into a defined variable.

mobile:handset:ready

Brings the device to its idle / home screen.

mobile:device:reboot 

Reboots the device, and returns it unlocked.

mobile:device:recover

Recovers an unresponsive connected device, such as, with an interrupted video, black screen, or touch failure.

mobile:screen:lock

Locks the device screen for a specified duration (in seconds).

mobile:audio.recording:start

Starts recording the audio output from the device.

mobile:audio.recording:stop

Completes the recording and saves the audio file to the media storage server.

mobile:handset:voiceCommand

Sends text String to the device's Voice Assistant (for example, Siri) and allows the assistant to complete the action.

Event extensions

Command Description

mobile:key:event

Sends a key event to the device, using key codes and metastates.

mobile:presskey

Clicks a single or a sequence of device keyboard keys.

File transfer extensions

Command Description

mobile:media:delete

Delete the specified file from the device.

mobile:media:get

Copy a file from the device to the repository.

mobile:media:put

Upload a file from the repository to the device.

perfecto:file:download

For Web tests, provides a link to files on the remote machine on which the test ran. You can use this command in combination with the file list and file info commands.

perfecto:file:upload

For Web tests, provides a way to upload a file from the Perfecto repository to the desktop web instance under test.

Fingerprint extensions

Command Description

mobile:fingerprint:set

Injects the authentication reply for a fingerprint check performed by the application.

IP Geolocation extensions

Command Description

perfecto:geoLocation:set

Sets the IP geolocation of the device under test (DUT) to allow for testing in any of the supported locations.

perfecto:geoLocation:get

Retrieves the IP geolocation set for the device under test (DUT).

perfecto:geoLocation:reset

Resets the IP geolocation of the device under test (DUT) to the device's physical location.

Location extensions

Command Description

mobile:location:get

Gets the device location.

mobile:location:reset

Resets the device location.

mobile:location:set

Sets the device location.

mobile:motion:inject

Injects a DetectedActivity object that identifies that an activity of the device has been detected with a "level of confidence" that the user is performing this activity.

Network extensions

Command Description

mobile:network.settings:get

Retrieves the network settings specified by the Property parameter, and can insert its value into a defined variable.

mobile:network.settings:set

Sets the network settings.

Network Virtualization extensions

Command Description

mobile:vnetwork:start

Starts network virtualization for the device with the specified conditions.

mobile:vnetwork:stop

Stops network virtualization for the device and save PCAP file to the repository.

mobile:vnetwork:update

Updates network virtualization for the device with the specified conditions.

Performance extensions

Command Description

mobile:timer:info

Retrieves the value of the timer specified by the timerId parameter. When working with Scriptless Mobile or using the API, the value is retrieved into a defined variable. There is no need to stop the timer to use the Get timer command.

Only supported when using Perfecto's Native IDE automation testing.

mobile:status:timer

Adds a timer report to the test.

mobile:timer:start

Begins measuring time via a timer identified by the timerId parameter until the Timer stop command is used.

The initPolicy parameter is useful when using the command within a loop, where the timer can be reset or continued with each iteration.

Only supported when using Perfecto's Native IDE automation testing.

mobile:timer:stop

Stops the timer with the specified timer ID. There is no need to stop the timer to use the Get timer function.

mobile:monitor:start

Starts collecting part or all of the real-time vitals data generated by the device until the Vitals stop command is invoked or the script ends. The collected information helps determine how efficient an application is at using resources as well as measuring the general device performance.

mobile:monitor:stop

Ends the collection of device vitals.

Services extensions

Command Description

mobile:gateway:call

Generates an external voice call recording to the selected destination.

mobile:gateway:email

Sends an email message to the selected destination.

mobile:gateway:sms

Sends an SMS message to the selected destination.

Visual Analysis extensions

Command Description

mobile:button-image:click

Identifies a button, based on an image, and clicks on it.

mobile:button-text:click

Identifies a button, based on a text label, and clicks on it.

mobile:edit-image:get

Retrieve the value of an edit field into a variable.

mobile:edit-image:set

Set a text value into a form input field.

mobile:edit-text:get

Identifies an edit field, based on a text label, and retrieves its value.

mobile:edit-text:set

Identifies an edit field, based on a text label, and inserts the specified text in the value parameter into the field.

mobile:checkpoint:image

Validate image appearance on the device.

mobile:checkpoint:text

Validate appearance of expected text on the device.

mobile:image:find

Finds image on the device screen.

mobile:image:select

Find an image on the device screen and click on it.

mobile:text:find

Finds text (needle) on the device screen (haystack), and stores the coordinates for future commands.

mobile:text:select

Finds text (needle) on the device screen (haystack), and clicks it to select the item.

mobile:screen:text

Returns the text that appears on the screen of the device without selecting it.

User Action extensions

Command Description

mobile:touch:drag

Perform drag action on a touch screen

mobile:touch:gesture

Performs the selected multi-touch operation, pinch and zoom.

mobile:touch:swipe

Perform a swipe operation on the device.

mobile:touch:tap

Perform a touch operation on the device.

mobile:trackball:roll

Performs a trackball roll (in BB devices).

Timer extensions

Command Description

mobile:timer:start

Begins to measure time, with the specified timer ID, until the mobile:timer:stop is invoked.

mobile:timer:stop

Stops time measurement of specified timer.

mobile:timer:info

Retrieves the specified timer value.

mobile:status:timer

Adds a timer report to the test. The measured timer result is reported from the test into the generated Single Test Report.

Vitals extensions

Command Description

mobile:monitor:start

Start collecting monitor data

mobile:monitor:stop

Stop collecting monitor data