Locating Swing components in JavaDriver can be done on the JavaDriver instance itself or on a WebElement that is fetched earlier. A WebElement in the context of JavaDriver represents a Swing™ component (or a Java/Fx™ node). JavaDriver bindings exposes
findElements methods. The
findElement method returns a WebElement object matching the query, and throws an exception if such an element cannot be found. The
findElements returns a list of WebElements, possibly empty if no components match the query.
The “find” methods take a locator or query object called
This article discusses the
By strategies that are implemented by JavaDriver for accessing Swing™ components.