Skip to content
Checks and downloads latest Selenium Chromedriver webdriver
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src/main
.gitattributes
.gitignore
LICENSE.txt
build.gradle
gradlew
gradlew.bat
readme.MD

readme.MD

Chromedriver Updater plugin

This is a simple plugin for Gradle to keep your Chromedriver for Selenium up to date. It checks the google code website for a new version of the Chromedriver, and downloads it to the build directory.

The plugin has been successfully tested with Gradle 3.2.1 on Mac OSX and Windows 10. It should work with newer versions and on other operations systems as well.

Apply plugin configuration

Put these in your build.gradle (Gradle 3.2.1 or higher):

plugins {
    id "eu.leontebbens.gradle.chromedriver-updater" version "1.6"
}
apply plugin: "eu.leontebbens.gradle.chromedriver-updater"

Next run gradlew updateChromedriver and the drivers will be downloaded to the directory build.

Example integration test

To use the downloaded driver in your tests:

task integrationTest(type: Test, dependsOn: updateChromedriver) {
    systemProperties = [
            'webdriver.chrome.driver' : "${updateChromedriver.driverLocation}"
    ] 

   // your testing code here ...

}

And run gradlew updateChromedriver integrationTest to use the downloaded driver in you Integration Tests.

More about the property webdriver.chrome.driver here.

Proxy

When you are behind a proxy, use the http.proxyHost and http.proxyPort JVM parameters

gradlew myTask -Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080

Just checking

Run gradlew checkChromedriver if you only want to check for a new Chromedriver version. No driver files are downloaded. This can be used in a daily job in Jenkins to inform people by e-mail of a new Chromedriver versions. Therefore the gradle build will FAIL when a new Chromedriver version is available.

License

The plugin is licensed under the Apache License, Version 2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Questions

Raise an issue on Github or Tweet me. Suggestions are welcome too!

Léon Tebbens

You can’t perform that action at this time.