Table of Contents

Class CaptureScreenshotCommandSettings

Namespace
OpenQA.Selenium.DevTools.V146.Page
Assembly
Selenium.WebDriver.dll

Capture page screenshot.

public sealed class CaptureScreenshotCommandSettings : ICommand
Inheritance
CaptureScreenshotCommandSettings
Implements
Inherited Members

Properties

CaptureBeyondViewport

Capture the screenshot beyond the viewport. Defaults to false.

[JsonPropertyName("captureBeyondViewport")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? CaptureBeyondViewport { get; set; }

Property Value

bool?

Clip

Capture the screenshot of a given region only.

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

Property Value

Viewport

CommandName

Gets the name of the command.

[JsonIgnore]
public string CommandName { get; }

Property Value

string

Format

Image compression format (defaults to png).

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

Property Value

string

FromSurface

Capture the screenshot from the surface, rather than the view. Defaults to true.

[JsonPropertyName("fromSurface")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? FromSurface { get; set; }

Property Value

bool?

OptimizeForSpeed

Optimize image encoding for speed, not for resulting size (defaults to false)

[JsonPropertyName("optimizeForSpeed")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public bool? OptimizeForSpeed { get; set; }

Property Value

bool?

Quality

Compression quality from range [0..100] (jpeg only).

[JsonPropertyName("quality")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public long? Quality { get; set; }

Property Value

long?