AndroidX UI Automator

Frameworks & LibrariesAI extracted

AndroidX's UI testing framework for driving system and cross-app UI on a device.

Latest 2.4.1 · by GoogleWebsiteRSS

Release activity

Release activity — 6 releases across 6 days in the last year. Each cell is one day; darker means more releases that day. Older weeks are hidden at this screen width.
AugSepOctNov
SundayNo releases on Aug 2, 2026No releases on Aug 9, 2026No releases on Aug 16, 2026No releases on Aug 23, 2026No releases on Aug 30, 2026No releases on Sep 6, 2026No releases on Sep 13, 2026No releases on Sep 20, 2026No releases on Sep 27, 2026No releases on Oct 4, 2026No releases on Oct 11, 2026No releases on Oct 18, 2026No releases on Oct 25, 2026No releases on Nov 1, 2026No releases on Nov 8, 2026No releases on Nov 15, 2026
MondayNo releases on Aug 3, 2026No releases on Aug 10, 2026No releases on Aug 17, 2026No releases on Aug 24, 2026No releases on Aug 31, 2026No releases on Sep 7, 2026No releases on Sep 14, 2026No releases on Sep 21, 2026No releases on Sep 28, 2026No releases on Oct 5, 2026No releases on Oct 12, 2026No releases on Oct 19, 2026No releases on Oct 26, 2026No releases on Nov 2, 2026No releases on Nov 9, 2026
TuesdayNo releases on Aug 4, 2026No releases on Aug 11, 2026No releases on Aug 18, 2026No releases on Aug 25, 2026No releases on Sep 1, 2026No releases on Sep 8, 2026No releases on Sep 15, 2026No releases on Sep 22, 2026No releases on Sep 29, 2026No releases on Oct 6, 2026No releases on Oct 13, 2026No releases on Oct 20, 2026No releases on Oct 27, 2026No releases on Nov 3, 2026No releases on Nov 10, 2026
WednesdayNo releases on Aug 5, 2026No releases on Aug 12, 2026No releases on Aug 19, 2026No releases on Aug 26, 2026No releases on Sep 2, 2026No releases on Sep 9, 2026No releases on Sep 16, 2026No releases on Sep 23, 2026No releases on Sep 30, 2026No releases on Oct 7, 2026No releases on Oct 14, 2026No releases on Oct 21, 2026No releases on Oct 28, 20261 release on Nov 4, 2026No releases on Nov 11, 2026
ThursdayNo releases on Aug 6, 2026No releases on Aug 13, 2026No releases on Aug 20, 2026No releases on Aug 27, 2026No releases on Sep 3, 2026No releases on Sep 10, 2026No releases on Sep 17, 2026No releases on Sep 24, 2026No releases on Oct 1, 2026No releases on Oct 8, 2026No releases on Oct 15, 2026No releases on Oct 22, 2026No releases on Oct 29, 2026No releases on Nov 5, 2026No releases on Nov 12, 2026
FridayNo releases on Aug 7, 2026No releases on Aug 14, 2026No releases on Aug 21, 2026No releases on Aug 28, 2026No releases on Sep 4, 2026No releases on Sep 11, 2026No releases on Sep 18, 2026No releases on Sep 25, 2026No releases on Oct 2, 2026No releases on Oct 9, 2026No releases on Oct 16, 2026No releases on Oct 23, 2026No releases on Oct 30, 2026No releases on Nov 6, 2026No releases on Nov 13, 2026
SaturdayNo releases on Aug 8, 2026No releases on Aug 15, 2026No releases on Aug 22, 2026No releases on Aug 29, 2026No releases on Sep 5, 2026No releases on Sep 12, 2026No releases on Sep 19, 2026No releases on Sep 26, 2026No releases on Oct 3, 2026No releases on Oct 10, 2026No releases on Oct 17, 2026No releases on Oct 24, 2026No releases on Oct 31, 2026No releases on Nov 7, 2026No releases on Nov 14, 2026

6 releases in the last year

Changelog

2.4.1

Latest
Fixed 1
  • Fixed an issue in ShellServer where random port selection could lead to port collisions and startup failures.

From AndroidX UI Automator

Fixed an issue in ShellServer where random port selection could lead to port collisions and startup failures. ( I1951b)

View originalPermalink
How 2.4.1 went

2.4.0

Added 7
  • A dedicated uiAutomator test scope for cleaner and more expressive test code
  • Methods onElement, onElements, and onElementOrNull for finding UI elements with clear predicates
  • Built-in waiting mechanism for conditional elements via onElement* methods with a timeoutMs parameter defaulting to 10000
  • Explicit app state management through waitForStable and waitForAppToBeVisible
  • Direct interaction with accessibility window nodes for multi-window testing scenarios
  • Built-in screenshot capabilities
  • ResultsReporter for visual testing and debugging
