public class VaadinFinderLocatorStrategy extends Object implements LocatorStrategy
//VTextField[2]//VVerticalLayout/VButton[1]//VScrollTable[caption="Accounts"]#row[2]/col[0]| Modifier and Type | Field and Description |
|---|---|
static String |
SUBPART_SEPARATOR |
| Constructor and Description |
|---|
VaadinFinderLocatorStrategy(ApplicationConnection clientConnection) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.dom.client.Element |
getElementByPath(String path)
Locates an element using a String locator (path) which identifies a DOM
element.
|
com.google.gwt.dom.client.Element |
getElementByPathStartingAt(String path,
com.google.gwt.dom.client.Element root)
Locates an element using a String locator (path) which identifies a DOM
element.
|
List<com.google.gwt.dom.client.Element> |
getElementsByPath(String path)
Locates all elements that match a String locator (path) which identifies
DOM elements.
|
List<com.google.gwt.dom.client.Element> |
getElementsByPathStartingAt(String path,
com.google.gwt.dom.client.Element root)
Locates all elements that match a String locator (path) which identifies
DOM elements.
|
String |
getPathForElement(com.google.gwt.dom.client.Element targetElement)
Generates a String locator which uniquely identifies the target element.
|
boolean |
validatePath(String path)
Test the given input path for formatting errors.
|
public static final String SUBPART_SEPARATOR
public VaadinFinderLocatorStrategy(ApplicationConnection clientConnection)
public String getPathForElement(com.google.gwt.dom.client.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 List<com.google.gwt.dom.client.Element> getElementsByPath(String path)
LegacyLocatorStrategy.getElementsByPath in interface LocatorStrategypath - The String locator which identifies target elements.public com.google.gwt.dom.client.Element getElementByPath(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 com.google.gwt.dom.client.Element getElementByPathStartingAt(String path, com.google.gwt.dom.client.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 List<com.google.gwt.dom.client.Element> getElementsByPathStartingAt(String path, com.google.gwt.dom.client.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(String path)
LocatorStrategyvalidatePath in interface LocatorStrategypath - a locator path expressionCopyright © 2016 Vaadin Ltd. All rights reserved.