2

How can i set the accessibility identifier for an ActionSheet in SwiftUI.

I want to tap a button of it, because i need to identify it for my XCUITest.

I'm currently trying this for my :

app.sheets[""].buttons["Choose Photo"].tap()
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96

1 Answers1

2

Fixed it by using this:

app.sheets.firstMatch.buttons["Choose Photo"].tap()
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96