Module org.htmlunit
Package org.htmlunit

Interface AlertHandler

All Superinterfaces:
Serializable
All Known Implementing Classes:
CollectingAlertHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AlertHandler extends Serializable
A handler for JavaScript alerts. Alerts are triggered when the JavaScript method Window.alert() is called.
Author:
Mike Bowler, Ronald Brill
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleAlert(Page page, String message)
    Handle an alert for the given page.
  • Method Details

    • handleAlert

      void handleAlert(Page page, String message)
      Handle an alert for the given page.
      Parameters:
      page - the page on which the alert occurred
      message - the message in the alert