Search in sources :

Example 71 with SelenideElement

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

the class DataMapperComponent method createMapping.

public void createMapping(String source, String target) {
    log.info("creating mapping from {} to {}", source, target);
    ElementsCollection dmColumns = this.dataMapperColumns();
    SelenideElement src = dmColumns.get(0);
    SelenideElement dest = dmColumns.get(1);
    this.selectMapping(source, src);
    this.selectMapping(target, dest);
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 72 with SelenideElement

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

the class IntegrationsListComponent method getIntegrationName.

public String getIntegrationName(SelenideElement integration) {
    String name;
    SelenideElement nameElement = integration.find(Element.ITEM_TITLE);
    boolean isNamePresent = nameElement.is(visible);
    if (isNamePresent) {
        name = nameElement.getText();
    } else {
        log.warn("Name is not present!");
        name = integration.find(Element.ITEM_DESCRIPTION).shouldBe(visible).getText();
    }
    return name;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 73 with SelenideElement

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

the class IntegrationsListComponent method checkIfKebabHasWhatShouldHave.

public void checkIfKebabHasWhatShouldHave(SelenideElement item, String status) {
    String[] properActions = this.getKebabActionsByStatus(status);
    if (properActions.length == 0) {
        throw new Error("Wrong status!");
    }
    // log.debug(`checking menu menu of menu element:`);
    SelenideElement kebabE = this.getKebabElement(true, item);
    kebabE.shouldBe(visible);
    for (String action : properActions) {
        kebabE.find(By.linkText(action)).isDisplayed();
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 74 with SelenideElement

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

the class IntegrationsListComponent method isIntegrationPresent.

public boolean isIntegrationPresent(String name) {
    log.info("Checking if integration {} is present in the list", name);
    SelenideElement integration = this.getIntegration(name);
    return integration.is(visible);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 75 with SelenideElement

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

the class OAuthSettingsComponent method getSettingsItem.

/**
 * Fetch all settings items and find proper one according to given name.
 *
 * @param name name of settings item
 * @returns element
 */
public SelenideElement getSettingsItem(String name) {
    ElementsCollection items = this.listSettingsItems(null).shouldBe(sizeGreaterThan(0));
    log.info("searching for {} in {} items", name, items.size());
    for (SelenideElement item : items) {
        String title = item.$(Element.SETTINGS_TITLE).shouldBe(visible).getText();
        if (name.equals(title)) {
            return item;
        }
    }
    throw new IllegalArgumentException(String.format("item%s not found", name));
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Aggregations

SelenideElement (com.codeborne.selenide.SelenideElement)91 ElementsCollection (com.codeborne.selenide.ElementsCollection)16 Then (cucumber.api.java.en.Then)13 And (cucumber.api.java.en.And)8 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)6 ArrayList (java.util.ArrayList)5 When (cucumber.api.java.en.When)4 Test (org.junit.Test)4 QualityGate (org.sonar.wsclient.qualitygate.QualityGate)4 ProjectQualityGatePage (pageobjects.ProjectQualityGatePage)4 Given (cucumber.api.java.en.Given)2 ModalDialogPage (io.syndesis.qe.pages.ModalDialogPage)2 DashboardPage (io.syndesis.qe.pages.dashboard.DashboardPage)2 StepComponent (io.syndesis.qe.pages.integrations.edit.steps.StepComponent)2 List (java.util.List)2 By (org.openqa.selenium.By)2 CollectionCondition.sizeGreaterThanOrEqual (com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual)1 Condition.visible (com.codeborne.selenide.Condition.visible)1 AbstractSelenideTest (com.evolveum.midpoint.testing.selenide.tests.AbstractSelenideTest)1 DataTable (cucumber.api.DataTable)1