Is there any means to script/automate taking Apple Watch app screenshots? UI automation or UI test only seem to support app targets.
Is there (UI) automation support for the Apple Watch simulator?
I'm not sure if UIAutomatin has, or will have, support for watchOS. UI testing in Xcode 7 currently does not.
As of Xcode 16.4, there is limited support for XCTest UI Automation for WatchOS apps (e.g. no recording support). If you remember to add a sleep(1)
after every automated app interaction such as .tap()
, then you can use XCUIScreen.main.screenshot()
and XCTAttachment(screenshot: ..., quality: .original)
to automate the collection of screenshots for the AppStore.
I have found it useful to use XCTContext.runActivity(named: "...") {}
to be able to organize the screenshots reliably.