use of com.codeborne.selenide.SelenideElement in project midpoint by Evolveum.
the class AbstractSelenideTest method switchToInnerFrame.
protected void switchToInnerFrame() {
SelenideElement element = $(byAttribute("class", "wicket-modal"));
String modalWindowId = element.getAttribute("id");
switchTo().innerFrame(modalWindowId);
}
use of com.codeborne.selenide.SelenideElement in project midpoint by Evolveum.
the class ServiceTests method test004assignServiceToUserTest.
@Test(priority = 3, dependsOnMethods = { "test001createServiceTest" })
public void test004assignServiceToUserTest() {
close();
login();
checkLoginIsPerformed();
Map<String, String> usersMap = new HashMap<>();
createUser(SERVICE_TEST_USER, usersMap);
//search for the created user in users list
searchForElement(SERVICE_TEST_USER);
//click on the found user link
$(By.linkText(SERVICE_TEST_USER)).shouldBe(visible).click();
//assign End user role to user
assignObjectToFocusObject(ASSIGN_ROLE_LINKTEXT, "ServiceType", SERVICE_NAME_VALUE + UPDATED_VALUE, null);
//search for the user in users list
searchForElement(SERVICE_TEST_USER);
//click on the found user link
$(By.linkText(SERVICE_TEST_USER)).shouldBe(visible).click();
//check if assigned role is displayed on the Assignments tab
openAssignmentsTab();
$(byAttribute("about", "dropdownMenu")).click();
$(By.linkText("Show all assignments")).shouldBe(visible).click();
SelenideElement element = $(byAttribute("class", "wicket-modal"));
element.find(By.linkText(SERVICE_DISPLAY_NAME_VALUE + UPDATED_VALUE)).shouldBe(visible);
element.find(By.linkText(EndUserTests.ENDUSER_ROLE_NAME)).shouldBe(visible);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class Form method fill.
public void fill(Map<String, String> data) {
if (data.isEmpty()) {
throw new IllegalArgumentException("can't find any connection details in connection");
}
ElementsCollection inputs = getRootElement().findAll(By.cssSelector("input"));
List<String> keys = new ArrayList<String>();
for (SelenideElement input : inputs) {
String name = input.getAttribute("name");
keys.add(name);
}
for (String key : data.keySet()) {
if (keys.contains(key)) {
log.info("fill connection Details detail {} ", key);
SelenideElement input = getRootElement().$(String.format("input[name=\"%s\"", key)).shouldBe(visible);
input.clear();
input.sendKeys(data.get(key));
} else {
log.info("Input {} is not present on form!", key);
}
}
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class SyndesisPageObject method selectFromDropDown.
public void selectFromDropDown(String selectId, String option) {
SelenideElement select = this.getElementById(selectId).shouldBe(visible);
assertThat(select.getTagName(), is("select"));
select.selectOption(option);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class TechExtensionsListComponent method chooseActionOnExtension.
public void chooseActionOnExtension(String name, String action) {
SelenideElement extension = this.getExtensionItem(name);
SelenideElement actionButton = extension.findAll(By.tagName("button")).filter(exactText(action)).first();
actionButton.shouldBe(visible).click();
}
Aggregations