JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit

Class CollectingAlertHandler

    • Constructor Detail

      • CollectingAlertHandler

        public CollectingAlertHandler()
        Creates a new instance, initializing it with an empty list.
      • CollectingAlertHandler

        public CollectingAlertHandler(List<String> list)
        Creates an instance with the specified list.
        Parameters:
        list - the list to store alerts in
    • Method Detail

      • handleAlert

        public void handleAlert(Page page,
         String message)
        Handles the alert. This implementation will store the message in a list for retrieval later.
        Specified by:
        handleAlert in interface AlertHandler
        Parameters:
        page - the page that triggered the alert
        message - the message in the alert
      • getCollectedAlerts

        public List<String> getCollectedAlerts()
        Returns a list containing the message portion of any collected alerts.
        Returns:
        a list of alert messages
      • clear

        public void clear()
        Removes all alerts.
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /