Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to take screenshots for UITest in Xcodee #539

Open
onmyway133 opened this issue Dec 12, 2019 · 0 comments
Open

How to take screenshots for UITest in Xcodee #539

onmyway133 opened this issue Dec 12, 2019 · 0 comments

Comments

@onmyway133
Copy link
Owner

onmyway133 commented Dec 12, 2019

XCUIScreenshot

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant