fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md in fastlane-2.82.0.beta.20180214010002 vs fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md in fastlane-2.82.0.beta.20180215010002

- old
+ new

@@ -82,32 +82,30 @@ # Quick Start - Create a new UI Test target in your Xcode project ([top part of this article](https://krausefx.com/blog/run-xcode-7-ui-tests-from-the-command-line)) - Run `fastlane snapshot init` in your project folder - Add the ./SnapshotHelper.swift to your UI Test target (You can move the file anywhere you want) - - **Note:** if you're using Xcode 8, add the ./SnapshotHelperXcode8.swift to your UI Test target -- (Objective C only) add the bridging header to your test class. - - `#import "MYUITests-Swift.h"` - - The bridging header is named after your test target with -Swift.h appended. + - (Xcode 8 only) add the ./SnapshotHelperXcode8.swift to your UI Test target +- (Objective C only) add the bridging header to your test class: + - `#import "MYUITests-Swift.h"` + (The bridging header is named after your test target with `-Swift.h` appended.) - In your UI Test class, click the `Record` button on the bottom left and record your interaction - To take a snapshot, call the following between interactions - - Swift: `snapshot("01LoginScreen")` - - Objective C: `[Snapshot snapshot:@"01LoginScreen" timeWaitingForIdle:10];` -- Add the following code to your `setUp()` method - -**Swift** -```swift -let app = XCUIApplication() -setupSnapshot(app) -app.launch() -``` - -**Objective C** -```objective-c -XCUIApplication *app = [[XCUIApplication alloc] init]; -[Snapshot setupSnapshot:app]; -[app launch]; -``` + - Swift: `snapshot("01LoginScreen")` + - Objective C: `[Snapshot snapshot:@"01LoginScreen" timeWaitingForIdle:10];` +- Add the following code to your `setUp()` method: + - Swift: + ```swift + let app = XCUIApplication() + setupSnapshot(app) + app.launch() + ``` + - Objective C: + ```objective-c + XCUIApplication *app = [[XCUIApplication alloc] init]; + [Snapshot setupSnapshot:app]; + [app launch]; + ``` _Make sure you only have one `launch` call in your test class, as Xcode adds one automatically on new test files._ ![img/actions/snapshot.gif](/img/actions/snapshot.gif)