Monday, 27 February 2017

serenity & jbehave

1. serenity.properties

    serenity.timeout=20000
    webdriver.wait.for.timeout=20000           //explicit timeout
    serenity.take.screenshots=FOR_FAILURES


2. implicit wait
    webdriver.timeouts.implicitlywait property


3. explicit wait

    webdriver.wait.for.timeout

    waitFor(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".mjHome")));
    withTimeoutOf(10,TimeUnit.SECONDS).waitFor(ExpectedConditions.presenceOfElementLocated(By.cssSelector(".mjHome")));


4. the correct plugin to use for jbehave is 'jbehave support', uninstall the others if unable to display step definition properly

No comments:

Post a Comment