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 syndesis-qe by syndesisio.
the class SupportPageSteps method downloadAllLogs.
@When("^.*downloads? diagnostics for all integrations$")
public void downloadAllLogs() throws InterruptedException, IOException {
supportPage.selectAllIntegrationDownload();
File downloadedLogs = supportPage.downloadZipLogs();
Assertions.assertThat(downloadedLogs).exists().isFile().has(new Condition<>(f -> f.length() > 0, "File size should be greater than 0"));
checkDownloadedFileContent(downloadedLogs);
}
use of cucumber.api.java.en.When in project syndesis-qe by syndesisio.
the class SupportPageSteps method downloadSpecificLogs.
@When("^.*downloads? diagnostics for \"([^\"]*)\" integration$")
public void downloadSpecificLogs(String integrationName) throws InterruptedException, IOException {
supportPage.selectSpecificIntegrationDownload("my-integration");
File downloadedLogs = supportPage.downloadZipLogs();
Assertions.assertThat(downloadedLogs).exists().isFile().has(new Condition<>(f -> f.length() > 0, "File size should be greater than 0"));
checkDownloadedFileContent(downloadedLogs);
}
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);
}
Aggregations