Class UserPromptHandler
Represents a WebDriver session's user prompt handler, which defines how unhandled browser prompts (alerts, confirms, prompts, beforeunload dialogs, file selection dialogs) are managed during automation.
public abstract record UserPromptHandler : IEquatable<UserPromptHandler>
- Inheritance
-
UserPromptHandler
- Implements
- Derived
- Inherited Members
Remarks
This corresponds to the W3C WebDriver unhandledPromptBehavior capability, which may be expressed
either as a single string applied to all prompt types, or as a per-prompt-type map.
Available variants:
- UserPromptHandler.Uniform - Wraps a single UnhandledPromptBehavior value applied to all prompt types. Create via the implicit conversion from UnhandledPromptBehavior or by constructing UserPromptHandler.Uniform directly.
- UserPromptHandler.PerPromptType - Allows configuring per-prompt behaviors (Alert, Confirm, Prompt, BeforeUnload, File, Default).
Operators
implicit operator UserPromptHandler?(UnhandledPromptBehavior?)
Converts a nullable UnhandledPromptBehavior to a UserPromptHandler instance,
or null when value is null.
public static implicit operator UserPromptHandler?(UnhandledPromptBehavior? value)
Parameters
valueUnhandledPromptBehavior?The UnhandledPromptBehavior value to convert.