Home > Software engineering >  Capture screen recording with UITesting in Swift
Capture screen recording with UITesting in Swift

Time:08-18

Is there any tool or service for capturing screen-recording or screenshot with UITesting?

I do not want snapshot testing from enter image description here

First you need to remove checkmark in "Delete when each test succeeds" remove checkmark in "Delete when each test succeeds" in attachments section too

Then you can find the screenshots in test logs

enter image description here

You can also take screenshots of different components using screenshot()

let screenShot = emailTextField.screenshot()
let emailScreenAttachment = XCTAttachment(screenshot: screenShot)
emailScreenAttachment.name = "screnshot of email textField"
emailScreenAttachment.lifetime = .keepAlways
add(emailScreenAttachment)
  • Related