public interface DOMElement extends DOMNode
| Modifier and Type | Method and Description |
|---|---|
void |
click()
Simulates mouse click event on this element.
|
java.lang.String |
getAttribute(java.lang.String name)
Returns value of the attribute with specified
name. |
DOMAttr |
getAttributeNode(java.lang.String name)
Returns attribute with specified
name as DOMAttr object. |
java.lang.String |
getClassName()
Returns CLASS attribute value of this element.
|
DOMNodeList |
getElementsByTagName(java.lang.String tagName)
Returns list of HTML elements with specified
tagName in the current HTML element hierarchy. |
java.lang.String |
getId()
Returns ID attribute value of this element.
|
java.lang.String |
getTagName()
Returns HTML element's tag name.
|
java.lang.String |
getTitle()
Returns TITLE attribute value of this element.
|
boolean |
hasAttribute(java.lang.String name)
Checks whether attribute with specified
name is available in this element. |
void |
removeAttribute(java.lang.String name)
Removes attribute with specified
name. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets a new
value for attribute with specified name. |
void |
setClassName(java.lang.String className)
Sets CLASS attribute value for this element.
|
void |
setId(java.lang.String id)
Sets ID attribute value for this element.
|
void |
setTitle(java.lang.String title)
Sets TITLE attribute value for this element.
|
appendChild, getAttributes, getChildNodes, getDocument, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getParentNode, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, isEqualNode, isSameNode, removeChild, replaceChild, setNodeValue, setTextContentaddEventListener, removeEventListenerjava.lang.String getTagName()
java.lang.String getAttribute(java.lang.String name)
name.name - attribute name.name.void setAttribute(java.lang.String name,
java.lang.String value)
value for attribute with specified name.name - attribute name.value - attribute value.void removeAttribute(java.lang.String name)
name.name - attribute name.DOMAttr getAttributeNode(java.lang.String name)
name as DOMAttr object.name - attribute name.DOMAttr object.DOMNodeList getElementsByTagName(java.lang.String tagName)
tagName in the current HTML element hierarchy.tagName - tag name.tagName.boolean hasAttribute(java.lang.String name)
name is available in this element.name - attribute name.true when attribute exists.java.lang.String getId()
void setId(java.lang.String id)
id - ID attribute value.java.lang.String getTitle()
void setTitle(java.lang.String title)
title - TITLE attribute valuejava.lang.String getClassName()
void setClassName(java.lang.String className)
className - CLASS attribute value.void click()