Skip to content

Screen

device.screen: elements of any app or the system UI. Guide: App or screen.

Screen

Whatever is visible on a device: every window, of any app or the system UI.

device.screen adds no package predicate, so a selector matches in any window: a permission dialog, the notification shade, a second app. Use device.app(package_name) when the node must belong to one app.

A node another window (the keyboard, a dialog) covers completely is not found; a gesture on a node it covers partly, with the touch point underneath, fails with CommandError NOT_INTERACTABLE / OBSCURED before any input.

Example::

device.screen.wait(text("Allow")).visible()
device.screen.element(text("Allow")).tap()

Methods:

Name Description
element

A lazy element: selector as is, matched in every visible window. Nothing is

wait

A wait on selector in every visible window; timeout (seconds) defaults to

device

device

element

element(selector: Selector) -> Element

A lazy element: selector as is, matched in every visible window. Nothing is looked up until an action or query runs.

wait

wait(selector: Selector, timeout: float | None = None) -> ElementWait

A wait on selector in every visible window; timeout (seconds) defaults to device.timeouts.wait.