use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DashboardPage method isIntegrationPresent.
public boolean isIntegrationPresent(String integrationName) {
log.info("Checking if integration {} is present in the list", integrationName);
SelenideElement integration = this.getRootElement().find(By.cssSelector(String.format("div[innertext='%s']", integrationName)));
return integration.is(visible);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationFlowViewComponent method getStepsArray.
public List<String> getStepsArray() {
ElementsCollection steps = this.getRootElement().findAll(Element.STEP);
List<String> stepsArray = new ArrayList<String>();
for (int i = 1; i < (steps.size() - 1); i++) {
steps.get(i).click();
SelenideElement title = this.getRootElement().find(Element.ACTIVE_STEP);
String type = title.getText();
StepComponent stepComponent = stepComponentFactory.getStep(type, "");
// wait for root element to be loaded
stepComponent.getRootElement();
stepComponent.initialize();
stepsArray.add(stepComponent.getParameter());
}
this.getFirstVisibleButton("Done").shouldBe(visible).click();
return stepsArray;
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationFlowViewComponent method getWarningTextFromStep.
public String getWarningTextFromStep(int stepPosition) {
SelenideElement warningIcon = getStepWarningElement(stepPosition).shouldBe(visible);
// open popup
warningIcon.click();
String text = getPopoverText();
// hide popup
warningIcon.click();
return text;
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationFlowViewComponent method clickAddStepLink.
public void clickAddStepLink(int pos) {
List<SelenideElement> allStepInserts = getRootElement().$$(Element.STEP_INSERT).shouldHave(sizeGreaterThanOrEqual(pos));
SelenideElement stepElement = allStepInserts.get(pos);
stepElement.hover();
getRootElement().$(Link.ADD_STEP).shouldBe(visible).click();
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class ActionConfigureComponentFieldFiller method checkAndGet.
private SelenideElement checkAndGet(By elem) {
Class inputClass = getInputClass();
Class selectClass = getSelectClass();
SelenideElement element = this.getRootElement().find(elem).shouldBe(visible);
String elemTagName = element.getTagName();
if (("input".equals(elemTagName) || "textarea".equals(elemTagName)) && isContainedInLocators(elem, inputClass) || "select".equals(elemTagName) && isContainedInLocators(elem, selectClass)) {
return element;
} else {
return null;
}
}
Aggregations