Alert Class
Defines the interface through which the user can manipulate JavaScript alerts.
Inheritance Hierarchy
SystemObject
  SeleniumAlert

Namespace: Selenium
Assembly: Selenium (in Selenium.dll) Version: 2.0.9.0 (2.0.9.0)
Syntax
VB Usage
Dim instance As Alert

The Alert type exposes the following members.

Methods
  NameDescription
Public methodAccept
Accepts the alert.
Public methodDismiss
Dismisses the alert.
Public methodSendKeys
Sends keys to the alert.
Public methodSetCredentials
Sets the user name and password in an alert prompting for credentials.
Top
Properties
  NameDescription
Public propertyText
Text displayed on the alert.
Top
Examples
Set dlg = driver.SwitchToAlert()
txt = dlg.Text
dlg.Accept
See Also