Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Oct 08:44
· 1 commit to main since this release
8dc93ff
uses: github.com/mozership/probe-android@bd855d4c4c0a62c662f7e059e4ff5b0586c63732 # v0.2.0

Highlights

  • type types any text (#1). input text types printable ASCII alone, so type refused Japanese and other text before the step ran. Such text, and %s, which input text reads as a space, now go through ADBKeyBoard, an input method that types the text adb sends it, when the device has it. ASCII still goes through input text, which needs nothing installed.
- name: type
  selector: id=ssid
  value: 日本語
  • ADBKeyBoard has to be installed on the device: adb install keyboardservice-debug.apk, from its releases. It needs no setting up beyond that. A step that types such text makes it the input method before its first action, enabling it when it is not, and puts the input method back as it was once the step is over, also when the step fails or its timeout runs out.
  • ADBKeyBoard drops text it is sent before it is bound to the focused element, and says nothing. The action reads the screen until the focused element has the text, and sends it again when it does not; the text is committed whole or not at all, so it is not typed twice. When it never shows, the step fails with the element that had the focus:
actions[5] type: the step's timeout ran out: ADBKeyBoard did not type "日本語": EditText id=com.android.settings:id/ssid text="Wi-Fi" [20,230][256,278] focused had the focus

Changed behavior

  • A step whose type has text other than printable ASCII used to be refused before it ran. It now runs on a device with ADBKeyBoard, and fails before its first action on one without, with where to get it:
actions[2] type: input text types printable ASCII alone, so "日本語" needs ADBKeyBoard: ADBKeyBoard is not installed: download keyboardservice-debug.apk from https://github.com/senzhk/ADBKeyBoard/releases and install it with adb install, and the action switches to it to type such text
  • tree marks the element that has the focus with focused.

Known limitation

Reading the screen with uiautomator dump, as each action on an element does, hides the soft keyboard. An element keeps the focus, and type types into it all the same, but an app that acts on the keyboard going cannot be driven past it: the search of Settings closes.

Testing

  • The e2e installs ADBKeyBoard v2.5-dev, checked against the digest GitHub lists for it, types Wi-Fi and then 日本語 into the name of a network to add in Settings on an Android 15 emulator, and checks the input method is put back.
  • When the e2e fails, the CI keeps the screen it was left on, as uiautomator reads it and as a screenshot.

See the README.

Changelog

  • 1fb26f2 Debug: print the tree of the search
  • ca38b94 Keep the screen the e2e failed on
  • 8dc93ff Merge pull request #1 from mozership/feat/adbkeyboard
  • b61457c Point action.yml at v0.1.0
  • a84d496 Revert "Debug: print the tree of the search"
  • f4c38e9 Say which element had the focus when ADBKeyBoard did not type
  • 4c27023 Switch to ADBKeyBoard before the first action of the step
  • cc5e8e4 Type into the name of a network to add in the e2e
  • c5bfc4b Type text input text cannot with ADBKeyBoard