# Core

> Use web apps in real browsers, the way the people who use them do: open pages, fill in forms, click buttons and links, answer dialogs, download files, and check what the page shows.

Source: https://axx.nimbusxr.us/references/packs/web-core/

Use web apps in real browsers, the way the people who use them do: open pages, fill in forms, click buttons and links, answer dialogs, download files, and check what the page shows.

Each web app is registered with its address:

```gherkin
Given the parcels web app with the following properties:
  | url | http://localhost:8400 |
```

The browsers run on the machine that runs Axx. The pack drives Playwright 1.62.1, and downloads its browsers the first time a scenario uses each one. The web app can use another `engine` (`firefox`, `webkit`, or the Google Chrome or Microsoft Edge installed on the machine), and present the browser as a `device` (like `iPhone 15`), with a `viewport`, a `locale` and a `timezone`.

- **Pages.** `the {string} page is opened` opens a page of the app; the other steps act on it. A link that opens a new browser tab makes it the current tab, until it is closed.
- **Finding things.** Fields are found by their label (or, without one, their placeholder), buttons, links, tabs and menu items by their name, and text anywhere on the page, in every frame: the names people see. Names must match exactly. Where a name is not enough, a step takes a selector in its place: `css=…`, `xpath=…` or `testid=…`.
- **Waiting.** Every step waits for what it needs: an action for its element to be ready, a check for the page to show what it expects, 10 seconds unless `within {duration}` says otherwise. There is no step to sleep.
- **Dialogs.** A dialog the page opens (an alert, a confirmation, a question) waits for `the dialog is accepted`, dismissed or answered; other steps fail while it is open.
- **Isolation.** Each scenario has its own browser context: its own cookies and storage, so scenarios run in parallel.
- **Failures.** A failed step attaches a screenshot of the page. A failed scenario keeps a Playwright trace in `.axx/web/traces`, step by step, with the feature file: open it with `npx playwright show-trace` or at trace.playwright.dev.
- **Watching.** With `packs.web-core.watch: true` in axx.yaml, the browsers open in windows on your screen: watch the scenarios, and open DevTools. `slowdown` slows them down.
- **Pausing.** `axx run --pause-at <file>:<line>` pauses before a step, and `packs.web-core.pauseOnFailure: true` where a scenario fails, in Playwright's Inspector: resume, step through the browser's actions, pick an element, which the Inspector names as steps do (`the "Register" button`), or record what you do on the page as steps.
- **Sessions.** A web app can start signed in: `cookie.<name>`, `header.<name>`, `local storage.<key>`, `session storage.<key>`, and `username` and `password` for HTTP authentication, for the app's address only.
- **Secrets.** Take passwords and tokens from the environment, as `${env:…}`: whatever a step takes from the environment is shown as `********` in failures and traces.

Values in the steps and the table expand `${env:..}` and `${sys:..}`.

Add it to a project with `axx pack add web-core`.

## Settings

In `axx.yaml`, under `packs.web-core`:

| Setting | Takes | Values | Default |
|---|---|---|---|
| `pauseOnFailure` | Pause a failed scenario where it failed, in Playwright's Inspector, until you resume it; the browsers show. | `true`, `false` | |
| `scriptErrors` | What errors in the pages' scripts do: report lists them with a failed scenario (the default), fail fails the scenario. | `report`, `fail` | |
| `slowdown` | Wait this long after each browser action, to follow what happens (like 500ms). | text | |
| `testIdAttribute` | The attribute testid= selectors look at. | text | `data-testid` |
| `traces` | Which scenarios keep a Playwright trace in .axx/web/traces. | `failed`, `always`, `never` | `failed` |
| `videos` | Which scenarios keep a video in .axx/web/videos. | `failed`, `always`, `never` | `never` |
| `watch` | Show the browsers in windows on your screen, instead of running them headless. | `true`, `false` | |

## Steps

### `web-core.app`

```gherkin
Given the {word} web app with the following properties:
  | property | value |
```

The table may start with the row naming its columns, as above, or go straight to its rows.

Register a web app, and how the browser presents itself to it. The first web app registered is the default.

