com.meterware.httpunit

Class BlockElement

public abstract class BlockElement extends ParsedHTML implements HTMLSegment, HTMLElement

Represents a block-level element such as a paragraph or table cell, which can contain other elements.

Since: 1.6

Author: Russell Gold

Constructor Summary
protected BlockElement(WebResponse response, FrameSelector frame, URL baseURL, String baseTarget, Node rootNode, String characterSet)
Method Summary
booleanequals(Object obj)
StringgetAttribute(String name)
protected intgetAttributeValue(Node node, String attributeName, int defaultValue)
StringgetClassName()
Returns the class attribute associated with this element.
NodegetDOM()
Returns a copy of the domain object model associated with this HTML segment.
StringgetID()
Returns the ID associated with this element.
StringgetName()
Returns the name associated with this element.
ScriptableDelegategetScriptableDelegate()
Returns the delegate which supports scripting this element.
StringgetTagName()
Returns the tag for this block.
StringgetText()
Returns the text value of this block.
StringgetTitle()
Returns the title associated with this element.
inthashCode()
booleanisSupportedAttribute(String name)
Returns true if this element may have an attribute with the specified name.

Constructor Detail

BlockElement

protected BlockElement(WebResponse response, FrameSelector frame, URL baseURL, String baseTarget, Node rootNode, String characterSet)

Method Detail

equals

public boolean equals(Object obj)

getAttribute

public String getAttribute(String name)

getAttributeValue

protected int getAttributeValue(Node node, String attributeName, int defaultValue)

getClassName

public String getClassName()
Returns the class attribute associated with this element.

getDOM

public Node getDOM()
Returns a copy of the domain object model associated with this HTML segment.

getID

public String getID()
Returns the ID associated with this element. IDs are unique throughout the HTML document.

getName

public String getName()
Returns the name associated with this element.

getScriptableDelegate

public ScriptableDelegate getScriptableDelegate()
Returns the delegate which supports scripting this element.

getTagName

public String getTagName()
Returns the tag for this block.

getText

public String getText()
Returns the text value of this block.

getTitle

public String getTitle()
Returns the title associated with this element.

hashCode

public int hashCode()

isSupportedAttribute

public boolean isSupportedAttribute(String name)
Returns true if this element may have an attribute with the specified name.