use of io.cucumber.java.fr.Lorsque in project NoraUi by NoraUi.
the class FileSteps method cleanDownloadDirectory.
/**
* Empties the default downloaded files folder.
*
* @param conditions
* List of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}).
*/
@Conditioned
@Lorsque("Je vide le repertoire des téléchargements(\\?)")
@Given("I clean download directory(\\?)")
public void cleanDownloadDirectory(List<GherkinStepCondition> conditions) {
try {
FileUtils.forceMkdir(new File(System.getProperty(USER_DIR) + File.separator + DOWNLOADED_FILES_FOLDER));
FileUtils.cleanDirectory(new File(System.getProperty(USER_DIR) + File.separator + DOWNLOADED_FILES_FOLDER));
} catch (IOException e) {
log.warn("IOException in cleanDownloadDirectory", e);
}
}
use of io.cucumber.java.fr.Lorsque in project NoraUi by NoraUi.
the class HelloByeSteps method checkFields.
@Lorsque("Mes champs sont prêts à être utilisés")
@Given("My fields are ready to use")
public void checkFields() throws FailureException {
By inputSelectLocator = Utilities.getLocator(demoPage.inputSelect);
By inputTextLocator = Utilities.getLocator(demoPage.inputText);
Wait.untilAnd(NoraUiExpectedConditions.atLeastOneOfTheseElementsIsPresent(inputSelectLocator, inputTextLocator)).wait(() -> NoraUiExpectedConditions.presenceOfNbElementsLocatedBy(inputSelectLocator, 1)).wait(() -> NoraUiExpectedConditions.presenceOfNbElementsLocatedBy(inputTextLocator, 1)).wait(() -> NoraUiExpectedConditions.visibilityOfNbElementsLocatedBy(inputSelectLocator, 1)).wait(() -> NoraUiExpectedConditions.visibilityOfNbElementsLocatedBy(inputTextLocator, 1));
}
Aggregations