Skip to main content
added 7 characters in body
Source Link
IAmMilinPatel
  • 7.8k
  • 7
  • 43
  • 68

If you are specifically mentioning as you want to click on the first button no matter the text, then I would go Listwith List concept

@FindBy(xpath = "//XCUIElementTypeButton")
    private List<MobileElement> button;

button.get(0).click();

If you are specifically mentioning as you want to click on the first button no matter the text, then I would go List concept

@FindBy(xpath = "//XCUIElementTypeButton")
    private List<MobileElement> button;

button.get(0).click();

If you are specifically mentioning as you want to click on the first button no matter the text, then I would go with List concept

@FindBy(xpath = "//XCUIElementTypeButton")
    private List<MobileElement> button;

button.get(0).click();
Source Link

If you are specifically mentioning as you want to click on the first button no matter the text, then I would go List concept

@FindBy(xpath = "//XCUIElementTypeButton")
    private List<MobileElement> button;

button.get(0).click();