Search in sources :

Example 26 with FluentElement

use of org.activityinfo.test.pageobject.api.FluentElement 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)

Example 27 with FluentElement

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

the class ImportDialog method enterExcelData.

public ImportDialog enterExcelData(String excelData) {
    FluentElement textArea = modal.form().getForm().find().textArea(withClass("form-control")).first();
    textArea.element().clear();
    textArea.sendKeys(excelData);
    return this;
}
Also used : FluentElement(org.activityinfo.test.pageobject.api.FluentElement)

Example 28 with FluentElement

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

the class GxtGrid method waitUntilReloaded.

public GxtGrid waitUntilReloaded() throws InterruptedException {
    // Wait until the loading mask appears
    FluentElement loadingMask = container.root().waitFor(By.className("ext-el-mask"));
    // Wait until it disappears...
    loadingMask.waitUntil(ExpectedConditions.stalenessOf(loadingMask.element()));
    return this;
}
Also used : FluentElement(org.activityinfo.test.pageobject.api.FluentElement)

Example 29 with FluentElement

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

the class DesignUiTest method navigateAwayWithoutSavingChanges.

// AI-877
@Test
public void navigateAwayWithoutSavingChanges() throws Exception {
    driver.login();
    driver.setup().createDatabase(property("name", DATABASE));
    driver.setup().createForm(name(FORM), property("database", DATABASE), property("classicView", false));
    driver.ensureLoggedIn();
    String db = driver.getAliasTable().getAlias(DATABASE);
    String form = driver.getAliasTable().getAlias(FORM);
    DesignTab tab = driver.getApplicationPage().navigateToDesignTab().selectDatabase(db);
    DesignPage designPage = tab.design();
    GxtTree.GxtNode node = designPage.getDesignTree().select(form);
    FluentElement nodeElement = node.getElement();
    nodeElement.doubleClick();
    FluentElement editor = findInputEditor(tab.getContainer());
    editor.sendKeys("123");
    try {
        driver.getApplicationPage().navigateToDashboard();
    } catch (Exception e) {
    // ignore : our goal is to navigate away and make sure confirmation dialog appears
    }
    GxtModal confirmationModal = GxtModal.waitForModal(designPage.getContainer().root());
    assertNotNull(confirmationModal);
}
Also used : FluentElement(org.activityinfo.test.pageobject.api.FluentElement) DesignPage(org.activityinfo.test.pageobject.web.design.DesignPage) GxtModal(org.activityinfo.test.pageobject.gxt.GxtModal) DesignTab(org.activityinfo.test.pageobject.web.design.DesignTab) GxtTree(org.activityinfo.test.pageobject.gxt.GxtTree) Test(org.junit.Test)

Aggregations

FluentElement (org.activityinfo.test.pageobject.api.FluentElement)29 FluentElements (org.activityinfo.test.pageobject.api.FluentElements)4 WebDriver (org.openqa.selenium.WebDriver)4 ArrayList (java.util.ArrayList)3 DataTableRow (gherkin.formatter.model.DataTableRow)2 GxtModal (org.activityinfo.test.pageobject.gxt.GxtModal)2 GxtTree (org.activityinfo.test.pageobject.gxt.GxtTree)2 DesignPage (org.activityinfo.test.pageobject.web.design.DesignPage)2 DesignTab (org.activityinfo.test.pageobject.web.design.DesignTab)2 Test (org.junit.Test)2 Stopwatch (com.google.common.base.Stopwatch)1 List (java.util.List)1 BsDataEntryDriver (org.activityinfo.test.driver.BsDataEntryDriver)1 DataEntryDriver (org.activityinfo.test.driver.DataEntryDriver)1 XPathBuilder (org.activityinfo.test.pageobject.api.XPathBuilder)1 ReportsTab (org.activityinfo.test.pageobject.web.reports.ReportsTab)1 Select (org.openqa.selenium.support.ui.Select)1