|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IElement
A wrapper around elements so we can access their properties directly, without requiring either direct access to the testing engine DOM, or implementing every permutation of assert test.
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. |
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. |
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. |
Method Detail |
---|
java.lang.String getAttribute(java.lang.String name)
name
- The attribute name
java.lang.String getName()
java.lang.String getTextContent()
IElement getParent()
java.util.List<IElement> getChildren()
IElement getElement(java.lang.String xpath)
xpath
- The xpath to serach
java.util.List<IElement> getElements(java.lang.String xpath)
xpath
- The xpath to search
void setAttribute(java.lang.String string)
string
- void setAttribute(java.lang.String string, java.lang.String value)
string
- value
- void setTextContent(java.lang.String value)
value
- boolean equals(java.lang.Object obj)
IElement
s are equal if they
refer to the same element in the current page.
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |