Package org.htmlunit

Interface PromptHandler

All Superinterfaces:
Serializable

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

    Modifier and Type
    Method
    Description
    handlePrompt(Page page, String message, String defaultValue)
    Handle a call to Window.prompt() for the given page.
  • Method Details

    • handlePrompt

      String handlePrompt(Page page, String message, 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