Long press an element in a smartphone test

Press and hold an element in a smartphone test, for any long-press gesture the app supports.

Use it to open the context menu of a list item, grab a drag handle, or trigger anything else the app does on a long press. Then add a Tap step to pick an action in the menu that opens.

Parameters

ParameterRequiredDescription
Target elementYes, unless a manual selector is setNatural-language description of the element. The AI uses it to find the element.
Manual selectorNoXPath or CSS selector, used when AI is disabled or as the saved selector.
AI usageNosmart (default), always, or inherit.
Enable AINoDefault: off. Turn it on to locate the element from the description.
Ignore error on this stepNoThe 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?

Tap

Pick an action in the menu the long press opened

Verify element

Check that the context actions appeared

Last updated on