use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class ExtensionSteps method importExtension.
@Given("^imported extensions$")
public void importExtension(DataTable extensionsData) throws Throwable {
CommonSteps commonSteps = new CommonSteps();
String extensionsLink = "Extensions";
String importButton = "Import Extension";
List<List<String>> dataTable = extensionsData.raw();
for (List<String> dataRow : dataTable) {
String extensionName = dataRow.get(0);
String extensionFileName = dataRow.get(1);
commonSteps.navigateTo("", "Customizations");
commonSteps.validatePage("", "Customizations");
commonSteps.clickOnLink(extensionsLink);
commonSteps.validatePage("", "Extensions");
SelenideElement techExtensionItem = techExtensionsListComponent.getExtensionItem(extensionName);
if (techExtensionItem != null) {
log.warn("Extension {} already exists!", extensionName);
} else {
commonSteps.clickOnButton(importButton);
commonSteps.validatePage("", "Import Extension");
uploadFile(extensionFileName);
importDetails();
commonSteps.clickOnButton(importButton);
commonSteps.validatePage("", "Extension Details");
}
}
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DashboardSteps method expectConnectionTitlePresent.
@Then("^Camilla can see \"([^\"]*)\" connection on dashboard page$")
public void expectConnectionTitlePresent(String connectionName) {
DashboardPage dashboardPage = new DashboardPage();
SelenideElement connection = dashboardPage.getConnection(connectionName);
connection.shouldBe(visible);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperSteps method combinePresentFielsWithAnother.
/**
* @param first parameter to be combined.
* @param first_pos position of the first parameter in the final string
* @param second parameter to be combined.
* @param sec_pos position of the second parameter in the final string.
* @param combined above two into this parameter.
* @param separator used to estethically join first and second parameter.
*/
// And she combines "FirstName" as "2" with "LastName" as "1" to "first_and_last_name" using "Space" separator
@Then("^she combines \"([^\"]*)\" as \"([^\"]*)\" with \"([^\"]*)\" as \"([^\"]*)\" to \"([^\"]*)\" using \"([^\"]*)\" separator$")
public void combinePresentFielsWithAnother(String first, String first_pos, String second, String sec_pos, String combined, String separator) {
SelenideElement inputElement;
SelenideElement selectElement;
// Then she fills "FirstCombine" selector-input with "FirstName" value
inputElement = mapper.getElementByAlias("FirstSource").shouldBe(visible);
mapper.fillInput(inputElement, first);
// And she selects "Combine" from "ActionSelect" selector-dropdown
selectElement = mapper.getElementByAlias("ActionSelect").shouldBe(visible);
mapper.selectOption(selectElement, "Combine");
// And she selects "Space" from "SeparatorSelect" selector-dropdown
selectElement = mapper.getElementByAlias("SeparatorSelect").shouldBe(visible);
mapper.selectOption(selectElement, separator);
// And clicks on the "Add Source" link
mapper.getButton("Add Source").shouldBe(visible).click();
// Then she fills "SecondCombine" selector-input with "LastName" value
inputElement = mapper.getElementByAlias("SecondSource").shouldBe(visible);
mapper.fillInputAndConfirm(inputElement, second);
// And she fills "FirstCombinePosition" selector-input with "2" value
inputElement = mapper.getElementByAlias("FirstSourcePosition").shouldBe(visible);
mapper.fillInput(inputElement, first_pos);
// And she fills "SecondCombinePosition" selector-input with "1" value
inputElement = mapper.getElementByAlias("SecondSourcePosition").shouldBe(visible);
mapper.fillInput(inputElement, sec_pos);
// Then she fills "TargetCombine" selector-input with "first_and_last_name" value
// inputElement = mapper.getElementByAlias("FirstTarget").shouldBe(visible);
// mapper.fillInputAndConfirm(inputElement, combined);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperSteps method separatePresentFielsIntoTwo.
// And she separates "FirstName" into "company" as "2" and "email" as "1" using "Comma" separator
@Then("^she separates \"([^\"]*)\" into \"([^\"]*)\" as \"([^\"]*)\" and \"([^\"]*)\" as \"([^\"]*)\" using \"([^\"]*)\" separator$")
public void separatePresentFielsIntoTwo(String input, String output1, String first_pos, String output2, String second_pos, String separator) {
SelenideElement inputElement;
SelenideElement selectElement;
// inputElement = mapper.getElementByAlias("FirstSource").shouldBe(visible);
// mapper.fillInput(inputElement, input);
selectElement = mapper.getElementByAlias("ActionSelect").shouldBe(visible);
mapper.selectOption(selectElement, "Separate");
selectElement = mapper.getElementByAlias("SeparatorSelect").shouldBe(visible);
mapper.selectOption(selectElement, separator);
// NOTE: THIS STEP SHOULD HAVE BEEN DONE AUTOMATICALLY BY SELECTING "Separate" action
mapper.getButton("Add Target").shouldBe(visible).click();
inputElement = mapper.getElementByAlias("FirstTarget").shouldBe(visible);
mapper.fillInputAndConfirm(inputElement, output1);
inputElement = mapper.getElementByAlias("FirstTargetPosition").shouldBe(visible);
mapper.fillInput(inputElement, first_pos);
inputElement = mapper.getElementByAlias("SecondTarget").shouldBe(visible);
mapper.fillInputAndConfirm(inputElement, output2);
inputElement = mapper.getElementByAlias("SecondTargetPosition").shouldBe(visible);
mapper.fillInput(inputElement, second_pos);
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DataMapperSteps method selectFromDropDownByElement.
@When("^she selects \"([^\"]*)\" from \"([^\"]*)\" selector-dropdown$")
public void selectFromDropDownByElement(String option, String selectAlias) {
log.info(option);
SelenideElement selectElement = mapper.getElementByAlias(selectAlias).shouldBe(visible);
mapper.selectOption(selectElement, option);
}
Aggregations