I am trying to use the function screenshot in XCTest to capture a screen, but I am unable to understand how to save this screenshot on to a simulator device or physical device
https://developer.apple.com/documentation/xctest/xcuiscreenshot
I am trying to Automate UI testing here and will need to capture a lot of screenshots for review.