Open roger-tan opened 4 years ago
Note in Xcode 12 Beta they've changed the label of each Photo to just "Photo" rather than included a timestamp etc., so you can use this:
func selectPhoto(atPosition position: Int) {
let selectedPhoto = Image(id: "Photo", index: position).underlyingXCUIElement
selectedPhoto.tap()
}
Unfortunately Image()
isn't Tappable
. Maybe there should be a check on where it is in the hierarchy too, so other Images named "Photo" won't be returned.
That's great news because UITesting with multilanguage was adding so much complexity between time format, image description.
From a previous project of a client. We built our Gallery Screen Helper in order to automate the task as one of the forms required to have a picture.
It will be great to have it.