|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.CollectingAlertHandler
public class CollectingAlertHandler
A simple alert handler that keeps track of alerts in a list.
Constructor Summary | |
---|---|
CollectingAlertHandler()
Creates a new instance, initializing it with an empty list. |
|
CollectingAlertHandler(List<String> list)
Creates an instance with the specified list. |
Method Summary | |
---|---|
List<String> |
getCollectedAlerts()
Returns a list containing the message portion of any collected alerts. |
void |
handleAlert(Page page,
String message)
Handles the alert. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectingAlertHandler()
public CollectingAlertHandler(List<String> list)
list
- the list to store alerts inMethod Detail |
---|
public void handleAlert(Page page, String message)
handleAlert
in interface AlertHandler
page
- the page that triggered the alertmessage
- the message in the alertpublic List<String> getCollectedAlerts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |