Search in sources :

Example 46 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectsPage method searchProject.

public ProjectsPage searchProject(String search) {
    SelenideElement searchInput = $(".projects-facet-search input");
    searchInput.setValue("").sendKeys(search);
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 47 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectAnalysisItem method deleteLastEvent.

public ProjectAnalysisItem deleteLastEvent() {
    int eventsCount = elt.findAll(".project-activity-event").size();
    SelenideElement lastEvent = elt.find(".project-activity-event:last-child");
    lastEvent.find(".js-delete-event").click();
    SelenideElement modal = $(".modal");
    modal.shouldBe(visible);
    modal.find("button[type=\"submit\"]").click();
    elt.findAll(".project-activity-event").shouldHaveSize(eventsCount - 1);
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 48 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectAnalysisItem method changeLastEvent.

public ProjectAnalysisItem changeLastEvent(String newName) {
    SelenideElement lastEvent = elt.find(".project-activity-event:last-child");
    lastEvent.find(".js-change-event").click();
    SelenideElement modal = $(".modal");
    modal.shouldBe(visible);
    modal.find("input").setValue(newName);
    modal.find("button[type=\"submit\"]").click();
    lastEvent.shouldHave(text(newName));
    return this;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 49 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.

the class ProjectDashboardPage method getLanguageDistribution.

public SelenideElement getLanguageDistribution() {
    SelenideElement element = $("#overview-language-distribution");
    element.shouldBe(visible);
    return element;
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement)

Example 50 with SelenideElement

use of com.codeborne.selenide.SelenideElement in project midpoint by Evolveum.

the class AbstractSelenideTest method assignObjectToFocusObject.

/**
     * Prerequirement: user's Edit page is to be opened
     * Assign the specified roleName role to user
     * @param linkText          the text of the menu item from the Assignments section menu
     * @param objectName        the name of the object to be assigned
     */
public void assignObjectToFocusObject(String linkText, String objectType, String objectName, String tabName) {
    if (tabName != null && tabName.equals(INDUCEMENT_TAB_NAME)) {
        openInducementsTab();
    } else {
        openAssignmentsTab();
    }
    $(byAttribute("about", "dropdownMenu")).click();
    //click Assign menu item with the specified linkText
    $(By.linkText(linkText)).shouldBe(visible).click();
    if (objectType != null && !(objectType.trim().isEmpty())) {
        $(byAttribute("class", "form-inline search-form")).find(By.tagName("select")).shouldBe(visible).click();
        $(byText(objectType)).shouldBe(visible).click();
        $(byAttribute("class", "form-inline search-form")).find(By.tagName("select")).find(byAttribute("selected", "selected")).shouldHave(text(objectType));
    }
    //search for object by objectName in the opened Select object(s) window
    searchForElement(objectName, "searchText");
    //select checkbox for the found object
    SelenideElement element = $(byAttribute("class", "wicket-modal"));
    element.find(byAttribute("about", "table")).find(By.tagName("tbody")).find(byAttribute("type", "checkbox")).shouldBe(visible).setSelected(true);
    //click Assign button
    $(By.linkText("Add")).shouldBe(visible).click();
    $(By.linkText("Add")).should(disappear);
    //click Save button
    $(By.linkText("Save")).click();
}
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