Tap on SwiftUI LocationButton in UI Test

Viewed 27

I am unable to tap on the LocationButton in a Swift UI Test. This is the button:

enter image description here

I am in a breakpoint in a UITest and I tried this without luck:

  • app.buttons.count returns 0
  • app.staticTexts["Current Location"].exists returns false
  • app.buttons["Current Location"].exists returns false

Is there something special about this button? How can I tap it in a UITest?

0 Answers
Related