use of com.codeborne.selenide.SelenideElement 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);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationsListComponent method getIntegrationName.
public String getIntegrationName(SelenideElement integration) {
String name;
SelenideElement nameElement = integration.find(Element.ITEM_TITLE);
boolean isNamePresent = nameElement.is(visible);
if (isNamePresent) {
name = nameElement.getText();
} else {
log.warn("Name is not present!");
name = integration.find(Element.ITEM_DESCRIPTION).shouldBe(visible).getText();
}
return name;
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationsListComponent method checkIfKebabHasWhatShouldHave.
public void checkIfKebabHasWhatShouldHave(SelenideElement item, String status) {
String[] properActions = this.getKebabActionsByStatus(status);
if (properActions.length == 0) {
throw new Error("Wrong status!");
}
// log.debug(`checking menu menu of menu element:`);
SelenideElement kebabE = this.getKebabElement(true, item);
kebabE.shouldBe(visible);
for (String action : properActions) {
kebabE.find(By.linkText(action)).isDisplayed();
}
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationsListComponent method isIntegrationPresent.
public boolean isIntegrationPresent(String name) {
log.info("Checking if integration {} is present in the list", name);
SelenideElement integration = this.getIntegration(name);
return integration.is(visible);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class OAuthSettingsComponent method getSettingsItem.
/**
* Fetch all settings items and find proper one according to given name.
*
* @param name name of settings item
* @returns element
*/
public SelenideElement getSettingsItem(String name) {
ElementsCollection items = this.listSettingsItems(null).shouldBe(sizeGreaterThan(0));
log.info("searching for {} in {} items", name, items.size());
for (SelenideElement item : items) {
String title = item.$(Element.SETTINGS_TITLE).shouldBe(visible).getText();
if (name.equals(title)) {
return item;
}
}
throw new IllegalArgumentException(String.format("item%s not found", name));
}
Aggregations