Table of Contents

Class CaptureScreenshotCommandParameters

Namespace
WebDriverBiDi.BrowsingContext
Assembly
WebDriverBiDi.dll

Provides parameters for the browsingContext.captureScreenshot command.

public class CaptureScreenshotCommandParameters : CommandParameters<CaptureScreenshotCommandResult>
Inheritance
CaptureScreenshotCommandParameters
Inherited Members

Constructors

CaptureScreenshotCommandParameters(string)

Initializes a new instance of the CaptureScreenshotCommandParameters class.

public CaptureScreenshotCommandParameters(string browsingContextId)

Parameters

browsingContextId string

The ID of the browsing context for which to capture the screenshot.

Properties

BrowsingContextId

Gets or sets the ID of the browsing context for which to capture the screenshot.

[JsonPropertyName("context")]
public string BrowsingContextId { get; set; }

Property Value

string

Clip

Gets or sets the clip rectangle for the screenshot, if any.

[JsonPropertyName("clip")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ClipRectangle? Clip { get; set; }

Property Value

ClipRectangle

Format

Gets or sets the format of the screenshot image.

[JsonPropertyName("format")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ImageFormat? Format { get; set; }

Property Value

ImageFormat

ImageSize

Gets or sets the size of the screenshot image.

[JsonPropertyName("imageSize")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ImageSize? ImageSize { get; set; }

Property Value

ImageSize

MethodName

Gets the method name of the command.

[JsonIgnore]
public override string MethodName { get; }

Property Value

string

Origin

Gets or sets the area the screenshot captures. Defaults to Viewport when omitted.

[JsonPropertyName("origin")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ScreenshotOrigin? Origin { get; set; }

Property Value

ScreenshotOrigin?

Remarks

The area is the visual viewport, or the whole document, which yields a full-page screenshot. The image is the part of a Clip that falls within the chosen area, so this value applies whether or not a clip is supplied. A BoxClipRectangle is positioned relative to the chosen area. An ElementClipRectangle is positioned at its element whatever the origin, so with the viewport origin an element scrolled out of view leaves nothing to capture.