I'm developing a test case that needs to run on both iOS and Android platforms using QAF (Qmetry Automation Framework). I want to follow a Page Object approach where I can define elements for both platforms in a single place and reuse them in my tests.
In Appium, I can achieve this by using annotations like @AndroidFindBy and @iOSXCUITFindBy. Here's an example:
@HowToUseLocators(androidAutomation = LocatorGroupStrategy.ALL_POSSIBLE, iOSXCUITAutomation = LocatorGroupStrategy.ALL_POSSIBLE)
@AndroidFindBy(xpath = "//android.widget.TextView[@resource-id='merchant-name']")
@iOSXCUITFindBy(accessibility = "Home")
protected WebElement home;
This allows me to specify different locators for Android and iOS, and the framework automatically chooses the appropriate locator based on the platform.
However, I couldn't find a similar implementation in QAF. Is there a way to achieve the same result in QAF? I would greatly appreciate any guidance or suggestions on how to approach this in QAF. Thank you!