Skip to content

feat(pagefactory): add viewTag support to @AndroidFindBy - #2443

Open
seethinajayadileep wants to merge 1 commit into
appium:masterfrom
seethinajayadileep:fix/androidfindby-viewtag
Open

feat(pagefactory): add viewTag support to @AndroidFindBy#2443
seethinajayadileep wants to merge 1 commit into
appium:masterfrom
seethinajayadileep:fix/androidfindby-viewtag

Conversation

@seethinajayadileep

Copy link
Copy Markdown
Contributor

Summary

Adds @AndroidFindBy(viewTag = "...") (and the matching @AndroidBy attribute) so Page Object fields can use the existing AppiumBy.androidViewTag strategy without falling back to XPath.

Changes

  • Add viewTag attribute to AndroidFindBy and AndroidBy
  • Wire Strategies.BY_VIEW_TAG to AppiumBy.androidViewTag
  • Unit test that PageFactory builds the expected locator

Fixes #1269

Test plan

  • ./gradlew test --tests io.appium.java_client.pagefactory_tests.AndroidViewTagFindByTest

Allow Page Object fields to use @AndroidFindBy(viewTag = "...") which
maps to AppiumBy.androidViewTag for React Native testID-style locators.

Signed-off-by: JAYA DILEEP <seethinajayadileep@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AndroidFindBy View Tag Support

1 participant