Closed clicman closed 9 years ago
It will work out of the box in case you use Appium as raw RemoteWebDriver (without any clients on top of it)
Could you provide an exampe? How to initialize elements properly in page objects? A used @AndroidFindBy annotations for locate elements and init it through appium decorator and Hrmlelements decorator both. But in command translated to appium I see html element`s variable name instead of locator.
Why you aren't using just @FindBy
annotation?
To separate android and ios locators for one page object element.
Am I right, that in Apium you basically testing a HTML page on a mobile device?
If so, then how it can be that same element on a page should be located using different xpath/css for Android and iOS devices?
No. I`m testing native applications using Page Object pattern. And Android and iOs internals uses different strategies for locationg elements.
Where @AndroidFindBy annotation is coming from? Is it some specific framework?
Yes, it`s framework for mobile automation. http://appium.io/
According to https://discuss.appium.io/t/java-client-1-6-0-findby-annotations-vs-driver-find/88 they are handled by their own AppiumFieldDecorator
. How than HtmlElements (which uses own field decorator) can be used with Appium?
As i told before, everything will work if you use RemoteWebdriver and selenium @FindBy
annotation. As soon as you use appium-specific annotations with AppiumDriver you break Selenium compatibility and need to implement appium-specific behavior to HtmlElements.
Is it possible to add appium support? If it is, how to deal with?