Desktop apps on macOS, Windows and Linux, used as people use them, through the operating system’s accessibility tree: what screen readers read. Axx starts the app as it ships, with no build for testing, and clicks and types with the pointer and the keyboard, as a person does.
An app is registered for each OS it runs on, by that OS’s pack (desktop-macos, desktop-windows, desktop-linux), and every other step is app-core’s: a feature lists the app once for each OS and runs unchanged on each. This pack adds what only desktops do: a key pressed, a click at a place on a control, a drag.
Each scenario has the desktop, and a clean app. A desktop has one screen, one pointer and one keyboard focus, so on macOS and Windows desktop scenarios take the machine’s desktop in turns (other runs on the machine wait too), while other scenarios run alongside them; on Linux, Axx runs desktops of its own. Before an app starts in a scenario, its home (a folder of the project’s .axx/desktop) is emptied, and what its OS keeps of it elsewhere is reset; after the scenario, the app and every process it started are stopped. An app’s files are a folder of the files pack whose owner is the app: ./ is where its OS keeps an app’s data, ~/ its home.
Screenshots are of the app’s front window, as it draws itself, one for each platform and display scale (arrivals.darwin@2x.png). A focused field’s text cursor is left out of them, as the web pack leaves it out of its screenshots: it blinks.
Add it to a project with axx pack add desktop-core; it builds on app-core, which comes with it.
Settings
Section titled “Settings”In axx.yaml, under packs.desktop-core:
| Setting | Takes | Values | Default |
|---|---|---|---|
screenshots.folder |
The folder of the apps’ screenshots, in the project. Unset, each feature keeps its screenshots in a screenshots folder next to its file. | text | |
screenshots.platforms |
The platforms whose screenshots the project keeps: each compares its own; elsewhere the steps pass without comparing (default: every platform). | a list of linux, darwin, windows |
|
screenshots.tolerance |
The share of a screenshot’s pixels that may differ. | a number, 0 to 1 | 0 |
screenshots.update |
Take every screenshot again, as the app looks now, instead of comparing. | true, false |
|
traces |
Which scenarios keep a trace of each app in .axx/desktop/traces: a page with its window after each step, and its controls where the scenario failed. | failed, always, never |
never |
videos |
Which scenarios keep a video of their desktop in .axx/desktop/videos, an MP4 file (H.264), and the run one of them all, run.mp4. OpenH264 Video Codec provided by Cisco Systems, Inc.: Axx downloads it from Cisco when a video is first kept; never turns it off. | failed, always, never |
never |
desktop-core.key
Section titled “desktop-core.key”When the {word} key is pressed in the {word} appPress a key, with the keys held with it, in the app’s focused window: Enter, Escape, Tab, Control+Shift+S, as the web pack names them. ControlOrMeta+Z is Command on macOS and Control elsewhere, so a feature runs unchanged on each OS.
| Parameter | Takes | For example |
|---|---|---|
{word} |
one word, with no spaces | parcels, PX-4101 |
Example:
When the Escape key is pressed in the depot appWhen the ControlOrMeta+S key is pressed in the depot appSince 0.2.0.
desktop-core.click-at
Section titled “desktop-core.click-at”When the {string} {control} in the {word} app is clicked at {int}, {int}Click at a place on a control, in points from its top left, for what an app draws rather than names: a signature pad, a map, a canvas.
| Parameter | Takes | Values | For example |
|---|---|---|---|
{string} |
text in double or single quotes, which the step leaves out | "Get a quote", 'Express' |
|
{control} |
a kind of control an app shows, found by the name people see: a button by its text, a field by its label, a list item or a row by one of its texts, a menu item in its open menu, an element is anything, by its text or accessibility label; a phone’s notification is tapped, by a text in its title or its text. A kind an app’s platform does not have (a phone has no menu bar) fails the step |
button, field, checkbox, radio button, switch, tab, menu, menu item, list item, row, link, image, text, element, notification |
button, list item |
{word} |
one word, with no spaces | parcels, PX-4101 |
|
{int} |
a whole number | 200, 3 |
Example:
When the "Courier signature" element in the depot app is clicked at 40, 40Since 0.2.0.
desktop-core.click-at-anchor
Section titled “desktop-core.click-at-anchor”When the {string} {control} in the {word} app is clicked at {int}, {int} from its {anchor}Click at a place on a control, in points from its middle or a corner, for what keeps its place there as the control grows with the window or the screen: a picture an app shows in its middle, a button in its bottom right corner. Places run right and down, so one left of or above the point is negative.
| Parameter | Takes | Values | For example |
|---|---|---|---|
{string} |
text in double or single quotes, which the step leaves out | "Get a quote", 'Express' |
|
{control} |
a kind of control an app shows, found by the name people see: a button by its text, a field by its label, a list item or a row by one of its texts, a menu item in its open menu, an element is anything, by its text or accessibility label; a phone’s notification is tapped, by a text in its title or its text. A kind an app’s platform does not have (a phone has no menu bar) fails the step |
button, field, checkbox, radio button, switch, tab, menu, menu item, list item, row, link, image, text, element, notification |
button, list item |
{word} |
one word, with no spaces | parcels, PX-4101 |
|
{int} |
a whole number | 200, 3 |
|
{anchor} |
the point of a control that places on it are measured from: its middle, or a corner. Places run right and down from it, so one left of or above it is negative |
middle, top left, top right, bottom left, bottom right |
middle, bottom right |
Example:
When the "Courier signature" element in the depot app is clicked at -40, -20 from its bottom rightSince 0.2.2.
desktop-core.drag
Section titled “desktop-core.drag”When the pointer is dragged from {int}, {int} to {int}, {int} on the {string} {control} in the {word} appPress the pointer at a place on a control, move it to another in steps, as a hand does, and release it there; places are in points from the control’s top left.
| Parameter | Takes | Values | For example |
|---|---|---|---|
{int} |
a whole number | 200, 3 |
|
{string} |
text in double or single quotes, which the step leaves out | "Get a quote", 'Express' |
|
{control} |
a kind of control an app shows, found by the name people see: a button by its text, a field by its label, a list item or a row by one of its texts, a menu item in its open menu, an element is anything, by its text or accessibility label; a phone’s notification is tapped, by a text in its title or its text. A kind an app’s platform does not have (a phone has no menu bar) fails the step |
button, field, checkbox, radio button, switch, tab, menu, menu item, list item, row, link, image, text, element, notification |
button, list item |
{word} |
one word, with no spaces | parcels, PX-4101 |
Example:
When the pointer is dragged from 40, 30 to 140, 30 on the "Courier signature" element in the depot appSince 0.2.0.
desktop-core.drag-from-anchor
Section titled “desktop-core.drag-from-anchor”When the pointer is dragged from {int}, {int} to {int}, {int} from the {anchor} of the {string} {control} in the {word} appDrag on a control as a hand does, with places in points from its middle or a corner, for what keeps its place there as the control grows with the window or the screen. Places run right and down, so one left of or above the point is negative.
| Parameter | Takes | Values | For example |
|---|---|---|---|
{int} |
a whole number | 200, 3 |
|
{anchor} |
the point of a control that places on it are measured from: its middle, or a corner. Places run right and down from it, so one left of or above it is negative |
middle, top left, top right, bottom left, bottom right |
middle, bottom right |
{string} |
text in double or single quotes, which the step leaves out | "Get a quote", 'Express' |
|
{control} |
a kind of control an app shows, found by the name people see: a button by its text, a field by its label, a list item or a row by one of its texts, a menu item in its open menu, an element is anything, by its text or accessibility label; a phone’s notification is tapped, by a text in its title or its text. A kind an app’s platform does not have (a phone has no menu bar) fails the step |
button, field, checkbox, radio button, switch, tab, menu, menu item, list item, row, link, image, text, element, notification |
button, list item |
{word} |
one word, with no spaces | parcels, PX-4101 |
Example:
When the pointer is dragged from -60, 0 to 60, 0 from the middle of the "Courier signature" element in the depot appSince 0.2.2.
Parameter types
Section titled “Parameter types”| Parameter | Takes | Values | For example |
|---|---|---|---|
{anchor} |
the point of a control that places on it are measured from: its middle, or a corner. Places run right and down from it, so one left of or above it is negative |
middle, top left, top right, bottom left, bottom right |
middle, bottom right |