Click or drag to resize

PageClient.HandleJavaScriptDialogAsync Method

Version 92.0.260
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

Namespace:  CefSharp.DevTools.Page
Assembly:  CefSharp (in CefSharp.dll) Version: 92.0.260.0 (92.0.260.0)
Syntax
public Task<DevToolsMethodResponse> HandleJavaScriptDialogAsync(
	bool accept,
	string promptText = null
)

Parameters

accept
Type: System.Boolean
Whether to accept or dismiss the dialog.
promptText (Optional)
Type: System.String
The text to enter into the dialog prompt before accepting. Used only if this is a promptdialog.

Return Value

Type: Task<DevToolsMethodResponse>
returns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also