| Parameter | Takes | For example |
|---|---|---|
| `{word}` | one word, with no spaces | `parcels`, `PX-4101` |

| Property | Takes | Values | Default |
|---|---|---|---|
| `url` | where the browser finds the app; page paths are below it |  | _required_ |
| `engine` | the browser; `chrome` and `msedge` are those installed on the machine | `chromium`, `firefox`, `webkit`, `chrome`, `msedge` | `chromium` |
| `device` | a device Playwright knows, like `iPhone 15` or `Pixel 7`: its screen, user agent and touch |  | |
| `viewport` | the size of the page, like `1280x720` |  | `1280x720` |
| `locale` | the browser's language, like `de-DE` |  | `en-US` |
| `timezone` | the browser's time zone, like `Europe/Berlin` |  | `UTC` |
| `color scheme` | what `prefers-color-scheme` says | `light`, `dark`, `no-preference` | |
| `reduced motion` | what `prefers-reduced-motion` says | `reduce`, `no-preference` | |
| `media` | the media the page's styles are for | `screen`, `print` | `screen` |
| `user agent` | the user agent the browser sends |  | |
| `location` | where the browser says it is: a latitude and a longitude, like `52.5200, 13.4050` |  | |
| `permissions` | the permissions the app has, like `notifications, clipboard-read` |  | |
| `tls.verify` | `false` accepts the app's certificate, whatever it is |  | `true` |
| `username` | the username for the app's HTTP authentication, with `password` |  | |
| `password` | the password for the app's HTTP authentication, with `username` |  | |
| `cookie.<name>` | a cookie the browser starts with, for the app's address |  | |
| `header.<name>` | a header the browser sends the app |  | |
| `local storage.<key>` | an item of the app's local storage, from the start |  | |
| `session storage.<key>` | an item of the app's session storage, from the start |  | |

**Example:**

```gherkin
Given the parcels web app with the following properties:
  | url    | http://localhost:8400/portal |
  | engine | webkit                       |
```

_Since 0.1.1._

### `web-core.open`

```gherkin
When the {string} page[[ of the {word} web app]] is opened
```

Open a page of the web app: a path below its `url`, or a whole URL. The steps that follow act on this page. A page that answers with an error status (404, 500...) fails the step.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |
| `{word}` | one word, with no spaces | `parcels`, `PX-4101` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} page is opened`
- `the {string} page of the {word} web app is opened`

**Example:**

```gherkin
When the "/quotes" page is opened
When the "/parcels/PX-4101" page of the portal web app is opened
```

_Since 0.1.1._

### `web-core.fill`

```gherkin
When the {string} field is filled with {string}
```

Type a value into the field with that label (or, without a label, that placeholder), replacing what it holds.

- Date fields take dates as `2026-10-01`.
- A value from `${env:…}`, such as a password, is a secret: failures and traces show it as `********`.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Weight (grams)" field is filled with "1200"
When the "Password" field is filled with "${env:SHOP_PASSWORD}"
```

_Since 0.1.1._

### `web-core.select`

```gherkin
When {string} is chosen in the {string} field
```

Choose the option with that text in a drop-down field.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When "Germany" is chosen in the "Destination country" field
```

_Since 0.1.1._

### `web-core.option`

```gherkin
When the {string} option is chosen
```

Choose the radio button with that label.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Express" option is chosen
```

_Since 0.1.1._

### `web-core.check`

```gherkin
When the {string} checkbox is checked
```

Tick the checkbox with that label (a checkbox already ticked stays so).

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Insure this parcel" checkbox is checked
```

_Since 0.1.1._

### `web-core.uncheck`

```gherkin
When the {string} checkbox is unchecked
```

Clear the checkbox with that label (a checkbox already clear stays so).

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Leave with a neighbour" checkbox is unchecked
```

_Since 0.1.1._

### `web-core.upload`

```gherkin
When the {filepath} file is uploaded in the {string} field
```

Choose a file of the project for the file field with that label, as if picked in the file dialog; or for a button with that name that opens the file dialog.

