|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jwebunit.htmlunit.HtmlUnitElementImpl
public class HtmlUnitElementImpl
HtmlUnit implementation of IElement wrapper.
Constructor Summary | |
---|---|
HtmlUnitElementImpl(com.gargoylesoftware.htmlunit.html.HtmlElement element)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Two IElement s are equal if they
refer to the same element in the current page. |
java.lang.String |
getAttribute(java.lang.String name)
Get the value of an attribute. |
java.util.List<IElement> |
getChildren()
Get direct child elements of this element. |
IElement |
getElement(java.lang.String xpath)
Get an element from this element by xpath. |
java.util.List<IElement> |
getElements(java.lang.String xpath)
Get all elements from this element by xpath. |
com.gargoylesoftware.htmlunit.html.HtmlElement |
getHtmlElement()
Return the unwrapped HtmlUnit element that this IElement represents. |
java.lang.String |
getName()
Get the element name, for example "input", "textarea", "select". |
IElement |
getParent()
Get the parent element, or null if none exists. |
java.lang.String |
getTextContent()
Get the text content, if any, of this element. |
int |
hashCode()
|
void |
setAttribute(java.lang.String string)
Set an attribute on this element. |
void |
setAttribute(java.lang.String string,
java.lang.String value)
Set an attribute on this element. |
void |
setTextContent(java.lang.String value)
Set the text content on this element. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HtmlUnitElementImpl(com.gargoylesoftware.htmlunit.html.HtmlElement element)
Method Detail |
---|
public java.lang.String getAttribute(java.lang.String name)
IElement
getAttribute
in interface IElement
name
- The attribute name
public java.lang.String getName()
IElement
getName
in interface IElement
public java.util.List<IElement> getChildren()
IElement
getChildren
in interface IElement
public IElement getParent()
IElement
getParent
in interface IElement
public java.lang.String getTextContent()
IElement
getTextContent
in interface IElement
public IElement getElement(java.lang.String xpath)
IElement
getElement
in interface IElement
xpath
- The xpath to serach
public java.util.List<IElement> getElements(java.lang.String xpath)
IElement
getElements
in interface IElement
xpath
- The xpath to search
public java.lang.String toString()
toString
in class java.lang.Object
public void setAttribute(java.lang.String string)
IElement
setAttribute
in interface IElement
public void setAttribute(java.lang.String string, java.lang.String value)
IElement
setAttribute
in interface IElement
public void setTextContent(java.lang.String value)
IElement
setTextContent
in interface IElement
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
IElement
IElement
s are equal if they
refer to the same element in the current page.
equals
in interface IElement
equals
in class java.lang.Object
obj
- the object to compare
true
if the object is an IElement
, and refers to the same
element as this IElement
public com.gargoylesoftware.htmlunit.html.HtmlElement getHtmlElement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |