How to take screenshots for UITest in Xcodee

Issue #539

XCUIScreenshot

1
2
3
4
5
6
7
8
extension XCTestCase {
func takeScreenshot(name: String) {
let screenshot = XCUIScreen.main.screenshot()
let attach = XCTAttachment(screenshot: screenshot)
attach.lifetime = .keepAlways
add(attach)
}
}
Screenshot 2019-12-12 at 23 02 21

Gather screenshot for localization

xcresult from Xcode 11

xcresulttool

Test plan

Comments