public class ParsedHTML extends Object
Modifier and Type | Method and Description |
---|---|
WebApplet[] |
getApplets()
Returns a proxy for each applet found embedded in this page.
|
Node |
getDOM()
Returns a copy of the domain object model associated with this page.
|
String[] |
getElementNames()
Returns a list of HTML element names contained in this HTML section.
|
HTMLElement[] |
getElementsWithAttribute(String name,
String value)
Returns the HTML elements with an attribute with the specified name and value.
|
HTMLElement[] |
getElementsWithName(String name)
Returns the HTML elements with the specified name.
|
HTMLElement |
getElementWithID(String id)
Returns the HTMLElement with the specified ID.
|
WebForm |
getFirstMatchingForm(HTMLElementPredicate predicate,
Object criteria)
Returns the first link found in the page matching the specified criteria.
|
WebLink |
getFirstMatchingLink(HTMLElementPredicate predicate,
Object criteria)
Returns the first link found in the page matching the specified criteria.
|
WebTable |
getFirstMatchingTable(HTMLElementPredicate predicate,
Object criteria)
Returns the first table in the response which matches the specified predicate and value.
|
TextBlock |
getFirstMatchingTextBlock(HTMLElementPredicate predicate,
Object criteria)
Returns the first text block found in the page which matches the specified predicate and value.
|
WebForm[] |
getForms()
Returns the forms found in the page in the order in which they appear.
|
WebForm |
getFormWithID(String id)
Returns the form found in the page with the specified ID.
|
WebForm |
getFormWithName(String name)
Returns the form found in the page with the specified name.
|
com.meterware.httpunit.WebFrame[] |
getFrames()
Returns the frames found in the page in the order in which they appear.
|
WebImage[] |
getImages()
Returns the images found in the page in the order in which they appear.
|
WebImage |
getImageWithAltText(String altText)
Returns the first image found in the page with the specified alt attribute.
|
WebImage |
getImageWithName(String name)
Returns the image found in the page with the specified name.
|
WebImage |
getImageWithSource(String source)
Returns the first image found in the page with the specified src attribute.
|
WebLink[] |
getLinks()
Returns the links found in the page in the order in which they appear.
|
WebLink |
getLinkWith(String text)
Returns the first link which contains the specified text.
|
WebLink |
getLinkWithID(String id)
Returns the link found in the page with the specified ID.
|
WebLink |
getLinkWithImageText(String text)
Returns the link which contains the first image with the specified text as its 'alt' attribute.
|
WebLink |
getLinkWithName(String name)
Returns the link found in the page with the specified name.
|
WebForm[] |
getMatchingForms(HTMLElementPredicate predicate,
Object criteria)
Returns all links found in the page matching the specified criteria.
|
WebLink[] |
getMatchingLinks(HTMLElementPredicate predicate,
Object criteria)
Returns all links found in the page matching the specified criteria.
|
WebTable[] |
getMatchingTables(HTMLElementPredicate predicate,
Object criteria)
Returns the tables in the response which match the specified predicate and value.
|
TextBlock |
getNextTextBlock(TextBlock block) |
WebTable[] |
getTables()
Returns the top-level tables found in the page in the order in which they appear.
|
WebTable |
getTableStartingWith(String text)
Returns the first table in the response which has the specified text as the full text of
its first non-blank row and non-blank column.
|
WebTable |
getTableStartingWithPrefix(String text)
Returns the first table in the response which has the specified text as a prefix of the text
in its first non-blank row and non-blank column.
|
WebTable |
getTableWithID(String ID)
Returns the first table in the response which has the specified text as its ID attribute.
|
WebTable |
getTableWithSummary(String summary)
Returns the first table in the response which has the specified text as its summary attribute.
|
TextBlock[] |
getTextBlocks()
Returns the top-level block elements found in the page in the order in which they appear.
|
static boolean |
isWebLink(Node node)
check whether the given node is a Web link by checking that
the node is of type "A"
|
String |
toString() |
public WebForm[] getForms()
public WebLink[] getLinks()
public WebApplet[] getApplets()
public WebImage[] getImages()
public TextBlock[] getTextBlocks()
public TextBlock getFirstMatchingTextBlock(HTMLElementPredicate predicate, Object criteria)
public WebTable[] getTables()
public HTMLElement getElementWithID(String id)
public HTMLElement[] getElementsWithName(String name)
public HTMLElement[] getElementsWithAttribute(String name, String value)
name
- - the name of the attribute to checkvalue
- - the value of the attribute to checkpublic String[] getElementNames()
public WebForm getFormWithID(String id)
public WebLink getLinkWithID(String id)
public WebForm getFirstMatchingForm(HTMLElementPredicate predicate, Object criteria)
public WebForm[] getMatchingForms(HTMLElementPredicate predicate, Object criteria)
public WebForm getFormWithName(String name)
public static boolean isWebLink(Node node)
node
- - the node to checkpublic WebLink getLinkWith(String text)
public WebLink getLinkWithImageText(String text)
public WebLink getLinkWithName(String name)
public WebLink getFirstMatchingLink(HTMLElementPredicate predicate, Object criteria)
public WebLink[] getMatchingLinks(HTMLElementPredicate predicate, Object criteria)
public WebImage getImageWithName(String name)
public WebImage getImageWithSource(String source)
public WebImage getImageWithAltText(String altText)
public WebTable getFirstMatchingTable(HTMLElementPredicate predicate, Object criteria)
public WebTable[] getMatchingTables(HTMLElementPredicate predicate, Object criteria)
public WebTable getTableStartingWith(String text)
public WebTable getTableStartingWithPrefix(String text)
public WebTable getTableWithSummary(String summary)
public WebTable getTableWithID(String ID)
public Node getDOM()
public com.meterware.httpunit.WebFrame[] getFrames()
Copyright © 2012. All Rights Reserved.