Available commands

The following table lists the commands available in Scriptless Mobile along with descriptions and references to more information, where available.

Group Command Description
AI commands AI Visual Checkpoint

Utilizes AI to validate semantic and contextual information on the open device screen, regardless of specific elements. You can specify what you need to validate independent of the screen structure.

Applications

Clean application

Cleans the data (including cache) from any application installed on the device and brings the application back to its initial state. This saves time and instantly resets the app for the next test.

To use this command, the application identifier is required. For information on retrieving the application identifier, see Application identifier.

Applications

Close application

Closes an application on the device. The application process is killed, not minimized. If you reopen the application, the application will launch from the start page. (If you minimize the application, for example by using the Home button, the application will launch from the last page previously open.)

To use this command, the application identifier is required. For information on retrieving the application identifier, see Application identifier.

This command does not clear the cache. Service applications that live forever in the background may be auto-relaunched.

Applications

Get installed applications

Gets the list of applications installed on the device.

Applications

Install application

Installs a single application on the device, using automation. To use this command, the application must first be uploaded to the Perfecto repository. The PerfectoLabUtils class provides the uploadMedia method to upload a file to the Repository.

Applications

Run app in background

Identifies the active application automatically, moves it to the background for the timeout defined, and then returns it to the foreground. You can check how your application behaves when coming back into foreground: Is your data saved? Is your session alive? Did your application crash?

Applications

Set fingerprint

Injects the authentication reply for a fingerprint check performed by the application. The command should be activated by the automation script at the point that the target application presents a "popup" indicating that the application is trying to retrieve information from the fingerprint reader.

The application must have been installed with sensor instrumention enabled.

To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.

Applications

Set sensor authentication

Injects the authentication reply for a sensor authentication check performed by the application (such as fingerprint or faceId) on supported devices.

The command should be activated by the automation script at the point that the target application presents a popup window indicating that the application is trying to retrieve information from the sensor reader.

The application must have been installed with sensor instrumentation enabled. 

To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.

Applications

Start activity

Starts an Android activity on the device. Android applications are composed of a series of "Activity" units. Each Activity presents a UI screen that allows users to perform some part of the application, such as call a number, take a photo, send an email, or view a map. When testing the application, it may be desirable to start the application execution from a specific Activity, rather than the initial Activity (usually referred to as the .Main).

Applications can be large and complex, written by many development teams. The start activity and sync activity commands enable a tester to start and sync a specific activity on the device and decreases the time it takes to write a test, allowing more coverage in a dynamic environment where time to develop tests is short.

Applications

Start application

Launches an application on the device. Use this function at the beginning of a script to ensure a known starting point for the user.

To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.

Applications

Start PWA

Launches a progressive web application (PWA) on the device. To use this command, the display name of the PWA icon is required.

Applications

Stop PWA

Closes the progressive web application (PWA) currently running in the foreground.

Applications

Sync activity

Verifies that the Android package or activity has started on the device. At least one of the package or activity parameters must be provided.

Applications

Uninstall application

Removes a single application from the device. You can remove a single application or all applications from the device, returning the device to its out-of-the-box state. For more information on removing all applications, refer to the Uninstall applications command.

To use this command, an application identifier is required. For information on retrieving the application identifier, see Application identifier.

Applications

Uninstall applications

Uninstalls all applications on the device, returning the device to its initial state. This does not affect applications pre-installed on the device.

You can remove a single application or all applications from the device, returning it to its out-of-the-box state. For more information on removing a single application, see Uninstall application.

Audio

Audio to text

Converts audio to text by applying powerful neural network models. It 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.

Important: This functionality is part of the Advanced Audio Package, a separate license that provides access to tools for testing a device's audio quality. For more information, contact your Perfecto account representative.
Audio

Audio to text validation

Accepts an audio file that may be recorded from a device and creates a text file that contains the textual translation (transcript) of the audio file. In addition, the command performs a text checkpoint function, checking for the existence of a text string in the translated text file. This function utilizes matching parameters similar to the text checkpoint function.

Important: This functionality is part of the Advanced Audio Package, a separate license that provides access to tools for testing a device's audio quality. For more information, contact your Perfecto account representative.
Audio

Audio validation

Validates audio input for MOS quality (WAV audio files only). The command receives an audio file that may have been recorded from a device and uses parameters to trim off any silence from the beginning or end of the audio. Using this trimmed file, it then executes an analysis service.

Important: This functionality is part of the Advanced Audio Package, a separate license that provides access to tools for testing a device's audio quality. For more information, contact your Perfecto account representative.
Audio

Inject audio

Plays an audio file into the device audio-in. Supported file types: MP3 and WAV. When using the Text to Speech command with audio injection, the audio file should be in the .wav format. 

When selecting Wait, the audio file cannot exceed 4 minutes. For audio files longer than 4 minutes, select No wait and follow with a Wait command.

The quality of sound (sample rate) needs to be 16000 Hz or above.

Audio

Start audio recording

Starts recording the audio output from the device and creates a WAV file. The file is saved in the media storage server. A URL to the file location is returned in the response to the command and, if supplied, in the Result variable supplied as a parameter.

To hear the audio when using Start Audio in the Perfecto Automation IDE, you need to use the Open Device command and the parameter "Audio Recording" should be set to TRUE.

Audio

Stop audio recording

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

Audio

Text to audio

Accepts either a text file or text string and returns an audio file. The function can be configured to produce the audio with a male or female voice and supports several languages.

Important: This functionality is part of the Advanced Audio Package, a separate license that provides access to tools for testing a device's audio quality. For more information, contact your Perfecto account representative.
Audio

Voice assistant inject

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

Browser > Cookies

Add cookie

Adds a cookie into the browser cache.

Browser > Cookies

Delete all cookies

Deletes all cookies from the browser cache. The browser must be open for the command to function.

Restriction: Delete all cookies will not work if there are Cookies that have the Secure or HttpOnly flag set. Use the Delete cookie command to delete each non-secure cookie.

Browser > Cookies

Delete cookie

Deletes a cookie from the browser cache.

Browser > Cookies

Get all cookies

Returns all cookies for the browser. Each entry in the data table includes the cookie identifier and the link to the page.

Browser > Cookies

Get cookie

Returns the value associated with the specified cookie and (optionally) stores it in the variable.

Browser

Browser clean

Clears the browser content. The browser being cleaned is inherited from the Browser open or Browser goto commands.

No validation is performed. The green success status confirmation within the execution report does not validate that the browser was opened; rather, it validates that the native command request was successfully received by the device OS.

Browser

Browser execute

Executes a JavaScript script on the device browser application. Supported for Chrome, Safari, and instrumented hybrid apps.

Browser

Browser go to

Opens the browser application and browses to the specified location. This is done with a direct native command to the device OS, and not with navigation.

No validation is performed. The green success status confirmation within the execution report does not validate that the browser was opened; rather, it validates that the native command request was successfully received by the device OS.

The URL page will not refresh if the browser go to function is used with the same URL consecutively. To ensure that the URL page is reloaded, use the Browser open function followed by the Browser go to function.

Browser

Browser navigate

