use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class ChooseFormDialog method nodes.
private SetMultimap<String, FluentElement> nodes() {
// parsing manually, for some reason /div containsText(nodeName) does not work
SetMultimap<String, FluentElement> nodes = HashMultimap.create();
FluentElement formElement = modal.form().getForm();
for (FluentElement node : formElement.find().span(XPathBuilder.withClass("icon")).ancestor().div().asList().list()) {
String text = node.text();
if (!Strings.isNullOrEmpty(text)) {
nodes.put(text, node);
}
}
return nodes;
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class DesignerField method labelWithMandatoryMarker.
private String labelWithMandatoryMarker() {
Optional<FluentElement> labelElement = element.find().div().div(withClass("h5")).firstIfPresent();
if (labelElement.isPresent()) {
FluentElement header = labelElement.get();
String label = labelElement.get().text();
Optional<FluentElement> code = header.find().span(withClass("small")).firstIfPresent();
if (code.isPresent()) {
label = label.substring(code.get().text().length() + 1);
}
return label;
}
return "";
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class BsTable method columns.
public List<Cell> columns() {
List<Cell> columns = Lists.newArrayList();
FluentElement columnsContainer = container.find().thead().tr().asList().get(1);
for (FluentElement element : columnsContainer.find().th().asList()) {
columns.add(new Cell(element));
}
return columns;
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class SubformContainer method getPanels.
public List<SubformPanel> getPanels() {
List<SubformPanel> panels = Lists.newArrayList();
List<FluentElement> elements = headerDiv.findElements(By.xpath("following-sibling::*")).list();
for (FluentElement element : elements) {
if (element.getTagName().equalsIgnoreCase("div") && element.attribute("class").contains("subformPanel")) {
panels.add(new SubformPanel(element));
} else {
break;
}
}
return panels;
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class ApplicationPage method navigateToReportsTab.
public ReportsTab navigateToReportsTab() {
FluentElement container = container();
container.find().div(withText("Reports")).clickWhenReady();
// we may got "Save" dialog before leaving the current page
closeSaveDialogSilently(true);
return new ReportsTab(container);
}
Aggregations