public class Alert extends Object
| Constructor and Description |
|---|
Alert(org.openqa.selenium.WebDriver webDriver) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept()
When an alert box pops up, click on "OK"
|
void |
dismiss()
When an alert box pops up, click on "Cancel"
|
String |
getText() |
void |
prompt(String s)
Entering an input value
|
void |
switchTo()
Switch to an alert box
|
public void accept()
public void dismiss()
public String getText()
public void prompt(String s)
s - field to enterpublic void switchTo()
org.openqa.selenium.NoAlertPresentException - if there is currently no alert boxCopyright © 2015 AConsulting. All Rights Reserved.