AndroidFindBy View Tag Support
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
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']"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with @AndroidFindBy and MobileBy.ByAndroidViewTag, then trace how AndroidFindBy locates elements through the page object model. Check the existing annotation behavior and related tests, if present, to determine how view-tag lookup should be exposed. Done means page objects can locate Android views by tag without requiring an XPath workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100