| Parameter | Takes | For example |
|---|---|---|
| `{filepath}` | a file of the project: a path relative to the feature file's directory, the `resources` directories or axx.yaml's directory (looked for in that order), or an absolute path, quoted when it has a space | `seeds/parcels.yaml`, `kafka/scan-delivered.json` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the invoices/INV-2041.pdf file is uploaded in the "Customs invoice" field
```

_Since 0.1.1._

### `web-core.button`

```gherkin
When the {string} button is clicked
```

Click the button with that name: its text, or its label.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Get a quote" button is clicked
```

_Since 0.1.1._

### `web-core.link`

```gherkin
When the {string} link is clicked
```

Click the link with that text. A link that opens a new browser tab makes it the current tab, as a browser shows it.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Track a parcel" link is clicked
```

_Since 0.1.1._

### `web-core.tab`

```gherkin
When the {string} tab is clicked
```

Click the tab with that name, in a row of tabs on the page.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "History" tab is clicked
```

_Since 0.1.1._

### `web-core.menuitem`

```gherkin
When the {string} menu item is clicked
```

Click the item with that name in an open menu: a plain one, one that ticks on and off, or one that picks one of a group (`menuitem`, `menuitemcheckbox`, `menuitemradio`).

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "Cancel the parcel" menu item is clicked
```

_Since 0.1.1._

### `web-core.element.click`

```gherkin
When the {string} element is clicked
```

Click an element that is none of the above: by its text, its label, an image's alternative text or its title, or by a selector (`css=…`, `xpath=…` or `testid=…`).

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the "css=.parcel-card" element is clicked
```

_Since 0.1.1._

### `web-core.key`

```gherkin
When the {word} key is pressed[[ in the {string} field]]
```

Press a key: `Enter`, `Escape`, `Tab`, `ArrowDown`, a letter, or a combination like `Control+A`. The key goes to the field with that label, or to whatever has the focus.

| Parameter | Takes | For example |
|---|---|---|
| `{word}` | one word, with no spaces | `parcels`, `PX-4101` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {word} key is pressed`
- `the {word} key is pressed in the {string} field`

**Example:**

```gherkin
When the Enter key is pressed in the "Find a parcel" field
When the Escape key is pressed
```

_Since 0.1.1._

### `web-core.hover`

```gherkin
When the pointer is moved over {string}
```

Move the pointer over the button, link, tab or menu item with that name, or else over that text, so that what opens on hover opens: a menu, a tip.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the pointer is moved over "About Express"
```

_Since 0.1.1._

### `web-core.reload`

```gherkin
When the page is reloaded
```

Reload the current page. A page that answers with an error status fails the step.

**Example:**

```gherkin
When the page is reloaded
```

_Since 0.1.1._

### `web-core.back`

```gherkin
When the browser's back button is clicked
```

Go back to the page before, as the browser's back button does.

**Example:**

```gherkin
When the browser's back button is clicked
```

_Since 0.1.1._

### `web-core.closetab`

```gherkin
When the browser tab is closed
```

Close the current browser tab, such as one a link opened; the tab it was opened from becomes the current tab again.

**Example:**

```gherkin
When the browser tab is closed
```

_Since 0.1.1._

### `web-core.accept`

```gherkin
When the dialog is accepted
```

Accept the dialog the page shows (its OK): a message, a confirmation or a question. The page waits for an answer, so every other step fails while a dialog is open. The step waits for the dialog: 10 seconds.

**Example:**

```gherkin
When the dialog is accepted
```

_Since 0.1.1._

### `web-core.dismiss`

```gherkin
When the dialog is dismissed
```

Dismiss the dialog the page shows (its Cancel). The step waits for the dialog: 10 seconds.

**Example:**

```gherkin
When the dialog is dismissed
```

_Since 0.1.1._

### `web-core.answer`

```gherkin
When the dialog is answered with {string}
```

Type an answer to the question the dialog asks, and accept it. The step waits for the dialog: 10 seconds.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
When the dialog is answered with "The parcel arrived damaged"
```

_Since 0.1.1._

### `web-core.dialog`

```gherkin
Then [[within {duration} ]]the dialog shows {string}
```

Check that the page shows a dialog with the text, as part of its message (case matters). The check waits for a dialog: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the dialog shows {string}`
- `within {duration} the dialog shows {string}`

