XCUIElement - Obtain Image value
问题 I have an variable that's of type .Image and class XCUIElement . Something like this: var image = app.descendantsMatchingType(.Image).elementAtIndex(0) Is there a way I can extract the actual image so I can compare it to another image? I've tried caling the value method, but it returns a string. Casting it to a UIImage always fails. 回答1: I have had a conversation about this with the Apple Developer Tools evangelist recently. There is currently no way of accessing the actual image from an