         }
     }
 
-    class func snapshot(name: String, waitForLoadingIndicator: Bool = false) {
+    class func snapshot(name: String, waitForLoadingIndicator: Bool = true) {
         if waitForLoadingIndicator {
             waitForLoadingIndicatorToDisappear()
         }
 
-        print("snapshot: \(name)") // more information about this, check out https://github.com/krausefx/snapshot
+        print("snapshot: \(name)") // more information about this, check out https://github.com/fastlane/snapshot
 
         sleep(1) // Waiting for the animation to be finished (kind of)
         XCUIDevice.sharedDevice().orientation = .Unknown

import XCTest

var deviceLanguage = ""

@available(*, deprecated, message="use setupSnapshot: instead")
func setLanguage(app: XCUIApplication) {


    class func waitForLoadingIndicatorToDisappear() {
        let query = XCUIApplication().statusBars.childrenMatchingType(.Other).elementBoundByIndex(1).childrenMatchingType(.Other)

        while (0..<query.count).map({ query.elementBoundByIndex($0) }).contains({ $0.isLoadingIndicator }) {
            sleep(1)
            print("Waiting for loading indicator to disappear...")
        }
    }

    class func pathPrefix() -> NSString? {
        if let path = NSProcessInfo().environment["SIMULATOR_HOST_HOME"] as NSString? {
            return path.stringByAppendingPathComponent("Library/Caches/tools.fastlane")
        }
        print("Couldn't find Snapshot configuration files at ~/Library/Caches/tools.fastlane")
        return nil
    }
}

extension XCUIElement {
    var isLoadingIndicator: Bool {
        return self.frame.size == CGSize(width: 10, height: 20)
    }
}

// Please don't remove the lines below
// They are used to detect outdated configuration files
// SnapshotHelperVersion [1.2]
