> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> Mo is the AI QA engineer, a separate product from the YAML test framework: its npm package and CLI are `qa` (not `mo` — `npx mo` is a different project). Install with `npm install -g qa`, authenticate the same MOMENTIC_API_KEY way, install repo skills with `qa skills -y`, and start a session with `qa start "<brief>"` or `qa <url>`. Docs: https://momentic.ai/docs/mo.md.
> You cannot complete the browser sign-in yourself. Read the API key from the exact MOMENTIC_API_KEY environment variable (similarly named vars like BILT_MOMENTIC_API_KEY are ignored), or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx momentic skills --yes` (or `npx momentic-mobile skills --yes` for mobile).
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# checkElementStyle

> Assert a condition on a WebView element's computed CSS style.

Asserts a condition on a computed CSS style property of a WebView element.
Computed style checks are not supported on native iOS or Android elements. Each
alias is its own single-key command. There is no separate `condition` or
`negated` field. The positive and negative variants map directly to the alias
table in [Notes](#notes).

Use a natural-language target. Percent-pair coordinates are not supported for
these element checks.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `on` | `string` | Yes | Natural-language target description. |
| `name` | `string` | Yes | Style property name to check. |
| `value` | `string` | Sometimes | Value to compare against. Required for every condition except `*Exists` and `*DoesNotExist`. |
| `timeout` | `number` | No | Milliseconds to wait for the condition to hold. |
| `saveAs` | `string` | No | Variable to store this step's return value on `env.<name>`. |
| `retries` | `number` | No | Times to retry the step on failure before failing the test. |
| `skipped` | `boolean` | No | Skip this step at execution time. |

## Examples

```yaml theme={null}
- checkElementStyleEquals:
    on: the primary button in the WebView
    name: color # the computed style property to read
    value: "rgb(255, 255, 255)" # computed CSS color
```

## Notes

Aliases supported by this family:

| Alias |
| - |
| `checkElementStyleExists` |
| `checkElementStyleDoesNotExist` |
| `checkElementStyleContains` |
| `checkElementStyleDoesNotContain` |
| `checkElementStyleEquals` |
| `checkElementStyleDoesNotEqual` |
| `checkElementStyleStartsWith` |
| `checkElementStyleDoesNotStartWith` |

## Related

* [Steps](/docs/core-concepts/steps)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.