Does the search improve when I use chain as locatorgroupstrategy

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;

@Biswajit_Pattanayak use better compact way:

 @AndroidFindBys(value = {
            @AndroidBy(id = "your_id"),
            @AndroidBy(xpath = “//android.widget.TextView[@text=‘DONATE’]”)
    })

all other depends on your app and with Android you will hardly see any difference while with iOS … (if you try - you will see :slight_smile: )