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
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
Modifier and TypeMethodDescriptiongetAttribute
(String name) Returns the value of the attribute of this element with the specified name.Returns the class associated with this element.getID()
Returns the ID associated with this element.getName()
Returns the name associated with this element.getNode()
Returns the DOM node underlying this element.Returns the scriptable delegate which can provide the scriptable delegate for this element.Returns the delegate which supports scripting this element.Returns the tag name of this node.getText()
Returns the contents of this element, converted to a string.getTitle()
Returns the title associated with this element.boolean
isSupportedAttribute
(String name) Returns true if this element may have an attribute with the specified name.void
removeAttribute
(String name) Remove the attribute of this element with the specified name.void
setAttribute
(String name, 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 Details
-
getID
String getID()Returns the ID associated with this element. IDs are unique throughout the HTML document. -
getClassName
String getClassName()Returns the class associated with this element. -
getName
String getName()Returns the name associated with this element. -
getTitle
String getTitle()Returns the title associated with this element. -
getAttribute
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
Set the value of the attribute of this element with the specified name.- Since:
- 1.7
-
removeAttribute
Remove the attribute of this element with the specified name.- Since:
- 1.7
-
isSupportedAttribute
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
String getText()Returns the contents of this element, converted to a string.- Since:
- 1.6
-
getTagName
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
Node getNode()Returns the DOM node underlying this element.
-