1. Docs
  2. Reference
  3. Step reference
  4. Mobile actions

Mobile actions

Mobile projects (Android and iOS) have their own action types, run through Appium on a local device, an emulator or a Device Farm device. This page lists them all, with the value each one needs.

6 min read Updated CustomersAdmins

In short

On this page you can

  • Tap, swipe, scroll, pinch and drag on Android and iOS screens.
  • Type, clear and press device keys such as Enter or Back.
  • Launch, close, reset, install or background the app under test.
  • Read text or attributes into variables and assert on them.
  • Add ready-made steps without a locator from Global.

How to use it

  1. Capture the screen’s elements with the Appium Inspector, or pick saved actions with Action.
  2. Add locator-free steps (Hide Keyboard, Scroll Down, Press Back…) with Global.
  3. Fill each step’s value in the right panel: text, direction, key or variable name.
  4. Insert values from earlier Get Text steps with the step variable picker.
  5. Save and run a Dry Run on a local device or a Device Farm device.

How mobile steps are created#

The step types below exist only in MOBILE projects (Android and iOS). Shared step types (Assertion, Python, API, Database, Mail, Kafka, Global parameter, Wait (seconds), AI) work here too.

Touch and gestures#

ActionChipDoesLocatorValue
TapTapTaps an element (single touch).Yes—
Double TapDblTapDouble-taps an element.Yes—
Long PressLongPressPresses and holds an element.Yes—
SwipeSwipeSwipes in a direction.NoDirection: up, down, left, right
ScrollScrollScrolls the screen (a swipe the other way). Without anything to scroll, nothing happens and the step does not fail.NoDirection: up, down, left, right
Tap First List ItemTapFirstTaps an item of the vertical list on screen, found without a locator. Tab bars and banners are ignored.NoIndex: 0 = first, 1 = second…
PinchPinchPinch gesture to zoom in or out.YesScale: below 1 zooms out, above 1 zooms in (default 0.5)
Drag & DropDragDrags an element and drops it on a target.YesThe drop target, set in the step

Input and keys#

ActionChipDoesValue
Type TextTypeTypes text into a mobile input field.The text
ClearClearClears all text from an input field.—
Clear & TypeClrTypeClears the field, then types new text.The text
Hide KeyboardHideKbdDismisses the on-screen keyboard. Use it when the keyboard covers a button.—
Press KeyPressKeyPresses a device or keyboard key.An Android keycode (66) or a key name (ENTER)

Key names for Press Key (case does not matter): HOME, BACK, VOLUME_UP, VOLUME_DOWN, POWER, MENU, TAB, SPACE, ENTER, RETURN, DEL, DELETE, BACKSPACE, SEARCH, ESCAPE, ESC, FORWARD_DEL, NUMPAD_ENTER. On iOS there are no keycodes: Home and volume go to the hardware buttons, Back navigates back, and Enter, Tab, Space and Delete are typed into the focused field. Log: Device key was pressed (keycode 66).

App lifecycle#

ActionChipDoesValue
Launch AppLaunchLaunches the application from scratch. The app of the project’s mobile settings is used.—
Close AppCloseCloses the application.—
Reset AppResetResets the app state: clears data and restarts.—
Background AppBgSends the app to the background for N seconds, then brings it back.Seconds
Activate AppActivateBrings the app back to the foreground.—
Install AppInstallInstalls an APK or IPA on the device.The app file
Remove AppRemoveUninstalls an app from the device.The app
ActionChipDoesValue
Press BackBackPresses the device Back button (on iOS: back navigation).—
Press HomeHomePresses the device Home button; the app goes to the background.—
Switch ContextCtxSwitches between the native and the webview context of a hybrid app.The context
Open NotificationsNotifOpens the notifications panel.—
Open Deep LinkDeepLinkOpens a deep link URL inside the app.The URL, for example myapp://orders/1042

Read values#

ActionChipDoesOutput
Get TextGetTxtCaptures an element’s text and stores it as a variable.The variable you name
Get AttributeGetAttrCaptures an element attribute (for example content-desc) and stores it.The variable you name
Store VariableStoreStores a fixed value as a variable for later steps.The variable you name

In later steps, the value field offers Insert step variable: a list of the Get Text, Get Attribute and Store Variable steps above (“Step variables (this test case)”). If two earlier steps set the same name, the tooltip warns that the last value wins at run time. These steps also accept the per-step Timeout (1–300 seconds).

Waits and assertions#

ActionChipPasses whenValue
Wait For ElementWaitThe element appears.—
Wait For TextWaitTxtThe expected text appears in the element.The text
Wait For VisibleWaitVisThe element becomes visible.—
Assert VisibleAssertVisThe element is visible.—
Assert Not VisibleAssertNotVisThe element is not visible.—
Assert TextAssertTxtThe element’s text matches the expected value.The expected text

A failed assertion logs, for example, The text of "Total" did not match the expected value "€ 12.00" (found: "€ 10.00") and stops the test case. A wait that runs out logs "Login" did not appear in time.

Global actions#

Global on the step toolbar (tooltip “Global Actions (Pre-built Mobile Steps)”) opens Global Actions: pre-built mobile steps you add without capturing an element. They are the same in every mobile project. Search with “Search action…” and click Add to step list. In the step list they show an orange chip with a bolt icon.

Global actionType and valueUse it to
Hide KeyboardHide KeyboardClose the keyboard when it covers a button.
Scroll Down / Up / Left / RightScroll, directionReveal content or move a carousel.
Tap List ItemTap First List Item, index 0Tap a list item without a locator; change the index in the step.
Swipe Down / UpSwipe, directionPull to refresh, close a bottom sheet.
Press Back, Press HomePress Back, Press HomeGo back, or send the app to the background.
Open NotificationsOpen NotificationsTest push notifications.
Press EnterPress Key, keycode 66Submit a form from the keyboard.
Launch App, Close App, Reset AppApp lifecycleStart clean or end a test.
Background App 5sBackground App, 5 secondsTest session refresh after the app was in the background.

At run time#

  • Where. A Dry Run runs on a local device or emulator through your agent and Appium (http://localhost:4723), or on a Device Farm device. A pipeline picks its own devices on its Mobile Settings tab (the agent’s Connected Device, or SmartTest Device Farm devices); only AWS Device Farm and BrowserStack use the device list of the project’s Mobile Config. See Connect mobile and desktop.
  • Time. Each step has a budget of the project’s Wait Timeout + 10 seconds; an AI step gets 35 seconds more.
  • Healing. Mobile steps are not auto-healed. Keep locators stable (accessibility id, resource-id).
  • Ambiguous locators. When a locator matches several elements, the first one is tapped. The inspector warns about this when you capture.

If something goes wrong#

Didn’t find your answer?Write to support with your project name and what you see on screen.

info@smartestqa.ai
© 2026 Selenity Technology · SmartestQAsmartestqa.aiThis page as MarkdownChecked against smarttest-fe predev 2a8c79cc, smarttest-be 633c2a03, smarttest-testsuite 017fcec