<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIScreenshotProviding",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(pl)XCUIScreenshotProviding"
  },
  "title" : "XCUIScreenshotProviding"
}
-->

# XCUIScreenshotProviding

A type that can provide a screenshot of its current UI state.

```
@MainActor protocol XCUIScreenshotProviding : NSObjectProtocol
```

## Overview

Call this protocol’s [`screenshot()`](/documentation/XCUIAutomation/XCUIScreenshotProviding/screenshot()) method on an [`XCUIScreen`](/documentation/XCUIAutomation/XCUIScreen) or [`XCUIElement`](/documentation/XCUIAutomation/XCUIElement) to capture a screenshot of its current UI state.

## Topics

### Taking a Screenshot

[`-  screenshot`](/documentation/XCUIAutomation/XCUIScreenshotProviding/screenshot())

Takes a screenshot of a screen or UI element’s current visual state.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Conforming Types

[`XCUIApplication`](/documentation/XCUIAutomation/XCUIApplication)

[`XCUIElement`](/documentation/XCUIAutomation/XCUIElement)

[`XCUIScreen`](/documentation/XCUIAutomation/XCUIScreen)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)