use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class BasicFilterStepComponent method setLatestValueInput.
public void setLatestValueInput(String value) {
log.info("Setting basic filter step value to {}", value);
ElementsCollection valueInputArray = this.getRootElement().findAll(Input.VALUE);
SelenideElement valueInput = valueInputArray.get(valueInputArray.size() - 1);
valueInput.shouldBe(visible).clear();
valueInput.shouldBe(visible).sendKeys(value);
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class DataMapperComponent method dataMapperColumns.
/**
* Find proper source and target datamapper columns.
*
* @returns ElementsCollection div elements
*/
private ElementsCollection dataMapperColumns() {
log.info("searching for columns");
// loadSelector should be visible:
this.getRootElement().$(Element.LOADER_SELECTOR).shouldBe(visible);
log.info("datamapper has been loaded");
ElementsCollection dmColumns = this.getRootElement().findAll(Element.DM_COLLUMNS).shouldBe(size(2));
log.info("found {} datamapper columns", dmColumns.size());
return dmColumns;
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class IntegrationsListComponent method clickDeleteIntegration.
public void clickDeleteIntegration(String integrationName) {
log.info("clicking delete link for integration {}", integrationName);
this.getRootElement().find(Element.ITEM).shouldBe(visible);
SelenideElement parentElement = null;
ElementsCollection parentElements = this.getAllIntegrations();
for (SelenideElement element : parentElements) {
String name = getIntegrationName(element);
if (name.equals(integrationName)) {
parentElement = element;
break;
}
}
if (parentElement != null) {
parentElement.find(Button.KEBAB_DROPDOWN).shouldBe(visible).click();
}
this.getRootElement().find(Link.KEBAB_DELETE).shouldBe(visible).click();
ModalDialogPage modal = new ModalDialogPage();
modal.getButton("OK").shouldBe(visible).click();
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class IntegrationsListComponent method checkAllIntegrationsKebabButtons.
public void checkAllIntegrationsKebabButtons() {
ElementsCollection integrationsItems = getAllIntegrations();
for (SelenideElement item : integrationsItems) {
String status = this.getIntegrationItemStatus(item);
if (status.equals("Deleted")) {
this.getKebabButtonFromItem(item).shouldBe(hidden);
} else {
SelenideElement kebabB = this.getKebabButtonFromItem(item);
kebabB.shouldBe(visible).click();
this.checkIfKebabHasWhatShouldHave(item, status);
}
}
}
use of com.codeborne.selenide.ElementsCollection in project syndesis-qe by syndesisio.
the class CommonSteps method navigateToHelp.
@When("^.*navigates? to the \"([^\"]*)\" page in help menu$")
public void navigateToHelp(String title) {
SelenideElement helpDropdownMenu = $(By.id("dropdownHelp")).shouldBe(visible);
if (!helpDropdownMenu.getAttribute("class").contains("open")) {
helpDropdownMenu.click();
}
SelenideElement dropdownElementsTable = $(By.className("dropdown-menu")).shouldBe(visible);
ElementsCollection dropdownElements = dropdownElementsTable.findAll(By.tagName("a"));
dropdownElements.filter(text(title)).shouldHaveSize(1).get(0).shouldBe(visible).click();
}
Aggregations