Search in sources :

Example 76 with SelenideElement

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

the class CommonSteps method expectElementsPresent.

@Then("^she is presented with the \"([^\"]*)\" elements$")
public void expectElementsPresent(String elementClassNames) {
    String[] elementClassNamesArray = elementClassNames.split(",");
    for (String elementClassName : elementClassNamesArray) {
        SelenideElement element = new SyndesisRootPage().getElementByClassName(elementClassName);
        element.shouldBe(visible);
    }
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) SelenideElement(com.codeborne.selenide.SelenideElement) Then(cucumber.api.java.en.Then)

Example 77 with SelenideElement

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

the class CommonSteps method selectsFromDropdown.

@And("^she selects \"([^\"]*)\" from \"([^\"]*)\" dropdown$")
public void selectsFromDropdown(String option, String selectId) throws Throwable {
    SelenideElement selectElement = $(String.format("select[name=\"%s\"]", selectId)).shouldBe(visible);
    selectElement.selectOption(option);
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) And(cucumber.api.java.en.And)

Example 78 with SelenideElement

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

the class CommonSteps method successNotificationIsPresent.

@Then("^she can see success notification$")
public void successNotificationIsPresent() {
    SelenideElement allertSucces = new SyndesisRootPage().getElementByClassName("alert-success");
    allertSucces.shouldBe(visible);
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) SelenideElement(com.codeborne.selenide.SelenideElement) Then(cucumber.api.java.en.Then)

Example 79 with SelenideElement

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

the class CommonSteps method navigateTo.

@When("^\"([^\"]*)\" navigates? to the \"([^\"]*)\" page$")
public void navigateTo(String username, String title) {
    SelenideElement selenideElement = $(By.className("nav-pf-vertical")).shouldBe(visible);
    ElementsCollection allLinks = selenideElement.findAll(By.className("list-group-item-value"));
    allLinks.find(Condition.exactText(title)).shouldBe(visible).click();
}
Also used : ElementsCollection(com.codeborne.selenide.ElementsCollection) SelenideElement(com.codeborne.selenide.SelenideElement) When(cucumber.api.java.en.When)

Example 80 with SelenideElement

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

the class ConnectionSteps method helpBlockVisible.

@Then("^she is presented with help block with text \"([^\"]*)\"$")
public void helpBlockVisible(String helpText) {
    SelenideElement helpBlock = $(By.className("help-block"));
    helpBlock.shouldBe(visible);
    Assertions.assertThat(helpBlock.getText().equals(helpText)).isTrue();
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) Then(cucumber.api.java.en.Then)

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