• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JUnit tests with Selenium WebDriver and WebDriverManager

Maven Central Build Status badge-jdk License badge Backers on Open Collective Sponsors on Open Collective Support badge Twitter Follow

WebDriverManager Examples

This repository contains JUnit examples to automate the Selenium WebDriver driver management using WebDriverManager. These examples are open-source, released under the terms of Apache 2.0 License.

Usage

In order to use WebDriverManager from tests in a Maven project, you need to add the following dependency in your pom.xml:

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>${wdm.version}</version>
    <scope>test</scope>
</dependency>

... or in a Gradle project:

dependencies {
    testImplementation("io.github.bonigarcia:webdrivermanager:${wdm.version}")
}

Then you can let WebDriverManager to manage the drivers required by Selenium WebDriver (e.g., chromedriver, geckodriver). For example, as a JUnit test using Chrome browser:

class ChromeTest {

    WebDriver driver;

    @BeforeAll
    static void setupClass() {
        WebDriverManager.chromedriver().setup();
    }

    @BeforeEach
    void setupTest() {
        driver = new ChromeDriver();
    }

    @AfterEach
    void teardown() {
        driver.quit();
    }

    @Test
    void test() {
        // Your test code here
    }

}

... or using Firefox:

class FirefoxTest {

    WebDriver driver;

    @BeforeAll
    static void setupClass() {
        WebDriverManager.firefoxdriver().setup();
    }

    @BeforeEach
    void setupTest() {
        driver = new FirefoxDriver();
    }

    @AfterEach
    void teardown() {
        driver.quit();
    }

    @Test
    void test() {
        // Your test code here
    }

}

Help

If you have questions on how to use WebDriverManager properly with a special configuration or suchlike, please consider asking a question on Stack Overflow and tag it with webdrivermanager-java.

Support

WebDriverManager 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).

Backers

Sponsors

About

WebDriverManager (Copyright © 2015-2023) is a personal project of Boni Garcia licensed under Apache 2.0 License.

More Repositories

1

webdrivermanager

Automated driver management and other helper features for Selenium WebDriver in Java
Java
2,364
star
2

mastering-junit5

Examples of the Packt book "Mastering Software Testing with JUnit 5"
Java
363
star
3

selenium-jupiter

JUnit 5 extension for Selenium WebDriver
Java
225
star
4

dualsub

DualSub: bilingual subtitles maker
Java
172
star
5

selenium-webdriver-java

Examples of the O'Reilly book "Hands-On Selenium WebDriver with Java"
Java
111
star
6

rate-my-cat

Sample application for the book "Mastering Software Testing with JUnit 5"
Java
25
star
7

novnc

Standalone noVNC client based on Alpine
Dockerfile
21
star
8

web-programming-examples

Examples of web applications using Java and Angular, among other technologies
HTML
20
star
9

bonigarcia.github.io

Personal web page of Boni García
JavaScript
16
star
10

webgl-examples

webgl-examples
HTML
13
star
11

webdrivermanager-spring-boot

Basic project with JUnit tests using Spring-Boot, Selenium WebDriver and WebDriverManager
Java
11
star
12

selenium-jupiter-examples

Test examples using Selenium-Jupiter, Selenium WebDriver, and JUnit 5
Java
10
star
13

webdrivermanager-basic

Basic project with JUnit tests using Selenium Webdriver and WebDriverManager
Java
8
star
14

browserwatcher

Browser extension for console monitoring, tab recording, Content Security Policy (CSP) disabling, and JavaScript/CSS injection
Java
8
star
15

rust-examples

Small programs written in Rust. Warm up for the upcoming Selenium Manager
Rust
7
star
16

android-examples

Sample Android apps created with Java
Java
5
star
17

selenium-jupiter-webrtc

Tests for WebRTC applications using Selenium-Jupiter
Java
5
star
18

android-basic-app

Basic Android app developed with Java
Java
5
star
19

c-examples

Basic C examples
C
4
star
20

react-native-examples

Basic apps using React Native
JavaScript
3
star
21

wdm-agent-example

Example of maven project using Selenium WebDriver and WebDriverManager as Agent
Java
3
star
22

job-tracker

Scheduled automated test for daily tracking jobs about Selenium, Cypress, Puppeteer, and Playwright on Linkedin
Java
3
star
23

test-orchestration

Jenkins library for test orchestration
Groovy
3
star
24

spark-examples

Collection of Spark examples using Python
Python
2
star
25

nodejs-examples

Node.js examples
JavaScript
2
star
26

git-intro

2
star
27

bonigarcia

Visiting Professor @UC3M, Staff Software Engineer @saucelabs, Committer @SeleniumHQ
1
star
28

nlp-examples

Natural Language Processing (NLP) examples with Python
Jupyter Notebook
1
star
29

saucelabs-fat-jars

Basic projects to illustrate how to create fat-jars with Maven and Gradle
Java
1
star
30

genai-selenium

GenAI-assisted development of Selenium tests
Java
1
star
31

nubomedia-test

NUBOMEDIA application example
Java
1
star