appium / appium/java-client

Custom FindBy annotations

Open
#1,043 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Is it possible to create custom FindBy annotations for simplifying complex uiAutomator locators?

An Example would be:

@CustomFindBy(scrollingResourceId = "com.test:id/buttonNotInView") private WebElement button;

instead of:

@AndroidFindBy(uiAutomator = "new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().resourceId(\"com.test:id/buttonNotInView\"));") private WebElement button;

In Selenium it is possible by extending the AbstractFindByBuilder and specify it in the @PageFactoryFinder annotation but this doesn't work in appium. Is there also such a feature included or must i implement a complete new FieldDecorator?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AndroidFindBy annotation, AbstractFindByBuilder, PageFactoryFinder, and FieldDecorator references in the issue. Determine whether custom FindBy annotations are supported by the Appium page factory; done would be a documented supported approach or a clearly scoped implementation decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.