Search in sources :

Example 11 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.

the class BasicFilterStepComponent method setLatestValueInput.

public void setLatestValueInput(String value) {
    log.info("Setting basic filter step value to {}", value);
    ElementsCollection valueInputArray = this.getRootElement().findAll(Input.VALUE);
    SelenideElement valueInput = valueInputArray.get(valueInputArray.size() - 1);
    valueInput.shouldBe(visible).clear();
    valueInput.shouldBe(visible).sendKeys(value);
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 12 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.

the class DataMapperComponent method dataMapperColumns.

/**
 * Find proper source and target datamapper columns.
 *
 * @returns ElementsCollection div elements
 */
private ElementsCollection dataMapperColumns() {
    log.info("searching for columns");
    // loadSelector should be visible:
    this.getRootElement().$(Element.LOADER_SELECTOR).shouldBe(visible);
    log.info("datamapper has been loaded");
    ElementsCollection dmColumns = this.getRootElement().findAll(Element.DM_COLLUMNS).shouldBe(size(2));
    log.info("found {} datamapper columns", dmColumns.size());
    return dmColumns;
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection)

Example 13 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.

the class IntegrationsListComponent method clickDeleteIntegration.

public void clickDeleteIntegration(String integrationName) {
    log.info("clicking delete link for integration {}", integrationName);
    this.getRootElement().find(Element.ITEM).shouldBe(visible);
    SelenideElement parentElement = null;
    ElementsCollection parentElements = this.getAllIntegrations();
    for (SelenideElement element : parentElements) {
        String name = getIntegrationName(element);
        if (name.equals(integrationName)) {
            parentElement = element;
            break;
        }
    }
    if (parentElement != null) {
        parentElement.find(Button.KEBAB_DROPDOWN).shouldBe(visible).click();
    }
    this.getRootElement().find(Link.KEBAB_DELETE).shouldBe(visible).click();
    ModalDialogPage modal = new ModalDialogPage();
    modal.getButton("OK").shouldBe(visible).click();
}
Also used : ModalDialogPage(io.syndesis.qe.pages.ModalDialogPage) ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 14 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.

the class IntegrationsListComponent method checkAllIntegrationsKebabButtons.

public void checkAllIntegrationsKebabButtons() {
    ElementsCollection integrationsItems = getAllIntegrations();
    for (SelenideElement item : integrationsItems) {
        String status = this.getIntegrationItemStatus(item);
        if (status.equals("Deleted")) {
            this.getKebabButtonFromItem(item).shouldBe(hidden);
        } else {
            SelenideElement kebabB = this.getKebabButtonFromItem(item);
            kebabB.shouldBe(visible).click();
            this.checkIfKebabHasWhatShouldHave(item, status);
        }
    }
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 15 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.

the class CommonSteps method navigateToHelp.

@When("^.*navigates? to the \"([^\"]*)\" page in help menu$")
public void navigateToHelp(String title) {
    SelenideElement helpDropdownMenu = $(By.id("dropdownHelp")).shouldBe(visible);
    if (!helpDropdownMenu.getAttribute("class").contains("open")) {
        helpDropdownMenu.click();
    }
    SelenideElement dropdownElementsTable = $(By.className("dropdown-menu")).shouldBe(visible);
    ElementsCollection dropdownElements = dropdownElementsTable.findAll(By.tagName("a"));
    dropdownElements.filter(text(title)).shouldHaveSize(1).get(0).shouldBe(visible).click();
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement) When(cucumber.api.java.en.When)

Aggregations

ElementsCollection (com.codeborne.selenide.ElementsCollection)31 SelenideElement (com.codeborne.selenide.SelenideElement)15 ArrayList (java.util.ArrayList)9 Then (cucumber.api.java.en.Then)4 When (cucumber.api.java.en.When)2 StepComponent (io.syndesis.qe.pages.integrations.edit.steps.StepComponent)2 Given (cucumber.api.java.en.Given)1 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)1 Connections (io.syndesis.qe.pages.connections.Connections)1 BasicFilterStepComponent (io.syndesis.qe.pages.integrations.edit.steps.BasicFilterStepComponent)1 ConfigureConnectionSteps (io.syndesis.qe.steps.connections.wizard.phases.ConfigureConnectionSteps)1 NameConnectionSteps (io.syndesis.qe.steps.connections.wizard.phases.NameConnectionSteps)1 List (java.util.List)1