---
title: Long press
description: "Press and hold an element on a device: open a context menu on a list item, start a drag handle, or trigger any long-press gesture."
lastUpdated: "2026-09-23"
---

> **For AI agents:** the complete documentation index is at [llms.txt](/llms.txt). Append `.md` to any page URL for its markdown version.

Press and hold an element: open a context menu on a list item, start a drag handle, or trigger any long-press gesture the app supports.

## Parameters

| Parameter | Required | Description |
| ----------- | ---------- | ------------- |
| Target element | Yes, unless a manual selector is set | Natural-language description of the element. The AI uses it to find the element. |
| Manual selector | No | XPath selector in the app's UI tree, used when AI is disabled or as the saved selector. |
| AI usage | No | `smart` (default), `always`, or `inherit`. |
| Enable AI | No | Default: off. Turn it on to locate the element from the description. |
| Ignore error on this step | No | The run continues with the next step if this one fails. Default: off. |

## Results and metrics

- **Timing**: start, end, and duration (in seconds) recorded in the step result.
- **Status**: success, warning, or failed, with the error message on failure.
- **Screenshot**: captured after the long press, usually showing the context actions it opened.
- **AI usage**: if the AI located the element, the healed selector is saved on the test and the AI cost is added to the run.

## What's next?

<Columns cols={2}>
  <Card title="Tap" icon="hand-pointer" href="/tests/actions/smartphone/tap">

    Pick an action in the menu the long press opened

</Card>
  <Card title="Verify element" icon="eye" href="/tests/actions/smartphone/verifyelement">

    Check that the context actions appeared

</Card>
</Columns>
