> ## 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.

# Mobile commands

> The mobile command set for Momentic iOS and Android tests, covering taps, swipes, device buttons, and app lifecycle.

Mobile tests use a mobile-specific command set. Targets are natural-language
descriptions or percent pairs (`"50%, 50%"`). There are no CSS selectors or
absolute pixel targets. See [Test format](/core-concepts/test-format) for file
shapes, targets, scroll containers, and conditionals.

## AI

| Command                                                        | Summary                                                                            |
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [`act`](/reference/mobile-commands/act)                        | Hand a natural-language goal to the AI agent, which taps and swipes to satisfy it. |
| [`assert`](/reference/mobile-commands/assert)                  | Run an AI assertion about the current screen. Fails the test by default.           |
| [`assertVisually`](/reference/mobile-commands/assert-visually) | Run an AI assertion about the screen using a screenshot only.                      |
| [`extract`](/reference/mobile-commands/extract)                | Pull a value off the screen with the AI agent and save it to `env`.                |

## Interact

| Command                                                   | Summary                                                     |
| --------------------------------------------------------- | ----------------------------------------------------------- |
| [`tap`](/reference/mobile-commands/tap)                   | Tap an element by description or percent-pair coordinates.  |
| [`type`](/reference/mobile-commands/type)                 | Type text into a field, optionally clearing and submitting. |
| [`swipe`](/reference/mobile-commands/swipe)               | Swipe the screen or a container in a direction.             |
| [`scrollTo`](/reference/mobile-commands/scroll-to)        | Scroll a container until the target is visible.             |
| [`dragAndDrop`](/reference/mobile-commands/drag-and-drop) | Drag from one target and drop onto another.                 |

## Device

| Command                                                              | Summary                                                          |
| -------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`press`](/reference/mobile-commands/press)                          | Press a physical device button (home, back, volume).             |
| [`pressKey`](/reference/mobile-commands/press-key)                   | Press a software keyboard key (enter, delete).                   |
| [`rotate`](/reference/mobile-commands/rotate)                        | Rotate the device to portrait or landscape.                      |
| [`toggleSettings`](/reference/mobile-commands/toggle-settings)       | Toggle an Android system setting such as airplane mode or Wi-Fi. |
| [`openNotifications`](/reference/mobile-commands/open-notifications) | Open the Android notification drawer.                            |

## App

| Command                                                    | Summary                                             |
| ---------------------------------------------------------- | --------------------------------------------------- |
| [`openApp`](/reference/mobile-commands/open-app)           | Launch an app by package name or bundle identifier. |
| [`killApp`](/reference/mobile-commands/kill-app)           | Force-stop the app under test.                      |
| [`installApp`](/reference/mobile-commands/install-app)     | Install an app from a file path.                    |
| [`uninstallApp`](/reference/mobile-commands/uninstall-app) | Uninstall an app by package name.                   |

## Screen checks

| Command                                                                                 | Summary                                           |
| --------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [`checkScreenContains`](/reference/mobile-commands/check-screen-contains)               | Assert that text appears somewhere on the screen. |
| [`checkScreenDoesNotContain`](/reference/mobile-commands/check-screen-does-not-contain) | Assert that text does not appear on the screen.   |

## Element checks

| Command                                                                       | Summary                                                              |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`checkElement`](/reference/mobile-commands/check-element)                    | Assert a condition on the element itself (exists, visible, enabled). |
| [`checkElementAttribute`](/reference/mobile-commands/check-element-attribute) | Assert a condition on an attribute of the element.                   |
| [`checkElementContent`](/reference/mobile-commands/check-element-content)     | Assert a condition on the element's text content.                    |
| [`checkElementName`](/reference/mobile-commands/check-element-name)           | Assert a condition on the element's type/class name.                 |
| [`checkElementStyle`](/reference/mobile-commands/check-element-style)         | Assert a condition on a computed style property.                     |

## Visual

| Command                                                | Summary                                                        |
| ------------------------------------------------------ | -------------------------------------------------------------- |
| [`visualDiff`](/reference/mobile-commands/visual-diff) | Compare a full-screen screenshot against a local golden image. |

## Network

| Command                                         | Summary                                                 |
| ----------------------------------------------- | ------------------------------------------------------- |
| [`request`](/reference/mobile-commands/request) | Issue an HTTP request and optionally save the response. |

## Scripts

| Command                                               | Summary                                                         |
| ----------------------------------------------------- | --------------------------------------------------------------- |
| [`javascript`](/reference/mobile-commands/javascript) | Run a JavaScript snippet and optionally store its return value. |
| [`adb`](/reference/mobile-commands/adb)               | Run an `adb` command against the connected Android device.      |
| [`appium`](/reference/mobile-commands/appium)         | Execute an Appium script against the device.                    |

## Files

| Command                                          | Summary                                    |
| ------------------------------------------------ | ------------------------------------------ |
| [`addFile`](/reference/mobile-commands/add-file) | Push a file from the host onto the device. |

## Waits

| Command                                   | Summary                                   |
| ----------------------------------------- | ----------------------------------------- |
| [`wait`](/reference/mobile-commands/wait) | Sleep for a fixed number of milliseconds. |

## Control flow

| Command                                       | Summary                                           |
| --------------------------------------------- | ------------------------------------------------- |
| [`if`](/reference/mobile-commands/if)         | Run a block of steps only when a condition holds. |
| [`module`](/reference/mobile-commands/module) | Invoke a reusable module of steps.                |

## Debugging

| Command                                                | Summary                                         |
| ------------------------------------------------------ | ----------------------------------------------- |
| [`debugState`](/reference/mobile-commands/debug-state) | Capture the current device state for debugging. |

`openNotifications`, `installApp`, `uninstallApp`, `toggleSettings`, and `adb`
are Android-only.

## Common options

Every step accepts these shared keys:

| Option    | Type      | Description                                                 |
| --------- | --------- | ----------------------------------------------------------- |
| `saveAs`  | `string`  | Variable to store this step's return value on `env.<name>`. |
| `retries` | `number`  | Times to retry the step on failure before failing the test. |
| `skipped` | `boolean` | Skip this step at execution time.                           |
