Package org.htmlunit

Class AbstractPage

java.lang.Object
org.htmlunit.AbstractPage
All Implemented Interfaces:
Serializable, Page
Direct Known Subclasses:
TextPage, UnexpectedPage

public class AbstractPage extends Object implements Page
A basic Page implementation.
See Also:
  • Constructor Details

    • AbstractPage

      public AbstractPage(WebResponse webResponse, WebWindow enclosingWindow)
      Creates an instance.
      Parameters:
      webResponse - the response from the server
      enclosingWindow - the window that holds the page
  • Method Details

    • initialize

      public void initialize()
      Initializes this page.
      Specified by:
      initialize in interface Page
    • cleanUp

      public void cleanUp()
      Cleans up this page.
      Specified by:
      cleanUp in interface Page
    • getWebResponse

      public WebResponse getWebResponse()
      Returns the web response that was originally used to create this page.
      Specified by:
      getWebResponse in interface Page
      Returns:
      the web response that was originally used to create this page
    • getEnclosingWindow

      public WebWindow getEnclosingWindow()
      Returns the window that this page is sitting inside.
      Specified by:
      getEnclosingWindow in interface Page
      Returns:
      the enclosing frame or null if this page isn't inside a frame
    • getUrl

      public URL getUrl()
      Returns the URL of this page.
      Specified by:
      getUrl in interface Page
      Returns:
      the URL of this page
    • isHtmlPage

      public boolean isHtmlPage()
      Description copied from interface: Page
      Returns true if this page is an HtmlPage.
      Specified by:
      isHtmlPage in interface Page
      Returns:
      true or false