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;
}
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;
}
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;
}
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;
}
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();
}
Aggregations