theappbusiness / TABTestKit

Library designed to make writing and maintaining automated tests for iOS applications. This includes automation of bio-metrics and controlling of mock servers
MIT License
59 stars 13 forks source link

Support Photo Gallery #126

Open roger-tan opened 4 years ago

roger-tan commented 4 years ago

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.

Screenshot 2020-08-11 at 16 58 36
tshort15-ford commented 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.

roger-tan commented 4 years ago

That's great news because UITesting with multilanguage was adding so much complexity between time format, image description.