use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class BasicFilterStepComponent method setPredicate.
public void setPredicate(String predicate) {
log.info("setting basic filter step predicate to option number {}", predicate);
SelenideElement predicateInput = this.getRootElement().find(Select.PREDICATE);
this.selectOption(predicateInput, predicate);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperComponent method selectMapping.
/**
* @param mappingName for instance "User.ScreenName"
* @param containerElement start searching mapping fields from here
*/
public void selectMapping(String mappingName, SelenideElement containerElement) {
// split and trim in one step:
List<String> path = Arrays.asList(mappingName.trim().split("\\."));
path.forEach(s -> {
SelenideElement detailElement = containerElement.find(By.id(s)).shouldBe(visible);
if (detailElement.find(Element.CHILDREN).exists()) {
// if there're childrenFields display element is expanded already, click otherwise
} else {
detailElement.$(Element.LABEL).shouldBe(visible).click();
}
});
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperComponent method fieldsCount.
/**
* Eventually returns count of found datamapper fields.
*
* @returns count of fields
*/
public Integer fieldsCount() {
ElementsCollection dmColumns = this.dataMapperColumns();
SelenideElement countElement = dmColumns.get(0).$(Element.LOADER_SELECTOR).shouldBe(visible);
String countText = countElement.getText();
// "77 fields" -> 77
String[] found = countText.split(" ");
if (found.length != 2) {
throw new IllegalArgumentException(String.format("failed to get files number from %s", countText));
}
return Integer.parseInt(found[0]);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperComponent method closeBucket.
public void closeBucket(String bucketName) {
SelenideElement bucket = getDataBucketElement(bucketName);
if (bucket.$(Element.BUCKET_IS_IN_OPEN_STATE).isDisplayed()) {
bucket.click();
getRootElement().hover();
}
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperComponent method openBucket.
public void openBucket(String bucketName) {
SelenideElement bucket = getDataBucketElement(bucketName);
if (!bucket.$(Element.BUCKET_IS_IN_OPEN_STATE).isDisplayed()) {
bucket.click();
getRootElement().hover();
}
}
Aggregations