Class PlaywrightWebOptions
- Namespace
- ProtoTest.Web.Playwright
- Assembly
- ProtoTest.Web.Playwright.dll
Playwright session options. Besides code, they bind from ProtoTest:Web:Playwright.
public sealed class PlaywrightWebOptions : IProtoConfigurableOptions
- Inheritance
-
PlaywrightWebOptions
- Implements
- Inherited Members
- Extension Methods
Fields
BackendName
public const string BackendName = "Playwright"
Field Value
ConfigurationSectionName
public const string ConfigurationSectionName = "ProtoTest:Web:Playwright"
Field Value
Properties
ActionTimeout
How long one read or action waits for its element before the backend reports it as missing. Playwright's own default is 30 seconds, which is longer than a polling assertion's budget; this matches the Selenium option of the same name so the two backends fail at the same speed.
public TimeSpan ActionTimeout { get; set; }
Property Value
Browser
public PlaywrightBrowser Browser { get; set; }
Property Value
CapturePageErrors
public bool CapturePageErrors { get; set; }
Property Value
CaptureRequestFailures
public bool CaptureRequestFailures { get; set; }
Property Value
Channel
public string? Channel { get; set; }
Property Value
ConfigureContext
Escape hatch: adjusts the native context options after the settings above are applied, for the Playwright knobs ProtoTest does not model.
public Action<BrowserNewContextOptions>? ConfigureContext { get; set; }
Property Value
- Action<BrowserNewContextOptions>
ConsoleCapture
public PlaywrightConsoleCapture ConsoleCapture { get; set; }
Property Value
CorrelateTraceGroups
public bool CorrelateTraceGroups { get; set; }
Property Value
Headless
public bool Headless { get; set; }
Property Value
InstallBrowsers
Downloads the selected browser through the Playwright driver before the first launch, so a clean
machine or CI runner needs no separate install step. Ignored when Channel names a
system browser (for example msedge or chrome).
public bool InstallBrowsers { get; set; }
Property Value
Locale
The locale the context reports, for example en-US.
public string? Locale { get; set; }
Property Value
MaxTraceBytes
The largest native trace attached to the test, in bytes. Defaults to 32 MiB; a bigger trace is
not attached and the trace records web.playwright.trace_too_large with its size, so a
failing run cannot spike memory buffering the whole zip. Set to zero to read without a cap.
public long MaxTraceBytes { get; set; }
Property Value
SlowMo
public float? SlowMo { get; set; }
Property Value
StorageStatePath
A storage-state JSON file the context starts from.
public string? StorageStatePath { get; set; }
Property Value
TimezoneId
The IANA timezone the context reports, for example Europe/Brussels.
public string? TimezoneId { get; set; }
Property Value
TraceRetention
public PlaywrightTraceRetention TraceRetention { get; set; }
Property Value
UserAgent
A user agent override for the context.
public string? UserAgent { get; set; }
Property Value
ViewportHeight
The context viewport height; both dimensions must be set for a viewport to apply.
public int? ViewportHeight { get; set; }
Property Value
- int?
ViewportWidth
The context viewport width; both dimensions must be set for a viewport to apply.
public int? ViewportWidth { get; set; }
Property Value
- int?