Skip to content

Conversation

@TikhomirovSergey
Copy link

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.

 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.
@TikhomirovSergey
Copy link
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
);

@Jonahss
Copy link
Owner

Jonahss commented Sep 26, 2014

Awesome work.

So, now that scrollTo() is implemented on IOSElement, the IOSElement methods scroll from the context of the IOSElement, whereas the IOSDriver methods scroll from the first TableView. This is good.

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.
@Jonahss Jonahss merged commit 6a5dcf4 into Jonahss:master Sep 26, 2014
Jonahss pushed a commit that referenced this pull request Jul 16, 2019
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