Skip to content

AndroidFindBy View Tag Support #1269

Description

@iChip

I'd like to use the @AndroidFindBy annotation for finding elements by view tag on Android, I am specifying a test ID through this attribute as we cannot use resource ids for targeting views when using React Native.

It does not seem like @AndroidFindBy currently supports this. I see MobileBy.ByAndroidViewTag, but I believe this cannot be used with the page object model to initially locate elements.

Is the only workaround an xpath selector (which I believe requires knowing the tag name in advance in addition to the view tag)?
e.g. driver.findElementByXPath("//android.widget.TextView[@view-tag='some-tag']"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions