public interface LocatorStrategy
| 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.
|
boolean validatePath(String path)
path - a locator path expressionString getPathForElement(com.google.gwt.dom.client.Element targetElement)
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.
targetElement - The element to generate a path for.com.google.gwt.dom.client.Element getElementByPath(String path)
getPathForElement(Element) method can be used for
the inverse operation, i.e. generating a string expression for a DOM
element.path - The String locator which identifies the target element.path or null if the element
could not be located.com.google.gwt.dom.client.Element getElementByPathStartingAt(String path, com.google.gwt.dom.client.Element root)
path - 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.getElementByPath(String)List<com.google.gwt.dom.client.Element> getElementsByPath(String path)
LegacyLocatorStrategy.path - The String locator which identifies target elements.List<com.google.gwt.dom.client.Element> getElementsByPathStartingAt(String path, com.google.gwt.dom.client.Element root)
LegacyLocatorStrategy.path - The String locator which identifies target elements.root - The element that is at the root of the path.getElementsByPath(String)Copyright © 2023 Vaadin Ltd. All rights reserved.