**Example:**

```gherkin
Then the dialog shows "Cancel parcel PX-4101?"
```

_Since 0.1.1._

### `web-core.shows`

```gherkin
Then [[within {duration} ]]the page shows {string}
```

Check that the page shows the text, anywhere, as part of what it shows (case matters). The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the page shows {string}`
- `within {duration} the page shows {string}`

**Example:**

```gherkin
Then the page shows "6.90 EUR"
Then within 30s the page shows "Parcel PX-4101 registered"
```

_Since 0.1.1._

### `web-core.hides`

```gherkin
Then [[within {duration} ]]the page does not show {string}
```

Check that the page does not show the text anywhere (case matters). The check waits for the text to go: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the page does not show {string}`
- `within {duration} the page does not show {string}`

**Example:**

```gherkin
Then the page does not show "Delivery not possible"
```

_Since 0.1.1._

### `web-core.url`

```gherkin
Then [[within {duration} ]]the {string} page is shown
```

Check which page the browser is on: its path below the web app's `url` (with the query, when the step gives one), or its whole URL. The check waits for the browser to get there: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} page is shown`
- `within {duration} the {string} page is shown`

**Example:**

```gherkin
Then the "/quotes/Q-3317" page is shown
```

_Since 0.1.1._

### `web-core.value`

```gherkin
Then [[within {duration} ]]the {string} field has the value {string}
```

Check the value a field shows: what it holds, or for a drop-down, the text of the option chosen. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} field has the value {string}`
- `within {duration} the {string} field has the value {string}`

**Example:**

```gherkin
Then the "Weight (grams)" field has the value "1200"
```

_Since 0.1.1._

### `web-core.disabled`

```gherkin
Then [[within {duration} ]]the {string} button is disabled
```

Check that the button with that name is disabled. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} button is disabled`
- `within {duration} the {string} button is disabled`

**Example:**

```gherkin
Then the "Register the parcel" button is disabled
```

_Since 0.1.1._

### `web-core.enabled`

```gherkin
Then [[within {duration} ]]the {string} button is enabled
```

Check that the button with that name is enabled. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} button is enabled`
- `within {duration} the {string} button is enabled`

**Example:**

```gherkin
Then within 5s the "Register the parcel" button is enabled
```

_Since 0.1.1._

### `web-core.row`

```gherkin
Then [[within {duration} ]]the page shows a table row where:
  | column | value |
```

The table may start with the row naming its columns, as above, or go straight to its rows.

Check that a table on the page has a row with those values in those columns. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |

Each row names a column, by its header, and the value the table's row has in it.

**Variants**, the parts in `[[...]]` said or left out:

- `the page shows a table row where:`
- `within {duration} the page shows a table row where:`

**Example:**

```gherkin
Then the page shows a table row where:
  | Parcel | PX-WEB-5116 |
  | Status | IN_TRANSIT  |
```

_Since 0.1.1._

### `web-core.downloaded`

```gherkin
Then [[within {duration} ]]the {string} file is downloaded
```

Check that the browser downloaded a file with that name, as the browser names it. The check waits for it: 10 seconds, or `within {duration}`. A failed scenario keeps the downloads its steps checked in `.axx/web/downloads`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} file is downloaded`
- `within {duration} the {string} file is downloaded`

**Example:**

```gherkin
Then the "PX-4101-label.zpl" file is downloaded
```

_Since 0.1.1._

### `web-core.download.contains`

```gherkin
Then the downloaded {string} file contains {string}
```

Check that a file the browser downloaded holds the text.

- Case matters; runs of spaces and line breaks count as one space.
- The text is read by the file's type: the text of a PDF's pages, the paragraphs and tables of a Word document (.docx), the cells of an Excel workbook (.xlsx), or the text itself.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
Then the downloaded "parcels.csv" file contains "PX-4101,Anna Weber,IN_TRANSIT"
```

_Since 0.1.1._

### `web-core.download.row`

```gherkin
Then the downloaded {string} file has a row where:
  | column | value |
