Skip to content
robotframework-maestrolibrary

Name every
tap.

Robot Framework keywords for mobile apps, driven by Maestro. The AppiumLibrary names, arguments and locators you know, with no Appium server and no capabilities.

Record a test on a live device

settings_search.yaml

  1. appId: com.android.settings
  2. ---
  3. - launchApp
  4. - assertVisible: "Search Settings"
  5. - inputText: "wifi"
  6. - hideKeyboard

settings_search.robot

  1. *** Settings ***
  2. Library MaestroLibrary
  3. *** Test Cases ***
  4. Settings Search
  5. Open Application com.android.settings
  6. Wait Until Page Contains Element text\=Search Settings
  7. Input Text Into Current Element wifi
  8. Hide Keyboard
$ python -m MaestroLibrary.flow2robot settings_search.yaml > settings_search.robot

Keywords you already know. Tests you write by tapping.

How the keywords in MaestroLibrary 1.0.2 line up with AppiumLibrary 3.2.1, listed with Robot Framework's libdoc.

these keywordsthe whole librarykeyword count

Same name as in AppiumLibrary

74%
53
72 in MaestroLibrary

Same name and argument names

64%
46
72 in MaestroLibrary

Added by Maestro

26%
19
72 in MaestroLibrary

AppiumLibrary keywords that carry over

48%
53
110 in AppiumLibrary

What isn't ported, and what behaves differently, is in the README.

FeatureWhat you get
AppiumLibrary names, no AppiumClick Text, Input Text, the five Wait Until keywords, Swipe, Capture Page Screenshot and more. Maestro waits for the UI on every action, so there are no sleeps.
Tap a phone, get a Robot testA window shows the device live. Every action runs on it while the matching Robot line is recorded, with a locator and how many elements it matches.
YAML to Robot, and backConvert a Maestro flow to a Robot test with flow2robot, or set record_flows=True and every command a test sends is written to a flow file.
More than Appium hadRun Flow, app permissions, Set Dark Mode, Set Airplane Mode, Add Media, Screenshot Should Match, and Travel for moving the location.
Logs and mirroringOn Android, every test's logcat is saved to its own file and linked in the log. Optional scrcpy mirroring shows the device while a suite runs.
Six locators that worktext=, accessibility_id=, id=, regex=, id_regex= and point=. Anything else fails with a clear message.

Pick an element. Get its locator. Tap it. It writes the line.

Studio, on a live device

In StudioDoes
Inspectshows each locator with how many elements it matches
Actruns your taps on the device and records them as Robot steps
No unique locatorrecords the tap with a note to ask for a test id

Install Studio

pip install "robotframework-maestrolibrary[studio]"
python -m MaestroLibrary.studio --app com.android.vending

Windows, Linux and macOS builds: releases (unsigned).

Studio inspecting the Display and touch row on an Android emulator: the element tree, and the suggested locator text=Display and touch marked unique
Inspect: the Display & touch row, with its locators. id=android:id/title matches 10 elements; text=Display & touch is unique.
Studio after two taps: the Dark theme screen is open and the recorded test lists Open Application, Click Element text=Display and touch, and a Click Element by point with a GAP note
Act: two taps later the recorded test has three lines. The last one has no unique locator, so Studio adds a note to ask for a test id.

What you need, and where it runs.

You need

  • Python 3.12 or newer
  • Maestro CLI and Java 17+
  • An Android emulator or device
  • adb on PATH
  • scrcpy, optional

Works with

  • Android emulators and devices
  • iOS simulators on a Mac
  • Flutter, Compose, React Native
  • Windows, Linux and macOS

Learn more

Every keyword, import argument and platform note is in the README, and the full list of changes is in the changelog.