Skip to content

Appium is using @FindBy annotation for searching an element for native UI. #577

@jain0nikhil

Description

@jain0nikhil

Scenario:
Same app for three platforms and UI some UI is native to platform or some in web view.

Example:
The login page is created for all three platform (Android,iOS,Web) with a native components.
-> Create a page object in your automation as given below:
@iOSFindBy(id = "CONTINUE AS A GUEST >")
@findby(id="continue_as_guest_btn")
@AndroidFindBy(id = "guest_login")
public WebElement lnkContinueAsGuest;

//Event on element
public void clickContinueAsGuest(){
lnkContinueAsGuest.click();
}

Expected: While running for iOS, Appium should use platform-specific locator strategy
Result: With java client version 5.0.0-BETA3, Appium is using only @findby locator strategy for finding an element for Android and iOS.

Environment

Java-client: group: 'io.appium', name: 'java-client', version: '5.0.0-BETA3'
Appium Server: 1.6.1-beta
OS: Mac - 10.12.3
Node: v5.11.0
Mobile Platform: iOS 10, Android API 22
Simulator

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions