java-client
java-client copied to clipboard
@FindAll annotation not compatible with @iOSXCUITFindBy
Description
I'm trying to use @FindAll with @iOSXCUITFindBy to find multiple IOS elements but it does not work.
this code works:
@FindAll({
@FindBy(xpath = "//XCUIElementTypeSearchField"),
@FindBy(xpath = "//XCUIElementTypeSearchField")
})
private WebElement searchField;
but IOS elements have accessibility attribute which is not present in the @FindBy annotation.
Environment
- Java client build version or git revision if you use some snapshot: latest
- Appium server version or git revision if you use some snapshot: latest
Details
Incompatible types. Found: 'io.appium.java_client.pagefactory.iOSXCUITFindBy', required: 'org.openqa.selenium.support.FindBy'
Code To Reproduce Issue [ Good To Have ]
@FindAll({
@iOSXCUITFindBy(accessibility = "a"),
@iOSXCUITFindBy(accessibility = "b")
})
private WebElement searchField;
try this
@iOSXCUITFindAll({
@iOSXCUITBy(accessibility = "skip_btn"),
@iOSXCUITBy(iOSClassChain = "**/XCUIElementTypeButton[`name == "skip_btn"`]")
})
public WebElement skip;