Directs the browser page back and forward (supports the browser's navigation buttons). Can also be used to refresh the current webpage.

The command can be used with Java code.

Browser

Browser open

Opens the browser. This is done with a direct native command to the device OS, and not with navigation. Supported for Chrome, Safari, and instrumented hybrid apps.

No validation is performed. The green success status confirmation within the execution report does not validate that the browser was opened; rather it validates that the native command request was successfully received by the device OS.

Browser

Browser sync

Verifies that the browser application is running and the page is loaded.

As a best practice, this function should follow a command such as a button click to ensure that the page is loaded following the command. The timeout is performed after the button click, as opposed to the timeout in a button click command, which is performed before the click and waits for the page to load.

No validation is performed. The green success status confirmation within the execution report does not validate that the browser was opened; rather it validates that the native command request was successfully received by the device OS.

Device > Cleanup

Clean device

When a "deep clean" is selected, it removes all installed applications, all user data, and all installed files from the device. If the Clean Chrome parameter is selected, it resets the Chrome history on the device.

On iOS devices, this command only removes user-installed applications.

Device > Files

Delete file

Deletes a single or multiple files from the device storage. Use the File transfer widget to identify the device folder and file name.

Device > Files

Get file

Copies a file from the device's file-system to the Perfecto Repository. Provides the full specification of the file location in the Repository and the target file location (including the file name) on the device.

Device > Files

Put file

Copies a file from the repository to the device's file system. Within iOS applications, you can use this command to place a file in any of the following folders as well: Documents, Library, tmp. If the specified folder does not exist, the command will create the folder before copying the file. This command is supported for automation testing. For interactive testing, you can use the Transfer a file option.

Device > Image Injection

Start image injection

Retrieves an image from the repository. Perfecto supplies this image to the specified application when the application tries to retrieve a camera image. The application must have been installed with sensor instrumentation.

To use this command, one of the two application identifiers is required. For information on retrieving the application identifier, see Application identifier.

Image injection continues for this application until activating the Stop Image Injection function.

Device > Image Injection

Stop image injection

Stops Perfecto from supplying an image to the application when the application tries to retrieve a camera image. Images are supplied by the device camera after invoking the command.

Used in conjunction with Start Image Injection.

Device > Location

Get location

Retrieves the current location of the device. The location coordinates are returned as a Latitude, Longitude pair.

Device > Location

Reset location

Stops setting the device location. This returns the device to its current actual location. Used alongside the Set device location function.

Device > Location

Set location

Sets the device location. This enables testing a location-aware app that uses location services without moving the device from place to place to generate location data.

The location is supplied as one of the following: Full (street, city, state, country) or partial address OR Latitude, Longitude pair

To set the location via address: This requires using Google Geocoding. For example: 1600 Amphitheatre Parkway, Mountain View, CA.

To set the location via GPS: Many applications supply GPS coordinates when given an address following Google's Geocoding format. For example: Google Maps yields the GPS coordinates 43.642752 (latitude), -79.386981 (longitude) - decimal degrees - for the address "1600 Amphitheatre Parkway, Mountain View, CA."

When you obtain GPS coordinates, you can set the device location via the Set device location command.

Device > Logs

Get device log

Retrieves the latest tail number of lines from the operating system log on the device. The device log contains valuable data that can help understand execution problems.

Device > Logs

Start debug logs

Notifies the system to start collecting log information.

Device > Logs

Stop debug logs

Notifies the system to stop collecting debug log entries.

Device > Network Settings

Get network settings

Returns the status of the network setting specified: wifi, data (only for devices with a valid SIM card installed), and/or airplane-mode. Can insert the retrieved value into a defined variable. Use the Property parameter to specify the network setting to retrieve.

This command is supported for both Android and iOS devices.

Important: If Airplane Mode is turned on, Data will be disabled.

Device > Network Settings

Set network settings

Sets the status of the specified network settings: wifi, data (only for devices with a valid SIM card installed), and/or airplane-mode.

Device > Time Zone

Get time zone

Retrieves the time zone configured on the device. The return value is a string that complies with the tz database format.

Important: When running the Get time zone command on an iOS device connected with the fast video template, it may return an incorrect date and time. If this is the case, contact your Lab admin user to request that the device be connected using the XCT template, or contact Perfecto Support to request the same.

Device > Time Zone

Reset time zone

Resets the time zone configured on the device to the default time zone.

Device > Time Zone

Set time zone

Sets the device time zone.

Before changing the device time zone, verify that the Automatic time zone setting is turned off on the device. The time zone of the device will automatically be reset when the device is closed by Perfecto.

The command fails if the timezone parameter does not comply with the tz database format.

Device > Vitals

Start vitals

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.

Device > Vitals

Stop vitals

Ends the collection of device vitals. The collected information is saved as a CSV file in the repository. Once script execution is complete, the CSV file is available for download from the Single Test Report.

If the script contains several start/stop pairs for the same device, there will be a single CSV file for the device, provided the device remains open. Numerous open/close device actions in the scrip will result in several CSV files. In other words, a CSV file is generated per device closure.

If the data collection frequency interval, defined by the Vitals start function, is shorter than the script runtime, no CSV file is created.

Device

Close device

Releases one ore more devices previously allocated to the current session/script execution. When a device is closed, it will automatically be returned to its default state, orientation, and home screen.

Device

Device info

Retrieves the specified device property and inserts its value into a defined variable. Use the Property parameter to specify the device property to retrieve.

Device

Device setup

Sets the environmental properties of the device. Available properties: Location, Orientation, Network and Background applications.

Device

Device shell

Runs an adb shell command on an Android device, for example to list the content of a folder on a device or to show a list of devices connected to a device.

Device

Device state

Changes the mechanical position of a device that supports a flip cover or slide keyboard. The operation parameter indicates what action to take.

Device

Get wifi ip address

Retrieves the internal IP address of the device. Verify that the device is connected to WiFi.

Returns the internal IP address of the device in Lab WiFi.

Device

Keyboard display

Controls the virtual keyboard display that appears when an edit field is selected.

Device

Lock screen

Locks the device screen for a specified number of seconds. Check instantly how your app behaves when the screen is locked.

Device

Open device

Allocates one or more devices to the current script execution and prepares them for usage. Allocated devices are available to the execution without interruption until either the Close device function is used or the script ends.

Device

Open notifications

Opens the notifications shade. This is helpful when testing for scenarios that use notifications from internal and external apps. How does your app behave when a weather notification comes in?

Device

Ping device

Pings the device.

Device

Reboot device

Reboots the device by performing a software restart on iOS and Android devices and returns it in the unlocked state.

Device

Recover device

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

The device will not be rebooted; it will be disconnected, reconnected to the Perfecto data center, and returned unlocked. To reboot the device, use the Reboot device function.

Recovery will take a few minutes to complete. Use this function at the end of your script instance of the device in error. This is useful for your next run.

Device

Rotate device

Rotates the device to either landscape or portrait. To rotate the device orientation, set method to Device. This will affect the screen orientation as well. To rotate the device view without manipulating the device screen, set method to be View. The Next parameter value in operation enables a 90° rotation.

The Rotate device function performs the same operation as the Rotate option in the Manual Testing view.

The operation and state parameters cannot be used together because they dictate a different behavior.

Device

Select device

Enables selecting a device according to device attributes instead of a specific device ID. For example, specifying an iPad 4 model will randomly select an available iPad 4 device.

When you define multiple parameters (such as Model and OS Version), the command will select a single device that matches all of the defined requirements. Use Select Device when you would like to broaden the range of potential device options according to the specified attributes.

All Select Device parameters accept regular expressions, including wildcards. The parameters are case insensitive.

Device

Send key event

Sends a keyboard event to the device. Uses standard Android keycodes. Key codes and metastates are defined by Android.

For example: Key code = 29 and the Metastate = 1 will print an "A"; Key code = 29 and the Metastate = 0 will print an "a"

Device

Toggle radio

Turns the device's radio signal on or off. This essentially disconnects or re-connects the cellular service of the device.

Device

Trackball

Performs a trackball roll.

Reporting

End test

Notifies the reporting service that the test execution has finished and the status to report for the test.

Important: If success = true, the failureDescription parameter should not be included.

Reporting

Start test

Adds specific test tags to represent the specific test context (what is being tested). For example, you can add “ValidateLogin” to represent a test that validates a user login. Other examples of tags that can be used here are test types such as regression, nightly, or smoke test.

Use the End test command to end the logical test and report the test status .

Script > Execute

Execute script

Deprecated. This command has been replaced with the Embedded tests functionality.

Script > Flow

Break

Stops the flow of the current loop iteration and continues it in the first operation after the loop iteration.

The Break function should be used within a condition. There is no value or logic in using it outside of a condition because the script lines following it will not be executed and are unnecessary.

Script > Flow

Continue

Stops the flow of the current loop iteration and continues it in the next loop iteration.

The Continue function should be used within a condition. There is no value or logic in using it outside of a condition because the script lines following it will not be executed and are unnecessary.

Script > Flow

Exit

Stops the flow of the current script. If the script is nested, the execution flow returns to the parent script.

The Exit function should be used within a condition. There is no value or logic in using it outside of a condition because the script lines following it will not be executed and are unnecessary.

Script > Flow Get embedded result

Accepts the value from the return variable of the embedded test. The Get command accepts the Value parameter from the Return Embedded result command and further processes it as the result variable of the main test.

You must always use a single Get embedded result command in the main test to accept the value from the return variable produced by the Return embedded result command.

Script > Flow Return embedded result

Returns the result of the embedded test to the main test. The return command ends the execution of the embedded test and returns a variable.

You must always use a single Get embedded result command in the main test to accept the value from the return variable produced by the Return embedded result command.

Script > Timer

Get timer

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.

Script > Timer

Timer report

Adds a timer report to the test. The measured timer result is reported from the test (retrieved via the Get timer command) into the generated Single Test Report. The report is named according to the name parameter and based on the timing measurement specified by the result parameter.

For more details on adding timer reports to your test, see Performance testing.

Script > Timer

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.

Script > Timer

Timer stop

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

Script

Counter update

Updates a counter variable. It is possible to increase or decrease the value of a counter and set it to a specific value.

Script

Integer convert

Converts an integer into a text string.

Script

Script info

Retrieves the script information and can insert its value into a defined variable. Use the Property parameter to specify the script info to retrieve.

Script

Select JSON value

Accepts a string containing a JSON value as an input, selects a specific value out of that object using the JSON Pointer specification, and provides a result variable as a STRING.

Script

String concatenate

Joins two or more character strings.

Script

String convert

Converts a text string into an integer.

Script

String indexOf

Returns the index within this text of the first/last occurrence of the specified subtext, starting the search at the specified index.

Script

String substring

Retrieves a substring of the given string. If no value is given for end, the substring starting at the begin index continues until the end of the string will be returned.

Services > Cloud

Cloud call

Generates an external voice call recording to the selected destination. It is possible to select multiple destinations that may include devices, users, and phone numbers.

There is no default. To use this command, at least one destination must be selected.

Services > Cloud

Cloud email

Sends an email message to the selected destination. To diversify, it is possible to select multiple destinations that may include different email addresses, devices, and users.

There is no default. At least one destination must be selected. If not specified, the message subject and body defaulted to none and test email.

To receive email message, confirm that the destination device is configured.

Services > Cloud

Cloud SMS

Sends an SMS message to the selected destination. It is possible to select multiple destinations that may include devices, users, and phones.

There is no default. To use this command, at least one destination must be selected.

Services > Network Virtualization

Network virtualization start

Starts network virtualization for the device with the specified conditions. Network virtualization will be stopped when the script ends.

For network condition testing, the device used is connected to the Web via Perfecto WiFi. Setup is completed by Perfecto.

Use the Network virtualization start and update commands to activate and update the network conditions. Without this activation, there is no effect on the device communication to the web.

Selecting latency effects both in and out traffic. For example, selecting latency of 100 results in the actual latency being 200 (100 each way).

For typical network emulation values, see Network conditions for network virtualization.

Services > Network Virtualization

Network virtualization stop

Stops the network virtualization for the device and saves the PCAP file to the repository. The PCAP file logs the network traffic. The parameter indicates if the should be attached to the execution report. If will then be included as a link in the extracted PDF and HTML report.

Services > Network Virtualization

Network virtualization update

Updates the network virtualization for the device with the specified conditions. For any condition that is not specified, the system will continue to use the existing value.

For network conditions testing, the device used is connected to the Web via Perfecto WiFi. Setup is completed by Perfecto.

Use the Network virtualizationstart and update commands to activate and update the network conditions. Without this activation, there is no effect on the device communication to the web.

Selecting latency effects both in and out traffic. For example, selecting latency of 100 results in the actual latency being 200 (100 each way).

For typical network emulation values, see Network conditions for network virtualization.

Services > Perfecto Connect

Perfecto connect attach

Connects the given device to the local network using the Perfecto Connect tunnel created by the perfectoconnect client. The tunnelId parameter should provide the identifier of the tunnel to connect through.

Used in conjunction with the Perfecto connect detach command.

Services > Perfecto Connect

Perfecto connect detach

Disconnects the given device from the local network. The tunnelId parameter should provide the identifier of the tunnel used to connect the device.

Used in conjunction with the Perfecto connect attach command.

UI Objects > Application

Application info

Retrieves the specified application property and can insert the value into a defined variable. Use the Property parameter to specify the webpage property to retrieve. Use the Property parameter to specify the application property, application version or orientation, to retrieve. Only one property value or performance value can be specified in each command.

The Response provides the value of the requested property value in the returnValue field.

UI Objects > Application

Application.Element.Click

Uses an element identifier (XPath or specific attribute) to search for the specified element in the display of the active window and then clicks the element. Used in conjunction with either the Perfecto or Appium framework to interpret the element classes.

UI Objects > Application

Application.Element.Find

Finds an element or elements in the active application. Can be used to validate whether an element exists in the application.

The returnValue of the response will indicate the UI Element hierarchy to the found element.

UI Objects > Application

Application.Element.Info

Retrieves the specified property of the element and can insert its value into a defined variable. Use the Property parameter to specify the element property to retrieve.

UI Objects > Application

Application.Element.MultiTap

Uses an element identifier (XPath or specific attribute) to search for the element in the display of the active window and then sends one or more taps with one or more touch points on the element. Used in conjunction with either the Perfecto or Appium framework to interpret the element classes.

UI Objects > Application

Application.Element.Set

Uses an element identifier (XPath or attribute value) to search for the element in the display of the active window and then enters the supplied text to the element. Uses either the Perfecto or Appium object tree framework.

UI Objects > Objects Optimization

Objects optimization start

Builds an Object search tree that is limited to the objects visible on the screen. This speeds up the object search functionality for large iOS View objects.

Used in conjunction with the Objects optimization stop command.

UI Objects > Objects Optimization

Objects optimization stop

Builds an Object search tree that is limited to the objects visible on the screen. This speeds up the object search functionality for large iOS View objects. This command cancels the optimization.

Used in conjunction with the Objects optimization start command.

UI Objects > Visual

Button.Click(image)

Identifies a button based on an image label and clicks it. The image file should be stored in the repository prior to running this command.

By default, the find image function searches for the image on the current screen. However, if there is a possibility that the image is not on the current screen, enable the Scroll and search parameter. When this parameter enabled, the default scroll direction is down. For iOS devices, the default scroll direction is right. To change the scroll direction to down, select body in the Search area parameter.

For more information on how to use the Next parameter, see Create custom swipe gestures

This command should be used in combination with Visual Relations.

UI Objects > Visual

Button.Click(text)

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

By default, the find text function searches for the text on the current screen. However, if there is a possibility that the selected text is not on the current screen, enable the Scroll and search parameter. When enabled, the default scroll direction is down. For iOS devices, the default scroll direction is right. To change the scroll direction to down, select body in the Search area parameter.

For more information on how to use the Next parameter, see Create custom swipe gestures

This command should be used in combination with Visual Relations.

UI Objects > Visual

Edit.Get(image)

Identifies an edit field based on an image label and retrieves its value. The value can be inserted into a defined variable.

The field is in relation to the found label and is defined by the label position and offset parameters. For more information, see Visual Relations.

By default, the find image function searches for the image on the current screen. However, if there is a possibility that the image is not on the current screen, enable the Scroll and search parameter. When enabled, the default scroll direction is down. For iOS devices, the default scroll direction is right. To change the scroll direction to down, select body in the Search area parameter.

For more information on how to use the Next parameter, see Create custom swipe gestures

UI Objects > Visual

Edit.Get(text)

Identifies an edit field, based on a text label, and retrieves its value. The value is returned as a string.

UI Objects > Visual

Edit.Set(image)

Identifies an edit field based on an image label and inserts the text specified in the value parameter into the field. The field is in relation to the found label and is defined by the label position and offset parameters.

UI Objects > Visual

Edit.Set(text)

Identifies an edit field based on a text label and inserts the text specified in the value parameter into the field. The field is in relation to the found label and is defined by the label position and offset parameters.

UI Objects > Webpage

Webpage info

Retrieves the specified webpage property and can insert the value into a defined variable. Use the property parameter to specify the webpage property to retrieve. Only one property value or performance value can be specified in each command.

The returnValue field of the response provides the value of the requested property value.

UI Objects > Webpage

Webpage.Element.Click

Uses an element identifier (HTML attribute value or XPath) to search for the element in the display of the active window and then clicks the element. Assumes that the display is using DOM elements.

UI Objects > Webpage

Webpage.Element.Find

Uses an element identifier (HTML attribute value or XPath) to search for the element in the display of the active window. Assumes that the display is using DOM elements. Can be used to validate whether an element exists on the webpage.

The returnValue of the response provides the element tree traversal to the element if found.

UI Objects > Webpage

Webpage.Element.Info

Retrieves the specified property of the element and can insert its value into a defined variable. Use the property parameter to specify the element property to retrieve.

UI Objects > Webpage

Webpage.Element.Info.CSS

Retrieves the specified css property value of a web page control and can insert its value into a defined variable. Use the property parameter to specify the element property to retrieve.

UI Objects > Webpage

Webpage.Element.Set

Uses an element identifier (HTML attribute value or XPath) to search for the element in the display of the active window and then enters the supplied text into the element. Use the text parameter to specify the text to set. Assumes that the display is using DOM elements.

(No group)

Comment

Adds a comment in the script. Comments appear in the script and in the generated report.

(No group)

Drag

Performs the drag gesture. You can define the touch sequence coordinates and time frame of the drag. The location parameter supplies the coordinates of the start and end points of the drag. There is a touchdown at the beginning of the drag and a touch-up at the end of the drag. A touchdown is performed with the first pair of coordinates. This is followed by a drag through all the coordinates until the last one, where a touch-up is performed.

(No group)

Find image

Finds an image (needle) on the device screen (haystack) and stores the coordinates for future commands. By default, the find image function searches for the image on the current screen.

(No group)

Find text

Locates the test specified by the content parameter and stores its coordinates on the device for future use by other operations. Note that these coordinates are not sent back as return value.

This command is used as the first step in a Visual Relationship sequence:

  • Perform Find text to identify the location of the string on the screen.
  • Perform a text visual analysis command using the visual relation parameters to identify the element relative to the text identified with the Find text execution.

(No group)

Gesture

Performs a multi-touch operation called pinch and zoom.

For this gesture, the start and end coordinates must be defined. It is also possible to define the duration of the gesture. The start and end coordinates specify the touch sequence path for a single finger. The other finger is symmetrical.

(No group)

Home

Brings the device to its idle/home screen.

For iOS and Android devices, the device is unlocked and returned to its default rotate orientation. For example, iOS devices are returned to portrait mode and iPad devices to landscape mode.

Use this function at the beginning of a script to ensure a known starting point for the user.

(No group)

Press key

Clicks a single key or a sequence of special device keys (either control or keyboard). You can hover over the device keys to identify them and then enter the Keys parameter according to the required syntax.

Common keys include: LEFT, RIGHT, UP, DOWN, ENTER, BACK, MENU, VOL_UP, VOL_DOWN, CAMERA, CLEAR

Important: The listed keys are not necessarily supported by all devices. The available keys depend on the device.

The Presskey command always presses the keyboard keys according to the default layout configuration.

(No group)

Screen text

Returns the text that appears on the screen of the device (but does not select the text). The retrieved screen text can be stored in a defined String variable or to a location in the Perfecto Repository (see key parameter) and then used with the string compare and string attribute checkpoints.

(No group)

Screenshot

Captures an image of the current screen display, in the selected format. The digital screenshot included in the report. Additional configurations include capturing an analog image, saving the image in the repository, and reducing the image resolution for long scripts that result in large reports.

Use this function to see how the application looks at any given time during a script run. For additional time saving, enable the Grid label advanced parameter to generate a separate view mode with customizable screenshot labels.

You can also use this command for dynamic image validation during runtime. This means that during runtime, a device screenshot image can be saved to the repository and then compared to the current screen on the device to validate what was expected.

(No group)

Select image

Clicks on the image (needle) in the PNG file whose name is indicated by the content parameter. Store the image in the repository prior to running this command.

By default, the select image function searches for the text on the current screen. If there is a possibility that the selected text is not on the current screen, enable the Scroll and search parameter. When enabled, the default scroll direction is down. For iOS devices, the default scroll direction is right. To change the scroll direction to down, select body in the Search area parameter.

Prerequisite: The image to be searched must be uploaded to the Perfecto repository. In the command, the repository location will be selected in the Expected Needle parameter. For information on uploading files to the repository, see Manage the repository.

(No group)

Select text

Clicks on the text specified by the label parameter.

By default, the select text function searches for the text on the current screen. However, if there is a possibility that the selected text is not on the current screen, enable the Scroll and search parameter. When enabled, the default scroll direction is down. For iOS devices, the default scroll direction is right. To change the scroll direction to down, select body in the Search area parameter.

(No group)

Swipe

Performs the swipe gesture, which is a three-part gesture:

  • A touchdown at the start coordinates
  • A move to the end coordinates
  • A touch-up at the end coordinates

The relationship between the start and end coordinates defines the direction vector of the swipe. It is possible to also define the time frame of the swipe. 

The start and end coordinate values can be in pixels or in percentage. Always use the same type for both coordinates.

The (0,0) point is in the upper left corner of the screen. The x-coordinate value increases to the right and the y-coordinate value increases to the bottom.

(No group)

Touch

Performs a touch operation on the specified coordinate location. A long press can be performed by using the durationparameter. A touchdown press is released with a touch- up release.

(No group)

Type

Enters text into a field on the device screen. The device should be in text-entry-mode: either the virtual keyboard is open or the cursor is waiting for text. Most platforms support Unicode and allow text in any language.

On most devices, the text is sent directly to the operating system, disregarding the keyboard.

(No group)

Wait

Waits the specified duration before performing the next script step. As a best practice, use the Timeout parameter and not the Wait command.