dependencies {
- testImplementation("io.github.bonigarcia:webdrivermanager:5.6.4")
+ testImplementation("io.github.bonigarcia:webdrivermanager:5.7.0")
}
From df6debb1f501f954a26889ffcd823e4c46b86139 Mon Sep 17 00:00:00 2001
From: Boni Garcia WebDriverManager
-Version 5.6.4
+Version 5.7.0
2. Setup
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
- <version>5.6.4</version>
+ <version>5.7.0</version>
<scope>test</scope>
</dependency>
2. Setup
dependencies {
- testImplementation("io.github.bonigarcia:webdrivermanager:5.6.4")
+ testImplementation("io.github.bonigarcia:webdrivermanager:5.7.0")
}
WebDriverManager tries to find the browser version. To this aim, WebDriverManager uses internally a knowledge database called commands database. This database is a collection of shell commands used to discover the version of a given browser in the different operating systems (e.g.,
google-chrome --version
for Chrome in Linux).
Using the browser version, WebDriverManager tries to find the proper driver version. This process is different for each browser. In Chrome and Edge, their respective drivers (chromedriver and msedgedriver) maintainers also publish resources to identify the suitable driver version for a given major browser release. For instance, to find out the version of chromedriver required for Chrome 89, we need to read the following file. Unfortunately, this information is not available in other browsers (e.g., Firefox and Opera) or older versions of Chrome and Firefox. For this reason, WebDriverManager uses another knowledge database called versions database. This database maps the browser releases with the known compatible driver versions.
+Using the browser version, WebDriverManager tries to find the proper driver version. This process is different for each browser. For chromedriver, the Chrome for Testing (CfT) endpoints are used. For geckodriver, the Firefox mapping maintained by the Selenium project (which is based on the official geckodriver support). For msedgedriver, the Edge metadata is used.
Once the driver version is discovered, WebDriverManager downloads this driver to a local cache (located at ~/.cache/selenium
by default). These drivers are reused in subsequent calls.
Using the WebDriverManager fat-JAR (i.e., WebDriverManager with all its dependencies in a single executable JAR file). This JAR file is generated from the source using the Maven command mvn compile assembly:single
, and it is released on GitHub with every new version of WebDriverManager. You can download the latest of this fat-JAR from here. Once you get this file, you need to use the following command in the shell (where <args>
are the accepted arguments, explained below):
Using the WebDriverManager fat-JAR (i.e., WebDriverManager with all its dependencies in a single executable JAR file). This JAR file is generated from the source using the Maven command mvn compile assembly:single
, and it is released on GitHub with every new version of WebDriverManager. You can download the latest of this fat-JAR from here. Once you get this file, you need to use the following command in the shell (where <args>
are the accepted arguments, explained below):
java -jar webdrivermanager-5.6.4-fat.jar <args>
+java -jar webdrivermanager-5.7.0-fat.jar <args>
docker run --rm -e ARGS="<args>" bonigarcia/webdrivermanager:5.6.4
+docker run --rm -e ARGS="<args>" bonigarcia/webdrivermanager:5.7.0
java -jar webdrivermanager-5.6.4-fat.jar resolveDriverFor chrome
+java -jar webdrivermanager-5.7.0-fat.jar resolveDriverFor chrome
docker run --rm -v ${PWD}:/wdm -e ARGS="resolveDriverFor chrome" bonigarcia/webdrivermanager:5.6.4
+docker run --rm -v ${PWD}:/wdm -e ARGS="resolveDriverFor chrome" bonigarcia/webdrivermanager:5.7.0
java -jar webdrivermanager-5.6.4-fat.jar runInDocker chrome
+java -jar webdrivermanager-5.7.0-fat.jar runInDocker chrome
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -e ARGS="runInDocker chrome" bonigarcia/webdrivermanager:5.6.4
+docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -e ARGS="runInDocker chrome" bonigarcia/webdrivermanager:5.7.0
java -jar webdrivermanager-5.6.4-fat.jar server
+java -jar webdrivermanager-5.7.0-fat.jar server
docker run --rm -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock bonigarcia/webdrivermanager:5.6.4
+docker run --rm -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock bonigarcia/webdrivermanager:5.7.0
To configure the WebDriverManager Agent, we need to specify the path of the WebDriverManager fat-JAR using the JVM flag -javaagent:/path/to/webdrivermanager-5.6.4-fat.jar
. Alternatively, it can be done using Maven (see a complete project example here).
To configure the WebDriverManager Agent, we need to specify the path of the WebDriverManager fat-JAR using the JVM flag -javaagent:/path/to/webdrivermanager-5.7.0-fat.jar
. Alternatively, it can be done using Maven (see a complete project example here).
boni@ubuntu:~$ java -jar webdrivermanager-5.6.4-fat.jar resolveDriverFor chrome
+boni@ubuntu:~$ java -jar webdrivermanager-5.7.0-fat.jar resolveDriverFor chrome
[INFO] Using WebDriverManager to resolve chrome
[DEBUG] Detecting chrome version using online commands.properties
[DEBUG] Running command on the shell: [google-chrome, --version]
@@ -2515,7 +2515,7 @@
-docker run --rm -v ${PWD}:/wdm -e ARGS="resolveDriverFor chrome" -e WDM_CHROMEVERSION=84 bonigarcia/webdrivermanager:5.6.4
+docker run --rm -v ${PWD}:/wdm -e ARGS="resolveDriverFor chrome" -e WDM_CHROMEVERSION=84 bonigarcia/webdrivermanager:5.7.0
@@ -2722,12 +2722,6 @@ Force to use the latest version available for a given driver
-avoidReadReleaseFrom
Repository()
-wdm.avoidReadReleaseFrom
Repository=true
-false
(discover driver relase using info from the repository, e.g., chromedriver-latest or msedgedriver-latest)
-Avoid using the repository info and use the versions database instead
-
-
avoidTmpFolder()
wdm.avoidTmpFolder=true
false
(Each driver release (typically compressed) is copied in a temporal folder in the local machine, and then the driver is extracted and copied to the driver cache
@@ -2758,24 +2752,12 @@ Regular expression used to extract the browser version from the shell
-useLocalVersionsProperties
First()
-wdm.versionsProperties
OnlineFirst=true
-false
(the online versions database is used in the resolution algorithm)
-Use local copy of the versions database
-
-
useLocalCommandsProperties
First()
wdm.commandsProperties
OnlineFirst=true
false
(the online commands database is used in the resolution algorithm)
Use local copy of the commands database
-versionsPropertiesUrl(URL)
-wdm.versionsPropertiesUrl
-Raw version of the online versions database
-Change versions database URL
-
-
commandsPropertiesUrl(URL)
wdm.commandsPropertiesUrl
Raw version of the online commands database
@@ -3086,7 +3068,7 @@
-WebDriverManager 5.4+ implements the support for the CfT endpoints. Therefore, the solution to this problem is to bump WebDriverManager to the latest version (5.6.4 currently). Also, to ensure that the wrong version has not been cached in the resolution cache, you can refresh completely the cache folder (at least once) as follows:
+WebDriverManager 5.4+ implements the support for the CfT endpoints. Therefore, the solution to this problem is to bump WebDriverManager to the latest version (5.7.0 currently). Also, to ensure that the wrong version has not been cached in the resolution cache, you can refresh completely the cache folder (at least once) as follows: