Protocol

XCUIScreenshotProviding

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

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

func screenshot()

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

Required.

Relationships

Inherits From

See Also

Screenshots

class XCUIScreen

A physical screen attached to a device.

Beta
class XCUIScreenshot

A captured image of a screen, app, or UI element state.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software