use of com.github.noraui.cucumber.annotation.Conditioned in project NoraUi by NoraUi.
the class CommonSteps method waitStalenessOf.
/**
* Waits staleness of element with timeout of x seconds.
*
* @param page
* The concerned page of field
* @param element
* is key of PageElement concerned
* @param time
* is custom timeout
* @param conditions
* list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}).
* @throws TechnicalException
* is throws if you have a technical error (format, configuration, datas, ...) in NoraUi.
*/
@Conditioned
@Lorsque("J'attends la diparition de '(.*)-(.*)' avec un timeout de '(.*)' secondes[\\.|\\?]")
@Then("I wait staleness of '(.*)-(.*)' with timeout of '(.*)' seconds[\\.|\\?]")
public void waitStalenessOf(String page, String element, int time, List<GherkinStepCondition> conditions) throws TechnicalException {
final WebElement we = Utilities.findElement(Page.getInstance(page).getPageElementByKey('-' + element));
Context.waitUntil(ExpectedConditions.stalenessOf(we), time);
}
Aggregations