Search in sources :

Example 21 with ElementsCollection

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

the class IntegrationActivityListComponent method clickButtonOfActivityStep.

public void clickButtonOfActivityStep(String buttonName, String stepName) {
    ElementsCollection activitySteps = $(Element.ROOT).find(Element.ACTIVITY_STEPS).shouldBe(visible).findAll(Element.ACTIVITY_STEP).shouldBe(sizeGreaterThan(0));
    SelenideElement step = activitySteps.stream().filter(el -> checkStepName(el, stepName)).findFirst().get();
    this.clickButtonInStep(step, buttonName);
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 22 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection 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 23 with ElementsCollection

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

the class BasicFilterStepComponent method getPathInputAllValues.

public List<String> getPathInputAllValues() {
    ElementsCollection pathInputArray = this.getPathInputs();
    int count = pathInputArray.size();
    List<String> pathInputValues = new ArrayList<String>();
    for (int i = 0; i < count; i++) {
        String value = pathInputArray.get(i).getAttribute("value");
        pathInputValues.add(value);
    }
    return pathInputValues;
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) ArrayList(java.util.ArrayList)

Example 24 with ElementsCollection

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

the class DataMapperComponent method fieldsCount.

/**
 * Eventually returns count of found datamapper fields.
 *
 * @returns count of fields
 */
public Integer fieldsCount() {
    ElementsCollection dmColumns = this.dataMapperColumns();
    SelenideElement countElement = dmColumns.get(0).$(Element.LOADER_SELECTOR).shouldBe(visible);
    String countText = countElement.getText();
    // "77 fields" -> 77
    String[] found = countText.split(" ");
    if (found.length != 2) {
        throw new IllegalArgumentException(String.format("failed to get files number from %s", countText));
    }
    return Integer.parseInt(found[0]);
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 25 with ElementsCollection

use of com.codeborne.selenide.ElementsCollection 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)

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