```

The table may start with the row naming its columns, as above, or go straight to its rows.

Check that the table of a file the browser downloaded has a row with those values in those columns: a CSV or TSV file, or an Excel workbook (.xlsx, its first sheet), whose first row names the columns.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

Each row names a column, as the file's first row names it, and the value the file's row has in it.

**Example:**

```gherkin
Then the downloaded "parcels-birch-and-bloom.csv" file has a row where:
  | Parcel | PX-WEB-5401 |
  | Status | REGISTERED  |
```

_Since 0.1.1._

### `web-core.download.identical`

```gherkin
Then the downloaded {string} file is identical to the {filepath} file
```

Check that a file the browser downloaded has exactly the content of a file of the project.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |
| `{filepath}` | a file of the project: a path relative to the feature file's directory, the `resources` directories or axx.yaml's directory (looked for in that order), or an absolute path, quoted when it has a space | `seeds/parcels.yaml`, `kafka/scan-delivered.json` |

**Example:**

```gherkin
Then the downloaded "PX-4101-label.zpl" file is identical to the labels/PX-4101.zpl file
```

_Since 0.1.1._

### `web-core.element.shown`

```gherkin
Then [[within {duration} ]]the {string} {element} is shown
```

Check that the page shows the element: by the name people see, or by a selector (`css=…`, `xpath=…` or `testid=…`). The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} {element} is shown`
- `within {duration} the {string} {element} is shown`

**Example:**

```gherkin
Then the "Cancel the parcel" button is shown
Then within 5s the "css=.parcel-card" element is shown
```

_Since 0.1.1._

### `web-core.element.hidden`

```gherkin
Then [[within {duration} ]]the {string} {element} is not shown
```

Check that the page does not show the element, by its name or a selector. The check waits for it to go: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} {element} is not shown`
- `within {duration} the {string} {element} is not shown`

**Example:**

```gherkin
Then the "Cancel the parcel" menu item is not shown
```

_Since 0.1.1._

### `web-core.element.text`

```gherkin
Then [[within {duration} ]]the {string} {element} shows {string}
```

Check that the element shows the text, as part of what it shows (case matters). The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} {element} shows {string}`
- `within {duration} the {string} {element} shows {string}`

**Example:**

```gherkin
Then the "css=#price" element shows "6.90 EUR"
Then the "Details" tab shows "3"
```

_Since 0.1.1._

### `web-core.element.attribute`

```gherkin
Then [[within {duration} ]]the {string} {element} has the {word} attribute {string}
```

Check the value of one of the element's attributes, such as `href` or `aria-expanded`. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |
| `{word}` | one word, with no spaces |  | `parcels`, `PX-4101` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} {element} has the {word} attribute {string}`
- `within {duration} the {string} {element} has the {word} attribute {string}`

**Example:**

```gherkin
Then the "Actions" button has the aria-expanded attribute "true"
```

_Since 0.1.1._

### `web-core.element.focus`

```gherkin
Then [[within {duration} ]]the {string} {element} has the focus
```

Check that the element has the keyboard's focus. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} {element} has the focus`
- `within {duration} the {string} {element} has the focus`

**Example:**

```gherkin
Then the "Find a parcel" field has the focus
```

_Since 0.1.1._

### `web-core.checkbox.ticked`

```gherkin
Then [[within {duration} ]]the {string} checkbox is ticked
```

Check that the checkbox with that name is ticked. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} checkbox is ticked`
- `within {duration} the {string} checkbox is ticked`

**Example:**

```gherkin
Then the "Signature on delivery" checkbox is ticked
```

_Since 0.1.1._

### `web-core.checkbox.unticked`

```gherkin
Then [[within {duration} ]]the {string} checkbox is not ticked
```

Check that the checkbox with that name is not ticked. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} checkbox is not ticked`
- `within {duration} the {string} checkbox is not ticked`

**Example:**

```gherkin
Then the "Leave with a neighbour" checkbox is not ticked
```

_Since 0.1.1._

### `web-core.option.selected`

```gherkin
Then [[within {duration} ]]the {string} option is selected
```

Check that the option with that name is selected. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} option is selected`
- `within {duration} the {string} option is selected`

**Example:**

```gherkin
Then the "Express" option is selected
```

_Since 0.1.1._

### `web-core.option.unselected`

```gherkin
Then [[within {duration} ]]the {string} option is not selected
```

Check that the option with that name is not selected. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} option is not selected`
- `within {duration} the {string} option is not selected`

