Search in sources :

Example 1 with FluentElements

use of org.activityinfo.test.pageobject.api.FluentElements in project activityinfo by bedatadriven.

the class GxtGrid method findCell.

public GxtCell findCell(String rowText, String columnId) {
    FluentElement nodeWithText = container.find().anyElement(withText(rowText)).first();
    FluentElement ancestor = nodeWithText.find().ancestor().div(withClass("x-grid3-row")).first();
    FluentElements cells = ancestor.find().descendants().td(withClass("x-grid3-td-" + columnId)).waitForList();
    if (cells.size() != 1) {
        throw new AssertionError(format("Expected unique row containing text '%s', found %d rows", rowText, cells.size()));
    }
    return new GxtCell(cells.first().get());
}
Also used : FluentElement(org.activityinfo.test.pageobject.api.FluentElement) FluentElements(org.activityinfo.test.pageobject.api.FluentElements)

Example 2 with FluentElements

use of org.activityinfo.test.pageobject.api.FluentElements in project activityinfo by bedatadriven.

the class GxtGrid method columnValues.

public List<String> columnValues(String columnId) {
    FluentElements cells = container.find().div(withClass("x-grid3-cell-inner"), withClass("x-grid3-col-" + columnId)).asList();
    List<String> values = new ArrayList<>();
    for (FluentElement cell : cells) {
        values.add(cell.text().trim());
    }
    return values;
}
Also used : FluentElements(org.activityinfo.test.pageobject.api.FluentElements) FluentElement(org.activityinfo.test.pageobject.api.FluentElement) ArrayList(java.util.ArrayList)

Example 3 with FluentElements

use of org.activityinfo.test.pageobject.api.FluentElements in project activityinfo by bedatadriven.

the class FieldPalette method getFieldTypes.

public List<String> getFieldTypes() {
    FluentElements elements = panel.find().div(withClass("btn")).asList();
    List<String> types = Lists.newArrayList();
    for (FluentElement element : elements) {
        types.add(element.text());
    }
    return types;
}
Also used : FluentElements(org.activityinfo.test.pageobject.api.FluentElements) FluentElement(org.activityinfo.test.pageobject.api.FluentElement)

Example 4 with FluentElements

use of org.activityinfo.test.pageobject.api.FluentElements in project activityinfo by bedatadriven.

the class Dashboard method getPortletTitles.

public List<String> getPortletTitles() {
    assertAtLeastOnePortletIsVisible();
    List<String> titles = new ArrayList<>();
    FluentElements headers = container.find().span(withClass("x-panel-header-text")).asList();
    for (FluentElement header : headers) {
        titles.add(header.text());
    }
    return titles;
}
Also used : FluentElements(org.activityinfo.test.pageobject.api.FluentElements) FluentElement(org.activityinfo.test.pageobject.api.FluentElement) ArrayList(java.util.ArrayList)

Aggregations

FluentElement (org.activityinfo.test.pageobject.api.FluentElement)4 FluentElements (org.activityinfo.test.pageobject.api.FluentElements)4 ArrayList (java.util.ArrayList)2