- Docs
- Reference
- Step reference
- Desktop actions
Desktop actions
Desktop projects test Windows and macOS applications through an agent on the machine where the app runs. This page lists every desktop action type and the value each one needs.
In short
On this page you can
- Click, double-click, right-click and hover controls of a desktop app.
- Type text, type key by key for password fields, and press shortcuts such as Ctrl+S.
- Check that a control is visible, exists, is enabled or is checked.
- Read a control’s text or attribute into a variable.
- Launch or close the app, switch or maximize windows, take screenshots.
How to use it
- Start the SmartTest agent on the machine that has the app.
- Capture controls with the Desktop Recorder, or pick saved actions with Action.
- Add locator-free steps such as Press Enter or Wait 2 Seconds with Global.
- Fill each step’s value: text, key, option, variable name or window title.
- Save and run a Dry Run on the agent.
How desktop steps are created#
- Desktop Recorder. Captures controls of the running app on the agent machine and adds them as steps. See Discover › Desktop.
- Action. Pick saved desktop actions from the Action List.
- Global. Ready-made steps that need no control. See Global desktop actions.
The types below exist only in DESKTOP projects. Shared step types (Assertion, Python, API, Database, Mail, Kafka, Global parameter, Wait (seconds), AI, JMeter, k6) work here too. JavaScript and Network are not available in desktop projects.
Mouse#
| Action | Does | Value |
|---|---|---|
| Click | Clicks a desktop control. | — |
| Double Click | Double-clicks a control. | — |
| Right Click | Right-clicks a control (opens the context menu). | — |
| Hover | Moves the mouse over a control. | — |
Input and keys#
| Action | Does | Value |
|---|---|---|
| Type Text | Types text into a control. | The text |
| Clear | Clears the value of a control. | — |
| Clear & Type | Clears the control, then types. | The text |
| Type Key by Key | Types with the real keyboard, one key at a time. Use it for password fields and fields that reject pasted or bulk input. | The text |
| Press Key | Presses a key or a combination. | Enter, Tab, Esc, Ctrl+S, Alt+F4 |
| Select | Selects an option in a combo box or list. | The option |
Scrolling and waits#
| Action | Does | Value |
|---|---|---|
| Scroll | Scrolls with the mouse wheel. | Direction: up, down, left, right |
| Scroll To Element | Scrolls until the control is visible. | — |
| Wait For Element | Waits until the control exists. | — |
| Wait For Visible | Waits until the control is visible. | — |
| Wait | Waits for the given number of seconds. | Seconds |
The shared Wait (seconds) step does the same as Wait and is the one to use in new steps.
Assertions#
| Action | Passes when | Value |
|---|---|---|
| Assert Visible | The control is visible. | — |
| Assert Not Visible | The control is not visible. | — |
| Assert Exists | The control exists. | — |
| Assert Not Exists | The control does not exist. | — |
| Assert Enabled | The control is enabled. | — |
| Assert Checked | The checkbox or toggle is checked. | — |
| Assert Text | The control’s text equals the expected value. | The expected text |
The Desktop Recorder offers the most used types. Wait For Element, Assert Exists, Assert Not Exists, Assert Text and Store Variable are not in its menu because other types cover them (Wait For Visible, Assert Visible, Assert Not Visible, Get Text plus an Assertion), but existing steps of these types keep running.
Read values#
| Action | Does | You fill |
|---|---|---|
| Get Text | Reads the control’s text into a variable. | The variable name |
| Get Attribute | Reads a control attribute into a variable. | The variable name and the attribute |
| Store Variable | Stores a value in a variable. | The variable name and the value |
Later steps read the value as {{tc:name}} or pick it with Insert step variable. These steps accept the per-step Timeout (1–300 seconds).
App and window#
| Action | Does | Value |
|---|---|---|
| Launch App | Launches the application under test (from the project’s desktop settings). | — |
| Close App | Closes the application under test. | — |
| Switch Window | Switches to the window whose title contains the value. | Part of the window title |
| Maximize Window | Maximizes the current window. | — |
| Screenshot | Takes a screenshot for the report. | — |
Global desktop actions#
Global opens Global Desktop Actions: “Ready-made desktop steps that need no element (keys, wait, app/window)”. Click Add to step list on a row.
| Global action | Type and value |
|---|---|
| Press Enter, Press Tab, Press Escape | Press Key: Enter, Tab, Esc |
| Save (Ctrl+S) | Press Key: Ctrl+S |
| Wait 2 Seconds | Wait: 2 |
| Scroll Down, Scroll Up | Scroll: down, up |
| Launch App, Close App | Launch App, Close App |
| Maximize Window | Maximize Window |
| Take Screenshot | Screenshot |
At run time#
- Agent required. Desktop steps run on an online SmartTest agent on the machine with the app. A Dry Run lists the agents under Device (agent). See Install the agent.
- Healing. Desktop locators can be auto-healed when the project’s AI is on; repairs wait for review in Maintenance.
- Logs. Each type writes a plain message, for example
"Save" was clicked,Key "Ctrl+S" was pressedor"OK" is not enabled.
If something goes wrong#
Didn’t find your answer?Write to support with your project name and what you see on screen.
info@smartestqa.ai