Table of Contents

Class JavascriptDialogOpeningEventArgs

Namespace
Selenium.WebDriver.BiDi.Cdp.Page
Assembly
Selenium.WebDriver.BiDi.Cdp.dll

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

public sealed record JavascriptDialogOpeningEventArgs : EventArgs, IEquatable<EventArgs>, IEquatable<JavascriptDialogOpeningEventArgs>
Inheritance
EventArgs
JavascriptDialogOpeningEventArgs
Implements
IEquatable<EventArgs>
Inherited Members
EventArgs.ToString()
EventArgs.GetHashCode()
EventArgs.Equals(EventArgs)
EventArgs.<Clone>$()
EventArgs.BiDi
EventArgs.AdditionalData
EventArgs.AdditionalMessageData

Constructors

JavascriptDialogOpeningEventArgs(string, FrameId, string, DialogType, bool, string?)

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

public JavascriptDialogOpeningEventArgs(string Url, FrameId FrameId, string Message, DialogType Type, bool HasBrowserHandler, string? DefaultPrompt = null)

Parameters

Url string

Frame url.

FrameId FrameId

Frame id.

Message string

Message that will be displayed by the dialog.

Type DialogType

Dialog type.

HasBrowserHandler bool

True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.

DefaultPrompt string

Default dialog prompt.

Properties

DefaultPrompt

Default dialog prompt.

public string? DefaultPrompt { get; init; }

Property Value

string

FrameId

Frame id.

public FrameId FrameId { get; init; }

Property Value

FrameId

HasBrowserHandler

True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.

public bool HasBrowserHandler { get; init; }

Property Value

bool

Message

Message that will be displayed by the dialog.

public string Message { get; init; }

Property Value

string

Type

Dialog type.

public DialogType Type { get; init; }

Property Value

DialogType

Url

Frame url.

public string Url { get; init; }

Property Value

string