|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.componentlocator.ComponentLocator
public class ComponentLocator
ComponentLocator provides methods for generating a String locator for a given DOM element and for locating a DOM element using a String locator.
The main use for this class is locating components for automated testing purposes.
com.vaadin.client.ComponentLocator| Constructor Summary | |
|---|---|
ComponentLocator(ApplicationConnection client)
Construct a ComponentLocator for the given ApplicationConnection. |
|
| Method Summary | |
|---|---|
ApplicationConnection |
getClient()
Returns the ApplicationConnection used by this locator. |
com.google.gwt.user.client.Element |
getElementByPath(java.lang.String path)
Locates an element using a String locator (path) which identifies a DOM element. |
com.google.gwt.user.client.Element |
getElementByPathStartingAt(java.lang.String path,
Element root)
Locates an element using a String locator (path) which identifies a DOM element. |
|
getElementsByPath(java.lang.String path)
Locates elements using a String locator (path) which identifies DOM elements. |
|
getElementsByPathStartingAt(java.lang.String path,
Element root)
Locates elements using a String locator (path) which identifies DOM elements. |
java.lang.String |
getLegacyPathForElement(Element targetElement)
Returns a String locator which uniquely identifies the target element. |
java.lang.String |
getPathForElement(com.google.gwt.user.client.Element targetElement)
Deprecated. As of 7.2, call and override getPathForElement(Element) instead |
java.lang.String |
getPathForElement(Element targetElement)
Generates a String locator which uniquely identifies the target element. |
boolean |
isValidForLegacyLocator(java.lang.String path)
Check if a given selector is valid for LegacyLocatorStrategy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComponentLocator(ApplicationConnection client)
client - ApplicationConnection instance for the application.| Method Detail |
|---|
@Deprecated public java.lang.String getPathForElement(com.google.gwt.user.client.Element targetElement)
getPathForElement(Element) instead
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.
public 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.
public java.lang.String getLegacyPathForElement(Element targetElement)
getPathForElement(com.google.gwt.user.client.Element) instead.
targetElement - The element to generate a path for.
public com.google.gwt.user.client.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.publicgetElementsByPath(java.lang.String path)
path - The String locator which identifies target elements.
path or
empty array if elements could not be located.publicgetElementsByPathStartingAt(java.lang.String path, Element root)
path - The path of elements to be foundroot - The root element where the path is anchored
path or
empty array if elements could not be located.getElementByPath(String)
public com.google.gwt.user.client.Element getElementByPathStartingAt(java.lang.String path,
Element root)
path - The path of the element to be foundroot - The root element where the path is anchored
path or null if the element
could not be located.getElementByPath(String)public ApplicationConnection getClient()
ApplicationConnection used by this locator.
This method is primarily for internal use by the framework.
public boolean isValidForLegacyLocator(java.lang.String path)
path - Vaadin selector path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||