|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.componentlocator.VaadinFinderLocatorStrategy
public class VaadinFinderLocatorStrategy
The VaadinFinder locator strategy implements an XPath-like syntax for locating elements in Vaadin applications. This is used in the new VaadinFinder API in TestBench 4. Examples of the supported syntax:
//VTextField[2]//VVerticalLayout/VButton[1]//VScrollTable[caption="Accounts"]#row[2]/col[0]
| Field Summary | |
|---|---|
static java.lang.String |
SUBPART_SEPARATOR
|
| Constructor Summary | |
|---|---|
VaadinFinderLocatorStrategy(ApplicationConnection clientConnection)
|
|
| Method Summary | |
|---|---|
Element |
getElementByPath(java.lang.String path)
Locates an element using a String locator (path) which identifies a DOM element. |
Element |
getElementByPathStartingAt(java.lang.String path,
Element root)
Locates an element using a String locator (path) which identifies a DOM element. |
java.util.List<Element> |
getElementsByPath(java.lang.String path)
Locates all elements that match a String locator (path) which identifies DOM elements. |
java.util.List<Element> |
getElementsByPathStartingAt(java.lang.String path,
Element root)
Locates all elements that match a String locator (path) which identifies DOM elements. |
java.lang.String |
getPathForElement(Element targetElement)
Generates a String locator which uniquely identifies the target element. |
boolean |
validatePath(java.lang.String path)
Test the given input path for formatting errors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SUBPART_SEPARATOR
| Constructor Detail |
|---|
public VaadinFinderLocatorStrategy(ApplicationConnection clientConnection)
| Method Detail |
|---|
public java.lang.String getPathForElement(Element targetElement)
LocatorStrategy.getElementByPath(String) method can be used for the inverse
operation, i.e. locating an element based on the return value from this
method.
Note that getElementByPath(getPathForElement(element)) == element is not always true as #getPathForElement(Element) can return a path to another element if the widget determines an action on the other element will give the same result as the action on the target element.
getPathForElement in interface LocatorStrategytargetElement - The element to generate a path for.
public java.util.List<Element> getElementsByPath(java.lang.String path)
LegacyLocatorStrategy.
getElementsByPath in interface LocatorStrategypath - The String locator which identifies target elements.
public Element getElementByPath(java.lang.String path)
LocatorStrategy.getPathForElement(Element) method can be used for
the inverse operation, i.e. generating a string expression for a DOM
element.
getElementByPath in interface LocatorStrategypath - The String locator which identifies the target element.
path or null if the element
could not be located.
public Element getElementByPathStartingAt(java.lang.String path,
Element root)
getElementByPathStartingAt in interface LocatorStrategypath - The String locator which identifies the target element.root - The element that is at the root of the path.
path or null if the element
could not be located.LocatorStrategy.getElementByPath(String)
public java.util.List<Element> getElementsByPathStartingAt(java.lang.String path,
Element root)
LegacyLocatorStrategy.
getElementsByPathStartingAt in interface LocatorStrategypath - The String locator which identifies target elements.root - The element that is at the root of the path.
LocatorStrategy.getElementsByPath(String)public boolean validatePath(java.lang.String path)
LocatorStrategy
validatePath in interface LocatorStrategypath - a locator path expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||