Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the four added Android locator strategies.
No open issues 🎉
What changed in this PR
Adds four Android locator strategies to the Appium .NET client, addressing #1187 with new MobileBy factories for UiAutomator2 and Espresso.
Changes:
- Adds predicate-string and class-chain locators for UiAutomator2, plus text and view-tag locators for Espresso.
- Documents driver requirements and minimum UiAutomator2 versions.
- Adds tests verifying strategy names and selector values for both
FindElementandFindElements.
| File | Description |
|---|---|
test/integration/Common/MobileByFactoryTest.cs |
Tests forwarding of all four locator strategies and selector values. |
src/Appium.Net/Appium/MobileBy.cs |
Adds documented factories and locator classes. |
src/Appium.Net/Appium/Enums/MobileSelector.cs |
Defines the four locator strategy strings. |
Review effort: Balanced
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.
PR title
feat(android): add UiAutomator2 and Espresso locator strategies
Related issue
Closes #1187
List of changes
MobileBy.AndroidPredicateStringandMobileBy.AndroidClassChainfor UiAutomator2.MobileBy.AndroidTextandMobileBy.AndroidViewTagfor Espresso.FindElementandFindElementsfor all four locators.Types of changes
Tests
The Release build passed for all target frameworks. All 92 tests in the device-free .NET 8 CI filter passed on macOS, including the four new cases in
Tests.Common. The build reported an existing platform warning in the iOS clipboard test. Windows .NET Framework tests and Android device tests were not run locally.Documentation
The new public factories include XML documentation identifying the driver and, for UiAutomator2, the minimum supported version. The driver references document selector syntax. UiAutomator2 locators · Espresso locators
Details
For example, a UiAutomator2 session can find a button by predicate on driver version 10.2.0 or later.