I\'m interested how to find the location of a screenshot which is created during UI Tests of my app. I would like to understand how Fastlane Snapshot grabs this screenshot.
To make screenshot you can call the next method
func makeScreenShot() {
let screenshot = XCUIScreen.main.screenshot()
let fullScreenshotAttachment = XCTAttachment(screenshot: screenshot)
fullScreenshotAttachment.lifetime = .keepAlways
add(fullScreenshotAttachment)
}
You can find screenshots in Xcode -> Report navigator -> select your test
Or go to
DerivedData -> ProjectName... -> Logs -> Test -> find .xcresult -> Show Package Contents -> Attachments
#For example
/Users//Library/Developer/Xcode/DerivedData/-<...>/Logs/Test/Test--<...>.xcresult
[Xcode run tests]