AWS Builder Center
Mobile Testing in Plain English with Nova Act and Device Farm

Mobile Testing in Plain English with Nova Act and Device Farm

Write mobile tests in plain English and run them on real Android and iOS devices — no selectors, no maintenance. Get started in 10 minutes.

Co-authored with Shyam Soundar 

The Problem: Fragile Mobile Tests

Mobile test automation breaks constantly. XPath selectors, element IDs, and accessibility labels change every time a developer renames a button or the OS pushes an update. Industry data shows teams spend 60–80% of QA time maintaining tests rather than writing new ones.
Amazon Nova Act eliminates this maintenance burden. You write test instructions in plain English. Nova Act's visual AI reads the screen like a human tester and executes your commands on real devices through AWS Device Farm.
This post walks you through your first Android and iOS test—from clone to execution in under 10 minutes.

How It Works

1
Your Python code → Nova Act (visual AI) → Appium → Device Farm (real device)
  1. Your code calls nova.act("Tap on Battery")
  2. Nova Act screenshots the device screen
  3. The visual AI model identifies the target element
  4. Nova Act returns precise (x, y) tap coordinates
  5. Appium executes the action on the real device
Nova Act sees the screen visually and translates natural language into precise actions. No XPath. No element IDs. No accessibility tree parsing.
The NovaActMobile library that orchestrates this flow comes from the amazon-agi-labs/nova-act-samples  Mobile Actuator. Our repository vendors it with adjusted imports for standalone use.

Prerequisites

  • Python 3.11+
  • AWS credentials with Device Farm access in us-west-2
  • A Nova Act Workflow Definition or API Key

Setup (5 Minutes)

1
2
3
4
5
6
7
git clone https://github.com/srcsakthivel/getting-started-device-farm-with-nova-act.git
cd getting-started-device-farm-with-nova-act

pip install -r requirements.txt

cp .env.example .env
# Add your workflow definition name and device ARN

Choose Your Auth Method

MethodConfigurationBest for
Workflow Definition (recommended)Set NOVA_ACT_WORKFLOW_DEFINITION_NAME in .envProduction, CI/CD, team usage
API Keyexport NOVA_ACT_API_KEY=...Local development
Workflow Definitions log executions to S3 and enable team-level visibility.

Android: Your First Test

Start with pre-installed apps. No APK upload required:
1
2
3
4
5
6
7
8
9
10
11
12
13
# src/android_getting_started.py

@workflow(workflow_definition_name=WORKFLOW_DEFINITION_NAME, model_id="nova-act-latest")
def main() -> None:
with NovaActMobile(
app_package="com.android.settings",
app_activity=".Settings",
device_arn=DEFAULT_DEVICE_ARN,
) as nova:
nova.act("Verify the Settings page is visible")
nova.act("Tap on 'Battery'")
nova.act("Press the back button to return to Settings")
nova.act("Tap on 'Display'")
Run it:
1
2
cd src/
python android_getting_started.py
NovaActMobile handles the full lifecycle: creates a Device Farm session, connects Appium, launches your app, and cleans up on exit. This library originates from the amazon-agi-labs/nova-act-samples  Mobile Actuator — our repository vendors it with adjusted imports for standalone use.

iOS: Same Pattern, One Change

Replace app_package with bundle_id:
1
2
3
4
5
6
7
8
9
# src/ios_getting_started.py

@workflow(workflow_definition_name=WORKFLOW_DEFINITION_NAME, model_id="nova-act-latest")
def main() -> None:
with NovaActMobile(bundle_id="com.apple.Preferences") as nova:
nova.act("Verify the Settings page is visible")
nova.act("Tap on 'Battery'")
nova.act("Press the back button to return to Settings")
nova.act("Tap on 'Display & Brightness'")
Omit device_arn and NovaActMobile auto-discovers the newest available iOS device.

Traditional Appium vs Nova Act

The same "navigate to Battery" action in both approaches:
Traditional Appium: 15+ lines, breaks across devices
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
selectors = [
("xpath", '//*[@text="Battery"]'),
("xpath", '//*[contains(@text, "Battery")]'),
("-android uiautomator",
'new UiScrollable(new UiSelector().scrollable(true))'
'.scrollTextIntoView("Battery")'),
]
for by, selector in selectors:
try:
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((by, selector))
)
element.click()
break
except Exception:
continue
# Breaks on Samsung ("Battery and device care")
# Breaks on Xiaomi ("Battery & performance")
Nova Act: 1 line, works everywhere
1
2
nova.act("Tap on 'Battery'")
# Works on Pixel, Samsung, Xiaomi — any device, any OS version
One line replaces 15+ lines of selector code that breaks on every UI change.

Cost

ComponentPrice
AWS Device Farm$0.17/device minute (1,000 free minutes in Free Tier)
Amazon Nova Act$4.75 per agent hour (pricing )
This tutorial run~$0.85 (3 min device time + ~3 min agent time)

Next Steps

In Part 2 , you upload and test a custom app with login flows, alert handling, and fixture verification—all in plain English.

Resources


Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article