Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#122 Fix #126

Merged
merged 2 commits into from
Oct 13, 2014
Merged

#122 Fix #126

merged 2 commits into from
Oct 13, 2014

Conversation

TikhomirovSergey
Copy link
Contributor

@AndroidFindAll and @iOSFindAll have been added.

So if the same app for the same platform has almost similar screens (there could be minor differences) it doesn't need to implement page/screen objects for each situation. It can be implemented once!

@AndroidFindAll({@AndroidFindBy(locator1), @AndroidFindBy(locator2)}) //element will be found by any
WebElement someElement; //of declared locators
@AndroidFindAll({@AndroidFindBy(locator1), @AndroidFindBy(locator2)}) //it creates an element collection
List<WebElement> someElements; //using all declared locators

or

@iOSFindAll({@iOSFindBy(locator1), @iOSFindBy(locator2)}) //element will be found by any
WebElement someElement; //of declared locators
@AndroidFindAll({@iOSFindBy(locator1), @iOSFindBy(locator2)}) //it creates an element collection
List<WebElement> someElements; //using all declared locators

All declared locators will be checked at the time frame (not the same time for each locator, one waiting duration for all locators at one time). So there shouldn't be performance issues.

There is one more bonus.
(1)

//there is no annotation
WebElement someElementId; //this element will be found by id or name which equal "someElementId"

(2)

//there is no annotation
List<WebElement> someElementId; //it is supposed that elements will be found by id or name which equal "someElementId"

Actially (1) works and (2) will be reason of NullPointerException if common Selenium tools are used (DefaultFieldDecorator). With AppiumFieldDecorator both use cases are fine.

@Jonahss
Copy link
Member

Jonahss commented Oct 13, 2014

nice!

Jonahss added a commit that referenced this pull request Oct 13, 2014
@Jonahss Jonahss merged commit 10eba88 into appium:master Oct 13, 2014
@Jonahss
Copy link
Member

Jonahss commented Oct 13, 2014

Should we do a release?

@TikhomirovSergey
Copy link
Contributor Author

Ok! If you are sure that there is enough modifications for a new release, let produce 2.1 (or 2.0.1) :)
I think it is enough.

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.

2 participants