QANode Logo

Mobile Flow Node

The Mobile Flow node allows you to automate interactions with native mobile applications (Android and iOS) using Appium. It supports real devices, emulators, and cloud services such as BrowserStack, Sauce Labs, and LambdaTest.


Overview

PropertyValue
Typemobile-flow
CategoryMobile
ColorLight Red (#f87171)
Inputin
Outputout

Prerequisites

Appium

The Mobile Flow node requires an accessible Appium server:

SituationSolution
Desktop EditionAppium is installed automatically on first use and started when a flow with a mobile node runs
Own serverInstall manually: npm install -g appium + driver: appium driver install uiautomator2 (Android) or appium driver install xcuitest (iOS)
Cloud (BrowserStack, etc.)No local Appium needed — use the provider credentials

Recommended versions (QANode 0.2.2+)

npm install -g appium@3.2.0
appium driver install --source=npm appium-uiautomator2-driver@7.0.0
appium driver install --source=npm appium-xcuitest-driver@10.25.0

For iOS, XCUITest requires macOS with Xcode configured.

Appium Drivers

PlatformDriverInstallation
AndroidUiAutomator2appium driver install uiautomator2
iOSXCUITestappium driver install xcuitest (requires Xcode on Mac)

General Configuration

FieldTypeDefaultDescription
CredentialselectMobile credential with connection settings
Session Modenew / reusenewStart a new session or reuse an existing one
Session IDstringID to identify/reuse the session

Session Mode

  • New Session (new): Opens a new Appium session on every execution. Ideal for isolated tests.
  • Reuse Session (reuse): Reuses a session already created by another Mobile Flow node in the same flow. Useful for splitting long automations across multiple nodes while keeping the same device connected.

Mobile Credential

The credential centralizes connection settings and device capabilities. Configure at Credentials → New Credential → Mobile.

Connection Modes

ModeDescription
LocalAppium running on the same machine (default: http://localhost:4723)
Self-hostedAppium on a custom server with URL and authentication token
SaaSCloud provider (BrowserStack, Sauce Labs, LambdaTest, or Custom)

Device Capabilities

FieldDescriptionExample
PlatformAndroid or iOSAndroid
Device NameDevice name or IDemulator-5554, Pixel 7
Platform VersionOS version13.0, 17.0
App PackageAndroid app packagecom.myapp.android
App ActivityAndroid initial activity.MainActivity
Bundle IDiOS app identifiercom.myapp.ios
App PathPath to .apk/.ipa file/path/to/app.apk
UDIDUnique device ID (real devices)R58M20XXXXX
No ResetDo not reset app between sessionstrue
Full ResetFully reset app statefalse
Automation NameAutomation driverUiAutomator2 (Android), XCUITest (iOS)
Extra CapabilitiesJSON with additional Appium capabilities{"appium:language": "en"}

Steps (Mobile Steps)

The Mobile Flow node executes a sequence of configurable steps. Each step represents an action on the device.

Available Actions

ActionDescription
tapTap an element
tap-coordsTap at absolute coordinates
typeType text into a field
clearClear a field's text
swipeSwipe on the screen
scrollScroll in a direction
waitWait for a condition or time
assertVerify a condition in the app
extractExtract text or attribute from an element
resetReset the application
backPress the Back button (Android)
homePress the Home button (Android)
key-eventSend an Android key code

Mobile Selector Strategies

StrategyDescriptionExample
idElement resource IDcom.myapp:id/login_button
accessibility_idContent description / accessibility labelLogin button
xpathXPath expression in XML hierarchy//android.widget.Button[@text="Login"]
class_nameNative class nameandroid.widget.EditText
-android uiautomatorUIAutomator2 selector (Android)new UiSelector().text("Login")
-ios predicate stringNSPredicate (iOS)type == 'XCUIElementTypeButton' AND name == 'Login'
-ios class chainiOS Class Chain**/XCUIElementTypeButton[\name == 'Login'`]`

Tip: The Mobile Inspector automatically generates selectors when you tap elements, with no need to write XPath manually.


Action Details

tap

Taps an element using selector strategies.

FieldTypeDescription
SelectorsarrayElement selector strategies
Retry AttemptsnumberNumber of attempts (default: 3)
Retry Delay (ms)numberWait between attempts (default: 500ms)

If all selector attempts fail and fallback coordinates exist (generated by the inspector), the tap will be performed at the direct coordinates.


tap-coords

Taps at absolute screen coordinates.

FieldTypeDescription
XnumberX coordinate in pixels
YnumberY coordinate in pixels

type

Types text into an input field.

FieldTypeDescription
SelectorsarrayField selector strategies
TextstringText to type (supports {{ }})
Clear FirstbooleanClear the field before typing
Retry AttemptsnumberNumber of location attempts

clear

Clears the content of an input field.

FieldTypeDescription
SelectorsarrayField selector strategies

swipe

Swipes on the screen between two points.

FieldTypeDescription
fromX / fromYnumberStart coordinates
toX / toYnumberEnd coordinates
Duration (ms)numberGesture speed (default: 350ms)
DirectionstringAlternative: up, down, left, right
PercentagenumberPercentage of the screen to swipe (with direction)

scroll

Scrolls content in a direction.

FieldTypeDescription
Directionstringup, down, left, right
SelectorsarrayContainer selector to scroll (optional)

wait

Waits for a condition before proceeding.

FieldTypeDescription
ModestringWait type
Timeout (ms)numberMaximum wait time
SelectorsarraySelectors (for elementVisible mode)

Modes:

ModeDescription
timeoutWait for a fixed time in milliseconds
elementVisibleWait for an element to appear on screen

assert

Verifies a condition in the application. If it fails, the step is marked as failed.

FieldTypeDescription
NamestringAssertion identifier (output key)
ModestringVerification type
SelectorsarrayElement selectors
Expected TextstringExpected value (text modes)
Continue on FailbooleanDo not interrupt the flow if it fails

Modes:

ModeDescription
elementExistsVerifies the element is visible on screen
textContainsVerifies the element's text contains the expected value
textEqualsVerifies the element's text exactly matches the expected value

Assertion results are available in outputs:

{{ steps["mobile-flow"].outputs.asserts.assertionName }}  →  true or false

extract

Extracts text or an attribute from an element.

FieldTypeDescription
NamestringExtraction name (output key)
SelectorsarrayElement selectors
AttributestringWhat to extract: text (default) or attribute name

Extracted data is available in outputs:

{{ steps["mobile-flow"].outputs.extracts.extractionName }}

reset

Resets the application, clearing its state (equivalent to uninstalling and reinstalling).


back

Presses the physical/virtual Back button (Android — keycode 4).


home

Presses the Home button (Android — keycode 3).


key-event

Sends an Android keycode directly to the device.

FieldTypeDescription
KeycodenumberAndroid key code (e.g.: 4 = BACK, 3 = HOME, 66 = ENTER)
CountnumberHow many times to send the event

Common keycodes:

KeycodeKey
3HOME
4BACK
66ENTER
67BACKSPACE/DEL
82MENU
84SEARCH

Evidence (Screenshots)

Each step can have individual evidence settings:

FieldTypeDescription
Take ScreenshotbooleanEnable screen capture
Modebefore / after / bothWhen to capture
Name TemplatestringCustom filename
Wait for StabilizationbooleanWait for stable screen before capturing
Stabilization Timeout (ms)numberMax time waiting for stable screen (default: 2000ms)
Delay (ms)numberAdditional time before capturing (default: 300ms)

Generated screenshots are available in the Evidence tab of the execution result. Taps and swipes are highlighted with a green visual marker over the screenshot.


Outputs

OutputTypeDescription
sessionIdstringMobile session ID for reuse in other nodes
extractsobjectData extracted by extract steps (key → value)
assertsobjectAssertion results (key → true/false)

Complete Example

Android app login

Steps configured in the node:

  1. wait → Mode: elementVisible, Selector: id=com.myapp:id/email_field (timeout: 10000ms)
  2. tap → Selector: id=com.myapp:id/email_field
  3. type → Selector: id=com.myapp:id/email_field, Text: {{ variables.USER_EMAIL }}
  4. type → Selector: id=com.myapp:id/password_field, Text: {{ variables.USER_PASSWORD }}, Clear: true
  5. tap → Selector: accessibility_id=Login
  6. wait → Mode: elementVisible, Selector: id=com.myapp:id/home_title (timeout: 15000ms)
  7. assert → Name: loginOk, Mode: elementExists, Selector: id=com.myapp:id/home_title
  8. extract → Name: welcomeText, Selector: id=com.myapp:id/welcome_message, Attribute: text

Result after execution:

{
  "sessionId": "my-android-session",
  "extracts": { "welcomeText": "Hello, John!" },
  "asserts": { "loginOk": true }
}

Reusing a Session Across Nodes

Node 1 — Mobile Flow (Login)

  • Session ID: android-session
  • Steps: login to the app

Node 2 — Mobile Flow (Check Order)

  • Session Mode: reuse
  • Session ID: android-session
  • Steps: navigate to orders, check status

Both nodes share the same device and session state.


Tips

  • Use the Mobile Inspector to record steps visually — it generates selectors automatically when you tap elements
  • In the Desktop edition, Appium starts automatically when a flow with a mobile node runs — no manual configuration needed
  • Prefer accessibility_id as the primary selector — it is more stable than XPath and works on both Android and iOS
  • Configure screenshots on critical steps to make failure identification easier
  • Use Continue on Fail in monitoring assertions to collect multiple results without interrupting the flow
  • For apps that take a long time to start, add a wait step with elementVisible before interacting
  • A custom Session ID makes it easy to reuse sessions across multiple Mobile Flow nodes in the same flow