UiObject
UiObject is a class in the Android UIAutomator framework that encapsulates a single UI element on the device screen. It is identified by a UiSelector, which specifies attributes such as resource-id, text, className, or description. UiObject enables automated tests to interact with UI controls across apps and system UI.
The class provides a range of interactions and queries. Typical methods include click() and longClick(), as well
Finding and using a UiObject usually involves constructing a UiSelector with the desired attributes and then
Limitations of UiObject include its association with UiAutomator v1, which can be brittle as UI layouts evolve
Alternatives and successors include UiObject2, part of the newer AndroidX Testing UiAutomator API, which offers a
See also: Android UIAutomator, UiSelector, UiDevice, UiObject2, Android Testing Support Library.