{"id":13582762,"url":"https://github.com/bonigarcia/webdrivermanager","last_synced_at":"2025-05-12T11:16:22.487Z","repository":{"id":28758506,"uuid":"32280638","full_name":"bonigarcia/webdrivermanager","owner":"bonigarcia","description":"Automated driver management and other helper features for Selenium WebDriver in Java","archived":false,"fork":false,"pushed_at":"2025-05-05T06:41:14.000Z","size":16623,"stargazers_count":2626,"open_issues_count":0,"forks_count":685,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-05-12T02:54:11.812Z","etag":null,"topics":["chromedriver","docker","geckodriver","java","maven","selenium","selenium-webdriver","webdriver"],"latest_commit_sha":null,"homepage":"http://bonigarcia.dev/webdrivermanager/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonigarcia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"webdrivermanager","ko_fi":null,"tidelift":null,"custom":"https://www.buymeacoffee.com/bonigarcia"}},"created_at":"2015-03-15T19:52:36.000Z","updated_at":"2025-05-12T00:20:48.000Z","dependencies_parsed_at":"2023-02-13T18:32:31.445Z","dependency_job_id":"328cfebc-36fc-40ab-abb1-1bd1cbf33c37","html_url":"https://github.com/bonigarcia/webdrivermanager","commit_stats":{"total_commits":3435,"total_committers":77,"mean_commits":44.61038961038961,"dds":0.4914119359534207,"last_synced_commit":"6b63e345d819c74d750d09860452096f0f7e1739"},"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fwebdrivermanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fwebdrivermanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fwebdrivermanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonigarcia%2Fwebdrivermanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonigarcia","download_url":"https://codeload.github.com/bonigarcia/webdrivermanager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253710128,"owners_count":21951289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromedriver","docker","geckodriver","java","maven","selenium","selenium-webdriver","webdriver"],"created_at":"2024-08-01T15:03:00.337Z","updated_at":"2025-05-12T11:16:22.387Z","avatar_url":"https://github.com/bonigarcia.png","language":"Java","readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.github.bonigarcia/webdrivermanager.svg)](https://search.maven.org/search?q=g:io.github.bonigarcia%20a:webdrivermanager)\n[![Build Status](https://github.com/bonigarcia/webdrivermanager/workflows/build/badge.svg)](https://github.com/bonigarcia/webdrivermanager/actions)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=io.github.bonigarcia:webdrivermanager\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=io.github.bonigarcia%3Awebdrivermanager)\n[![codecov](https://codecov.io/gh/bonigarcia/webdrivermanager/branch/master/graph/badge.svg)](https://codecov.io/gh/bonigarcia/webdrivermanager)\n[![badge-jdk](https://img.shields.io/badge/jdk-8-green.svg)](https://www.oracle.com/java/technologies/javase-downloads.html)\n[![License badge](https://img.shields.io/badge/license-Apache2-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Backers on Open Collective](https://opencollective.com/webdrivermanager/backers/badge.svg)](#backers)\n[![Sponsors on Open Collective](https://opencollective.com/webdrivermanager/sponsors/badge.svg)](#sponsors)\n[![Support badge](https://img.shields.io/badge/stackoverflow-webdrivermanager_java-green.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/webdrivermanager-java)\n[![Twitter Follow](https://img.shields.io/twitter/follow/boni_gg.svg?style=social)](https://twitter.com/boni_gg)\n\n# [![][Logo]][WebDriverManager]\n[WebDriverManager] is an open-source Java library that carries out the management (i.e., download, setup, and maintenance) of the drivers required by [Selenium WebDriver] (e.g., chromedriver, geckodriver, msedgedriver, etc.) in a fully automated manner. In addition, WebDriverManager provides other relevant features, such as the capability to discover browsers installed in the local system, building WebDriver objects (such as `ChromeDriver`, `FirefoxDriver`, `EdgeDriver`, etc.), and running browsers in Docker containers seamlessly.\n\n## Documentation\nAs of version 5, the documentation of WebDriverManager has moved [here][WebDriverManager]. This site contains all the features, examples, configuration, and advanced capabilities of WebDriverManager.\n\n## Driver Management\nThe primary use of WebDriverManager is the automation of driver management. For using this feature, you need to select a given manager in the WebDriverManager API (e.g., `chromedriver()` for Chrome) and invoke the method `setup()`. The following example shows the skeleton of a test case using [JUnit 5], [Selenium WebDriver], and [WebDriverManager].\n\n```java\nimport org.junit.jupiter.api.AfterEach;\nimport org.junit.jupiter.api.BeforeAll;\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport org.openqa.selenium.WebDriver;\nimport org.openqa.selenium.chrome.ChromeDriver;\n\nimport io.github.bonigarcia.wdm.WebDriverManager;\n\nclass ChromeTest {\n\n    WebDriver driver;\n\n    @BeforeAll\n    static void setupAll() {\n        WebDriverManager.chromedriver().setup();\n    }\n\n    @BeforeEach\n    void setup() {\n        driver = new ChromeDriver();\n    }\n\n    @AfterEach\n    void teardown() {\n        driver.quit();\n    }\n\n    @Test\n    void test() {\n        // Your test logic here\n    }\n\n}\n```\n\nAlternatively, you can use the method `create()` to manage automatically the driver and instantiate the `WebDriver` object in a single line. For instance, as follows:\n\n```java\nimport org.junit.jupiter.api.AfterEach;\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport org.openqa.selenium.WebDriver;\nimport org.openqa.selenium.chrome.ChromeDriver;\n\nimport io.github.bonigarcia.wdm.WebDriverManager;\n\nclass ChromeCreateTest {\n\n    WebDriver driver;\n\n    @BeforeEach\n    void setup() {\n        driver = WebDriverManager.chromedriver().create();\n    }\n\n    @AfterEach\n    void teardown() {\n        driver.quit();\n    }\n\n    @Test\n    void test() {\n        // Your test logic here\n    }\n\n}\n```\n\nFor further information about the driver resolution algorithm implemented by WebDriverManager and configuration capabilities, read the [documentation][WebDriverManager].\n\n## Browsers in Docker\nAnother relevant new feature available in WebDriverManager 5 is the ability to create browsers in [Docker] containers out of the box. The requirement to use this feature is to have installed a [Docker Engine] in the machine running the tests. To use it, we need to invoke the method `browserInDocker()` in conjunction with `create()` of a given manager. This way, WebDriverManager pulls the image from [Docker Hub], starts the container, and instantiates the WebDriver object to use it. The following test shows a simple example using Chrome in Docker. This example also enables the recording of the browser session and remote access using [noVNC]:\n\n```java\nimport org.junit.jupiter.api.AfterEach;\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport org.openqa.selenium.WebDriver;\n\nimport io.github.bonigarcia.wdm.WebDriverManager;\n\nclass DockerChromeVncTest {\n\n    WebDriver driver;\n\n    WebDriverManager wdm = WebDriverManager.chromedriver().browserInDocker()\n            .enableVnc().enableRecording();\n\n    @BeforeEach\n    void setup() {\n        driver = wdm.create();\n    }\n\n    @AfterEach\n    void teardown() {\n        wdm.quit();\n    }\n\n    @Test\n    void test() {\n        // Your test logic here\n    }\n\n}\n```\n\n## Support\nWebDriverManager is part of [OpenCollective], an online funding platform for open and transparent communities. You can support the project by contributing as a backer (i.e., a personal [donation] or [recurring contribution]) or as a [sponsor] (i.e., a recurring contribution by a company).\n\n### Backers\n\u003ca href=\"https://opencollective.com/webdrivermanager\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n### Sponsors\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/webdrivermanager/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/webdrivermanager/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\nAlternatively, you can acknowledge my work by buying me a coffee:\n\n\u003cp\u003e\u003ca href=\"https://www.buymeacoffee.com/bonigarcia\"\u003e \u003cimg align=\"left\" src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"50\" width=\"210\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003cbr\u003e\u003cbr\u003e\n\n## About\nWebDriverManager (Copyright \u0026copy; 2015-2025) is a project created and maintained by [Boni Garcia] and licensed under the terms of the [Apache 2.0 License].\n\n[Logo]: https://bonigarcia.github.io/img/wdm.png\n[WebDriverManager]: https://bonigarcia.dev/webdrivermanager/\n[Selenium WebDriver]: https://www.selenium.dev/documentation/webdriver/\n[JUnit 5]: https://junit.org/junit5/\n[Docker]: https://www.docker.com/\n[Docker Engine]: https://docs.docker.com/engine/\n[Docker Hub]: https://hub.docker.com/\n[noVNC]: https://novnc.com/\n[OpenCollective]: https://opencollective.com/webdrivermanager\n[donation]: https://opencollective.com/webdrivermanager/donate\n[recurring contribution]: https://opencollective.com/webdrivermanager/contribute/backer-8132/checkout\n[sponsor]: https://opencollective.com/webdrivermanager/contribute/sponsor-8133/checkout\n[Boni Garcia]: https://bonigarcia.dev/\n[Apache 2.0 License]: https://www.apache.org/licenses/LICENSE-2.0\n","funding_links":["https://opencollective.com/webdrivermanager","https://www.buymeacoffee.com/bonigarcia","https://opencollective.com/webdrivermanager/donate","https://opencollective.com/webdrivermanager/contribute/backer-8132/checkout","https://opencollective.com/webdrivermanager/contribute/sponsor-8133/checkout"],"categories":["Java","Resources","测试"],"sub_categories":["Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonigarcia%2Fwebdrivermanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonigarcia%2Fwebdrivermanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonigarcia%2Fwebdrivermanager/lists"}