I\'m trying to test my UIs using XCTest UI testing, and having troubles of testing UIImageViewsI have in my app (hit tests, presence etc).
In the list of the XCUIEle
Assert the presence of an image by its accessibility label.
Production Code
let image = UIImage(named: "profile")
let imageView = UIImageView(image: image)
imageView.accessibilityLabel = "Your profile image"
UI Test Code
let app = XCUIApplication()
XCTAssert(app.images["Your profile image"].exists)