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