snapshot/lib/assets/SnapshotHelper.swift in fastlane-2.100.1 vs snapshot/lib/assets/SnapshotHelper.swift in fastlane-2.101.0
- old
+ new
@@ -158,15 +158,11 @@
guard let app = self.app else {
print("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().")
return
}
- guard let window = app.windows.allElementsBoundByIndex.first(where: { $0.frame.isEmpty == false }) else {
- print("Couldn't find an element window in XCUIApplication with a non-empty frame.")
- return
- }
-
+ let window = app.windows.firstMatch
let screenshot = window.screenshot()
guard let simulator = ProcessInfo().environment["SIMULATOR_DEVICE_NAME"], let screenshotsDir = screenshotsDirectory else { return }
let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")
do {
try screenshot.pngRepresentation.write(to: path)
@@ -275,6 +271,6 @@
}
}
// Please don't remove the lines below
// They are used to detect outdated configuration files
-// SnapshotHelperVersion [1.11]
+// SnapshotHelperVersion [1.12]