Package org.htmlunit
Class AbstractPage
java.lang.Object
org.htmlunit.AbstractPage
- All Implemented Interfaces:
Serializable,Page
- Direct Known Subclasses:
TextPage,UnexpectedPage
A basic
Page implementation.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractPage(WebResponse webResponse, WebWindow enclosingWindow) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()Cleans up this page.Returns the window that this page is sitting inside.getUrl()Returns the URL of this page.Returns the web response that was originally used to create this page.voidInitializes this page.booleanReturns true if this page is an HtmlPage.
-
Constructor Details
-
AbstractPage
Creates an instance.- Parameters:
webResponse- the response from the serverenclosingWindow- the window that holds the page
-
-
Method Details
-
initialize
public void initialize()Initializes this page.- Specified by:
initializein interfacePage
-
cleanUp
public void cleanUp()Cleans up this page. -
getWebResponse
Returns the web response that was originally used to create this page.- Specified by:
getWebResponsein interfacePage- Returns:
- the web response that was originally used to create this page
-
getEnclosingWindow
Returns the window that this page is sitting inside.- Specified by:
getEnclosingWindowin interfacePage- Returns:
- the enclosing frame or null if this page isn't inside a frame
-
getUrl
Returns the URL of this page. -
isHtmlPage
public boolean isHtmlPage()Description copied from interface:PageReturns true if this page is an HtmlPage.- Specified by:
isHtmlPagein interfacePage- Returns:
- true or false
-