Search in sources :

Example 16 with SelenideElement

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

the class DashboardPage method isIntegrationPresent.

public boolean isIntegrationPresent(String integrationName) {
    log.info("Checking if integration {} is present in the list", integrationName);
    SelenideElement integration = this.getRootElement().find(By.cssSelector(String.format("div[innertext='%s']", integrationName)));
    return integration.is(visible);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 17 with SelenideElement

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

the class IntegrationFlowViewComponent method getStepsArray.

public List<String> getStepsArray() {
    ElementsCollection steps = this.getRootElement().findAll(Element.STEP);
    List<String> stepsArray = new ArrayList<String>();
    for (int i = 1; i < (steps.size() - 1); i++) {
        steps.get(i).click();
        SelenideElement title = this.getRootElement().find(Element.ACTIVE_STEP);
        String type = title.getText();
        StepComponent stepComponent = stepComponentFactory.getStep(type, "");
        // wait for root element to be loaded
        stepComponent.getRootElement();
        stepComponent.initialize();
        stepsArray.add(stepComponent.getParameter());
    }
    this.getFirstVisibleButton("Done").shouldBe(visible).click();
    return stepsArray;
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) StepComponent(io.syndesis.qe.pages.integrations.edit.steps.StepComponent) SelenideElement(com.codeborne.selenide.SelenideElement) ArrayList(java.util.ArrayList)

Example 18 with SelenideElement

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

the class IntegrationFlowViewComponent method getWarningTextFromStep.

public String getWarningTextFromStep(int stepPosition) {
    SelenideElement warningIcon = getStepWarningElement(stepPosition).shouldBe(visible);
    // open popup
    warningIcon.click();
    String text = getPopoverText();
    // hide popup
    warningIcon.click();
    return text;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 19 with SelenideElement

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

the class IntegrationFlowViewComponent method clickAddStepLink.

public void clickAddStepLink(int pos) {
    List<SelenideElement> allStepInserts = getRootElement().$$(Element.STEP_INSERT).shouldHave(sizeGreaterThanOrEqual(pos));
    SelenideElement stepElement = allStepInserts.get(pos);
    stepElement.hover();
    getRootElement().$(Link.ADD_STEP).shouldBe(visible).click();
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 20 with SelenideElement

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

the class ActionConfigureComponentFieldFiller method checkAndGet.

private SelenideElement checkAndGet(By elem) {
    Class inputClass = getInputClass();
    Class selectClass = getSelectClass();
    SelenideElement element = this.getRootElement().find(elem).shouldBe(visible);
    String elemTagName = element.getTagName();
    if (("input".equals(elemTagName) || "textarea".equals(elemTagName)) && isContainedInLocators(elem, inputClass) || "select".equals(elemTagName) && isContainedInLocators(elem, selectClass)) {
        return element;
    } else {
        return null;
    }
}
Also used : 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