---
title: XCUIScreenshotProviding
framework: xcuiautomation
role: symbol
role_heading: Protocol
path: xcuiautomation/xcuiscreenshotproviding
---

# XCUIScreenshotProviding

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

## Declaration

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

## Overview

Overview Call this protocol’s screenshot() method on an XCUIScreen or XCUIElement to capture a screenshot of its current UI state.

## Topics

### Taking a Screenshot

- [screenshot()](xcuiautomation/xcuiscreenshotproviding/screenshot().md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Conforming Types

- [XCUIApplication](xcuiautomation/xcuiapplication.md)
- [XCUIElement](xcuiautomation/xcuielement.md)
- [XCUIScreen](xcuiautomation/xcuiscreen.md)

## See Also

### Screenshots

- [XCUIScreen](xcuiautomation/xcuiscreen.md)
- [XCUIScreenshot](xcuiautomation/xcuiscreenshot.md)
