Merged
Conversation
Change log: - MobileElement has become abstract. It implements FindsByAccessibilityId - AndroidElement and IOSElement have been created. - AndroidElement implements FindsByAndroidAutomator. - IOSElement implements FindsByIosAutomation. - Both AppiumDriver and MobileElement implement ScrollsTo. Yeah! MobileElement is scrollable too! - PageFactory facilities are synchronized with changes above.
Author
|
About page factory: WebElement can be instantiated by these ways: @FindBy(someStrategy) //for browser or Html UI
@AndroidFindBy(someStrategy) //for Android UI of the same application. Strategies are:
//uiAutomator, accessibility, id, name, className, tagName, xpath
//@AndroidFindBys({@AndroidFindBy(someStrategy1), @AndroidFindBy(someStrategy2)}) is for chained search
@iOSFindBy(someStrategy) //for iOS UI of the same application. Strategies are:
//uiAutomator, accessibility, id, name, className, tagName, xpath
//iOSFindBys({@iOSFindBy(someStrategy1), @iOSFindBy(someStrategy2)}) is for chained search
WebElement someElement;or @FindBy(someStrategy)
@AndroidFindBy(someStrategy)
@iOSFindBy(someStrategy)
RemoteWebElement someElement;or @AndroidFindBy(someStrategy)
@iOSFindBy(someStrategy)
MobileElement someElement;If it needs to work especially only with Android or iOS so are possible following use cases: @AndroidFindBy(someStrategy)
//or
@FindBy(someStrategy)
AbdroidElement someElement;or @iOSFindBy(someStrategy)
//or
@FindBy(someStrategy)
IOSElement someElement;These use cases are allowable by this decorator: PageFactory.initElements(new AppiumFieldDecorator(driver),
pageObject //an instance of PageObject.class
);or PageFactory.initElements(new AppiumFieldDecorator(driver,
15, //default implicit waiting timeout for all strategies
TimeUnit.SECONDS),
pageObject //an instance of PageObject.class
); |
Owner
|
Awesome work. So, now that But the Android methods don't work like that. Being able to scroll from a context was too complicated to implement right away. Do you think we can remove them there just so it's less confusing? |
Jonahss
added a commit
that referenced
this pull request
Sep 26, 2014
Final improvements before 2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change log:
FindsByAccessibilityId
MobileElement is scrollable too!