Search in sources :

Example 51 with SelenideElement

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

the class SyndesisPageObject method fillInput.

public void fillInput(String inputId, String value) {
    SelenideElement input = this.getElementById(inputId);
    assertThat(input.getTagName(), is("input"));
    if (input.getAttribute("type").equals("checkbox")) {
        input.setSelected(Boolean.valueOf(value));
    } else {
        input.shouldBe(visible).clear();
        input.shouldBe(visible).sendKeys(value);
    }
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 52 with SelenideElement

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

the class SyndesisPageObject method fillForm.

/**
 * Fill form with given data. It will look for ui element for every map entry.
 *
 * @param data key,value data. Key is used for element lookup
 * @param parrentElement search inputs in child elements of this one
 */
public void fillForm(Map<By, String> data, SelenideElement parrentElement) {
    String value;
    for (By locator : data.keySet()) {
        value = data.get(locator);
        SelenideElement inputElement = parrentElement.find(locator).shouldBe(visible);
        inputElement.sendKeys(value);
    }
}
Also used : By(org.openqa.selenium.By) SelenideElement(com.codeborne.selenide.SelenideElement)

Example 53 with SelenideElement

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

the class SyndesisPageObject method selectOption.

public void selectOption(SelenideElement selectElement, String option) {
    SelenideElement optionElement = getElementContainingText(By.tagName("option"), option);
    optionElement.shouldBe(visible).click();
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 54 with SelenideElement

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

the class CustomizationsPage method validate.

@Override
public boolean validate() {
    SelenideElement rootElement = this.getRootElement();
    boolean isTechExtensionsLinkPresent = rootElement.find(Link.TECH_EXTENSIONS).is(visible);
    boolean isApiClientLinkPresent = rootElement.find(Link.API_CLIENT_CONNECTORS).is(visible);
    return isTechExtensionsLinkPresent && isApiClientLinkPresent;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 55 with SelenideElement

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

the class TechExtensionsListComponent method getExtensionItem.

public SelenideElement getExtensionItem(String name) {
    $(Element.LIST_WRAPPER).shouldBe(visible);
    ElementsCollection items = $$(Element.ITEM);
    SelenideElement resultItem = items.stream().filter(item -> item.find(Element.ITEM_TITLE).getText().equals(name)).findAny().orElse(null);
    return resultItem;
}
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