Search in sources :

Example 6 with ElementsCollection

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

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

the class BasicFilterStepComponent method getOpSelectAllValues.

public List<String> getOpSelectAllValues() {
    log.debug("Searching basic filter op select checked options");
    ElementsCollection opSelectArray = this.getOpSelects();
    int size = opSelectArray.size();
    List<String> opSelectValues = new ArrayList<String>();
    for (int i = 0; i < size; i++) {
        String value = opSelectArray.get(i).shouldBe(visible).getText();
        opSelectValues.add(value.trim());
    }
    return opSelectValues;
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) ArrayList(java.util.ArrayList)

Example 8 with ElementsCollection

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

the class BasicFilterStepComponent method setLatestOpSelect.

public void setLatestOpSelect(String op) {
    log.info("setting basic filter step op to option number {}", op);
    ElementsCollection opInputArray = this.getRootElement().findAll(Select.OP);
    SelenideElement opInput = opInputArray.get(opInputArray.size() - 1);
    this.selectOption(opInput, op);
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 9 with ElementsCollection

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

the class BasicFilterStepComponent method getValueInputAllValues.

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

Example 10 with ElementsCollection

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

the class BasicFilterStepComponent method setLatestPathInput.

public void setLatestPathInput(String path) {
    log.info("setting basic filter step path to {}", path);
    ElementsCollection pathInputArray = this.getRootElement().findAll(Input.PATH);
    SelenideElement pathInput = pathInputArray.get(pathInputArray.size() - 1);
    pathInput.shouldBe(visible).clear();
    pathInput.shouldBe(visible).sendKeys(path);
}
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