Skip to content

Commit bb889e9

Browse files
docs: Add a warning about -android uiautomator deprecation (#813)
1 parent a4acae8 commit bb889e9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@ className | This strategy is mapped to the native UiAutomator's `By.clazz` [loca
236236
-android uiautomator | This strategy is mapped to the native UiAutomator's `UiSelector` [locator](https://developer.android.com/reference/androidx/test/uiautomator/UiSelector)). It is even possible to perform some advanced operations, like scrolling, with this locator type. Check [Guide on UiAutomator Locator Types](docs/uiautomator-uiselector.md) | `⭐⭐⭐⭐` | new UiScrollable(new UiSelector().resourceId(\"android:id/list\")).scrollIntoView(new UiSelector().text(\"Radio Group\"))
237237
xpath | For elements lookup Xpath strategy the driver uses the same XML tree that is generated by page source API. Only Xpath 1.0 is supported for appium-uiatomator2-server versions below 4.25.0. All server versions starting from 4.25.0 support both Xpath 1.0 and 2.0 | `⭐⭐⭐` | By.xpath("//android.view.View[@text=\"Regular\" and @checkable=\"true\"]")
238238

239+
> [!WARNING]
240+
> Google is going to [deprecate](https://developer.android.com/training/testing/other-components/ui-automator#ui-automator)
241+
> and remove `UiCollection`, `UiObject`, `UiScrollable`, and `UiSelector` support from the UiAutomator framework.
242+
> This will render all `-android uiautomator`-based locators invalid, so please keep it in mind while
243+
> using them or plan to use them in the future.
244+
239245

240246
## Parallel Tests
241247

@@ -1840,8 +1846,8 @@ This exception happens due to a known bug in the [Eclipse's Psychopath](https://
18401846

18411847
The UiAutomator2 driver provides multiple options for touch gestures automation.
18421848
For simple gestures, like swipe, scroll, drag, double click, fling or pinch use the corresponding
1843-
[gesture shortcuts](#mobile-gesture-commands).
1844-
You may also use [UiScrollable-based UiAutomator locators](./docs/uiautomator-uiselector.md)
1849+
[gesture shortcuts](#mobile-gesture-commands).
1850+
You may also use [UiScrollable-based UiAutomator locators](./docs/uiautomator-uiselector.md)
18451851
to automate various scrolling behaviours.
18461852
For more sophisticated gestures
18471853
consider using [W3C actions](https://w3c.github.io/webdriver/#actions).

0 commit comments

Comments
 (0)