**Example:**

```gherkin
Then the "Standard" option is not selected
```

_Since 0.1.1._

### `web-core.field.disabled`

```gherkin
Then [[within {duration} ]]the {string} field is disabled
```

Check that the field with that name is disabled. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} field is disabled`
- `within {duration} the {string} field is disabled`

**Example:**

```gherkin
Then the "Parcel reference" field is disabled
```

_Since 0.1.1._

### `web-core.field.enabled`

```gherkin
Then [[within {duration} ]]the {string} field is enabled
```

Check that the field with that name is enabled. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the {string} field is enabled`
- `within {duration} the {string} field is enabled`

**Example:**

```gherkin
Then the "Weight (grams)" field is enabled
```

_Since 0.1.1._

### `web-core.element.count`

```gherkin
Then [[within {duration} ]]the page shows {int} {string} {element}
```

Check how many of the elements the page shows, by their name or a selector. The check waits for the number: 10 seconds, or `within {duration}`.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) |  | `5s`, `2m` |
| `{int}` | a whole number |  | `200`, `3` |
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Variants**, the parts in `[[...]]` said or left out:

- `the page shows {int} {string} {element}`
- `within {duration} the page shows {int} {string} {element}`

**Example:**

```gherkin
Then the page shows 2 "Remove" buttons
Then within 5s the page shows 3 "css=.parcel-card" elements
```

_Since 0.1.1._

### `web-core.row.count`

```gherkin
Then [[within {duration} ]]the page shows {int} table row(s) where:
  | column | value |
```

The table may start with the row naming its columns, as above, or go straight to its rows.

Check how many rows of the page's tables have those values in those columns. The check waits for the number: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{int}` | a whole number | `200`, `3` |

Each row names a column, by its header, and the value the tables' rows have in it.

**Variants**, the parts in `[[...]]` said or left out:

- `the page shows {int} table row(s) where:`
- `within {duration} the page shows {int} table row(s) where:`

**Example:**

```gherkin
Then the page shows 2 table rows where:
  | Status | REGISTERED |
```

_Since 0.1.1._

### `web-core.title`

```gherkin
Then [[within {duration} ]]the page title is {string}
```

Check the page's title, as the browser tab shows it. The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the page title is {string}`
- `within {duration} the page title is {string}`

**Example:**

```gherkin
Then the page title is "Get a quote · Parcels"
```

_Since 0.1.1._

### `web-core.errors.none`

```gherkin
Then the page has no script errors
```

Check that the web app's pages have had no errors in their scripts since the scenario opened them: no uncaught errors, and none logged to the console.

**Example:**

```gherkin
Then the page has no script errors
```

_Since 0.1.1._

### `web-core.request.sent`

```gherkin
Then [[within {duration} ]]the browser sent a {word} request to {string}
```

Check that the web app's pages sent a request with that method to that address.

- The address is a path below the web app's `url`, or a whole URL. The query counts only when the step gives one.
- The check waits for it: 10 seconds, or `within {duration}`.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |
| `{word}` | one word, with no spaces | `parcels`, `PX-4101` |
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Variants**, the parts in `[[...]]` said or left out:

- `the browser sent a {word} request to {string}`
- `within {duration} the browser sent a {word} request to {string}`

**Example:**

```gherkin
Then the browser sent a POST request to "/api/parcels"
```

_Since 0.1.1._

### `web-core.element.dblclick`

```gherkin
When the {string} {element} is double-clicked
```

Double-click the element, by its name or a selector.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Example:**

```gherkin
When the "PX-4101" element is double-clicked
```

_Since 0.1.1._

### `web-core.element.rightclick`

```gherkin
When the {string} {element} is right-clicked
```

Right-click the element, by its name or a selector: a menu of the page's own may open.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Example:**

```gherkin
When the "PX-4101" link is right-clicked
```

_Since 0.1.1._

### `web-core.element.tap`

```gherkin
When the {string} {element} is tapped
```

