-
-
Notifications
You must be signed in to change notification settings - Fork 46
Description
It will be very helpful to have a module that supports Selenium WebDriver for testing applications written with DominoUI components.
Similar to gwt-driver, we would need to be able to 'find' and operate with DominoUI components from a testing perspective. gwt-driver has a small advantage with UIObject/Widget subclasses as the elements inserted into the DOM contain the __listener property with class information, so it makes is easy to crawl up elements to find the first one associated with a Widget.
However, with DominoUI, this does not seem possible, so a more 'raw' HTML search will be needed.
If the components are 'found' by using CSS classes, then it may make sense for the module to be closely related to domino ui releases; in case CSS classes change from release to release.
I can foresee having several base classes (again, similar to gwt-driver):
@ForDominoComponent(BaseDominoElement.class)
public class DominoComponent<F extends DominoComponentFinder<?>> {
public static <C extends DominoComponent<T>, T extends DominoComponentFinder<C>> T find(Class<C> componentType, WebDriver driver) {
// ...
}
// ...
}
Then usage:
CheckBoxModel cb = DominoComponent.find(CheckBoxModel.class, getDriver(), getElement())
.withLabel("Apply to all")
.done();
cb.click();