Repository navigation
feat: add the Android class chain and predicate string locators and deprecate UiSelector - #2508
Open
mykola-mokhnach wants to merge 1 commit into
Open
mykola-mokhnach wants to merge 1 commit into
mykola-mokhnach wants to merge 1 commit into
Conversation
…eprecate UiSelector Google is going to remove UiSelector and UiScrollable from the UiAutomator framework. appium-uiautomator2-driver 10.1.0 and 10.2.0 added the class chain and predicate string strategies as the replacement. - AppiumBy.androidClassChain and AppiumBy.androidPredicateString - androidClassChain and androidPredicate of AndroidFindBy and AndroidBy - deprecate AppiumBy.androidUIAutomator, ByAndroidUIAutomator and the uiAutomator attribute of AndroidFindBy and AndroidBy Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mykola-mokhnach
requested review from
SrinivasanTarget,
saikrishna321 and
valfirst
as code owners
November 24, 2026 18:51
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change list
Google is going to remove
UiSelectorandUiScrollablefrom the UiAutomator framework, so the-android uiautomatorstrategy is going to stop working.appium-uiautomator2-driver10.1.0 and 10.2.0 added the-android class chainand-android predicate stringstrategies as the faster replacement. This PR adds them to the client and deprecates theUiSelectorones.AppiumBy.androidClassChainandAppiumBy.androidPredicateString(ByAndroidClassChain,ByAndroidPredicateString)androidClassChainandandroidPredicateattributes of@AndroidFindByand@AndroidByAppiumBy.androidUIAutomator,ByAndroidUIAutomatorand theuiAutomatorattribute of@AndroidFindByand@AndroidByare deprecated, with a pointer to the replacements and to the migration guidedocs/Advanced-By.mddescribes the new locators and marks the old one as deprecatedOverrideWidget.androidUIAutomator()is not deprecated: it names the Android platform, not the locator strategy.Types of changes
Details
Unit tests, checkstyle and javadoc pass. The locator strings and the driver side were checked on an emulator with server 11.6.0: appium/appium-uiautomator2-driver#1091