Tap the element, by its name or a selector, on a touch screen: the web app's `device` must have one (like `iPhone 15`).

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Example:**

```gherkin
When the "Register a parcel" link is tapped
```

_Since 0.1.1._

### `web-core.element.scroll`

```gherkin
When the {string} {element} is scrolled into view
```

Scroll the page (or the list it is in) until the element shows.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Example:**

```gherkin
When the "css=.parcel-card:last-child" element is scrolled into view
```

_Since 0.1.1._

### `web-core.element.drag`

```gherkin
When the {string} {element} is dragged onto the {string} {element}
```

Drag an element onto another, each by its name or a selector, as with a mouse.

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out |  | `"Get a quote"`, `'Express'` |
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

**Example:**

```gherkin
When the "PX-4101" element is dragged onto the "Out for delivery" element
```

_Since 0.1.1._

### `web-core.scroll.bottom`

```gherkin
When the page is scrolled to the bottom
```

Scroll the page to its bottom, as far as it goes: a page that shows more as it scrolls shows it.

**Example:**

```gherkin
When the page is scrolled to the bottom
```

_Since 0.1.1._

### `web-core.scroll.top`

```gherkin
When the page is scrolled to the top
```

Scroll the page to its top, as far as it goes: a page that shows more as it scrolls shows it.

**Example:**

```gherkin
When the page is scrolled to the top
```

_Since 0.1.1._

### `web-core.select.many`

```gherkin
When the following options are chosen in the {string} field:
  | option |
```

Choose several options in a drop-down field that takes more than one.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

An option a row, by its text.

**Example:**

```gherkin
When the following options are chosen in the "Pickup days" field:
  | Monday   |
  | Thursday |
```

_Since 0.1.1._

### `web-core.clock.set`

```gherkin
Given the browser's clock is set to {string}
```

Set the time the web apps' pages see, from then on.

- The time is like `2026-09-25T14:00:00+02:00`, or `2026-09-25 14:00` in UTC.
- Time goes on from there, so the pages' timers still run.
- Set it before opening the pages whose timers a step moves forward.

| Parameter | Takes | For example |
|---|---|---|
| `{string}` | text in double or single quotes, which the step leaves out | `"Get a quote"`, `'Express'` |

**Example:**

```gherkin
Given the browser's clock is set to "2026-09-25T14:00:00+02:00"
```

_Since 0.1.1._

### `web-core.clock.forward`

```gherkin
When the browser's clock is moved forward by {duration}
```

Move the time the web apps' pages see forward, as if the computer slept that long.

- The timers due in between fire once, and what expires, such as a session, expires.
- The pages' timers are the browser's own from when its clock is set: set it before opening them.

| Parameter | Takes | For example |
|---|---|---|
| `{duration}` | a duration in seconds (`s`) or minutes (`m`) | `5s`, `2m` |

**Example:**

```gherkin
When the browser's clock is moved forward by 31m
```

_Since 0.1.1._

### `web-core.connection.offline`

```gherkin
When the browser is offline
```

Take the browser offline: the web apps' pages cannot reach anything until it is online again.

**Example:**

```gherkin
When the browser is offline
```

_Since 0.1.1._

### `web-core.connection.online`

```gherkin
When the browser is online
```

Bring the browser back online.

**Example:**

```gherkin
When the browser is online
```

_Since 0.1.1._

## Parameter types

| Parameter | Takes | Values | For example |
|---|---|---|---|
| `{element}` | a kind of element on the page, plural after a number (`buttons`): a `field` by its label or placeholder, an `option` is a radio button, an `element` is anything, by its text, label, alternative text or title | `button`, `field`, `checkbox`, `option`, `link`, `tab`, `menu item`, `element` | `button`, `field` |

## Tools for agents

What the pack lets coding agents do through `axx mcp`, in the scenario they keep open with `steps_try`.

| Tool | |
|---|---|
| `web_page` | The page the web app of the agent's session is on, once steps_try opened it: its address and title, the elements steps can name, as they name them (the "Get a quote" button, the "Weight (grams)" field), what a screen reader reads (an ARIA snapshot), its script errors and a screenshot. Try steps with steps_try, look with web_page, then write the steps into the feature. |
