Search in sources :

Example 61 with SelenideElement

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

the class ActionConfigureComponentPeriodicSql method fillSQLperiod.

public void fillSQLperiod(String period) {
    log.debug("filling sql period: {}", period);
    SelenideElement element = $(Element.INPUT_PERIOD).shouldBe(visible);
    this.fillInput(element, period);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 62 with SelenideElement

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

the class BasicFilterStepComponent method getPathInputOptions.

public List<String> getPathInputOptions() {
    SelenideElement pathDataList = this.getRootElement().find(DataList.PATH_LIST);
    ElementsCollection options = pathDataList.findAll(Element.OPTION);
    List<String> optionsList = new ArrayList<String>();
    for (SelenideElement option : options) {
        String value = option.getAttribute("value");
        optionsList.add(value);
    }
    return optionsList;
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement) ArrayList(java.util.ArrayList)

Example 63 with SelenideElement

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

the class BasicFilterStepComponent method validate.

public boolean validate() {
    log.info("Validating configure page");
    SelenideElement predicateSelect = this.getPredicateSelect();
    SelenideElement pathInput = this.getPathInput();
    SelenideElement valueInput = this.getValueInput();
    SelenideElement opSelect = this.getOpSelect();
    boolean isPredicateSelect = predicateSelect.waitWhile(Condition.not(visible), 5 * 1000).is(visible);
    boolean isPathInput = pathInput.waitWhile(Condition.not(visible), 5 * 1000).is(visible);
    boolean isValueInput = valueInput.waitWhile(Condition.not(visible), 5 * 1000).is(visible);
    boolean isOpSelect = opSelect.waitWhile(Condition.not(visible), 5 * 1000).is(visible);
    log.info("isPredicateSelect {}, isPathInput {}, isValueInput {}, isOpSelect {}", isPredicateSelect, isPathInput, isValueInput, isOpSelect);
    return isPredicateSelect && isPathInput && isValueInput && isOpSelect;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 64 with SelenideElement

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

the class BasicFilterStepComponent method setValue.

public void setValue(String value) {
    log.info("setting basic filter step value to {}", value);
    SelenideElement valueInput = this.getRootElement().find(Input.VALUE);
    valueInput.shouldBe(visible).clear();
    valueInput.shouldBe(visible).sendKeys(value);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 65 with SelenideElement

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

the class BasicFilterStepComponent method setOp.

public void setOp(String op) {
    log.info("setting basic filter step op to option number {}", op);
    SelenideElement opInput = this.getRootElement().find(Select.OP);
    this.selectOption(opInput, op);
}
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