yandex-qatools / htmlelements

Html Elements is a Java framework providing easy-to-use way of interaction with web-page elements in web-page tests.
Other
271 stars 116 forks source link

Is it possible to add appium support? #73

Closed clicman closed 9 years ago

clicman commented 9 years ago

Is it possible to add appium support? If it is, how to deal with?

artkoshelev commented 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)

clicman commented 9 years ago

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.

aik099 commented 9 years ago

Why you aren't using just @FindBy annotation?

clicman commented 9 years ago

To separate android and ios locators for one page object element.

aik099 commented 9 years ago

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?

clicman commented 9 years ago

No. I`m testing native applications using Page Object pattern. And Android and iOs internals uses different strategies for locationg elements.

artkoshelev commented 9 years ago

Where @AndroidFindBy annotation is coming from? Is it some specific framework?

clicman commented 9 years ago

Yes, it`s framework for mobile automation. http://appium.io/

aik099 commented 9 years ago

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?

artkoshelev commented 9 years ago

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.