Changed 1
  • The API surface of UiAutomator has been overhauled
View originalRead the notes
How 2.4.0 went

2.4.0-beta02

Changed 1
  • UiObject2#scrollToElementOrNull has an updated return type
Fixed 1
  • UiObject2#scrollToElementOrNull no longer throws an exception and instead returns null when the element is not found
View originalRead the notes
How 2.4.0-beta02 went

2.4.0-beta01

Changed 3
  • Make state-less commands singletons.
  • Update the RecorderCommands API.
  • Simplify the RecorderCommands API to have a well defined lifecycle.
View originalRead the notes
How 2.4.0-beta01 went

2.4.0-alpha07

Changed 1
  • startActivity now waits for a new window to appear, making the launch generally synchronous and allowing future versions of Macrobenchmark to configure launch completion detection
Removed 1
  • API without an explicit package name removed from UiAutomatorTestScope
View originalRead the notes
How 2.4.0-alpha07 went

2.4.0-alpha06

Added 1
  • Added window-based APIs for improved multi-window testing, including UiDevice#findWindow, which can find a specific UiWindow according to a ByWindowSelector built with By.Window factory methods
View originalRead the notes
How 2.4.0-alpha06 went

2.4.0-alpha05

Added 1
  • Added UiObject2#waitForStable as a shortcut for UiObject2#accessibilityNodeInfo#waitForStable()
View originalRead the notes
How 2.4.0-alpha05 went

2.4.0-alpha04

Changed 1
  • Renamed onView to onElement to clarify it works with compose
Fixed 1
  • Fixed waitForStableInActiveWindow
View originalRead the notes
How 2.4.0-alpha04 went

2.4.0-alpha03

Fixed 1
  • waitForStableInActiveWindow no longer throws a NullPointerException in some cases
View originalRead the notes
How 2.4.0-alpha03 went

2.4.0-alpha02

Added 3
  • Initial shape of new Uiautomator API, with UiAutomatorTestScope created through the factory uiAutomator that gives access to the new onView APIs
  • Initial lint rules warning about usage of AccessibilityNodeInfo#getText and suggesting usage of textAsString
  • Configurator#setDefaultDisplayId to set a display ID to restrict all searches to
Changed 2
  • Searchable interface shared by UiDevice and UiObject2 made public for convenience
  • UiDevice#getWindowRoots always returns roots in Z order
Fixed 3
  • Handling of meta keys in UiDevice#pressKeyCodes
  • Issue where certain gestures were incomplete
  • Rare infinite loop when calling UiDevice#scrollUntil
View originalRead the notes
How 2.4.0-alpha02 went

2.4.0-alpha01

Changed 4
  • The delay between UiObject2 motion events is updated to account for dynamic refresh rates such as Smooth Display
  • The accessibility cache is periodically invalidated to reduce flakiness from accessibility node staleness on certain UIs
  • UiWatcher performance is improved by skipping unnecessary waitForIdle calls
  • Javadoc inaccuracies are fixed, especially to clarify when each Configurator parameter is used
Fixed 1
  • StaleObjectException no longer occurs when calling toString or hashCode on a stale UiObject2
Deprecated 1
  • Configurator#getKeyInjectionDelay and setKeyInjectionDelay are deprecated because the parameter is unused now that text is always injected directly rather than by key presses
View originalRead the notes
How 2.4.0-alpha01 went

2.3.0

Added 7
  • Support for finding and operating on objects across multiple displays
  • UiDevice methods to manage secondary displays
  • By.displayId to select objects by their display ID
  • By.hasParent and By.hasAncestor to select objects according to their parents
  • By.hint methods to select objects by their hint text
  • Condition interface to support custom wait conditions
  • UiDevice#wait, UiObject2#wait, and UiObject2#scrollUntil methods
Changed 2
  • MotionEvent injection updated to improve accuracy
  • Gesture emulation improved to better emulate user gestures
Fixed 5
  • Display size calculations that were occasionally incorrect and might ignore portions of the screen
  • Reliability of scrolls improved
  • Reliability of rotations improved
  • Reliability of long clicks improved
  • Reliability of pinches improved
View originalRead the notes
How 2.3.0 went

2.3.0-rc01

androidx.test.uiautomator:uiautomator:2.3.0-rc01 is released with no changes. Version 2.3.0-rc01 contains these commits.

View originalRead the notes
How 2.3.0-rc01 went

2.3.0-beta01

Changed 2
  • Renamed the UiObject2 percentage-based margin methods to setGestureMarginPercentage and setGestureMarginsPercentage for consistency
  • Improved the error thrown when a secondary display is not found or not accessible
View originalRead the notes
How 2.3.0-beta01 went

2.3.0-alpha05

