This suite contains useful standard procedures provided and maintained by Quality First Software GmbH.
For a description of packages and procedures of this library in javadoc format, see qfs.html in the same directory.
| Package | Description | |
|---|---|---|
| This package contains helpful standard procedures provided by Quality First Software. | ||
| Contains procedures to test android applications as well as useful procedures for remote controlling android devices. | ||
| Procedures using the Android Debug Bridge (adb). | ||
| Procedures for controlling android apps. | ||
| Procedures to read out the package name of an android application. | ||
| Procedures for changing android apps settings. | ||
| Procedures for transfering data from a computer to an android device and vica versa | ||
| Procedures to set the state of checkboxes. | ||
| Contains procedures to remote control android devices. | ||
| Procedures for android gestures like pinch, swipe, ... | ||
| Procedures which work for any Android component. | ||
| Procedures for accessing lists. | ||
| Procedures for checking a list. | ||
| Procedures to select menu items | ||
| Procedures to get and set the state of radio buttons. | ||
| Packages containing swiping procedures | ||
| Procedures to access text fields and text areas. | ||
| Contains procedures to work with native windows on a MacOS system. | ||
| Procedures to start/close/raise a native macOS application. | ||
| Procedures to get and set the state of checkboxes in native macOS applications. | ||
| Basic procedures for interacting with a component of a native macOS application. | ||
| Procedures to select menu items and checkbox menu items in native macOS applications. | ||
| Procedures for testing based on images. | ||
| Procedures to replay events anywhere on an android application based on images. | ||
| Procedures to replay events anywhere on the screen based on images. | ||
| Contains procedures to work with native windows of the operating system Windows. | ||
| Contain procedures to handle Adobe Acrobat Reader specific tasks like SaveAs or SaveAs Text ... | ||
| Procedures to get and set the state of checkboxes in native windows applications. | ||
| Basic procedures for interacting with a component of a native windows application. | ||
| Dependencies for starting/stopping a native windows application. | ||
| Procedures for replaying key events to a windows application. | ||
| Procedures to select menu items and checkbox menu items in native windows applications. | ||
| Procedures for checking components or comparing various kinds of values. | ||
| The procedures in this package are useful for generic cleanup after an exception is thrown. | ||
| Procedures for interacting with (SUT) clients. | ||
| Procedures to work with a QF-Test daemon. | ||
| Procedures to work with databases. | ||
| Procedures to bind data for data-driven testing. | ||
| Procedures for showing dialogs during the test run. | ||
| Procedures to show a simple progress dialog | ||
| Contains procedures to test iOS applications as well as useful procedures for controlling ios simulator and devices. | ||
| Procedures to set the state of checkboxes (= switches). | ||
| Accessing the device clipboard from procedures. | ||
| Contains procedures to control iOS simulator and devices. | ||
| Procedures for controlling iOS applications | ||
| Procedures for iOS gestures like pinch, swipe, ... | ||
| Procedures which work for any iOS element | ||
| Procedures for executing commands with the iOS Development Bridge (IDB) tool. | ||
| Procedures for accessing lists. | ||
| Procedures for checking a list. | ||
| Procedures to select menu items | ||
| Procedures to get and set the state of radio buttons (= switches). | ||
| Helper procedures to check and set up the test environment for iOS testing. | ||
| Helper procedures to check and set up the homebrew tool for iOS testing. | ||
| Helper procedures to check and set up the iOS Developer Bridge for iOS testing. | ||
| Helper procedures to check and set up the iOS Developer Bridge client (idb) for iOS testing. | ||
| Helper procedures to check and set up the iOS Developer Bridge companion (idb-companion) for iOS testing. | ||
| Helper procedures to interact with macOS system functions during the test environment setup for iOS testing. | ||
| Helper procedures to check and set up the Python package installer (pip) for iOS testing. | ||
| Helper procedures to check and set up the python 3 environment for iOS testing. | ||
| Helper procedures to check and set up the Xcode development environment for iOS testing. | ||
| Helper procedures to check and set up the Xcode development path. | ||
| Packages containing swiping procedures | ||
| Procedures to set the state of switches. | ||
| Procedures to access text fields and text areas. | ||
| Procedures for writing log-entries. | ||
| Procedures to write screenshots into the run log. | ||
| Utility procedures for shell commands. | ||
| Miscellaneous utility procedures. | ||
| Accessing the clipboard from procedures. | ||
| Procedures for sending emails. | ||
| Procedures for interacting with a POP3 server. | ||
| Contain procedures to work with files. | ||
| Contain procedures to work with images. | ||
| Procedures for working with JSON files. | ||
| Procedures for generating random string. | ||
| Procedures for executing commands on a remote server via ssh. | ||
| Procedures for handling SSH connections. | ||
| Procedures for handling the test execution. | ||
| Procedures for skipping test steps. | ||
| Procedures for stopping test steps. | ||
| Procedures for working with variables. | ||
| Procedures for working with XML files. |
| Package/Procedure/Dependency | Description | |
|---|---|---|
| This package contains helpful standard procedures provided by Quality First Software. | ||
| Contains procedures to test android applications as well as useful procedures for remote controlling android devices. | ||
| Procedures using the Android Debug Bridge (adb). | ||
| Procedures for controlling android apps. | ||
| Reset all data and permissons from the app that currently has the focus and restart it. | ||
| Start an Android app on an already running device. | ||
| Stop a running Android app. | ||
| Procedures to read out the package name of an android application. | ||
| Get the package name of the app that currently has the focus. | ||
| Get the package name from an APK file. | ||
| Procedures for changing android apps settings. | ||
| Grant a permission from an app. | ||
| Deletes all data from an app. | ||
| Revoke a permission from an app. | ||
| Procedures for transfering data from a computer to an android device and vica versa | ||
| Copy a file or folder from the android device to the local system. | ||
| Copy a file or folder from the local system to the android device. | ||
| Get the path to the adb binary. | ||
| Execute an adb command. | ||
| Procedures to set the state of checkboxes. | ||
| Deselect a checkbox. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Set checkbox to the given state. | ||
| Contains procedures to remote control android devices. | ||
| Select the app switch button on the device. | ||
| Select the back button on the device. | ||
| Close a possibly open keyboard window. | ||
| Procedures for android gestures like pinch, swipe, ... | ||
| Perform a two finger pinch action. | ||
| Perform a two finger zoom action. | ||
| Get the rotation of the device. | ||
| Select the home button on the device. | ||
| Set the rotation of the device. | ||
| Sync the time of the android device with the current machine or a given timestamp. | ||
| Procedures which work for any Android component. | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component. | ||
| Click on a given component. | ||
| Long click on a given component. | ||
| Wait for a given component. | ||
| Wait till a given component disappears. | ||
| Procedures for accessing lists. | ||
| Procedures for checking a list. | ||
| Check the number of items of a given list according to a specified comparison mode. | ||
| Select a given item by a mouse click on it. | ||
| Return the current index of a given item. | ||
| Return the number of items of a given list. | ||
| Return the text of a given item. | ||
| Check whether we are at the end of the list. | ||
| Check whether we are at the top of the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to the top of the list. | ||
| Scroll to the top of the list. | ||
| Select a given item by a mouse click on it. | ||
| Procedures to select menu items | ||
| Select an item from a menu. | ||
| Select an item from a menu. | ||
| Procedures to get and set the state of radio buttons. | ||
| Return the value of a radio button. | ||
| Select a radio button. | ||
| Select a radio button. | ||
| Packages containing swiping procedures | ||
| Perform a swipe down operation. | ||
| Perform a swipe operation. | ||
| Perform a swipe left operation. | ||
| Perform a swipe right operation. | ||
| Perform a swipe up operation. | ||
| Perform a swipe operation. | ||
| Procedures to access text fields and text areas. | ||
| Clear a text field. | ||
| Return the text of a given textfield. | ||
| Set a given text to a given text-field or text-area. | ||
| Read the content of a given file and set its content to a given text-field. | ||
| Contains procedures to work with native windows on a MacOS system. | ||
| Procedures to start/close/raise a native macOS application. | ||
| Close the application. | ||
| Connect to the given application. | ||
| Disconnects from the application, which was connected previously with "qfs.automac.app.connect", without closing the application. | ||
| Raise the application. | ||
| Procedures to get and set the state of checkboxes in native macOS applications. | ||
| Check the value of the given component. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Basic procedures for interacting with a component of a native macOS application. | ||
| Check the position, width and height of the component on the screen. | ||
| Check the image of a given component. | ||
| Compare the given value to the value of a component according to the compareMode. | ||
| Click a given component. | ||
| Set the global Jython variable __uiauto_control to the GUI element matching the given parameters. | ||
| Fetch the screen coordinates for the left border, top, width and height for the component. | ||
| Return the value of the given control. | ||
| Set a given attribute of a component. | ||
| Set a given value to a component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. | ||
| Procedures to select menu items and checkbox menu items in native macOS applications. | ||
| Select an item from a menu. | ||
| Send the given key along with the qualifier to the component having the focus. | ||
| Procedures for testing based on images. | ||
| Procedures to replay events anywhere on an android application based on images. | ||
| Click at an image anywhere on a Android application. | ||
| Find an image anywhere on an Android application and return the component ID. | ||
| Procedures to replay events anywhere on the screen based on images. | ||
| Click at an image anywhere on the screen. | ||
| Find an image anywhere on the screen and return its position. | ||
| Contains procedures to work with native windows of the operating system Windows. | ||
| Contain procedures to handle Adobe Acrobat Reader specific tasks like SaveAs or SaveAs Text ... | ||
| Save the current open PDF in Adobe Acrobat Reader as a text file with the given filename. | ||
| Save the current open PDF in Adobe Acrobat Reader as a PDF file with the given filename. | ||
| Procedures to get and set the state of checkboxes in native windows applications. | ||
| Check the value of the given component. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Check, whether a native window on the operating system Windows is opened. | ||
| Check, whether a native window on the operating system Windows is opened and close it. | ||
| Close a window. | ||
| Basic procedures for interacting with a component of a native windows application. | ||
| Check the position, width and height of the component on the screen. | ||
| Check the image of a given component. | ||
| Compare the given name to the name of a component according to the compareMode. | ||
| Wrapper procedure to either check the value of a component or, if no value exists, the name. | ||
| Compare the given value to the value of a component according to the compareMode. | ||
| Click a given component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. | ||
| Fetch the screen coordinates for the left border, top, width and height for the component. | ||
| Return the name of the given control. | ||
| Return the value or, if it does not exist, the name of the given control. | ||
| Return the value of the given control. | ||
| Set a given text to a component if the method setText() is implemented by the IUIAutomationElement Interface of the component. | ||
| Set a given value to a component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. | ||
| Dependencies for starting/stopping a native windows application. | ||
| Start a native windows application as the SUT (system under test) using the dependency funtionality. | ||
| Read the URL from an InternetExplorer window. | ||
| Procedures for replaying key events to a windows application. | ||
| Perform Ctrl+a to the given window to mark all text of the compontent which has the focus. | ||
| Perform Ctrl+v to the given window to paste the content of the clipboard to the component with the focus. | ||
| Perform Ctrl+x to the given window to cut the selected content of the component with the focus. | ||
| Replay DELETE to the given window. | ||
| Replay ENTER to the given window. | ||
| Replay TAB to the given window. | ||
| Send the given key along with the qualifier to the window with the given title. | ||
| Write all children of a window to the run log. | ||
| This method logs the top-level objects (windows) accessible via the Windows UIAutomation API. | ||
| Perform Ctrl+A and then Ctrl+C to a given window. | ||
| Procedures to select menu items and checkbox menu items in native windows applications. | ||
| Select an item from a menu. | ||
| Mark and copy the whole text of a given document via Ctrl+A and Ctrl+C. | ||
| Procedures for checking components or comparing various kinds of values. | ||
| Check the state of a given component. | ||
| Check image of a component against a file or an ImageRep. | ||
| Check image of a component against a file. | ||
| Compare two Objects for their equality. | ||
| Check if given component is selected. | ||
| Check the text of a given component. | ||
| Check whether a value is in a given range. | ||
| Compare two string values for their equality. | ||
| Compare two date strings. | ||
| Compare two values for their equality. | ||
| Compare two values for their equality. | ||
| The procedures in this package are useful for generic cleanup after an exception is thrown. | ||
| Close all dialogs. | ||
| Close all menus unconditionally. | ||
| Close all modal dialogs. | ||
| This procedure encompasses the usage of other cleanup procedures in this package and is the recommended operation to perform after an exception occurs and is implicitly caught. | ||
| Procedures for interacting with (SUT) clients. | ||
| Rename an SUT client. | ||
| Write a string to the stdin stream of a process started by QF-Test. | ||
| Helper method for turning on internal logging. | ||
| Helper method for turning off internal logging. | ||
| Procedures to work with a QF-Test daemon. | ||
| Starts remote instrumentation procedure for an Eclipse/RCP based or standalone SWT application via a given daemon. | ||
| Locate all running daemons and writes them into the run log and prints a list of running daemons to the terminal. | ||
| Start a client application on a remote host via the QF-Test daemon. | ||
| Procedures to work with databases. | ||
| Build up connection to a given database and executes a specified select-sql-statement. | ||
| Build up connection to a given database and execute a specified SQL-statement. | ||
| Procedures to bind data for data-driven testing. | ||
| Create and register a databinder that binds a JSON array of objects. | ||
| Create and register a databinder that binds a list of values to a variable. | ||
| Create and register a databinder that binds a list of value-sets to a set of variables. | ||
| Procedures for showing dialogs during the test run. | ||
| Procedures to show a simple progress dialog | ||
| Hides a progress dialog displayed with showProgressDialog | ||
| Shows a simple progress dialog on the screen. | ||
| Show a configurable dialog equivalent to JOptionPane. | ||
| Show an information dialog with an OK option. | ||
| Show an information dialog with a YES, NO and CANCEL option. | ||
| Show an information dialog with a YES and NO option. | ||
| Contains procedures to test iOS applications as well as useful procedures for controlling ios simulator and devices. | ||
| Procedures to set the state of checkboxes (= switches). | ||
| Deselect a checkbox. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Set checkbox to the given state. | ||
| Accessing the device clipboard from procedures. | ||
| Gets the content of the primary clipboard on the device. | ||
| Sets the primary clipboard's content on the device. | ||
| Contains procedures to control iOS simulator and devices. | ||
| Procedures for controlling iOS applications | ||
| Returns the bundleId of the application currently running on the device. | ||
| Returns the name of the application currently running on the device (or empty, if no name can be assigned). | ||
| Returns the bundleId of an app. | ||
| Installs an application on the device. | ||
| Lists all apps on the device | ||
| Removes an application from the device. | ||
| Start an application already installed on the device. | ||
| Stops a running application on the device. | ||
| Procedures for iOS gestures like pinch, swipe, ... | ||
| Perform a two finger pinch action. | ||
| Perform a two finger zoom action. | ||
| Get the rotation of the device. | ||
| Get the udid of the connected device. | ||
| Return to the home screen of the iOS device. | ||
| Checks if the iOS device is locked. | ||
| Lists all iOS devices. | ||
| Locks the (simulated) iOS device | ||
| Set the rotation of the device. | ||
| Unlocks the (simulated) iOS device | ||
| Procedures which work for any iOS element | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component. | ||
| Click on a given component. | ||
| Double click on a given component. | ||
| Long click on a given component. | ||
| Types in some text on the currently selected input element | ||
| Wait for a given component. | ||
| Wait till a given component disappears. | ||
| Procedures for executing commands with the iOS Development Bridge (IDB) tool. | ||
| Get the path to the idb binary. | ||
| Run idb command. | ||
| Procedures for accessing lists. | ||
| Procedures for checking a list. | ||
| Check the number of items of a given list according to a specified comparison mode. | ||
| Select a given item by a mouse click on it. | ||
| Return the current index of a given item. | ||
| Return the number of items of a given list. | ||
| Return the text of a given item. | ||
| Scroll to a particular element in the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to the top of the list. | ||
| Scroll to the top of the list. | ||
| Select a given item by a mouse click on it. | ||
| Procedures to select menu items | ||
| Select an item from a menu. | ||
| Select an item from a menu. | ||
| Procedures to get and set the state of radio buttons (= switches). | ||
| Return the value of a radio button. | ||
| Select a radio button. | ||
| Select a radio button. | ||
| Helper procedures to check and set up the test environment for iOS testing. | ||
| Checks the current environment for being compatible with iOS tests. | ||
| Helper procedures to check and set up the homebrew tool for iOS testing. | ||
| Checks if a detected homebrew version is recent enough. | ||
| Get the version of the currently installed homebrew tool, if available. | ||
| Triggers the installation of homebrew. | ||
| Helper procedures to check and set up the iOS Developer Bridge for iOS testing. | ||
| Helper procedures to check and set up the iOS Developer Bridge client (idb) for iOS testing. | ||
| Checks if a detected IDB client version is recent enough. | ||
| Get the path of the currently installed IDB client, if available. | ||
| Get the version of the currently installed IDB client, if available. | ||
| Triggers the installation of the IDB client. | ||
| Helper procedures to check and set up the iOS Developer Bridge companion (idb-companion) for iOS testing. | ||
| Checks if a detected IDB companion build is recent enough. | ||
| Get the build number of the currently installed IDB companion, if available. | ||
| Get the path of the currently installed IDB companion, if available. | ||
| Triggers the installation of the IDB companion. | ||
| Helper procedures to interact with macOS system functions during the test environment setup for iOS testing. | ||
| Checks if the current system is running macOS. | ||
| Finds an executable at different possible locations on the system. | ||
| Displays an information dialog about a started application. | ||
| Displays an information dialog about installation triggered in the terminal. | ||
| Opens on macOS an application at the given path. | ||
| Opens on macOS a file at the given path. | ||
| Opens the terminal to execute the given command. | ||
| Helper procedures to check and set up the Python package installer (pip) for iOS testing. | ||
| Checks if a detected Python package installer version is recent enough. | ||
| Get the version of the currently installed Python package installer, if available. | ||
| Triggers the installation of the Python package installer. | ||
| Helper procedures to check and set up the python 3 environment for iOS testing. | ||
| Checks if a detected Python 3 version is recent enough. | ||
| Get the version of the currently installed Python 3, if available. | ||
| Triggers the installation of Python 3. | ||
| Triggers the creation of a Python 3 virtual environment. | ||
| Helper procedures to check and set up the Xcode development environment for iOS testing. | ||
| Checks if the number of earlier detected available iOS devices on the system is > 0. | ||
| Checks if a detected Xcode version is recent enough. | ||
| Get information about a available iOS devices using Xcode tools. | ||
| Tries to detect if the recent runtime of the given platform is installed. | ||
| Returns the number of simulated iOS devices on the system using Xcode tools. | ||
| Get the version of the currently installed Xcode, if available. | ||
| Helper procedures to check and set up the Xcode development path. | ||
| Checks if the given Xcode development path matches the expected one. | ||
| Returns the Xcode development path. | ||
| Sets the Xcode development path. | ||
| Triggers the installation of Xcode. | ||
| Triggers the installation of the Xcode runtime. | ||
| Packages containing swiping procedures | ||
| Perform a swipe down operation. | ||
| Perform a swipe operation. | ||
| Perform a swipe left operation. | ||
| Perform a swipe right operation. | ||
| Perform a swipe up operation. | ||
| Perform a swipe operation. | ||
| Procedures to set the state of switches. | ||
| Deselect a switch. | ||
| Deselect a switch. | ||
| Return the value of a switch. | ||
| Select a switch. | ||
| Select a switch. | ||
| Set switch to the given state. | ||
| Set switch to the given state. | ||
| Procedures to access text fields and text areas. | ||
| Clear a text field. | ||
| Return the text of a given textfield. | ||
| Set a given text to a given text-field or text-area. | ||
| Read the content of a given file and set its content to a given text-field. | ||
| Procedures for writing log-entries. | ||
| Write an error into the run log. | ||
| Write a message into the run log. | ||
| Write a warning into the run log. | ||
| Procedures to write screenshots into the run log. | ||
| Return the total number of monitors. | ||
| Write an image of a component into the run log. | ||
| Write a screenshot of the whole screen into the run log. | ||
| Write a screenshots of a given monitor into the run log. | ||
| Utility procedures for shell commands. | ||
| Copy a given file or directory to a given target. | ||
| Delete a file. | ||
| Execute a shell command. | ||
| Check whether a given file or directory exists. | ||
| Return the basename of the given file or directory. | ||
| Return the parent directory of the given file or directory. | ||
| Create a given directory. | ||
| Move a given file or directory to a given target. | ||
| Remove a given directory. | ||
| Create a given file or update the last modified date of an existing file. | ||
| Miscellaneous utility procedures. | ||
| Perform a mouse click somwhere on the screen or onto a given component. | ||
| Accessing the clipboard from procedures. | ||
| Return the current text on the system clipboard. | ||
| Set a text on the system clipboard. | ||
| Trigger a full thread dump in the SUT if possible. | ||
| Drag the source component or item onto the target and drop it. | ||
| Dump an entire component hierarchy into the run log. | ||
| Dump the heap of the Java VM. | ||
| Procedures for sending emails. | ||
| Procedures for interacting with a POP3 server. | ||
| Delete all messages from a pop3 account. | ||
| Fetch a message from a pop3 account. | ||
| This procedure uses the smtplib module from Jython, to send emails via SMTP(s) server. | ||
| Send an email. | ||
| Contain procedures to work with files. | ||
| Check, whether a given file contain a specific value. | ||
| Check, whether a given file contain a specific value in a line. | ||
| Compare the given files and returns true if equal, otherwise false. | ||
| Read a worksheet of an Excel file. | ||
| Generates a time based one time password (TOTP). | ||
| Get the screen location and the size of a component or subitem. | ||
| Return a date, default is the current date in current locale. | ||
| Return the time in the current format. | ||
| Return a timestamp, which represents the current time in milliseconds. | ||
| Contain procedures to work with images. | ||
| Creates an ImageRep object with a visual matrix code, e.g. | ||
| Reads a visual matrix code - e.g. | ||
| Procedures for working with JSON files. | ||
| Compare two JSON files for full identity. | ||
| Compare two JSON structures for full identity. | ||
| Kill all running clients. | ||
| Kill a client. | ||
| Log all available methods of a given component. | ||
| Log current memory use. | ||
| Log current memory usage of the native process(es) of a client. | ||
| Print a given message to STDOUT. | ||
| Print the visible content of a variable. | ||
| Procedures for generating random string. | ||
| Return a random string created of parts of a specified area. | ||
| Return a random number. | ||
| Return a random number between two given numbers. | ||
| Return a random string containing small letters. | ||
| Read the content of a given file. | ||
| Send the given key along with the qualifier to the component which currently has the input focus. | ||
| Send the given text to the component which currently has the input focus. | ||
| Brings the specified window to the foreground. | ||
| Sleep a given time. | ||
| Procedures for executing commands on a remote server via ssh. | ||
| Connect to a remote server by ssh and execute a command. | ||
| Procedures for handling SSH connections. | ||
| Close an established ssh connection. | ||
| Connect to a remote server by ssh and keep the session open for further use. | ||
| Send a command via an established ssh connection and wait for resulting output. | ||
| Procedures for handling the test execution. | ||
| Procedures for skipping test steps. | ||
| Skip the execution of the current test case. | ||
| Skip the execution of the current test set. | ||
| Procedures for stopping test steps. | ||
| Stop the execution of the current test case | ||
| Stop the complete test run. | ||
| Stop the execution of the current test set. | ||
| Procedures for working with variables. | ||
| Delete all global QF-Test variables. | ||
| Delete all global QF-Test variables. | ||
| Delete a given global QF-Test variable. | ||
| Delete a given variable of a property group. | ||
| Delete a given global property group. | ||
| Print a list of all members of a given property group to the terminal. | ||
| Compares two version numbers. | ||
| Compares the expected version number with the version number of the currently used QF-Test. | ||
| Wait until a client prints something to the terminal. | ||
| Wait until one of N components is available. | ||
| Write a given message into a given file. | ||
| Procedures for working with XML files. | ||
| Compare two XML files for full identity. | ||
| Load properties from an XML file. |
This package contains helpful standard procedures provided by Quality First Software.
The "SUT client" name is used in many of the contained procedures represented by the "$(client)" variable. We recommend to define the variable "client" in the respective table of the test suite's root node - as long as only one SUT client is used in the test suite. This ensures that the "client" parameter doesn't have to be given separately.
Contains procedures to test android applications as well as useful procedures for remote controlling android devices.
Procedures using the Android Debug Bridge (adb).
| Procedure/Dependency | Description | |
|---|---|---|
| Get the path to the adb binary. | ||
| Execute an adb command. |
Get the path to the adb binary.
Execute an adb command.
command - the adb command to execute
retWithoutNewline - if the return value should cut "\n" default:false
addDeviceName - Try to add the deviceName to the adb shell command.
Procedures for controlling android apps.
| Procedure/Dependency | Description | |
|---|---|---|
| Reset all data and permissons from the app that currently has the focus and restart it. | ||
| Start an Android app on an already running device. | ||
| Stop a running Android app. |
Reset all data and permissons from the app that currently has the focus and restart it.
Start an Android app on an already running device.
packageName - The package name of the Android app to be launched.
Stop a running Android app.
packageName - The package name of the Android app to be stopped.
Procedures to read out the package name of an android application.
| Procedure/Dependency | Description | |
|---|---|---|
| Get the package name of the app that currently has the focus. | ||
| Get the package name from an APK file. |
Get the package name of the app that currently has the focus. This procedure will throw an exception in case multiple such apps exists or no such app could be found.
Get the package name from an APK file.
apkPath - apk path
Procedures for changing android apps settings.
| Procedure/Dependency | Description | |
|---|---|---|
| Grant a permission from an app. | ||
| Deletes all data from an app. | ||
| Revoke a permission from an app. |
Grant a permission from an app.
packageName - package name
permission - android permisson
Deletes all data from an app.
packageName - package name
Revoke a permission from an app.
packageName - package name
permission - android permisson
Procedures for transfering data from a computer to an android device and vica versa
| Procedure/Dependency | Description | |
|---|---|---|
| Copy a file or folder from the android device to the local system. | ||
| Copy a file or folder from the local system to the android device. |
Copy a file or folder from the android device to the local system.
filePath - Source path where the file is stored.
targetPath - Target path where to copy the file
Copy a file or folder from the local system to the android device.
filePath - Source path where the file is stored.
targetPath - Target path where to copy the file
Procedures to set the state of checkboxes.
| Procedure/Dependency | Description | |
|---|---|---|
| Deselect a checkbox. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Set checkbox to the given state. |
Deselect a checkbox. If the checkbox is already deselected, no action is performed.
id - The id of the checkbox.
Deselect a checkbox. If the checkbox is already deselected, no action is performed. You can specify the coordinates for clicking.
id - The id of the checkbox.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Return the value of a checkbox. It's either 1, if box is selected or 0, if box is not selected.
id - ID of the checkbox.
Select a checkbox. If the checkbox is already selected, no action is performed.
id - The id of the checkbox.
Select a checkbox. If the checkbox is already selected, no action is performed. You can specify the coordinates for clicking.
id - The id of the checkbox.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Set checkbox to the given state.
id - The id of the checkbox.
check - The check value to be set (either true or false).
Set checkbox to the given state. You can specify the coordinates for clicking.
id - The id of the checkbox.
check - The check value to be set (either true or false).
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Contains procedures to remote control android devices.
| Procedure/Dependency | Description | |
|---|---|---|
| Select the app switch button on the device. | ||
| Select the back button on the device. | ||
| Close a possibly open keyboard window. | ||
| Get the rotation of the device. | ||
| Select the home button on the device. | ||
| Set the rotation of the device. | ||
| Sync the time of the android device with the current machine or a given timestamp. |
Select the app switch button on the device.
Select the back button on the device.
Close a possibly open keyboard window.
Get the rotation of the device.
Select the home button on the device.
Set the rotation of the device.
rotation - The rotation in degree
valid values: 0,90,180,270
0 = reset to the default position
Sync the time of the android device with the current machine or a given timestamp.
timestamp - Optional timestamp, empty to use the current time of the host system, otherwise data in the form MMDDhhmm[[CC]YY][.ss]
Procedures for android gestures like pinch, swipe, ...
| Procedure/Dependency | Description | |
|---|---|---|
| Perform a two finger pinch action. | ||
| Perform a two finger zoom action. |
Perform a two finger pinch action.
finger1X - position X of the first finger
finger1Y - position Y of the first finger
finger2X - position X of the second finger
finger2Y - position Y of the second finger
Perform a two finger zoom action.
startX - position X of the start point
startY - position Y of the start point
range - moving range
angle - moving angle 0 = horizontal
Procedures which work for any Android component.
| Procedure/Dependency | Description | |
|---|---|---|
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component. | ||
| Click on a given component. | ||
| Long click on a given component. | ||
| Wait for a given component. | ||
| Wait till a given component disappears. |
Click on a given component, but only if the according parameter is set to true.
id - The Id of the target component.
click - If this is set to true, the click will be performed, otherwise nothing happens.
Click on a given component, but only if the according parameter is set to true. You can specify the coordinates for clicking and all other details of that mouse click.
id - The Id of the target component.
click - If this is set to true, the click will be performed, otherwise nothing happens.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
modifier - Modifier for mouse key. 16 for right mouse. 4 for left mouse.
hard - True, if hard event should be replayed. Default is false.
popupTrigger - True, if click should open a popup. Default is false.
Click on a given component.
id - The Id of the target component.
Click on a given component. You can specify the coordinates for clicking and all other details of that mouse click.
id - The Id of the target component.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
modifier - Modifier for mouse key. 16 for right mouse. 4 for left mouse.
hard - True, if hard event should be replayed. Default is false.
popupTrigger - True, if click should open a popup. Default is false.
Long click on a given component.
id - The Id of the target component.
Wait for a given component.
id - The Id of the target component.
timeout - The timeout to wait for that component
throwExc - True, whether procedure should throw an exception if component didn't appear.
Wait till a given component disappears.
id - The Id of the target component.
timeout - The timeout to wait for that component
throwExc - True, whether procedure should throw an exception if component didn't disappear.
Procedures for accessing lists.
| Procedure/Dependency | Description | |
|---|---|---|
| Select a given item by a mouse click on it. | ||
| Return the current index of a given item. | ||
| Return the number of items of a given list. | ||
| Return the text of a given item. | ||
| Check whether we are at the end of the list. | ||
| Check whether we are at the top of the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to the top of the list. | ||
| Scroll to the top of the list. | ||
| Select a given item by a mouse click on it. |
Select a given item by a mouse click on it. You can specify the coordinates for clicking and all other details of that mouse click.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
modifier - Modifier for mouse key. 16 for right mouse. 4 for left mouse.
hard - True, if hard event should be replayed. Default is false.
popupTrigger - True, if click should open a popup. Default is false.
Return the current index of a given item.
Sample usage: Can be used to determine the numeric index of an item like 'Price'.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
Return the number of items of a given list.
id - The component ID of the list.
Return the text of a given item.
Sample usage: Determine the text of the second item.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
Check whether we are at the end of the list.
id - ID of the list.
pixelVisible - Number of pixels that must be visible.
scrollBack - Sometimes QF-Test needs to scroll in order to determine whether a particular list is at the bottom or not. In case QF-Test needed to scroll down but we are not at the bottom, this parameter will determine whether to scroll back.
Check whether we are at the top of the list.
id - ID of the list.
pixelVisible - Number of pixels that must be visible.
Scroll to a particular element in the list.
id - ID of the list.
item - The item to scroll to.
itemSeparator - The item separator (@, % or &).
Scroll to a particular element in the list.
id - ID of the list.
item - The item to scroll to.
Scroll to the top of the list.
id - ID of the list.
Scroll to the top of the list.
id - ID of the list.
Select a given item by a mouse click on it.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
x - The x coordinate for the click, default is empty to click in the middle.
y - The x coordinate for the click, default is empty to click in the middle.
Procedures for checking a list.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the number of items of a given list according to a specified comparison mode. |
Check the number of items of a given list according to a specified comparison mode.
Sample usage: You can check, that a list has exactly 6 items or that the table has less then 10 items.
id - The id of the list.
compareValue - The comparison value.
compareMode - The comparison mode
= or ==, if the compareValue should be equal than the actual amount of items.
<, if the compareValue should be greater than the actual amount of items.
>, if the compareValue should be less than the actual amount of items.
<=, if the compareValue should be greater or equal than the actual amount of items.
>=, if the compareValue should be less or equal the actual amount of items.
!=, if the compareValue should be not equal the actual amount of items.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if wrong comparison mode has been set.
Procedures to select menu items
| Procedure/Dependency | Description | |
|---|---|---|
| Select an item from a menu. | ||
| Select an item from a menu. |
Select an item from a menu.
For example: for the File -> Open action, the component ID of "File" is the menu, and the ID for "Open" is the item.
menu - The id of the menu.
item - The id of menu item.
Select an item from a menu.
For example: for the File -> Open action, the component ID of "File" is the menu, and the ID for "Open" is the item.
menu - The id of the menu.
item - The id of menu item.
menuX - The x coordinate for the click on the menu, default is empty to click in the middle.
menuY - The y coordinate for the click on the menu, default is empty to click in the middle.
itemX - The x coordinate for the click on the item, default is empty to click in the middle.
itemY - The y coordinate for the click on the item, default is empty to click in the middle.
Procedures to get and set the state of radio buttons.
| Procedure/Dependency | Description | |
|---|---|---|
| Return the value of a radio button. | ||
| Select a radio button. | ||
| Select a radio button. |
Return the value of a radio button. It's either 1, if radio button is selected of 0, if radio button is not selected.
id - ID of the radio button.
Select a radio button. If the radio button is already selected, no action is performed.
id - The id of the radio button.
Select a radio button. If the radio button is already selected, no action is performed. You can specify the coordinates for clicking.
id - The id of the radio button.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Packages containing swiping procedures
| Procedure/Dependency | Description | |
|---|---|---|
| Perform a swipe down operation. | ||
| Perform a swipe operation. | ||
| Perform a swipe left operation. | ||
| Perform a swipe right operation. | ||
| Perform a swipe up operation. | ||
| Perform a swipe operation. |
Perform a swipe down operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe operation.
direction - The direction of the swipe.
Valid entries: up, down, right, left, upright, up_left, down_right, down_left (and some more, see manual)
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe left operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe right operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe up operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe operation.
id - The id the coordinates refer to
startX - The number pixels right of the upper left corner of the id where to start the swipe
startY - The number pixels down from the upper left corner of the id where to start the swipe
swipeHorizontal - The number of pixels covered by the swipe.
swipeVertical - The number of pixels covered by the swipe.
time - The time in which to execute the swipe. With many applications a quick swipe will give the display a momentum which will make the display scroll further than the actual length of the swipe.
steps - The number of steps the swipe is broken down to. If you choose a long time or long distance increase the number of steps to make the movement more fluent.
Procedures to access text fields and text areas.
| Procedure/Dependency | Description | |
|---|---|---|
| Clear a text field. | ||
| Return the text of a given textfield. | ||
| Set a given text to a given text-field or text-area. | ||
| Read the content of a given file and set its content to a given text-field. |
Clear a text field.
id - The id of the text field.
Return the text of a given textfield.
id - ID of the textfield.
Set a given text to a given text-field or text-area.
id - ID of the textfield.
text - text to be set.
append - if this value is set to true, the text will be appended to the current values.
clear - If this value is set to true, the text-field will be cleared before the text given as parameter "text" is inserted.
replaySingleEvents - If this value is set to true, the text will be inserted replaying single events.
newline - the separator sign for marking a linebreak within the text
Read the content of a given file and set its content to a given text-field.
id - The id of the text-field to set.
file - The path to the file.
append - If this value is set to true, the text will be appended to the current values.
clear - If this value is set to true, the text-field will be cleared in case an empty string is given as parameter "text".
replaySingleEvents - If this value is set to true, the text will be inserted replaying single events.
newline - the separator sign for marking a linebreak within the text
Contains procedures to work with native windows on a MacOS system.
All procedures use the Jython libraries automac.py, located in the jython/Lib folder of the current installation. In the libraries there are even more methods for your needs.
| Procedure/Dependency | Description | |
|---|---|---|
| Send the given key along with the qualifier to the component having the focus. |
Send the given key along with the qualifier to the component having the focus. The application is defined by the global Jython variable "app" set in the procedure "qfs.automac.app.connect", which has to be called before.
qualifier - The qualifier to send along with the key. Valid input: SHIFT, COMMAND, META, ALT or the empty string for no qualifier
key - The key to be send along with the alt key. Valid input: a single letter of the latin alphabet, a digit or values for special keys like ENTER, DELETE, TAB, ESCAPE or F1 to F24.
Procedures to start/close/raise a native macOS application.
| Procedure/Dependency | Description | |
|---|---|---|
| Close the application. | ||
| Connect to the given application. | ||
| Disconnects from the application, which was connected previously with "qfs.automac.app.connect", without closing the application. | ||
| Raise the application. |
Close the application. The application defined by the global Jython variable "app" set in the procedure "qfs.automac.app.connect". The procedure deletes the global Jython variable "app".
timeout - Timeout how long to wait till window disappears
UserException - if the window was not closed
Connect to the given application. If the application has not been started yet and either the bundle file or the bundle id is provided the application will be started first. The procedure sets the global jython variable "app".
One of the following parameters needs to be provided:
title - The title of the application window.
processId - The pid as shown by the Activity Monitor.
bundleFile - The bundle file of the application.
bundleId - The bundle id of the application.
These are optional:
titleRegexp - Flag to interprete "title" as a regular expression
timeout - Maximum time (in ms) to wait for the application to start.
Only relevant if bundleFile or bundleId are provided and the application has to be started.
Disconnects from the application, which was connected previously with "qfs.automac.app.connect", without closing the application.
Raise the application.
The application defined by the global Jython variable "app" set in the procedure "qfs.automac.app.connect". The procedure deletes the global Jython variable "app".
Procedures to get and set the state of checkboxes in native macOS applications.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the value of the given component. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. |
Check the value of the given component.
Write an error into the run log or throw an exception, if the check fails.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
expectedValue - true if the checkbox should be checked (on), false otherwise.
errorLevel - ERROR or EXCEPTION
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Deselect a checkbox. If the checkbox is already deselected, no action is performed.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Return the value of a checkbox. It's either 1 if box is checked or 0 if box is not checked.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Select a checkbox. If the checkbox is already selected, no action is performed.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Set checkbox to the given state.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
check - The check value to be set (either true or false).
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Basic procedures for interacting with a component of a native macOS application.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the position, width and height of the component on the screen. | ||
| Check the image of a given component. | ||
| Compare the given value to the value of a component according to the compareMode. | ||
| Click a given component. | ||
| Set the global Jython variable __uiauto_control to the GUI element matching the given parameters. | ||
| Fetch the screen coordinates for the left border, top, width and height for the component. | ||
| Return the value of the given control. | ||
| Set a given attribute of a component. | ||
| Set a given value to a component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. |
Check the position, width and height of the component on the screen.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
left - The expected number of pixels from the left border of the screen to the left border of the component.
Empty string: skip check.
top - The expected number of pixels from the top of the screen to the top of the component.
Empty string: skip check.
width - The expected number of pixels for the width of the component.
Empty string: skip check.
height - The expected number of pixels for the height of the component.
Empty string: skip check.
errorLevel - The kind of error, which should be logged.
Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
timeout - The time in ms to wait for the component.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
Check the image of a given component. The target image has to be provided as PNG file. QF-Test tries to match this image to the image of the component on the screen by using an advanced image check algorithm.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
target - An image as ImageRep or PNG file, e.g. C:\temp\target.png
algorithm - The algorithm used for finding the target.
Best is to use the default one and adjust match probability if necessary.
best - True means to find the best match.
False means to find the first match which is better than the defined probability.
errorLevel - The kind of error to be logged.
Either EXCEPTION, ERROR, WARNING or MESSAGE.
assumed.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Compare the given value to the value of a component according to the compareMode.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
expectedValue - The expected value.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
regexp, the expected value should be treated as a regular expression, that matches the received value.
regexpNegate, the expected value should be treated as a regular expression, that doesn't match the received value.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
UserException, - if wrong comparison mode has been set.
Click a given component.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Set the global Jython variable __uiauto_control to the GUI element matching the given parameters. The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the following parameters all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
Fetch the screen coordinates for the left border, top, width and height for the component.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Return the value of the given control.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Set a given attribute of a component.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
attribute - The attribute to be set.
value - The value to be set.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Set a given value to a component.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
value - The value to be set.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. Wait for the component for timeout ms at the most.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for component recognition all respective attributes of the element have to match.
label - The attribute "Label" or "AXDescription" of the GUI element.
title - The attribute "Title" or "AXTitle" of the GUI element.
identifier - The attribute "Identifier" or "AXIdentifier" of the GUI element.
role - The attribute "Role" or "AXRole" of the GUI element.
roleType - The attribute "Type" or "AXRoleDescription" of the GUI element.
subrole - The attribute "Subrole" or "AXSubrole" of the GUI element.
index - The index of the GUI element in case more than one element matches the given parameters.
timeout - The time in ms to wait for the component.
ComponentNotFoundException - If the component is not found within the given time.
Procedures to select menu items and checkbox menu items in native macOS applications.
| Procedure/Dependency | Description | |
|---|---|---|
| Select an item from a menu. |
Select an item from a menu.
The application in which to look for the GUI element is defined by the global Jython variable "app" set in the procedure "qfs.automac.startApp". In case you specify more than one of the parameters for a component all respective attributes of the element have to match.
menuDescription - The attribute "Label" or "AXDescription" of the menu.
menuTitle - The attribute "Title" or "AXTitle" of the menu.
menuIdentifier - The attribute "Identifier" or "AXIdentifier" of the menu.
menuRole - The attribute "Role" or "AXRole" of the menu.
menuRoleDescription - The attribute "Type" or "AXRoleDescription" of the menu.
menuSubrole - The attribute "Subrole" or "AXSubrole" of the menu.
menuIndex - The index of the menu in case more than one element matches the given parameters.
itemDescription - The attribute "Label" or "AXDescription" of the menu item.
itemTitle - The attribute "Title" or "AXTitle" of the menu item.
itemIdentifier - The attribute "Identifier" or "AXIdentifier" of the menu item.
itemRole - The attribute "Role" or "AXRole" of the menu item.
itemRoleDescription - The attribute "Type" or "AXRoleDescription" of the menu item.
itemSubrole - The attribute "Subrole" or "AXSubrole" of the menu item.
itemIndex - The index of the item in case more than one element matches the given parameters item.
timeout - The time in ms to wait for the component.
Procedures for testing based on images.
Procedures to replay events anywhere on an android application based on images.
| Procedure/Dependency | Description | |
|---|---|---|
| Click at an image anywhere on a Android application. | ||
| Find an image anywhere on an Android application and return the component ID. |
Click at an image anywhere on a Android application. The target image has to be provided as PNG file. QF-Test tries to find this image on the Android application by using an advanced image check algorithm. The click goes to the middle of the got image unless there are offsets defined. Note: Does only work for currently displayed images without scrolling.
target - An image as ImageRep or PNG file, e.g. C:\temp\target.png
component - A target stage which has been recorded, maybe genericAndroidApp.
componentSearchTimeout - A timeout to find the component.
algorithm - The algorithm used for finding the target. Best is to use the default one and adjust match probability if necessary.
offsetX - If defined use this x-offset instead of middle of got region.
offsetY - If defined use this y-offset instead of middle of got region.
mouseButton - An integer describing the mouse button to click with. A value of 16 will perform a short touch and a value of 4 a long touch.
UserException - If the target could not be found, an TestException will be thrown.
Find an image anywhere on an Android application and return the component ID. The target image has to be provided as PNG file. QF-Test tries to find this image on the Android application by using an advanced image check algorithm. Note: Does only work for currently displayed images without scrolling.
target - An image as ImageRep or PNG file, e.g. C:\temp\target.png
component - A target stage node which has been recorded, maybe genericAndroidApp.
componentSearchTimeout - A timeout to find the component.
algorithm - The algorithm used for finding the target. Best is to use the default one and adjust match probability if necessary.
UserException - If the target could not be found, an TestException will be thrown.
Procedures to replay events anywhere on the screen based on images.
| Procedure/Dependency | Description | |
|---|---|---|
| Click at an image anywhere on the screen. | ||
| Find an image anywhere on the screen and return its position. |
Click at an image anywhere on the screen. The target image has to be provided as PNG file. QF-Test tries to find this image on the screen by using an advanced image check algorithm. The click goes to the middle of the got region unless there are offsets defined.
target - An image as ImageRep or PNG file, e.g. C:\temp\target.png
x - The start x position of the partial image of the screen. Empty means 0.
y - The start y position of the partial image of the screen. Empty means 0.
width - The width of the partial image of the screen. Empty means maximum width.
height - The height of the partial image of the screen. empty means maximum height.
algorithm - The algorithm used for finding the target. Best is to use the default one and adjust match probability if necessary.
offsetX - If defined use this x-offset instead of middle of got region.
offsetY - If defined use this y-offset instead of middle of got region.
best - True means to find the best match. False means to find the first match which is better than the defined probability.
mouseButton - An integer describing the mouse button to click with. A value of 16 will perform a left and a value of 4 a right click.
UserException - If the target could not be found, an UserException will be thrown.
Find an image anywhere on the screen and return its position. The target image has to be provided as PNG file. QF-Test tries to find this image on the screen by using an advanced image check algorithm.
target - An image as ImageRep or PNG file, e.g. C:\temp\target.png
x - The start x position of the partial image of the screen. Empty means 0.
y - The start y position of the partial image of the screen. Empty means 0.
width - The width of the partial image of the screen. Empty means maximum width.
height - The height of the partial image of the screen. empty means maximum height.
algorithm - The algorithm used for finding the target. Best is to use the default one and adjust match probability if necessary.
best - True means to find the best match. False means to find the first match which is better than the defined probability.
UserException - If the target could not be found, an UserException will be thrown.
Contains procedures to work with native windows of the operating system Windows.
All procedures use the Jython libraries autowin.py and uiauto.py, located in the jython/Lib folder of the current installation. In the libraries there are even more methods for your needs.
| Procedure/Dependency | Description | |
|---|---|---|
| Check, whether a native window on the operating system Windows is opened. | ||
| Check, whether a native window on the operating system Windows is opened and close it. | ||
| Close a window. | ||
| Read the URL from an InternetExplorer window. | ||
| Write all children of a window to the run log. | ||
| This method logs the top-level objects (windows) accessible via the Windows UIAutomation API. | ||
| Perform Ctrl+A and then Ctrl+C to a given window. | ||
| Mark and copy the whole text of a given document via Ctrl+A and Ctrl+C. |
Check, whether a native window on the operating system Windows is opened. If the window is a result of your test you can configure it to provide an error or an exception, if the window does not appear.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
timeout - The timeout to wait for the dialog to appear.
errorLevel - MESSAGE if a message should be logged in case the window is not visible.
WARNING if a warning should be logged in case the window is not visible.
EXCEPTION if an exception should be raised in case the window is not visible.
in any other case an error will be logged in case the window is not visible.
appearInReport - set this to 1, if you want to track a message or warning, which should also be part of the report later.
UserException - if window is not visible and parameter errorLevel is set to EXCEPTION
Check, whether a native window on the operating system Windows is opened and close it. If the window is a result of your test you can configure it to provide an error or an exception, if the window does not appear.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
timeout - The timeout to wait for the dialog to appear.
errorLevel - MESSAGE if a message should be logged in case the window is not visible.
WARNING if a warning should be logged in case the window is not visible.
EXCEPTION if an exception should be raised in case the window is not visible.
in any other case an error will be logged in case the window is not visible.
appearInReport - set this to 1, if you want to track a message or warning, which should also be part of the report later.
close_timeout - Timeout how long to wait till window disappears after closing.
close_errorLevel - MESSAGE if a message should be logged in case the window wasn't closed.
WARNING if a warning should be logged in case the window wasn't closed.
EXCEPTION if an exception should be raised in case the window wasn't closed.
in any other case an error will be logged in case the window wasn't closed.
UserException - if window is not visible and parameter errorLevel is set to EXCEPTION or if window hasn't been closed and close_errorLevel is set to EXCEPTION.
Close a window.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false
appearInReport - set this to 1, if you want to track a message or warning, which should also be part of the report later.
timeout - Timeout how long to wait till window disappears
errorLevel - MESSAGE if a message should be logged in case the window wasn't closed.
WARNING if a warning should be logged in case the window wasn't closed.
EXCEPTION if an exception should be raised in case the window wasn't closed.
in any other case an error will be logged in case the window wasn't closed.
UserException - if window wasn't closed and parameter errorLevel is set to EXCEPTION
Deprecated: Internet Explorer 11 has retired and the browser is officially out of support by Microsoft.
Read the URL from an InternetExplorer window.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
UserException - if the browser window is not visible or the URL cannot be determined.
Write all children of a window to the run log.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
titleRe - The title of the window as regular expression.
This method logs the top-level objects (windows) accessible via the Windows UIAutomation API.
Note: It is preferable to make use of QF-Test's ability to control native Windows applications directly, but in simple cases this procedure can still be useful.
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Perform Ctrl+A and then Ctrl+C to a given window.
Afterwards you should have the text in the Clipboard, which enables you to insert the text somewhere for checking.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
UserException - if window is not visible
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Mark and copy the whole text of a given document via Ctrl+A and Ctrl+C. Then it fetches the text from the clipboard and saves it into a given file.
fileName - The filename to save.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise
UserException - if window is not visible
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Contain procedures to handle Adobe Acrobat Reader specific tasks like SaveAs or SaveAs Text ...
| Procedure/Dependency | Description | |
|---|---|---|
| Save the current open PDF in Adobe Acrobat Reader as a text file with the given filename. | ||
| Save the current open PDF in Adobe Acrobat Reader as a PDF file with the given filename. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Save the current open PDF in Adobe Acrobat Reader as a text file with the given filename. Note: It only 'knows' English and German buttons. Thus currently only the English and German versions of Adobe Acrobat Reader are supported. Logs an error if the file is already existing but parameter overwriteExistingFile is set to false.
fileName - The filename to save.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
fileMenuTitle - The title of the file menu.
saveAsTextMenuTitle - The title of the 'save as text' menu item.
dialogTitle - The title of the 'save as...'-dialog.
timeout - Timeout for waiting to complete the save operation.
overwriteExistingFile - If set to true an already existing file gets overwritten
windowtimer - with default 30000 - Timeout for finding the acrobat window and the sub-dialogs.
savetimer - with default 2 - internal timer which is used to determine when the save operation has finished.
enableFunctionsYDiff - The distance in pixel from the bottom of the menu bar to the "Enable all functions" button. In case of scaled ultraHD/4k resolution you might need to increase those value.
enableFunctionsXDiff - The distance in pixel from the right edge of the main window bar to the "Enable all functions" button. In case of scaled ultraHD/4k resolution you might need to increase those value.
useUIAutomation - Whether to use UIAutomation to handle the Acrobat menus.
UserException - if window is not visible or the file is already existing
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Save the current open PDF in Adobe Acrobat Reader as a PDF file with the given filename. Note: It simulates CTRL+SHIFT+S keystrokes to open the file dialog. Logs an error if the file is already existing but parameter overwriteExistingFile is set to false.
fileName - The filename to save.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
dialogTitle - The title of the 'save as...'-dialog.
timeout - with default 30000 - Timeout for waiting to complete the save operation.
overwriteExistingFile - If set to true an already existing file gets overwritten
windowtimer - with default 30000 - Timeout for finding the acrobat window and the sub-dialogs.
savetimer - with default 3 - internal timer which is used to determine when the save operation has finished.
inlineDisplay - - set to true if pdf is displayed inline (e.g. inside the browser window)
UserException - if window is not visible or the file is already existing
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Procedures to get and set the state of checkboxes in native windows applications.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the value of the given component. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Check the value of the given component.
Write an error into the run log or throw an exception, if the check fails.
expectedValue - true if the checkbox should be checked (on), false otherwise.
errorLevel - ERROR or EXCEPTION
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Deselect a checkbox. If the checkbox is already deselected, no action is performed.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Return the value of a checkbox. It's either 1 if box is selected or 0 if box is not selected.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Select a checkbox. If the checkbox is already selected, no action is performed.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Set checkbox to the given state.
check - The check value to be set (either true or false).
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Basic procedures for interacting with a component of a native windows application.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the position, width and height of the component on the screen. | ||
| Check the image of a given component. | ||
| Compare the given name to the name of a component according to the compareMode. | ||
| Wrapper procedure to either check the value of a component or, if no value exists, the name. | ||
| Compare the given value to the value of a component according to the compareMode. | ||
| Click a given component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. | ||
| Fetch the screen coordinates for the left border, top, width and height for the component. | ||
| Return the name of the given control. | ||
| Return the value or, if it does not exist, the name of the given control. | ||
| Return the value of the given control. | ||
| Set a given text to a component if the method setText() is implemented by the IUIAutomationElement Interface of the component. | ||
| Set a given value to a component. | ||
| Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Check the position, width and height of the component on the screen.
left - The expected number of pixels from the left border of the screen to the left border of the component.
Empty string: skip check.
top - The expected number of pixels from the top of the screen to the top of the component.
Empty string: skip check.
width - The expected number of pixels for the width of the component.
Empty string: skip check.
height - The expected number of pixels for the height of the component.
Empty string: skip check.
errorLevel - The kind of error, which should be logged.
Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Check the image of a given component. The target image has to be provided as PNG file. QF-Test tries to match this image to the image of the component on the screen by using an advanced image check algorithm.
target - An image as PNG file, e.g. C:\temp\target.png
algorithm - The algorithm used for finding the target.
Best is to use the default one and adjust match probability if necessary.
best - True means to find the best match.
False means to find the first match which is better than the defined probability.
errorLevel - The kind of error to be logged.
Either EXCEPTION, ERROR, WARNING or MESSAGE.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Compare the given name to the name of a component according to the compareMode.
expectedName - The expected value.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
regexp, the expected value should be treated as a regular expression, that matches the received value.
regexpNegate, the expected value should be treated as a regular expression, that doesn't match the received value.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameUserException, - if wrong comparison mode has been set.
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Wrapper procedure to either check the value of a component or, if no value exists, the name.
expectedText - The expected text.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
regexp, the expected value should be treated as a regular expression, that matches the received value.
regexpNegate, the expected value should be treated as a regular expression, that doesn't match the received value.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameUserException, - if wrong comparison mode has been set.
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Compare the given value to the value of a component according to the compareMode.
expectedValue - The expected value.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
regexp, the expected value should be treated as a regular expression, that matches the received value.
regexpNegate, the expected value should be treated as a regular expression, that doesn't match the received value.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameUserException, - if wrong comparison mode has been set.
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Click a given component.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Fetch the screen coordinates for the left border, top, width and height for the component.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Return the name of the given control.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Return the value or, if it does not exist, the name of the given control.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Return the value of the given control.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Set a given text to a component if the method setText() is implemented by the IUIAutomationElement Interface of the component. If not try setValue() instead.
text - Text to be set.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Set a given value to a component.
value - The value to be set.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Set the global variable __uiauto_control to the GUI element matching the given parameters in the given window. Wait for the component for timeout ms at the most.
window - The title of the window containing the GUI element.
It has to be a regular expression.
automationId - The AutomationId of the GUI element.
name - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
controlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
index - The index of the GUI element of the given control type.
Only in combination with controlType or className.
className - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
ComponentNotFoundException - If the component is not found within the given time.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameDeprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Dependencies for starting/stopping a native windows application.
| Procedure/Dependency | Description | |
|---|---|---|
| Start a native windows application as the SUT (system under test) using the dependency funtionality. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Start a native windows application as the SUT (system under test) using the dependency funtionality. This implies stopping the SUT when a different dependency is called or when the value of one of the characteristic variables (dialogtitle, executable, path, titleRegexp) changes as compared to the last time the dependency was called. For more information about dependencies please refer to the tutorial or the the manual, chapter 'Organizing the test suite', section 'Dependency nodes'.
When starting the application you can specify via the parameter checkOutput that QF-Test retrieves the output written by the application to standard out during startup and compare it to the given expected output.
The global variable "window" is set to the dialogtitle. In the cleanup sequence it will be deleted again.
executable - The fully qualified name of the native windows application to be started.
Instead of the fully qualified name you may also specify a path relative to the test suite.
workdir - The working directory for the application.
dialogtitle - The title of the application window when it is first started.
titleRegexp - True (default) if the dialogtitle is specified as a regular expression, false otherwise. For more details on regular expressions please refer to the respective in the manual.
expectedOutput - The output that ought to appear in standard out during startup of the application. The parameter is only evaluated if the parameter checkOutput is set to true.
checkOutput - See above.
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Procedures for replaying key events to a windows application.
| Procedure/Dependency | Description | |
|---|---|---|
| Perform Ctrl+a to the given window to mark all text of the compontent which has the focus. | ||
| Perform Ctrl+v to the given window to paste the content of the clipboard to the component with the focus. | ||
| Perform Ctrl+x to the given window to cut the selected content of the component with the focus. | ||
| Replay DELETE to the given window. | ||
| Replay ENTER to the given window. | ||
| Replay TAB to the given window. | ||
| Send the given key along with the qualifier to the window with the given title. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Perform Ctrl+a to the given window to mark all text of the compontent which has the focus.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Perform Ctrl+v to the given window to paste the content of the clipboard to the component with the focus.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Perform Ctrl+x to the given window to cut the selected content of the component with the focus.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Replay DELETE to the given window.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Replay ENTER to the given window.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Replay TAB to the given window.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
ComponentNotFoundException - if window is not found
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure. If only a single keyboard shortcut should be send, the qfs.utils.sendKey method can be used.
Send the given key along with the qualifier to the window with the given title.
title - The title of the window.
titleRegexp - true, if the given title is a regular expression, otherwise false.
qualifier - The qualifier to send along with the key. Valid input: SHIFT, CTRL, ALT or the empty string for no qualifier
key - The key to be send along with the alt key. Valid input: a single letter of the latin alphabet, a digit or values for special keys like ENTER, DELETE, TAB, ESCAPE or F1 to F24.
ComponentNotFoundException - if window is not visible
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by the procedures in this package.
Procedures to select menu items and checkbox menu items in native windows applications.
| Procedure/Dependency | Description | |
|---|---|---|
| Select an item from a menu. |
Deprecated: QF-Test can control native windows applications directly. Most of the time direct control improves test stability over the scripting based approach used by this procedure.
Select an item from a menu.
window - The title of the window containing the GUI element.
It has to be a regular expression.
menuAutomationId - The AutomationId of the GUI element.
menuName - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
menuControlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
menuIndex - The index of the GUI element of the given control type.
Only in combination with controlType or className.
menuClassName - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
itemAutomationId - The AutomationId of the GUI element.
itemName - The name of the GUI element as a regular expression.
Either alone or in combination with controlType or className.
itemControlType - The ControlType of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
The allowed control types are defined by the IUIAutomationElement Interface.
Examples: Button, CheckBox, ComboBox, DataGrid, Edit, List, Tab, Text.
itemIndex - The index of the GUI element of the given control type.
Only in combination with controlType or className.
itemClassName - The class name of the GUI element.
Can be combined with name or index.
If neither name nor index is given then index 0 is assumed.
timeout - The time in ms to wait for the component.
Parameter precedences:
1. automationId takes precedence over the rest. 2. controlType alone or in combination with name or index takes precedence over the rest. 3. className alone or in combination with name or index takes precedence over name only. 4. nameProcedures for checking components or comparing various kinds of values.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the state of a given component. | ||
| Check image of a component against a file or an ImageRep. | ||
| Check image of a component against a file. | ||
| Compare two Objects for their equality. | ||
| Check if given component is selected. | ||
| Check the text of a given component. | ||
| Check whether a value is in a given range. | ||
| Compare two string values for their equality. | ||
| Compare two date strings. | ||
| Compare two values for their equality. | ||
| Compare two values for their equality. |
Check the state of a given component.
It writes an error into the run log, if the check fails.
id - ID of the component.
enabled - true, if component should be enabled.
otherwise, if component should be disabled.
throwExc - whether the check should throw an exception on failure.
reportName - the Name for the check in the report.
timeout - Timeout for the checked condition to happen.
Check image of a component against a file or an ImageRep.
It writes an error into the run log, if the check fails.
id - ID of the component.
file - An image as ImageRep or PNG file, e.g. C:\temp\target.png
algorithm - If an algorithm is defined, use it. If empty, execute a classic check.
throwException - Throw an exception in case of failure
Check image of a component against a file.
It writes an error into the run log, if the check fails.
id - ID of the component.
file - The full path to the expected file.
algorithm - If an algorithm is defined, use it. If empty, execute a classic check.
checkMessage - The message, which should be written into the run log for that check.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Compare two Objects for their equality.
It uses the rc.checkEqual() method from QF-Test.
got - The got Object for comparison.
expected - The expected Object for comparison.
checkMessage - The message, which should be written into the run log for that check.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
Check if given component is selected.
It writes an error into the run log, if the check fails.
id - ID of the component.
selected - true, if component should be selected.
otherwise, if component shouldn't be selected.
throwExc - whether the check should throw an exception on failure.
reportName - the Name for the check in the report.
timeout - Timeout for the checked condition to happen.
Check the text of a given component.
It writes an error into the run log, if the check fails.
id - ID of the component.
text - text, which should be checked.
regexp - if this value is set to true, the text will be checks as regular expression.
negate - if, the check should check for anything but the given text.
nameCheckType - the value for "name of check type" attribute.
throwExc - whether the check should throw an exception on failure.
reportName - the Name for the check in the report.
timeout - Timeout for the checked condition to happen.
Check whether a value is in a given range.
value - The value to check.
minimum - The minimum of the range.
maximum - The maximum of the range.
includingMinimum - If minimum itself is ok.
includingMaximum - If maximum itself is ok.
checkMessage - The message, which should be written into the run log for that check.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
Compare two string values for their equality.
It uses the rc.checkEqual() method from QF-Test.
got - The got value for comparison.
expected - The expected value for comparison.
checkMessage - The message, which should be written into the run log for that check.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
Compare two date strings.
Formatting rules: If a format and a locale are specified the date will be formated using both values. If only a format is specified the date will be formatted only with that format. If only a locale is specified the date will be formatted according to the locale-format.
got - The received date for comparison.
expected - The expected date.
gotFormat - The format in which the got date is formatted.
You can specify this via the SimpleDateFormat in Java, e.g. MM/dd/yyyy.
dd means two digits for the day.
MM means two digits for month.
yyyy means four digits for year.
expectedFormat - The format in which the expected date is formatted.
You can specify this via the SimpleDateFormat in Java, e.g. MM/dd/yyyy.
dd means two digits for the day.
MM means two digits for month.
yyyy means four digits for year.
gotLocale - The locale of the got date, e.g. de, us, it, es, fr, zh, ko, ru, pt, ar
or specific locales as en_gb, de_ch etc.
expectedLocale - The locale of the expected date, e.g. de, us, it, es, fr, zh, ko, ru, pt, ar
or specific locales as en_gb, de_ch etc.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
//======================== RETURN Options =============================
reuturnOnly - Decides wheter to return boolean value, or directly write to run log
True: returns the compare result
False: log directly in report - see below
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
Further samples:
MMM stands for the name of the month, e.g. 'Feb'.
E stands for the day of the week, e.g. 'Mon'.
w stands for week in the year.
Further samples can be found at SimpleDateFormat documentation at Java's documentation.
UserException, - if wrong comparison mode has been set, or if the date cannot be parsed.
Compare two values for their equality. Both values should be numbers.
It uses the rc.check() method from QF-Test.
got - The received value for comparison.
expected - The expected value.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if wrong comparison mode has been set.
Compare two values for their equality. The values should be string values.
It uses the rc.check() method from QF-Test.
got - The received value for comparison.
expected - The expected value.
checkMessage - The message, which should be written into the run log for that check.
compareMode - The comparison mode.
= or ==, asserts got == expected
<, asserts got < expected
>, asserts got > expected
<=, asserts got <= expected
>=, asserts got >= expected
!=, asserts got != expected
regexp, the expected value should be treated as a regular expression, that matches the received value.
regexpNegate, the expected value should be treated as a regular expression, that doesn't match the received value.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if wrong comparison mode has been set.
Deprecated: This package is deprecated because according cleanup procedures are implemented in the qfs.swing resp. qfs.swt package. Please use the technology specific procedures.
The procedures in this package are useful for generic cleanup after an exception is thrown. In some cases a menu or modal dialog may have been left open, causing future events for the SUT to be blocked.
| Procedure/Dependency | Description | |
|---|---|---|
| Close all dialogs. | ||
| Close all menus unconditionally. | ||
| Close all modal dialogs. | ||
| This procedure encompasses the usage of other cleanup procedures in this package and is the recommended operation to perform after an exception occurs and is implicitly caught. |
Deprecated: Please use the technology specific procedures in the qfs.swing or qfs.swt package according to your SUT.
Close all dialogs.
client - The name of the SUT client.
maxDialogs - Maximum number of dialogs that are tried to be closed. (Optional, default 6)
Deprecated: Please use the technology specific procedures in the qfs.swing or qfs.swt package according to your SUT.
Close all menus unconditionally. A menu left open (or even just selected) will cause events for the SUT to be blocked. This procedure is recommended for cleanup after an exception occurs.
client - The name of the SUT client.
Deprecated: Please use the technology specific procedures in the qfs.swing or qfs.swt package according to your SUT.
Close all modal dialogs. A modal dialog that is left open will cause events for the SUT to be blocked. Ensuring that modal dialogs are closed is a good operation to conduct in a setup/cleanup sequence.
client - The name of the SUT client.
maxDialogs - Maximum number of modal dialogs that are tried to be closed. (Optional, default 5)
Deprecated: Please use the technology specific procedures in the qfs.swing or qfs.swt package according to your SUT.
This procedure encompasses the usage of other cleanup procedures in this package and is the recommended operation to perform after an exception occurs and is implicitly caught.
Calling this procedure should be the first step in the cleanup sequence of any Test node with the "Implicitly catch exceptions" attribute set.
client - The name of the SUT client.
Procedures for interacting with (SUT) clients.
| Procedure/Dependency | Description | |
|---|---|---|
| Rename an SUT client. | ||
| Write a string to the stdin stream of a process started by QF-Test. | ||
| Helper method for turning on internal logging. | ||
| Helper method for turning off internal logging. |
Rename an SUT client. This is especially useful when interacting with sub-processes of an SUT where you don't have full control over the client name during startup.
oldName - The current name of the client.
newName - The new name of the client.
trueName - An optional name to use for recording which may include variable syntax with escaped $, e.g. $$(subclient).
checkBeforeRename - If this is set to true, QF-Test will check whether a client with newName is already running.
Write a string to the stdin stream of a process started by QF-Test.
client - The name of the client.
input - The input to send
addNewline - Whether to append a line separator to the input.
newline - The newline character to send. Can be specified as \n.
NoSuchClientException - If there is no such client.
UserException - It the output cannot be written.
Helper method for turning on internal logging. For QFS support and debugging use only.
levels - Classes and levels to log (class=level, comma separated)
logfile - The name of file where the log should be saved
bufsize - Number of last log entries to log if parameter logfile is not set
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. If empty or undefined, the primariy engine of the SUT is used.
Helper method for turning off internal logging. For QFS support and debugging use only.
dontcompactify - Whether to prevent the resulting log entry from compactification.
messagesizelimit - Limit for the size of individual messages. 0 = unlimited.
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. If empty or undefined, the primariy engine of the SUT is used.
Procedures to work with a QF-Test daemon.
| Procedure/Dependency | Description | |
|---|---|---|
| Starts remote instrumentation procedure for an Eclipse/RCP based or standalone SWT application via a given daemon. | ||
| Locate all running daemons and writes them into the run log and prints a list of running daemons to the terminal. | ||
| Start a client application on a remote host via the QF-Test daemon. |
Starts remote instrumentation procedure for an Eclipse/RCP based or standalone SWT application via a given daemon. See procedure qfs.swt.instrument.setup for further information.
daemonhost - The host name or IP address of the QF-Test daemon.
daemonport - The port where the daemon is listening.
sutdir - The installation directory of the SUT at the destination machine.
plugin - Optional: The specific plugin to instrument. Useful in case the directories are not layed out as expected.
forceInstrumentation - Whether to force instrumentation even if not required.
Locate all running daemons and writes them into the run log and prints a list of running daemons to the terminal. If no daemons can be found it logs an error.
timeout - Timeout for waiting for running daemons.
Start a client application on a remote host via the QF-Test daemon.
daemonhost - The host name or IP address of the QF-Test daemon.
daemonport - The port where the daemon is listening.
commandline - The commandline used by the daemon to launch the client. Arguments containing spaces must be wrapped into quotes.
Procedures to work with databases.
| Procedure/Dependency | Description | |
|---|---|---|
| Build up connection to a given database and executes a specified select-sql-statement. | ||
| Build up connection to a given database and execute a specified SQL-statement. |
Build up connection to a given database and executes a specified select-sql-statement. You can configure the procedure to store all results in a group QF-Test variable.
NOTE: The SQL-statement should be a select statement! NOTE: The class of the database driver must be either in QF-Test's plugin directory or in the CLASSPATH environment variable before QF-Test startup!
For more information about connection-strings please see www.connectionstrings.com.
driver - The class-name of the database driver.
connectionString - The connection-string to the database.
dbUser - The user for establishing database-connection.
dbPass - The password for establishing database-connection.
statement - The SQL-statement, it should be a select statement.
resultGroupName - If this name is specified the result is stored in a Propertygroup, which an be accessed via ${resultGroup:'Columnname'.'RowIdx'}. ${resultGroup:'count'} gives the number of rows in the result set.
throwExceptionOnDuplicateColumns - If the result set has two columns with the same name (which could happen if you join tables), then you will get an exception.
commit - true, false or auto. Whether to explicitly execute db.commit() at the end. Some databases / connection modes reuqire the execution of this statement. When this option is set to auto, QF-Test tries to determine if that is possible.
TestException - If something went wrong with the database or execution of statement.
TestException - If there are duplicate in column names, which could happen in case of joins on tables.
Build up connection to a given database and execute a specified SQL-statement.
NOTE: The class of the database driver must be either in QF-Test's plugin directory or in the CLASSPATH environment variable before QF-Test startup!
For more information about connection-strings please see www.connectionstrings.com.
driver - The class-name of the database driver.
connectionString - The connection-string to the database.
dbUser - The user for establishing database-connection.
dbPass - The password for establishing database-connection.
statement - The SQL-statement.
TestException - If something went wrong with the database or execution of statement.
Procedures to bind data for data-driven testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Create and register a databinder that binds a JSON array of objects. | ||
| Create and register a databinder that binds a list of values to a variable. | ||
| Create and register a databinder that binds a list of value-sets to a set of variables. |
Create and register a databinder that binds a JSON array of objects.
jsonOrFile - The JSON text or a file name.
token - The token or path (/) which identifies the array. It is not required to give a complete path.
identifier - The name for the databinder.
counter - Optional variable name for the iteration counter.
intervals - Optional ranges of indices, separated by comma, e.g. "0,2-3"
Create and register a databinder that binds a list of values to a variable.
varname - The name of the variable to bind to.
values - The values to bind.
separator - Optional separator character for splitting the values. Default is whitespace.
counter - Optional variable name for the iteration counter.
intervals - Optional ranges of indices, separated by comma, e.g. "0,2-3"
Create and register a databinder that binds a list of value-sets to a set of variables.
loopname - The name for which to register the databinder.
varnames - The names of the variables to bind to.
values - The values to bind. String based value-sets are separated by linebreaks.
separator - Optional separator character for splitting the varnames and value-sets. Default is whitespace.
counter - Optional variable name for the iteration counter.
intervals - Optional ranges of indices, separated by comma, e.g. "0,2-3"
Procedures for showing dialogs during the test run.
| Procedure/Dependency | Description | |
|---|---|---|
| Show a configurable dialog equivalent to JOptionPane. | ||
| Show an information dialog with an OK option. | ||
| Show an information dialog with a YES, NO and CANCEL option. | ||
| Show an information dialog with a YES and NO option. |
Deprecated: - Redirect for procedure name with typo
Show a configurable dialog equivalent to JOptionPane.
title - The title of the dialog.
msg - The message to be shown.
timeout - The timeout for closing the dialog in ms. -1 means no timeout.
alwaysOnTop - Try to bring the dialog to front. Supported for JDKs >= 1.5.
wraplength - Approximate line length of the message text (0 to avoid line breaks).
messagetype - The message type, one of ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, PLAIN_MESSAGE .
optiontype - The option type, one of DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
buttons - Explicit button labels, separated by comma (optional)
Show an information dialog with an OK option.
title - The title of the dialog.
msg - The message to be shown.
timeout - The timeout for closing the dialog in ms. -1 means no timeout.
alwaysOnTop - Try to bring the dialog to front. Supported for JDKs >= 1.5.
wraplength - Approximate line length of the message text (0 to avoid line breaks).
Show an information dialog with a YES, NO and CANCEL option.
title - The title of the dialog.
msg - The message to be shown.
timeout - The timeout for closing the dialog in ms. -1 means no timeout.
alwaysOnTop - Try to bring the dialog to front. Supported for JDKs >= 1.5.
wraplength - Approximate line length of the message text (0 to avoid line breaks).
Show an information dialog with a YES and NO option.
title - The title of the dialog.
msg - The message to be shown.
timeout - The timeout for closing the dialog in ms. -1 means no timeout.
alwaysOnTop - Try to bring the dialog to front. Supported for JDKs >= 1.5.
wraplength - Approximate line length of the message text (0 to avoid line breaks).
Procedures to show a simple progress dialog
| Procedure/Dependency | Description | |
|---|---|---|
| Hides a progress dialog displayed with showProgressDialog | ||
| Shows a simple progress dialog on the screen. |
Hides a progress dialog displayed with showProgressDialog
Shows a simple progress dialog on the screen. Only one dialog is displayed at the time.
title - The title of the dialog
msg - The text of the label
alwaysOnTop - If true, the dialog remains on top, even if not focused
Contains procedures to test iOS applications as well as useful procedures for controlling ios simulator and devices.
Procedures to set the state of checkboxes (= switches).
| Procedure/Dependency | Description | |
|---|---|---|
| Deselect a checkbox. | ||
| Deselect a checkbox. | ||
| Return the value of a checkbox. | ||
| Select a checkbox. | ||
| Select a checkbox. | ||
| Set checkbox to the given state. | ||
| Set checkbox to the given state. |
Deselect a checkbox. If the checkbox is already deselected, no action is performed.
id - The id of the checkbox.
Deselect a checkbox. If the checkbox is already deselected, no action is performed. You can specify the coordinates for clicking.
id - The id of the checkbox.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Return the value of a checkbox. It's either 1, if box is selected or 0, if box is not selected.
id - ID of the checkbox.
Select a checkbox. If the checkbox is already selected, no action is performed.
id - The id of the checkbox.
Select a checkbox. If the checkbox is already selected, no action is performed. You can specify the coordinates for clicking.
id - The id of the checkbox.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Set checkbox to the given state.
id - The id of the checkbox.
check - The check value to be set (either true or false).
Set checkbox to the given state. You can specify the coordinates for clicking.
id - The id of the checkbox.
check - The check value to be set (either true or false).
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Accessing the device clipboard from procedures.
| Procedure/Dependency | Description | |
|---|---|---|
| Gets the content of the primary clipboard on the device. | ||
| Sets the primary clipboard's content on the device. |
Gets the content of the primary clipboard on the device.
contentType - The type of the content to get. Valid types are "plaintext", "image" or "url".
decodePlaintext - If true and the content type is "plaintext" the clipboard content will be decoded as a normal string.
Sets the primary clipboard's content on the device.
content - The content to be set as base64 encoded string.
contentType - The type of the content to set. Valid types are "plaintext", "image" or "url".
encodePlaintext - If true and the content type is "plaintext" the content will be encoded as base64 string.
Contains procedures to control iOS simulator and devices.
| Procedure/Dependency | Description | |
|---|---|---|
| Get the rotation of the device. | ||
| Get the udid of the connected device. | ||
| Return to the home screen of the iOS device. | ||
| Checks if the iOS device is locked. | ||
| Lists all iOS devices. | ||
| Locks the (simulated) iOS device | ||
| Set the rotation of the device. | ||
| Unlocks the (simulated) iOS device |
Get the rotation of the device.
Get the udid of the connected device.
Return to the home screen of the iOS device.
Checks if the iOS device is locked.
client - The name of the SUT client.
expected - The expected lock state. If empty, no check is performed.
throwExc - Whether to throw an exception if the check fails
ClientNotConnectedException - If SUT wasn't started this exception will be thrown.
Lists all iOS devices.
Writes list as information to the run log and returns a parsable list of names.
includeSimulators - If true, simulator are included in the result
includeDevices - If true, real devices are included in the result
asJson - If true, return the result as JSON formated data
Locks the (simulated) iOS device
Set the rotation of the device.
rotation - The rotation in degree
valid values: 0,90,180,270
0 = reset to the default position
Unlocks the (simulated) iOS device
Procedures for controlling iOS applications
| Procedure/Dependency | Description | |
|---|---|---|
| Returns the bundleId of the application currently running on the device. | ||
| Returns the name of the application currently running on the device (or empty, if no name can be assigned). | ||
| Returns the bundleId of an app. | ||
| Installs an application on the device. | ||
| Lists all apps on the device | ||
| Removes an application from the device. | ||
| Start an application already installed on the device. | ||
| Stops a running application on the device. |
Returns the bundleId of the application currently running on the device.
Returns the name of the application currently running on the device (or empty, if no name can be assigned).
Returns the bundleId of an app.
appName - The name of the app.
throwExc - True, whether procedure should throw an exception if component didn't appear.
Installs an application on the device.
appFile - The path of the app to install. Can be an .app bundle, a .ipa archive or a zip file containing the bundle
start - Set to "true" to automatically start the app after installation
Lists all apps on the device
Writes list as information to the run log and returns a parsable list of bundleIds.
Removes an application from the device. At least the name of the app or the bundleId must be specified.
bundleId - The bundle id of the app to remove.
appName - The name of the app to remove, if bundleId is empty.
Start an application already installed on the device. At least the name of the app or the bundleId must be specified.
bundleId - The bundle id of the app to stop.
appName - The name of the app to stop, if bundleId is empty.
Stops a running application on the device. At least the name of the app or the bundleId must be specified.
bundleId - The bundle id of the app to stop.
appName - The name of the app to stop, if bundleId is empty.
Procedures for iOS gestures like pinch, swipe, ...
| Procedure/Dependency | Description | |
|---|---|---|
| Perform a two finger pinch action. | ||
| Perform a two finger zoom action. |
Perform a two finger pinch action.
finger1X - position X of the first finger
finger1Y - position Y of the first finger
finger2X - position X of the second finger
finger2Y - position Y of the second finger
Perform a two finger zoom action.
startX - position X of the start point
startY - position Y of the start point
range - moving range
angle - moving angle 0 = horizontal
Procedures which work for any iOS element
| Procedure/Dependency | Description | |
|---|---|---|
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component, but only if the according parameter is set to true. | ||
| Click on a given component. | ||
| Click on a given component. | ||
| Double click on a given component. | ||
| Long click on a given component. | ||
| Types in some text on the currently selected input element | ||
| Wait for a given component. | ||
| Wait till a given component disappears. |
Click on a given component, but only if the according parameter is set to true.
id - The Id of the target component.
click - If this is set to true, the click will be performed, otherwise nothing happens.
Click on a given component, but only if the according parameter is set to true. You can specify the coordinates for clicking within the component.
id - The Id of the target component.
click - If this is set to true, the click will be performed, otherwise nothing happens.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
Click on a given component.
id - The Id of the target component.
Click on a given component. You can specify the coordinates for clicking within the component.
id - The Id of the target component.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
Double click on a given component.
id - The Id of the target component.
Long click on a given component.
id - The Id of the target component.
duration - How long the tap should be (in ms). Defaults to 600ms
Types in some text on the currently selected input element
text - The text to type
Wait for a given component.
id - The Id of the target component.
timeout - The timeout to wait for that component
throwExc - True, whether procedure should throw an exception if component didn't appear.
Wait till a given component disappears.
id - The Id of the target component.
timeout - The timeout to wait for that component
throwExc - True, whether procedure should throw an exception if component didn't disappear.
Procedures for executing commands with the iOS Development Bridge (IDB) tool.
| Procedure/Dependency | Description | |
|---|---|---|
| Get the path to the idb binary. | ||
| Run idb command. |
Get the path to the idb binary.
Run idb command.
command - the idb command to execute
retWithoutNewline - if the return value should cut "\n" default:false
Procedures for accessing lists.
| Procedure/Dependency | Description | |
|---|---|---|
| Select a given item by a mouse click on it. | ||
| Return the current index of a given item. | ||
| Return the number of items of a given list. | ||
| Return the text of a given item. | ||
| Scroll to a particular element in the list. | ||
| Scroll to a particular element in the list. | ||
| Scroll to the top of the list. | ||
| Scroll to the top of the list. | ||
| Select a given item by a mouse click on it. |
Select a given item by a mouse click on it. You can specify the coordinates for clicking and all other details of that mouse click.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
clickCount - Number of clicks. Default is 1. For a double click set this to 2.
modifier - Modifier for mouse key. 16 for right mouse. 4 for left mouse.
hard - True, if hard event should be replayed. Default is false.
popupTrigger - True, if click should open a popup. Default is false.
Return the current index of a given item.
Sample usage: Can be used to determine the numeric index of an item like 'Price'.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
Return the number of items of a given list.
id - The component ID of the list.
Return the text of a given item.
Sample usage: Determine the text of the second item.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
Scroll to a particular element in the list.
id - ID of the list.
item - The item to scroll to.
itemSeparator - The item separator (@, % or &).
Scroll to a particular element in the list.
id - ID of the list.
item - The item to scroll to.
Scroll to the top of the list.
id - ID of the list.
Scroll to the top of the list.
id - ID of the list.
Select a given item by a mouse click on it.
id - ID of the list.
item - The item.
itemSeparator - Separator to use for the item syntax. Default is @ for text values, also available & for index and % for regexp.
x - The x coordinate for the click, default is empty to click in the middle.
y - The x coordinate for the click, default is empty to click in the middle.
Procedures for checking a list.
| Procedure/Dependency | Description | |
|---|---|---|
| Check the number of items of a given list according to a specified comparison mode. |
Check the number of items of a given list according to a specified comparison mode.
Sample usage: You can check, that a list has exactly 6 items or that the table has less then 10 items.
id - The id of the list.
compareValue - The comparison value.
compareMode - The comparison mode
= or ==, if the compareValue should be equal than the actual amount of items.
<, if the compareValue should be greater than the actual amount of items.
>, if the compareValue should be less than the actual amount of items.
<=, if the compareValue should be greater or equal than the actual amount of items.
>=, if the compareValue should be less or equal the actual amount of items.
!=, if the compareValue should be not equal the actual amount of items.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if wrong comparison mode has been set.
Procedures to select menu items
| Procedure/Dependency | Description | |
|---|---|---|
| Select an item from a menu. | ||
| Select an item from a menu. |
Select an item from a menu.
For example: for the File -> Open action, the component ID of "File" is the menu, and the ID for "Open" is the item.
menu - The id of the menu.
item - The id of menu item.
Select an item from a menu.
For example: for the File -> Open action, the component ID of "File" is the menu, and the ID for "Open" is the item.
menu - The id of the menu.
item - The id of menu item.
menuX - The x coordinate for the click on the menu, default is empty to click in the middle.
menuY - The y coordinate for the click on the menu, default is empty to click in the middle.
itemX - The x coordinate for the click on the item, default is empty to click in the middle.
itemY - The y coordinate for the click on the item, default is empty to click in the middle.
Procedures to get and set the state of radio buttons (= switches).
| Procedure/Dependency | Description | |
|---|---|---|
| Return the value of a radio button. | ||
| Select a radio button. | ||
| Select a radio button. |
Return the value of a radio button. It's either 1, if radio button is selected of 0, if radio button is not selected.
id - ID of the radio button.
Select a radio button. If the radio button is already selected, no action is performed.
id - The id of the radio button.
Select a radio button. If the radio button is already selected, no action is performed. You can specify the coordinates for clicking.
id - The id of the radio button.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Helper procedures to check and set up the test environment for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks the current environment for being compatible with iOS tests. |
Checks the current environment for being compatible with iOS tests.
interactive - If true, dialogs are shown and tool installation is supported.
requirePythonVenv - If true, the installation of python tools in a virtual environment is required.
Helper procedures to check and set up the homebrew tool for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if a detected homebrew version is recent enough. | ||
| Get the version of the currently installed homebrew tool, if available. | ||
| Triggers the installation of homebrew. |
Checks if a detected homebrew version is recent enough.
Get the version of the currently installed homebrew tool, if available.
Triggers the installation of homebrew.
Helper procedures to check and set up the iOS Developer Bridge for iOS testing.
Helper procedures to check and set up the iOS Developer Bridge client (idb) for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if a detected IDB client version is recent enough. | ||
| Get the path of the currently installed IDB client, if available. | ||
| Get the version of the currently installed IDB client, if available. | ||
| Triggers the installation of the IDB client. |
Checks if a detected IDB client version is recent enough.
Get the path of the currently installed IDB client, if available.
Get the version of the currently installed IDB client, if available.
Triggers the installation of the IDB client.
Helper procedures to check and set up the iOS Developer Bridge companion (idb-companion) for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if a detected IDB companion build is recent enough. | ||
| Get the build number of the currently installed IDB companion, if available. | ||
| Get the path of the currently installed IDB companion, if available. | ||
| Triggers the installation of the IDB companion. |
Checks if a detected IDB companion build is recent enough.
Get the build number of the currently installed IDB companion, if available.
Get the path of the currently installed IDB companion, if available.
Triggers the installation of the IDB companion.
Helper procedures to interact with macOS system functions during the test environment setup for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if the current system is running macOS. | ||
| Finds an executable at different possible locations on the system. | ||
| Displays an information dialog about a started application. | ||
| Displays an information dialog about installation triggered in the terminal. | ||
| Opens on macOS an application at the given path. | ||
| Opens on macOS a file at the given path. | ||
| Opens the terminal to execute the given command. |
Checks if the current system is running macOS.
Finds an executable at different possible locations on the system.
Displays an information dialog about a started application.
Displays an information dialog about installation triggered in the terminal.
Opens on macOS an application at the given path.
Opens on macOS a file at the given path.
Opens the terminal to execute the given command.
Helper procedures to check and set up the Python package installer (pip) for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if a detected Python package installer version is recent enough. | ||
| Get the version of the currently installed Python package installer, if available. | ||
| Triggers the installation of the Python package installer. |
Checks if a detected Python package installer version is recent enough.
Get the version of the currently installed Python package installer, if available.
Triggers the installation of the Python package installer.
Helper procedures to check and set up the python 3 environment for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if a detected Python 3 version is recent enough. | ||
| Get the version of the currently installed Python 3, if available. | ||
| Triggers the installation of Python 3. | ||
| Triggers the creation of a Python 3 virtual environment. |
Checks if a detected Python 3 version is recent enough.
Get the version of the currently installed Python 3, if available.
Triggers the installation of Python 3.
Triggers the creation of a Python 3 virtual environment.
Helper procedures to check and set up the Xcode development environment for iOS testing.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if the number of earlier detected available iOS devices on the system is > 0. | ||
| Checks if a detected Xcode version is recent enough. | ||
| Get information about a available iOS devices using Xcode tools. | ||
| Tries to detect if the recent runtime of the given platform is installed. | ||
| Returns the number of simulated iOS devices on the system using Xcode tools. | ||
| Get the version of the currently installed Xcode, if available. | ||
| Triggers the installation of Xcode. | ||
| Triggers the installation of the Xcode runtime. |
Checks if the number of earlier detected available iOS devices on the system is > 0.
Checks if a detected Xcode version is recent enough.
Get information about a available iOS devices using Xcode tools.
Tries to detect if the recent runtime of the given platform is installed.
Returns the version of the missing runtime, or "" if everything is ok, or "-1" upon error
Requires Xcode 14+
Returns the number of simulated iOS devices on the system using Xcode tools.
Get the version of the currently installed Xcode, if available.
Triggers the installation of Xcode.
Triggers the installation of the Xcode runtime.
Requires Xcode 14+
Helper procedures to check and set up the Xcode development path.
| Procedure/Dependency | Description | |
|---|---|---|
| Checks if the given Xcode development path matches the expected one. | ||
| Returns the Xcode development path. | ||
| Sets the Xcode development path. |
Checks if the given Xcode development path matches the expected one.
Returns the Xcode development path.
Sets the Xcode development path.
Packages containing swiping procedures
| Procedure/Dependency | Description | |
|---|---|---|
| Perform a swipe down operation. | ||
| Perform a swipe operation. | ||
| Perform a swipe left operation. | ||
| Perform a swipe right operation. | ||
| Perform a swipe up operation. | ||
| Perform a swipe operation. |
Perform a swipe down operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe operation.
direction - The direction of the swipe.
Valid entries: up, down, right, left, upright, up_left, down_right, down_left (and some more, see manual)
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe left operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe right operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe up operation.
id - The QF-Test ID of the component to perform the swipe operation on.
time - The duration of the swipe operation in milli seconds.
Perform a swipe operation.
id - The id the coordinates refer to
startX - The number pixels right of the upper left corner of the id where to start the swipe
startY - The number pixels down from the upper left corner of the id where to start the swipe
swipeHorizontal - The number of pixels covered by the swipe.
swipeVertical - The number of pixels covered by the swipe.
time - The time in which to execute the swipe. With many applications a quick swipe will give the display a momentum which will make the display scroll further than the actual length of the swipe.
steps - The number of steps the swipe is broken down to. If you choose a long time or long distance increase the number of steps to make the movement more fluent.
Procedures to set the state of switches.
| Procedure/Dependency | Description | |
|---|---|---|
| Deselect a switch. | ||
| Deselect a switch. | ||
| Return the value of a switch. | ||
| Select a switch. | ||
| Select a switch. | ||
| Set switch to the given state. | ||
| Set switch to the given state. |
Deselect a switch. If the switch is already deselected, no action is performed.
id - The id of the switch.
Deselect a switch. If the switch is already deselected, no action is performed. You can specify the coordinates for clicking.
id - The id of the switch.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Return the value of a switch. It's either 1, if box is selected or 0, if box is not selected.
id - ID of the switch.
Select a switch. If the switch is already selected, no action is performed.
id - The id of the switch.
Select a switch. If the switch is already selected, no action is performed. You can specify the coordinates for clicking.
id - The id of the switch.
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Set switch to the given state.
id - The id of the switch.
check - The check value to be set (either true or false).
Set switch to the given state. You can specify the coordinates for clicking.
id - The id of the switch.
check - The check value to be set (either true or false).
x - The x coordinate for the click, default is empty to click in the middle.
y - The y coordinate for the click, default is empty to click in the middle.
Procedures to access text fields and text areas.
| Procedure/Dependency | Description | |
|---|---|---|
| Clear a text field. | ||
| Return the text of a given textfield. | ||
| Set a given text to a given text-field or text-area. | ||
| Read the content of a given file and set its content to a given text-field. |
Clear a text field.
id - The id of the text field.
Return the text of a given textfield.
id - ID of the textfield.
Set a given text to a given text-field or text-area.
id - ID of the textfield.
text - text to be set.
append - if this value is set to true, the text will be appended to the current values.
clear - If this value is set to true, the text-field will be cleared before the text given as parameter "text" is inserted.
replaySingleEvents - If this value is set to true, the text will be inserted replaying single events.
newline - the separator sign for marking a linebreak within the text
Read the content of a given file and set its content to a given text-field.
id - The id of the text-field to set.
file - The path to the file.
append - If this value is set to true, the text will be appended to the current values.
clear - If this value is set to true, the text-field will be cleared in case an empty string is given as parameter "text".
replaySingleEvents - If this value is set to true, the text will be inserted replaying single events.
newline - the separator sign for marking a linebreak within the text
Procedures for writing log-entries.
| Procedure/Dependency | Description | |
|---|---|---|
| Write an error into the run log. | ||
| Write a message into the run log. | ||
| Write a warning into the run log. |
Write an error into the run log. Note: since 7.0 a new QF-Test node "Error" can be used for more Options
client - The name of the SUT client.
message - The message, which should be written.
withScreenshots - If true, try to take screenshots from individual SUT windows.
guiengine - The name of the engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Write a message into the run log.
message - The message, which should be written.
dontcompactify - If true, the message will not be removed from the run log. Use with care!
report - If true, the message will be shown in the report. Implies dontcompactify.
Write a warning into the run log.
message - The message, which should be written.
report - If true, the warning will be shown in the report.
Procedures to write screenshots into the run log.
| Procedure/Dependency | Description | |
|---|---|---|
| Return the total number of monitors. | ||
| Write an image of a component into the run log. | ||
| Write a screenshot of the whole screen into the run log. | ||
| Write a screenshots of a given monitor into the run log. |
Return the total number of monitors.
inSUT - Whether to take the screenshot in a SUT script. Should be true, if you start the SUT remotely.
guiengine - The name of the engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Write an image of a component into the run log.
client - The name of the SUT client.
id - The ID of the component to be written into the run log.
title - An optional title for the image.
dontcompactify - If true, the screenshot will not be removed from the run log. Use with care!
report - If true, the screenshot will be shown in the report. Implies dontcompactify.
guiengine - The name of the engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Write a screenshot of the whole screen into the run log.
inSUT - Whether to take the screenshot in a SUT script. Should be true, if you start the SUT remotely.
title - An optional title for the image.
dontcompactify - If true, the screenshot will not be removed from the run log. Use with care!
report - If true, the screenshot will be shown in the report. Implies dontcompactify.
guiengine - The name of the engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Write a screenshots of a given monitor into the run log.
monitor - The index of the monitor, the first one is 0, the second 1 etc.
inSUT - Whether to take the screenshot in a SUT script. Should be true, if you start the SUT remotely.
title - An optional title for the image.
dontcompactify - If true, the screenshot will not be removed from the run log. Use with care!
report - If true, the screenshot will be shown in the report. Implies dontcompactify.
guiengine - The name of the engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Utility procedures for shell commands.
| Procedure/Dependency | Description | |
|---|---|---|
| Copy a given file or directory to a given target. | ||
| Delete a file. | ||
| Execute a shell command. | ||
| Check whether a given file or directory exists. | ||
| Return the basename of the given file or directory. | ||
| Return the parent directory of the given file or directory. | ||
| Create a given directory. | ||
| Move a given file or directory to a given target. | ||
| Remove a given directory. | ||
| Create a given file or update the last modified date of an existing file. |
Copy a given file or directory to a given target. If the target is a directory, copy source into that directory. If target's parent directory does not exist, create it.
source - The source to be copied.
target - The target to be copied to.
Delete a file.
file - The file to remove.
Execute a shell command.
cmd - The command to execute.
dir - The working directory.
timeout - The maximal amount of time to wait for the program to finish.
expectedExitCode - The expected error level (or "" (without quotes, that means an empty string) in order to disable this check).
errorLvl - Whether to log a IGNORE, WARNING, ERROR or EXCEPTION in case the program did not finish within the specified amount of time or with an unexpected exit code.
stdoutVar - The name of the global variable in which to save the stdout of the program.
stderrVar - The name of the global variable in which to save the stderr of the program.
exitCodeVar - The name of the global variable in which to save the exitCode of the program.
outputFilterDrop - A regular expression of all the output that should get dropped.
outputFilterKeep - A regular expression of all the output that should get keeped.
autoExpandVariables - If set to True, variables in program output will be automatically expanded.
Check whether a given file or directory exists.
file - The path of the file or directory to check.
Return the basename of the given file or directory. If the root directory is specified as parameter an empty string will returned.
file - The file or directory.
Return the parent directory of the given file or directory. If the root directory is specified as parameter an empty string will returned.
file - The file or directory.
Create a given directory. It also creates non-existing parent directories.
directory - The directory to create.
UserException, - if the directory couldn't be created
Move a given file or directory to a given target. If the target is a directory, move source into that directory. If target's parent directory does not exist, create it. If an error happens during moving, source is not changed.
source - The source to be moved.
target - The target to be moved.
Remove a given directory.
directory - The directory to remove.
Create a given file or update the last modified date of an existing file.
For creation it also creates non-existing parent directories.
file - The file to touch.
Miscellaneous utility procedures.
| Procedure/Dependency | Description | |
|---|---|---|
| Perform a mouse click somwhere on the screen or onto a given component. | ||
| Trigger a full thread dump in the SUT if possible. | ||
| Drag the source component or item onto the target and drop it. | ||
| Dump an entire component hierarchy into the run log. | ||
| Dump the heap of the Java VM. | ||
| Generates a time based one time password (TOTP). | ||
| Get the screen location and the size of a component or subitem. | ||
| Return a date, default is the current date in current locale. | ||
| Return the time in the current format. | ||
| Return a timestamp, which represents the current time in milliseconds. | ||
| Kill all running clients. | ||
| Kill a client. | ||
| Log all available methods of a given component. | ||
| Log current memory use. | ||
| Log current memory usage of the native process(es) of a client. | ||
| Print a given message to STDOUT. | ||
| Print the visible content of a variable. | ||
| Read the content of a given file. | ||
| Send the given key along with the qualifier to the component which currently has the input focus. | ||
| Send the given text to the component which currently has the input focus. | ||
| Brings the specified window to the foreground. | ||
| Sleep a given time. | ||
| Wait until a client prints something to the terminal. | ||
| Wait until one of N components is available. | ||
| Write a given message into a given file. |
Perform a mouse click somwhere on the screen or onto a given component.
id - The QF-Test component ID of the source to click on or SCREEN.
x - The x coordinate of the click. Use "-" to replay a click on the center of the source.
y - The y coordinate of the click. Use "-" to replay a click on the center of the source.
mouseModifier - The mouse modifier: 16 - left click, 4 - right click
nrTimes - The number of times that the click gets executed (set to 2 in order to replay a double click)
keyModifier - Whether to press a modifier key during the operation: 1 - SHIFT, 2 - CTRL, 3 - SHIFT+CTRL, 4 - CMD, 8 - ALT
Trigger a full thread dump in the SUT if possible.
client - The name of the SUT client.
Drag the source component or item onto the target and drop it.
source - The QF-Test component ID of the source or SCREEN
target - The QF-Test component ID of the target or SCREEN
fromX - An X-offset when starting to drag the source
fromY - A Y-offset when starting to drag the source
toX - An X-offset when dropping on the target
toY - A Y-offset when dropping on the target
fromClient - The name of the source's client
toClient - The name of the target's client
modifier - Whether to press a modifier key during the operation: 17 - SHIFT, 18 - CTRL, 19 - SHIFT+CTRL
eventDelay - The amount of milliseconds to wait between each inserted event. High values ensure that the SUT has the time to respond to every event generated while low values will speedup the replay. Default is 50.
Dump an entire component hierarchy into the run log.
id - The id of the component from which to start dumping.
visibleOnly - Whether to include only visible components, i.e. ignore all components that are not currently showing.
interestingOnly - Whether to include only "interesting" components, i.e. ignore all components that QF-Test would not record with the default option settings.
filter - Optional comma-separated list of classes. If defined, dump only components of these classes or not of these classes, if filter is negated by preprending ^.
dontcompactify - Whether to prevent the resulting log entry from compactification.
Dump the heap of the Java VM.
sut - True to dump the SUT heap for $(client), false for the QF-Test heap.
client - The name of the SUT client in case sut is true.
file - The name of the file to dump the heap to.
deleteFirst - Whether to delete the file first. Otherwise an existing file will not be overwritten.
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Generates a time based one time password (TOTP).
secret - The secret to derive the password from (as base32 string).
digits - Number of digits of the password. Defaults to 6.
tokenPeriod - The duration in seconds of how long one token is valid. Defaults to 30.
algorithm - The algorithm to use. Defaults to SHA1.
keyURI - As an alternative to specifying the secret, digits, tokenPeriod and algorithm,
a keyURI starting with "otpauth://totp/" can be provided.
timestamp - The timestamp (in milliseconds) for which to generate the token. Defaults to the current time.
Get the screen location and the size of a component or subitem.
id - The QF-Test component ID of the component
client - The client of the component
Return a date, default is the current date in current locale.
Formatting rules: If a format and a locale are specified the date will be formatted using both values. If only a format is specified the date will be formatted only with that format. If only a locale is specified the date will be formatted according to the locale-format.
format - The format of the date, default is the current locale.
You can specify this via the SimpleDateFormat in Java, e.g. MM/dd/yyyy.
dd means two digits for the day.
MM means two digits for month.
yyyy means four digits for year.
offset - The number of days in future/past.
For yesterday's date specify -1.
For tomorrow's date specify 1.
locale - The locale of the date, e.g. de, us, it, es, fr, zh, ko, ru, pt, ar
or specific locales as en_gb, de_ch etc.
Return the time in the current format. Default is now, timestamps in the past or in future can be specified via the offset parameter.
Formatting rules: If a format and a locale are specified the time will be formatted using both values. If only a format is specified the time will be formatted only with that format. If only a locale is specified the time will be formatted according to the locale-format.
format - The format of the date, default HH:mm:ss.
hh means two digits for the hour.
mm means two digits for minutes.
ss means two digits for seconds.
offset - The seconds in future/past.
For one minute ago specify -60.
For one minute in future specify +60.
timezone - The timezone to get the time from.
If left empty, the local time will be taken.
If an invalid timezone is specified
the timezone will be set to GMT.
Examples see below.
locale - The locale of the date, e.g. de, us, it, es, fr, zh, ko, ru, pt, ar
or specific locales as en_gb, de_ch etc.
Further samples:
S stands for current millisecond.
K stands for hour in am/pm (0-11)
k stands for hour in day (1-24)
a stands for the am/pm marker
z stands for the time zone abbreviation
(zzzz) stands for the time zone name
Further samples can be found at SimpleDateFormat documentation at Java's documentation.
Samples for timezone:
GMT (Greenwich mean time),
CET (Central european time),
IST (India Standard Time),
GMT-08:00
GMT+2:00.
Return a timestamp, which represents the current time in milliseconds.
Kill all running clients.
timeout - The timeout for waiting for process termination after killing a client.
ClientNotTerminatedException - if a client has not been killed.
Kill a client.
client - The connection.
timeout - The timeout for waiting for process termination after killing.
ClientNotTerminatedException - if a client has not been killed.
Log all available methods of a given component. This script can be used to look for dedicated methods of objects. NOTE: If you use custom classloaders, the procedure could fail.
id - The id of the component.
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Log current memory use.
sut - True to log SUT memory for $(client), false for qftest memory.
client - The name of the SUT client in case sut is true.
warningLimit - Optional value in MB. If exceeded, log a warning instead of a plain message.
warningDelay - If warningLimit is exceeded, wait the given delay in seconds, then try again and log a warning only if the limit is still exceeded.
errorLimit - Optional value in MB. If exceeded, log an error instead of a warning or a plain message.
errorDelay - If errorLimit is exceeded, wait the given delay in seconds, then try again and log an error only if the limit is still exceeded.
guiengine - The name of the GUI engine to run the SUTscript, e.g. awt, swt, web. Can be empty, if you work with one engine at the same time.
Log current memory usage of the native process(es) of a client.
client - Optional name of the SUT client. Its processID is used unless processID is explicitly specified.
processID - Can be explicitly specified if known, otherwise the client parameter is used to determine the process.
warningLimit - Optional value in MB. If exceeded, log a warning instead of a plain message.
errorLimit - Optional value in MB. If exceeded, log an error instead of a warning or a plain message.
processTree - If set to True the amount of the process itself and all its child processes will get logged.
Print a given message to STDOUT.
message - The message to be printed.
Print the visible content of a variable.
variableName - The name of the variable.
Read the content of a given file.
file - The path to the file.
fileencoding - The file encoding to use. If this parameter is empty, the default file encoding will be used.
autoExpandVariables - If set to True, variables in the file text will be automatically expanded.
UserException, - if files doesn't exist.
Deprecated: Use qfs.utils.email.sendEmail or qfs.utils.email.sendEmail_SMTPHost instead.
Send the given key along with the qualifier to the component which currently has the input focus.
key - The key to be send along with the qualifier key. Valid input: a single letter of the latin alphabet, a digit or values for special keys like ENTER, DELETE, TAB, ESCAPE or F1 to F24.
qualifier - The qualifiers to send along with the key. Valid inputs: SHIFT, CONTROL/CTRL, ALT (= OPTION), META (= WINDOWS/COMMAND), combinations of these, or the empty string for no qualifier
title - (optional) The title of the window to bring to front before pressing the shortcut.
titleRegexp - (optional) true, if the given title is a regular expression, otherwise false.
Send the given text to the component which currently has the input focus.
text - The text to be send.
title - (optional) The title of the window to bring to front before sending the text.
titleRegexp - (optional) true, if the given title is a regular expression, otherwise false.
Brings the specified window to the foreground.
title - The title of the window to bring to front before pressing the shortcut.
titleRegexp - true, if the given title is a regular expression, otherwise false.
Sleep a given time.
sleeptime - The time to sleep in milliseconds.
Wait until a client prints something to the terminal.
If no output can be determined, throw an exception or log an error depending on the parameters.
client - The client for which the output should be inspected.
expectedOutput - The output to wait for.
isRegex - True to have the output matched as regular expression.
timeout - The maximal waiting time (in ms).
polling - The interval in milliseconds in which to poll for new components.
dologerror - Log an error instead of throwing an exception.
Exception - If dologerror==false and the terminal output was not found once timeout exceeded.
Wait until one of N components is available. If no component can be determined within a given timeout it will throw an exception or log an error depending on the parameters.
comids - Comma-separated list of component ids to wait for.
disappear - If this parameter is set to true, the procedure will wait until at least one of the given component disappeared.
hidden - Whether to accept hidden components.
timeout - The maximal waiting timeout (in ms).
polling - The interval in milliseconds in which to poll for new components.
dologerror - Log an error instead of throwing an exception.
comidsSeparator - The value, which separates the component ids. , is default.
ComponentNotFoundException - If dologerror==false, disappear==false and non of the components was found once timeout exceeded.
ComponentFoundException - If dologerror==false, disappear==true and all components can still be found once timeout exceeded.
Write a given message into a given file. NOTE: Special characters like \n or \t won't be expanded and will be treated as normal characters.
message - The message, which should be written.
file - The file, where the message has to be written into.
addLinebreak - If this is set to true, a linebreak `\n` will be appended to the text. On Windows '\r\n will be added.
UserException, - if no proper values for file and message have been set.
Accessing the clipboard from procedures.
| Procedure/Dependency | Description | |
|---|---|---|
| Return the current text on the system clipboard. | ||
| Set a text on the system clipboard. |
Return the current text on the system clipboard.
autoExpandVariables - If set to True, variables in the clipboard string will be automatically expanded.
Set a text on the system clipboard.
Procedures for sending emails.
| Procedure/Dependency | Description | |
|---|---|---|
| This procedure uses the smtplib module from Jython, to send emails via SMTP(s) server. | ||
| Send an email. |
This procedure uses the smtplib module from Jython, to send emails via SMTP(s) server. This procedure performs a login of a given user to a given SMTP server before sending the email. The attachment type is guessed based on file extension.
Logs detailed Error/Warning messages.
Note: To and From fields work only with ASCII characters, see https://docs.python.org/2.7/library/email.header.html
from - The address of the sender.
to - A comma-separated list of recipients.
subject - The subject of the email.
text - The text of the email.
asHtml - The Body of the email. Plain text or HTML.
smtpHost - SMTP server for sending emails. HOSTNAME:PORT
smtpUser - Username for login to the SMTP server.
smtpPassword - Password for login to the SMTP server.
fileToAttach - File to attach. Use full path.
readFileAsText - force file to be read as text file
suppressErrors - Log Warnings instead of errors in run log
Deprecated: Use qfs.utils.email.sendEmail because it provides the same functionallity.
Send an email. This procedure uses the smtplib module from Jython, which requires a SMTP server for sending emails. This procedure performs a login of a given user to a given SMTP server before sending the email.
It is possible that you have to copy that script and use it as template for your own script, because your mail-server requires a different authentication.
from - The address of the sender.
to - A comma-separated list of recipients.
subject - The subject of the email.
text - The text of the email.
asHtml - The Content-Type of the text is text/html.
smtpHost - SMTP server for sending emails.
smtpUser - User for the SMTP server.
smtpPassword - Password for the SMTP server.
Exception - If something went wrong
Procedures for interacting with a POP3 server.
| Procedure/Dependency | Description | |
|---|---|---|
| Delete all messages from a pop3 account. | ||
| Fetch a message from a pop3 account. |
Delete all messages from a pop3 account.
host - Hostname of the pop3 server.
port - Optional port of the pop3 server, leave empty to use the standard port.
username - Username for the pop3 account.
password - Password for the pop3 account.
useSSL - Whether to use SSL.
Fetch a message from a pop3 account.
host - Hostname of the pop3 server.
port - Optional port of the pop3 server, leave empty to use the standard port.
username - Username for the pop3 account.
password - Password for the pop3 account.
number - Optional number of the message to get, default 1.
delete - Whether to delete the message, default true.
timeout - Approximate maximum time in ms to wait for the message to appear.
useSSL - Whether to use SSL.
Contain procedures to work with files.
| Procedure/Dependency | Description | |
|---|---|---|
| Check, whether a given file contain a specific value. | ||
| Check, whether a given file contain a specific value in a line. | ||
| Compare the given files and returns true if equal, otherwise false. | ||
| Read a worksheet of an Excel file. |
Check, whether a given file contain a specific value. The value has to be a regular expression. It checks the whole text of the file for the value, so you can also specify text containing line breaks, if required.
fileName - The filename to check.
value - The value for checking.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if file doesn't exist.
Check, whether a given file contain a specific value in a line. If valueRegex is set to true, it checks for a regular expression. If valueRegex is set to false the text has in a row has to match exactly.
fileName - The filename to check.
value - The value for checking.
valueRegex - True, if the value is a regex, otherwise false.
errorLevel - The kind of error, which should be logged. Either EXCEPTION, ERROR, WARNING or MESSAGE.
appearInReport - Flag, whether to show check in report, if a message or warning are set as errorLevel.
If this is set to 1, the check will be shown in the report.
UserException, - if file doesn't exist.
Compare the given files and returns true if equal, otherwise false. It uses the Jython module filecmp for the comparison. It doesn't return the diff of the files in case of differences.
file1 - The name and path of the first file to compare.
file2 - The name and path of the second file to compare with.
UserException - If at least one of both file to be compared does not exist.
Read a worksheet of an Excel file.
fileName - The name of the file to read.
sheet - The name or the index of the worksheet.
dateFormat - A format string for the Java SimpleDateFormat.
resultGroupName - If this name is specified, the result is stored in a property group which an be accessed via ${resultGroupName:cellReference}, for example ${resultGroup:A2}
Contain procedures to work with images.
| Procedure/Dependency | Description | |
|---|---|---|
| Creates an ImageRep object with a visual matrix code, e.g. | ||
| Reads a visual matrix code - e.g. |
Creates an ImageRep object with a visual matrix code, e.g. a bar code or QR code.
content - The content to display as visual code.
width - The width of the created image. Defaults to 100.
height - The height of the created image. Defaults to 100.
type - The type of the visual code to generate. One of "AZTEC", "CODABAR",
"CODE_39", "CODE_93", "CODE_128", "DATA_MATRIX", "EAN_8", "EAN_13",
"ITF", "MAXICODE", "PDF_417", "QR_CODE", "RSS_14", "RSS_EXPANDED",
"UPC_A", "UPC_E", "UPC_EAN_EXTENSION". Defaults to "QR_CODE".
Reads a visual matrix code - e.g. a bar code or QR code - from an image.
image - An image as BufferedImage or ImageRep, or defined by its filename or URL
componentId - As alternative to providing the "image" directly, the QF-Test ID of a component can be provided, from which the image is used.
Procedures for working with JSON files.
| Procedure/Dependency | Description | |
|---|---|---|
| Compare two JSON files for full identity. | ||
| Compare two JSON structures for full identity. | ||
Deprecated: - use compareJSONValues instead
Compare two JSON files for full identity.
If differences are found, an error is logged for each different key.
The 'noCheck' parameter can be used to exclude keys from the comparison, for example variable values like timestamps. 'noCheck' also ignores keys that only appear in one JSON file, so optional keys can be specified there as well.
Examples for 'noCheck': noCheck: date ... ignores all 'date' keys. noCheck: date@value=11122015 ... ignores all 'date' keys with the value '11122015'. noCheck: date@value=%.*2015 ... ignores all 'date' keys where the regular expression '.*2015' matches the value.
originalFile - The original file for comparison.
compareFile - The file for comparing.
ignoreOrder - Whether to ignore the order of the keys.
stopAtFirstDiff - If enabled, only the first difference will be logged in the run log. The files won't be compared any further. This can lead to shorter run times, especially when comparing large files. If no difference is found, the parameter will not affect the comparison.
noCheck - A comma separated list of keys which are excluded from checking. To ignore attributes specifiy key@attr, or key@attr=value or key@attr=%regex-for-value.
timeout - Maximum time for the comparison. Once the timeout is reached the check is ended. This may lead to an incomplete check!
UserException, - if any of the given files don't exist.
Deprecated: use qfs.utils.json.compareJSONFiles directly Compare a JSON response against an expected file. If differences are found, an error is logged for each different key. The 'noCheck' parameter can be used to exclude keys from the comparison, for example variable values like timestamps. 'noCheck' also ignores keys that only appear in one JSON file, so optional keys can be specified there as well. Examples for 'noCheck': noCheck: date ... ignores all 'date' keys. noCheck: date@value=11122015 ... ignores all 'date' keys with the value '11122015'. noCheck: date@value=%.*2015 ... ignores all 'date' keys where the regular expression '.*2015' matches the value.
URL - The URL to connect to.
expectedFile - The file to compare to.
ignoreOrder - Whether to ignore the order of the keys.
stopAtFirstDiff - If enabled, only the first difference will be logged in the run log. The files won't be compared any further. This can lead to shorter run times, especially when comparing large files. If no difference is found, the parameter will not affect the comparison.
noCheck - A comma separated list of keys and attributes, which are excluded from checking. To ignore attributes specifiy key@attr or key@attr=value or key@attr=%regex-for-value.
requestMethod - The request method, e.g. GET.
actualFile - The file to save the response to.
headers - Optional headers.
payload - The payload to send.
payloadAsFile - Whether the payload is a file.
timeout - Maximum time for the comparison. Once the timeout is reached the check is ended. This may lead to an incomplete check!
UserException, - if something went wrong.
Compare two JSON structures for full identity.
If differences are found, an error is logged for each different key.
The 'noCheck' parameter can be used to exclude keys from the comparison, for example variable values like timestamps. 'noCheck' also ignores keys that only appear in one JSON, so optional keys can be specified there as well.
Examples for 'noCheck': noCheck: date ... ignores all 'date' keys. noCheck: date@value=11122015 ... ignores all 'date' keys with the value '11122015'. noCheck: date@value=%.*2015 ... ignores all 'date' keys where the regular expression '.*2015' matches the value.
expected - (String|File|byte[]|InputStream) The original JSON for comparison.
actual - (String|File|byte[]|InputStream) The expected JSON for comparing.
ignoreOrder - Whether to ignore the order of the keys.
stopAtFirstDiff - If enabled, only the first difference will be logged in the run log. The data won't be compared any further. This can lead to shorter run times, especially when comparing larger structures. If no difference is found, the parameter will not affect the comparison.
noCheck - A comma separated list of keys which are excluded from checking. To ignore attributes specifiy key@attr, or key@attr=value or key@attr=%regex-for-value.
timeout - Maximum time for the comparison. Once the timeout is reached the check is ended. This may lead to an incomplete check!
UserException - If data is not JSON
Deprecated: use the WebRequest-Node instead of this procedure. Get a REST response from a given URL.
URL - The URL to connect to.
requestMethod - The request method, e.g. GET.
responseFile - The file whre the repsonse is saved to.
headers - Optional headers.
payload - The payload to send.
payloadAsFile - Whether the payload is a file.
UserException, - if something went wrong.
Procedures for generating random string.
| Procedure/Dependency | Description | |
|---|---|---|
| Return a random string created of parts of a specified area. | ||
| Return a random number. | ||
| Return a random number between two given numbers. | ||
| Return a random string containing small letters. |
Return a random string created of parts of a specified area. The length of the string can also be specified as parameter.
area - The area, which contains the choices.
length - The length of the random string.
Return a random number.
length - The length of the random string.
Return a random number between two given numbers.
If you call it with lowest 0 and highest 3. The procedure could return 0, 1 or 2.
lowest - The lowest number for the random choice. It could be returned.
highest - The highest number for the random choice. It won't be included.
Return a random string containing small letters.
length - The length of the random string.
Procedures for executing commands on a remote server via ssh.
| Procedure/Dependency | Description | |
|---|---|---|
| Connect to a remote server by ssh and execute a command. |
Connect to a remote server by ssh and execute a command.
server - The remote server to connect to.
port - The port to use for ssh login (optional, default 22).
user - The username to use.
password - The password to use (optional).
keyfile - The name of the file containing the key for public key authentication. Used only if no password is specified (optional, default is checkKnownHosts - Whether to check the fingerprint of the remote server. For security reasons this should be enabled.
knownHostFile - A file containing the fingerprint for the remote server (optional, default is connectionTimeout - Time in ms to wait for a connection. -1 to wait forever (optional, default is 5000).
command - The command to execute on the remote server.
stdin - Text to be based to the stdin of the executing program. Ignored if stdinFile is specified.
stdinFile - The path to a local file or nothing. If a file is specified, the content of this file is passed to the stdin of the executing program.
mixOut - If true, stdout and stderr of the executing program are captured together in the stdout stream with stderr remaining empty (optional, default False).
programTimeout - Time in ms to wait for the command to execute. -1 to wait forever (optional, default is 5000).
encoding - The encoding for the stdout and stderr stream (optional, default is UTF-8).
resultGroupName - If this name is specified the stdout, stderr and exit code of the executed command are stored in a property group and may be accessed with ${resultGroup:'stdout'} (for the stdout of the program), ${resultGroup:'stderr'} (for the stderr of the program) and ${resultGroup:'exitCode'} (for the exit code of the program).
Exception - If something goes wrong with the ssh connection or program execution.
Procedures for handling SSH connections.
| Procedure/Dependency | Description | |
|---|---|---|
| Close an established ssh connection. | ||
| Connect to a remote server by ssh and keep the session open for further use. | ||
| Send a command via an established ssh connection and wait for resulting output. |
Close an established ssh connection.
sessionName - The name of the global Jython variable in which the session is stored.
resultGroupName - If this name is specified the combined stdout and stderr and the exit code of the executed command are stored in a property group and may be accessed with ${resultGroup:'stdout'} (for the stdout and stderr of the program) and ${resultGroup:'exitCode'} (for the exit code of the program).
Exception - If something goes wrong with the ssh connection.
Connect to a remote server by ssh and keep the session open for further use.
sessionName - The name of the global Jython variable in which the session is stored.
server - The remote server to connect to.
port - The port to use for ssh login (optional, default 22).
user - The username to use.
password - The password to use (optional).
keyfile - The name of the file containing the key for public key authentication. Used only if no password is specified (optional, default is checkKnownHost - Whether to check the fingerprint of the remote server. For security reasons this should be enabled.
knownHostFile - A file containing the fingerprint for the remote server (optional, default is connectionTimeout - Time in ms to wait for a connection. -1 to wait forever (optional, default is 5000).
encoding - The encoding for the stdout and stderr stream (optional, default is UTF-8).
Exception - If something goes wrong with the ssh connection.
Send a command via an established ssh connection and wait for resulting output.
sessionName - The name of the global Jython variable in which the session is stored.
input - The text to send.
addNewline - Whether to automatically terminate the command with a newline character if necessary (optional, default true).
expect - A regular expression for the output to expect from the program.
timeout - The maximum time to wait for the output.
Exception - If something goes wrong with the ssh connection or program execution.
Procedures for handling the test execution.
Procedures for skipping test steps.
| Procedure/Dependency | Description | |
|---|---|---|
| Skip the execution of the current test case. | ||
| Skip the execution of the current test set. |
Skip the execution of the current test case.
Skip the execution of the current test set.
Procedures for stopping test steps.
| Procedure/Dependency | Description | |
|---|---|---|
| Stop the execution of the current test case | ||
| Stop the complete test run. | ||
| Stop the execution of the current test set. |
Stop the execution of the current test case
expectedToFail - Whether test case was expected to fail.
Stop the complete test run.
Stop the execution of the current test set.
Procedures for working with variables.
| Procedure/Dependency | Description | |
|---|---|---|
| Delete all global QF-Test variables. | ||
| Delete all global QF-Test variables. | ||
| Delete a given global QF-Test variable. | ||
| Delete a given variable of a property group. | ||
| Delete a given global property group. | ||
| Print a list of all members of a given property group to the terminal. |
Delete all global QF-Test variables.
Delete all global QF-Test variables. You can define some exceptions for variable names, which shouldn't be deleted.
dontDelete - A comma-separated list of variable names which shouldn't be deleted.
If dontDelete is set to: client,number
The variables client and number won't become deleted.
Delete a given global QF-Test variable.
variableName - The name of the variable.
Delete a given variable of a property group.
groupName - The name of the group.
variableName - The name of the variable.
Delete a given global property group. You can also use this to delete a custom resource bundle set, which have been read by the Load-Resource bundle node.
groupName - The name of the group.
Print a list of all members of a given property group to the terminal.
groupName - The name of the group.
| Procedure/Dependency | Description | |
|---|---|---|
| Compares two version numbers. | ||
| Compares the expected version number with the version number of the currently used QF-Test. |
Compares two version numbers.
firstVersion - The first version number to compare.
secondVersion - The second version number to compare with.
significantDigits - The number of digits to compare.
splitRegExp - Regexp to split the version parts.
UserException - If a version number does not contain at least one digit.
Compares the expected version number with the version number of the currently used QF-Test.
expected - The expected version number.
Exception - If the expected number does not contain at least one digit.
Procedures for working with XML files.
| Procedure/Dependency | Description | |
|---|---|---|
| Compare two XML files for full identity. | ||
| Load properties from an XML file. |
Compare two XML files for full identity.
If differences are found, an error is logged for each different tag.
The 'noCheck' parameter can be used to exclude tags and attributes from the comparison, for example random values like timestamps. 'noCheck' also ignores tags, that only appear in one xml file, so optional tags can be specified there as well.
Examples for noCheck: noCheck: date ... ignores all 'date' tags. noCheck: date@value ... ignores all 'date' tags with the attribute 'value'. noCheck: date@value=11122015 ... ignores all 'date' tags with the attribute 'value' and corresponding value '11122015'. noCheck: date@value=%.*2015 ... ignores all 'date' tags where the regular expression '.*2015' matches to the value of the attribute 'value'.
originalFile - The original file for comparison.
compareFile - The file for comparing.
noCheck - A comma separated list of tags and attributes, which are excluded for checking, to ignore attributes specifiy tag@attr, or tag@attr=value or tag@attr=%regex-for-value.
stripWhitespace - Whether to strip leading and trailing whitespaces from text nodes before comparing.
xmlNamespace - Whether to process xml namespace definitions. Legal values are 'ignore' (remove all namespaces) or 'normalize' (normalize the namespaces). For all other values, xml namespace definitions are not preprocessed and possible namespaces are interpreted literally.
technology - The technology to use in order to compare the two xml files. Currently either 'sax', 'minidom', or 'auto' can be specified here. While 'sax' is the faster one, 'minidom' supports the additional 'sort=true' parameter. 'auto' means to take the technology which can probably best handle the given situation.
Minidom exclusive
sort - Sort the xml trees from both files before checking for identity.
SAX exclusive
stopAtFirstDiff - If enabled, only the first difference will be logged in the protocol. The files won't be compared any further which could lead to better runtime, especially while comparing large files. If no difference is found, the parameter will not affect the comparison.
compareComments - Whether the content of comments should be compared. If the parameter is disabled it will only be checked if both files include a comment tag at the same position.
UserException, - if one of the given files don't exist.
Load properties from an XML file. Property names are created from the node hierarchy and separated by a '.' or '.@' respectively (in case of an attribute), for example:
${group:root.first.second}=Text of this node ${group:root.first.@id}=Value of the id attribute
file - The name of the XML file.
group - The name of the properties group.
includeAttributes - Whether to define attributes as variables too.