Xcode UI test manual snapshot
Asked Answered
S

1

4

I want to manually take some snapshots from my applications using UI Tests intoduced in Xcode 7. By default, Xcode takes screenshots of every step and in result I got screenshots that was taken in the middle of transitions between view controllers. I want to manually take snapshot in the specific moments. Any ideas how to do this? I know how to take screenshot of UIView, but XCUIApplication doesn't provide any API to get UIView objects.

Stepper answered 19/7, 2015 at 14:1 Comment(1)
Check out snapshot, part of the Fastlane suite of tools.Pastose
A
4

I've created a library for this: https://github.com/zmeyc/UITestUtils The idea is to take the screenshot in the app itself and send it to the test app via sockets. I didn't find a way to capture screenshots in a controlled manner directly from the test app.

Aldora answered 20/7, 2015 at 10:7 Comment(3)
Nice, I will try this. Thanks!Stepper
Is it possible to install it via cocoapods?Stepper
Not yet, I'll look into it.Aldora

© 2022 - 2024 — McMap. All rights reserved.