-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gwt-driver-7 Add faster child/descendant Widget locator #10
Conversation
src/main/java/com/vertispan/webdriver/gwt/gwtdriver/client/SeleniumExporter.java
Show resolved
Hide resolved
- Added new exported method "getChildren" - Modified the existing descendant methods to stop including root widget
ba3fda8
to
a742d7b
Compare
removed the need to pass the driver in by getting it from the search context. pulled up common methods into base class. Created convenient static methods in the GwtBy
convenience to call the getChildren exported method.
src/main/java/com/vertispan/webdriver/gwt/gwtdriver/by/ByDescendantWidget.java
Show resolved
Hide resolved
public List<WebElement> findElements(SearchContext context) { | ||
Require.nonNull("Search Context", context); | ||
final WebElement contextElem = toWebElement(context); | ||
ExportedMethods m = ClientMethodsFactory.create(ExportedMethods.class, getDriver(context)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we shouldn't ThreadLocal/WeakRef map these instances to avoid re-creating them each call, and make them easy to look up on the current driver instance...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe. future update. I'll add new ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the unit test to utilize uibinder for easier test UI creation
Added 4 new exported methods:
Added a new "By" for the descendants search
Added a base GwtBy class with some helpers.
Modified each By implementation that needs a WebDriver to extract from the SearchContext