I have a +
image in the UI from the following code
struct QueryPlusButton: View {
var body: some View {
Button {
}
label: {
Image(systemName: "plus")
}
}
}
However, I'm not able to query the +
image in XCTest using any of the following queries
let view = app.images["plus"]
//let view = app.staticTexts["plus"]
//let view = app.buttons["plus"]
XCTAssertTrue(view.exists, "Plus button does not exist")
The test fails. Is there a methodical way to determine what a query is for any UI element? Thank you.