com.meterware.httpunit

Interface HTMLElement

public interface HTMLElement

An interface which defines the common properties for an HTML element, which can correspond to any HTML tag.

Since: 1.5.2

Author: Russell Gold

Method Summary
StringgetAttribute(String name)
Returns the value of the attribute of this element with the specified name.
StringgetClassName()
Returns the class associated with this element.
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 name of this node.
StringgetText()
Returns the contents of this element, converted to a string.
StringgetTitle()
Returns the title associated with this element.
booleanisSupportedAttribute(String name)
Returns true if this element may have an attribute with the specified name.

Method Detail

getAttribute

public String getAttribute(String name)
Returns the value of the attribute of this element with the specified name. Returns the empty string if no such attribute exists.

Since: 1.6

getClassName

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

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 name of this node.

Since: 1.6.1

getText

public String getText()
Returns the contents of this element, converted to a string.

Since: 1.6

getTitle

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

isSupportedAttribute

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

Since: 1.6