Table of Contents

Enum UnhandledPromptBehavior

Namespace
OpenQA.Selenium
Assembly
Selenium.WebDriver.dll

Specifies how a WebDriver session handles an unhandled user prompt.

public enum UnhandledPromptBehavior

Fields

Accept = 2

Accept unexpected alerts.

AcceptAndNotify = 4

Accepts unexpected alerts and notifies the user that the alert has been accepted by throwing an UnhandledAlertException

[Obsolete("Use a nullable UnhandledPromptBehavior? and pass null to leave the behavior unset. This member will be removed in v4.46.")] Default = 0

Sentinel value meaning "behavior not set". Not part of the W3C WebDriver spec.

Dismiss = 3

Dismiss unexpected alerts.

DismissAndNotify = 5

Dismisses unexpected alerts and notifies the user that the alert has been dismissed by throwing an UnhandledAlertException

Ignore = 1

Ignore unexpected alerts, such that the user must handle them.

Remarks

Corresponds to the handler values defined for the W3C WebDriver unhandledPromptBehavior capability: dismiss, accept, dismiss and notify, accept and notify, and ignore. When no handler is configured, the spec's implicit default is DismissAndNotify.