Skip to content

Commit

Permalink
Deprecating WebDriverManager since it is now supported natively in Se…
Browse files Browse the repository at this point in the history
…lenium 4.6 - the webdriver.autodownload property is now set to false by default
  • Loading branch information
wakaleo committed Nov 7, 2022
1 parent c256e6e commit 9538fcb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.base.Splitter;
import net.serenitybdd.core.webdriver.driverproviders.webdrivermanager.WebDriverManagerSetup;
import net.thucydides.core.ThucydidesSystemProperty;
import net.thucydides.core.util.EnvironmentVariables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -21,7 +22,7 @@ protected List<String> argumentsIn(String options) {
private final static ThreadLocal<Set<String>> DOWNLOADED_DRIVERS = ThreadLocal.withInitial(CopyOnWriteArraySet::new);

protected void downloadDriverIfRequired(String driver, EnvironmentVariables environmentVariables) {
if (!DOWNLOADED_DRIVERS.get().contains(driver)) {
if (ThucydidesSystemProperty.WEBDRIVER_AUTODOWNLOAD.booleanFrom(environmentVariables, false) && !DOWNLOADED_DRIVERS.get().contains(driver)) {
synchronized (DOWNLOADED_DRIVERS) {
DOWNLOADED_DRIVERS.get().add(driver);
if (isDriverAutomaticallyDownloaded(environmentVariables)) {
Expand Down

0 comments on commit 9538fcb

Please sign in to comment.