use of org.activityinfo.test.driver.DataEntryDriver in project activityinfo by bedatadriven.
the class DataEntryTab method newSubmission.
public DataEntryDriver newSubmission() {
buttonClick(I18N.CONSTANTS.newSite());
final FluentElement windowElement = container.root();
return container.waitFor(new Function<WebDriver, DataEntryDriver>() {
@Override
public DataEntryDriver apply(WebDriver input) {
if (windowElement.find().div(withClass(GxtModal.CLASS_NAME)).exists()) {
return new GxtDataEntryDriver(new GxtModal(windowElement));
} else if (windowElement.find().div(withClass("formPanel")).firstIfPresent().isPresent()) {
return new BsDataEntryDriver(windowElement);
} else {
return null;
}
}
});
}
Aggregations