Package com.meterware.httpunit
Interface HTMLElement
-
- All Superinterfaces:
ScriptingEventHandler
- All Known Implementing Classes:
BlockElement
,Button
,FormControl
,RadioButtonFormControl
,RadioGroupFormControl
,ResetButton
,SubmitButton
,TableCell
,TableRow
,TextBlock
,WebApplet
,WebForm
,WebImage
,WebLink
,WebList
,WebRequestSource
,WebTable
public interface HTMLElement extends ScriptingEventHandler
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAttribute(java.lang.String name)
Returns the value of the attribute of this element with the specified name.java.lang.String
getClassName()
Returns the class associated with this element.java.lang.String
getID()
Returns the ID associated with this element.java.lang.String
getName()
Returns the name associated with this element.org.w3c.dom.Node
getNode()
Returns the DOM node underlying this element.ScriptableDelegate
getParentDelegate()
Returns the scriptable delegate which can provide the scriptable delegate for this element.ScriptingHandler
getScriptingHandler()
Returns the delegate which supports scripting this element.java.lang.String
getTagName()
Returns the tag name of this node.java.lang.String
getText()
Returns the contents of this element, converted to a string.java.lang.String
getTitle()
Returns the title associated with this element.boolean
isSupportedAttribute(java.lang.String name)
Returns true if this element may have an attribute with the specified name.ScriptableDelegate
newScriptable()
void
removeAttribute(java.lang.String name)
Remove the attribute of this element with the specified name.void
setAttribute(java.lang.String name, java.lang.Object value)
Set the value of the attribute of this element with the specified name.-
Methods inherited from interface com.meterware.httpunit.scripting.ScriptingEventHandler
doEvent, doEventScript, handleEvent
-
-
-
-
Method Detail
-
getID
java.lang.String getID()
Returns the ID associated with this element. IDs are unique throughout the HTML document.
-
getClassName
java.lang.String getClassName()
Returns the class associated with this element.
-
getName
java.lang.String getName()
Returns the name associated with this element.
-
getTitle
java.lang.String getTitle()
Returns the title associated with this element.
-
getAttribute
java.lang.String getAttribute(java.lang.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
-
setAttribute
void setAttribute(java.lang.String name, java.lang.Object value)
Set the value of the attribute of this element with the specified name.- Since:
- 1.7
-
removeAttribute
void removeAttribute(java.lang.String name)
Remove the attribute of this element with the specified name.- Since:
- 1.7
-
isSupportedAttribute
boolean isSupportedAttribute(java.lang.String name)
Returns true if this element may have an attribute with the specified name.- Since:
- 1.6
-
getScriptingHandler
ScriptingHandler getScriptingHandler()
Returns the delegate which supports scripting this element.
-
getText
java.lang.String getText()
Returns the contents of this element, converted to a string.- Since:
- 1.6
-
getTagName
java.lang.String getTagName()
Returns the tag name of this node.- Since:
- 1.6.1
-
newScriptable
ScriptableDelegate newScriptable()
-
getParentDelegate
ScriptableDelegate getParentDelegate()
Returns the scriptable delegate which can provide the scriptable delegate for this element.
-
getNode
org.w3c.dom.Node getNode()
Returns the DOM node underlying this element.
-
-