Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 07:24
· 10 commits to main since this release
42036ca
uses: github.com/mozership/probe-android@b61457c71c3d04b825d7fa89cf4183679e281fed # v0.1.0

Highlights

  • The first release of the android action. It drives an app on an Android emulator or device: it launches the app, taps and types into it, presses back, waits for elements, reads their text and the screen, and takes screenshots.
  • It works through adb alone. It reads the screen with uiautomator dump and acts on it with input, so there is nothing to build, and nothing to install on the device but the app under test.
  • Its with and its result have the shape of probe-ios's, with selectors on what Android knows of an element: id, text, desc, class and index.

A step

actions:
  android: github.com/mozership/probe-android@b61457c71c3d04b825d7fa89cf4183679e281fed # v0.1.0

jobs:
- name: Settings
  steps:
  - name: Open Network & internet
    uses: android
    with:
      app: com.android.settings
      actions:
      - name: launch
      - name: tap
        selector: text="Network & internet"
      - name: wait
        selector: text="Airplane mode"
      - name: text
        id: airplane
        selector: text="Airplane mode"
    test: res.code == 0 && res.results.airplane == "Airplane mode"

An action on an element reads the screen again until the element is on it, for what is left of the step's timeout, and fails the step with the reason when it does not come:

actions[0] tap: no element matches text="No Such Row" within 5.0s

tree lists the screen an element a line, with what a selector can name:

TextView id=android:id/title text="Network & internet" [200,540][700,600]

Requirements

  • adb, on PATH or in $ANDROID_HOME/platform-tools, and a booted emulator or a device with USB debugging on, with the app installed. The action boots nothing and installs nothing.
  • type types printable ASCII alone, as input text does; other text is refused before the step runs.
  • The e2e runs it through Probe v1.30.0 on an Android 15 (API 35) emulator on Ubuntu, with android-emulator-runner.

See the README.

Changelog

  • 42036ca Drive an Android emulator or device from a Probe workflow, as an action of its own