Skip to content

Commit

Permalink
Automatic WebDriver downloads are now active by default (to disable, …
Browse files Browse the repository at this point in the history
…set webdriver.autodownload to false). The @Managed annotation is now only required to specify what driver you want to use for JUnit tests
  • Loading branch information
wakaleo committed Nov 4, 2020
1 parent a366dba commit 51ce106
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static String getCurrentSessionID() {
return null;
}

protected static WebDriver getDriver() {
public static WebDriver getDriver() {
return getWebdriverManager().getWebdriver();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.base.Predicate;
import com.paulhammant.ngwebdriver.NgWebDriver;
import net.serenitybdd.core.Serenity;
import net.serenitybdd.core.collect.NewList;
import net.serenitybdd.core.environment.EnvironmentSpecificConfiguration;
import net.thucydides.core.ThucydidesSystemProperty;
Expand Down Expand Up @@ -282,6 +283,9 @@ private MatchingPageExpressions getMatchingPageExpressions() {
}

public WebDriver getDriver() {
if (driver == null) {
driver = Serenity.getDriver();
}
return driver;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ default Properties capabilitiesToProperties(Capabilities capabilities) {
}

default boolean isDriverAutomaticallyDownloaded(EnvironmentVariables environmentVariables) {
String webDriverAutodownload = ThucydidesSystemProperty.WEBDRIVER_AUTODOWNLOAD.from(environmentVariables);
return( webDriverAutodownload != null && webDriverAutodownload.toLowerCase().equals("true"));
return ThucydidesSystemProperty.WEBDRIVER_AUTODOWNLOAD.booleanFrom(environmentVariables, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Serenity report generated ${timestamp}
${testOutcomes.totalTestScenarios} test scenarios <#if (testOutcomes.hasDataDrivenTests())>(${testOutcomes.total} tests in all, including ${testOutcomes.totalDataRows} rows of test data)</#if>

Passed: ${testOutcomes.totalScenarios.withResult("success")}
Pending ${testOutcomes.totalScenarios.withResult("pending")}
Failed: ${testOutcomes.totalScenarios.withResult("failure")}
Failed with errors: ${testOutcomes.totalScenarios.withResult("error")}
Compromised: ${testOutcomes.totalScenarios.withResult("compromised")}
Expand Down

0 comments on commit 51ce106

Please sign in to comment.