|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LocatorStrategy
This interface should be implemented by all locator strategies. A locator strategy is responsible for generating and decoding a string that identifies an element in the DOM. A strategy can implement its own syntax for the locator string, which may be completely different from any other strategy's syntax.
| 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. |
| Method Detail |
|---|
boolean validatePath(java.lang.String path)
path - a locator path expression
java.lang.String getPathForElement(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.
Element getElementByPath(java.lang.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.
Element getElementByPathStartingAt(java.lang.String path,
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)java.util.List<Element> getElementsByPath(java.lang.String path)
LegacyLocatorStrategy.
path - The String locator which identifies target elements.
java.util.List<Element> getElementsByPathStartingAt(java.lang.String path,
Element root)
LegacyLocatorStrategy.
path - The String locator which identifies target elements.root - The element that is at the root of the path.
getElementsByPath(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||