Class HTMLPage

java.lang.Object
com.meterware.httpunit.ParsedHTML
com.meterware.httpunit.HTMLPage

public class HTMLPage extends ParsedHTML
This class represents an HTML page returned from a request.
Author:
Russell Gold, Benoit Xhenseval
  • Method Details

    • getTitle

      public String getTitle() throws SAXException
      Returns the title of the page.
      Throws:
      SAXException
    • getOnLoadEvent

      public String getOnLoadEvent() throws SAXException
      Returns the onLoad event script.
      Throws:
      SAXException
    • getExternalStyleSheet

      public String getExternalStyleSheet() throws SAXException
      Returns the location of the linked stylesheet in the head
      Throws:
      SAXException
    • getMetaTagContent

      public String[] getMetaTagContent(String attribute, String attributeValue)
      Retrieves the "content" of the meta tags for a key pair attribute-attributeValue. this can be used like this getMetaTagContent("name","robots") will return { "index","follow" } getMetaTagContent("http-equiv","Expires") will return { "now" }
    • parse

      public void parse(String text, URL pageURL) throws SAXException, IOException
      parse the given test with the given URL
      Parameters:
      text -
      pageURL -
      Throws:
      SAXException
      IOException