use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class IntegrationActivityListComponent method clickButtonOfActivityStep.
public void clickButtonOfActivityStep(String buttonName, String stepName) {
ElementsCollection activitySteps = $(Element.ROOT).find(Element.ACTIVITY_STEPS).shouldBe(visible).findAll(Element.ACTIVITY_STEP).shouldBe(sizeGreaterThan(0));
SelenideElement step = activitySteps.stream().filter(el -> checkStepName(el, stepName)).findFirst().get();
this.clickButtonInStep(step, buttonName);
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class BasicFilterStepComponent method getPathInputOptions.
public List<String> getPathInputOptions() {
SelenideElement pathDataList = this.getRootElement().find(DataList.PATH_LIST);
ElementsCollection options = pathDataList.findAll(Element.OPTION);
List<String> optionsList = new ArrayList<String>();
for (SelenideElement option : options) {
String value = option.getAttribute("value");
optionsList.add(value);
}
return optionsList;
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class BasicFilterStepComponent method getPathInputAllValues.
public List<String> getPathInputAllValues() {
ElementsCollection pathInputArray = this.getPathInputs();
int count = pathInputArray.size();
List<String> pathInputValues = new ArrayList<String>();
for (int i = 0; i < count; i++) {
String value = pathInputArray.get(i).getAttribute("value");
pathInputValues.add(value);
}
return pathInputValues;
}
use of com.codeborne.selenide.ElementsCollection 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.ElementsCollection in project syndesis-qe by syndesisio.
the class DataMapperComponent method createMapping.
public void createMapping(String source, String target) {
log.info("creating mapping from {} to {}", source, target);
ElementsCollection dmColumns = this.dataMapperColumns();
SelenideElement src = dmColumns.get(0);
SelenideElement dest = dmColumns.get(1);
this.selectMapping(source, src);
this.selectMapping(target, dest);
}
Aggregations