Added 4
  • Added UiObject2#getDrawingOrder to expose drawing order (z-index) information.
  • Added UiDevice methods to get, set, freeze, and unfreeze the rotation of secondary displays.
  • Added retry to UiObject2#scrollUntil when the end of scrolling could not be detected.
  • Added warning when performing clicks or scrolls on non-clickable or non-scrollable objects.
Changed 1
  • Reduced the default UiObject2 scroll speed to improve reliability.
Fixed 2
  • Fixed issue where UiDevice would use a stale Instrumentation instance if it was recreated.
  • Fixed possible NullPointerException if the display ID cannot be determined when dumping nodes.
View originalRead the notes
How 2.3.0-alpha05 went

2.3.0-alpha04

Added 7
  • Added By.hasParent and By.hasAncestor to support finding objects according to their parents
  • Added UiObject2#getHint to retrieve an object's hint text, and By.hint methods to select objects according to their hint text
  • Added By.displayId to support selecting objects according to the display they are on
  • Added UiDevice#getDisplayHeight(int) and UiDevice#getDisplayWidth(int) methods to find the dimensions of a display by its ID
  • Re-added wait(SearchCondition, long) and wait(UiObject2Condition, long) methods for backwards compatibility
  • Added tracing to resource heavy methods to identify performance bottlenecks
  • Added a retry mechanism when initiating a UiAutomation connection
Changed 2
  • Changed UiDevice#executeShellCommand to public but discouraged instead of hidden
  • Updated MotionEvent injection to reduce flakiness by prioritizing gesture accuracy over speed
Fixed 2
  • Fixed a possible NPE from null nodes in UiDevice#dumpWindowHierarchy
  • Fixed unexpected errors from querying or operating on private displays
View originalRead the notes
How 2.3.0-alpha04 went

2.3.0-alpha03

Added 4
  • Exposed a Condition interface to allow custom wait conditions instead of relying solely on the built-ins in Until
  • Added UiObject2#scrollUntil to support scrolling until a condition is met and to reach parity with UiScrollable
  • Added UiDevice#setOrientationPortrait and setOrientationLandscape to facilitate rotations across device types
  • Added UiObject2#setGestureMarginPercent to support setting margins relative to the object size
Changed 1
  • Updated UiDevice#wait and UiObject2#wait methods to accept the Condition interface
View originalRead the notes
How 2.3.0-alpha03 went

2.3.0-alpha02

Added 3
  • Added UiDevice#pressKeyCodes to support pressing multiple keys simultaneously, such as POWER and VOLUME_DOWN to take a screenshot
  • Added UiDevice#setCompressedLayoutHierarchy to fix a typo in the method name
  • Added support for multiline text and description matching
Changed 2
  • Reworked logging throughout the library to provide more information, warn about possible issues, and improve consistency
  • Updated delay between UiObject2 MotionEvents to twice the display refresh rate to better emulate user gestures
Fixed 6
  • Fixed StaleObjectExceptions occasionally being thrown while querying or waiting for objects
  • Fixed the return values of UiScrollable#scrollToBeginning, scrollToEnd, flingToBeginning, and flingToEnd not denoting whether the beginning or end was reached
  • Fixed UiScrollable#scrollForward and scrollBackward methods ignoring the configured timeout
  • Fixed the BySelector copy constructor not handling depth selectors
  • Fixed the handling of invalid percent values in UiObject#pinchIn and pinchOut
  • Fixed a rare issue where multi-window support was lost if the underlying UiAutomation connection was reset
Deprecated 2
  • Deprecated UiDevice#setCompressedLayoutHeirarchy in favor of UiDevice#setCompressedLayoutHierarchy
  • Marked UiAutomatorInstrumentationTestRunner as deprecated as it handles deprecated UiAutomatorTestCases and is no longer necessary
View originalRead the notes
How 2.3.0-alpha02 went

2.3.0-alpha01

Added 2
  • Added UiObject2#getDisplayId and support for finding and managing objects across multiple displays.
  • Added UiObject#click and UiObject2#clickAndWait methods for clicking on a point using its coordinates.
Changed 4
  • Annotated the nullness of all public methods.
  • Switched MotionEvent injection to asynchronous with a short delay for smoother UiObject2 gestures.
  • Reduced the polling interval while waiting from 1000ms to 100ms.
  • Updated UiDevice#wakeUp and UiDevice#sleep to use KEYCODE_WAKEUP and KEYCODE_SLEEP to support devices that override the power button.
Fixed 4
  • Fixed an issue where display size calculations were occasionally incorrect and might ignore portions of the screen, especially in multi-window mode.
  • Fixed the scaling of screenshots in UiDevice#takeScreenshot.
  • Improved the reliability of Until.scrollFinished and UiObject2#scroll.
  • Fixed strict mode IncorrectContextUseViolation warnings.
View originalRead the notes
How 2.3.0-alpha01 went
View all

Discussion