Skip to content

Commit

Permalink
Include current device in path
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Aug 30, 2022
1 parent 8c6b2b7 commit 3969467
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/XCTestExtensions/XCUIApplication+UITesting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public extension XCUIApplication {
var screenshotsURL: URL {
let env = ProcessInfo.processInfo.environment
let path = env["ScreenshotDirectory"] ?? "\(NSTemporaryDirectory())/Screenshots"
let url = URL(fileURLWithPath: path)
let url = URL(fileURLWithPath: path).appendingPathComponent(UIDevice.current.name)

try? FileManager.default.createDirectory(at: url, withIntermediateDirectories: true)
return url
}
Expand Down

0 comments on commit 3969467

Please sign in to comment.