use of cucumber.api.java.en.When 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);
}
use of cucumber.api.java.en.When in project hippo by NHS-digital-website.
the class SiteSteps method iClickOn.
/**
* Then I can click on link "foo bar"
* When I click on "foo bar" button
*/
@When("^I (?:can )?click on(?: the| link)? \"([^\"]+)\"(?: link| button)?$")
public void iClickOn(String linkTitle) throws Throwable {
WebElement element = sitePage.findElementWithTitle(linkTitle);
assertThat("I can find element with title: " + linkTitle, element, is(notNullValue()));
sitePage.clickOnElement(element);
}
use of cucumber.api.java.en.When in project data-prep by Talend.
the class ExportPreparationStep method whenIGetExportFormat.
@When("^I get the export formats for the preparation \"(.*)\"$")
public void whenIGetExportFormat(String preparationName) throws IOException {
String preparationId = context.getPreparationId(suffixName(preparationName));
Response apiResponse = api.getExportFormats(preparationId);
ExportFormatMessage[] parameters = objectMapper.readValue(apiResponse.getBody().asString(), ExportFormatMessage[].class);
context.storePreparationExportFormat(suffixName(preparationName), parameters);
}
use of cucumber.api.java.en.When in project data-prep by Talend.
the class ExportPreparationStep method whenIExportThePreparationWithCustomParametersInto.
@When("^I export the preparation with parameters :$")
public void whenIExportThePreparationWithCustomParametersInto(DataTable dataTable) throws IOException {
Map<String, String> params = dataTable.asMap(String.class, String.class);
ExportType exportType = epAnalyzer.detectExportType(params);
ExportSampleStep exporter = epAnalyzer.getExporter(exportType);
if (exporter == null) {
Assert.fail("No exporter available for " + exportType.getName() + " export type.");
}
exporter.exportSample(params);
}
use of cucumber.api.java.en.When in project data-prep by Talend.
the class ActionStep method whenIAddAStepToAPreparation.
@When("^I add a \"(.*)\" step on the preparation \"(.*)\" with parameters :$")
public void whenIAddAStepToAPreparation(String actionName, String preparationName, DataTable dataTable) {
Map<String, String> params = dataTable.asMap(String.class, String.class);
String prepId = context.getPreparationId(suffixName(preparationName));
Action action = new Action();
action.action = actionName;
action.parameters.putAll(util.mapParamsToActionParameters(params));
api.addAction(prepId, action);
}
Aggregations