we have an app where we need to find elements mostly based on xpath. While exploring options to improve the element identification, I stumbled upon locatorgroupstrategy. I want to understand whether the performance of element identification improves if I use the first option in place of second option.
1st option
@HowToUseLocators(androidAutomation = LocatorGroupStrategy.CHAIN)
@AndroidFindBy(id = “xxxx”)
@AndroidFindBy(xpath = “//android.widget.TextView[@text=‘DONATE’]”)
MobileElement donate;
2nd option
@AndroidFindBy(xpath = “//android.widget.TextView[@text=‘DONATE’]”)
MobileElement donate;