Skip to content

Enums

The options calls take: match modes, directions, rotations, permission choices, accessibility actions and stability signals.

MatchMode

Bases: Enum

How a text property is compared with a selector's value.

EXACT

EXACT

The whole value equals the text.

CONTAINS

CONTAINS

STARTS_WITH

STARTS_WITH

ENDS_WITH

ENDS_WITH

REGEX

REGEX

The text fully matches the value as an RE2 regular expression.

Direction

Bases: Enum

Gesture direction: where the finger moves for swipe, the content edge scrolled towards for scroll (DOWN reveals content below).

UP

UP

DOWN

DOWN

LEFT

LEFT

RIGHT

RIGHT

Orientation

Bases: Enum

Display geometry: portrait is at least as tall as it is wide, whatever the device's natural orientation (Device.set_orientation, DeviceInfo.orientation).

PORTRAIT

PORTRAIT

LANDSCAPE

LANDSCAPE

DisplayRotation

Bases: Enum

Display rotation relative to the device's natural orientation, named like AndroidX UiDevice: LEFT is Surface.ROTATION_90, UPSIDE_DOWN 180, RIGHT 270.

NATURAL

NATURAL

LEFT

LEFT

UPSIDE_DOWN

UPSIDE_DOWN

RIGHT

RIGHT

PermissionChoice

Bases: Enum

A button of Android's runtime-permission dialog. Which ones a dialog offers depends on the permission, the Android version and whether it was asked before (Device.await_permission_prompt).

ALLOW

ALLOW

"Allow" (API 29 and older, and permissions without a foreground/one-time split).

ALLOW_FOREGROUND_ONLY

ALLOW_FOREGROUND_ONLY

"While using the app".

ALLOW_ONE_TIME

ALLOW_ONE_TIME

"Only this time" (API 30+).

ALLOW_ALWAYS

ALLOW_ALWAYS

"Allow all the time" (background location on API 29).

ALLOW_SELECTED

ALLOW_SELECTED

"Select photos and videos" (API 34+ partial media access).

ALLOW_ALL

ALLOW_ALL

"Allow all" (API 34+ media access).

DENY

DENY

"Deny" / "Don't allow".

DENY_AND_DONT_ASK_AGAIN

DENY_AND_DONT_ASK_AGAIN

"Deny & don't ask again" (API 29/30 on a repeated request).

KEEP_FOREGROUND_ONLY

KEEP_FOREGROUND_ONLY

"Keep while using the app" when an upgrade to background access is offered.

KEEP_ONE_TIME

KEEP_ONE_TIME

"Keep only this time" when an upgrade is offered.

LocationAccuracy

Bases: Enum

The Precise / Approximate choice of the location permission dialog (API 31+).

PRECISE

PRECISE

APPROXIMATE

APPROXIMATE

StandardAction

Bases: Enum

A standard accessibility action that takes no arguments, as a screen reader performs it (Element.perform_action). Click and long click are not here: tap / long_tap touch the screen. PAGE_* need API 29+, PRESS_AND_HOLD API 30+.

EXPAND

EXPAND

COLLAPSE

COLLAPSE

DISMISS

DISMISS

SCROLL_FORWARD

SCROLL_FORWARD

SCROLL_BACKWARD

SCROLL_BACKWARD

SCROLL_UP

SCROLL_UP

SCROLL_DOWN

SCROLL_DOWN

SCROLL_LEFT

SCROLL_LEFT

SCROLL_RIGHT

SCROLL_RIGHT

PAGE_UP

PAGE_UP

PAGE_DOWN

PAGE_DOWN

PAGE_LEFT

PAGE_LEFT

PAGE_RIGHT

PAGE_RIGHT

SHOW_ON_SCREEN

SHOW_ON_SCREEN

CONTEXT_CLICK

CONTEXT_CLICK

PRESS_AND_HOLD

PRESS_AND_HOLD

SELECT

SELECT

CLEAR_SELECTION

CLEAR_SELECTION

FOCUS

FOCUS

Input focus.

CLEAR_FOCUS

CLEAR_FOCUS

COPY

COPY

CUT

CUT

PASTE

PASTE

StabilitySignal

Bases: Enum

What App.await_screen_stable watches: the accessibility tree, the window pixels (0.5 % tolerance) or both.

TREE

TREE

PIXELS

PIXELS

ALL

ALL