Package org.htmlunit

Interface PromptHandler

  • All Superinterfaces:
    java.io.Serializable

    public interface PromptHandler
    extends java.io.Serializable
    A handler for JavaScript window.prompt(). Prompts are triggered when the JavaScript method Window.prompt() is called.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String handlePrompt​(Page page, java.lang.String message, java.lang.String defaultValue)
      Handle a call to Window.prompt() for the given page.
    • Method Detail

      • handlePrompt

        java.lang.String handlePrompt​(Page page,
                                      java.lang.String message,
                                      java.lang.String defaultValue)
        Handle a call to Window.prompt() for the given page.
        Parameters:
        page - the page on which the prompt occurred
        message - the message in the prompt
        defaultValue - the default value in the prompt
        Returns:
        the value typed in or null if the user pressed cancel