/selenium-webdriver-java

Selenium WebDriver tutorials with Java and JUnit

Primary LanguageJavaMIT LicenseMIT

selenium-webdriver-java

Tutorials and sample web automation frameworks using Selenium WebDriver and Java

Installation

  1. Make sure you have OpenJDK 20 / JDK 20 or newer installed on your machine (projects were developed using OpenJDK 20). Check installation
    java -version
  2. Clone this repository to your local machine.
  3. For Maven projects: download Maven and follow the installation instructions. After that, type the following in a terminal or in a command prompt:
    mvn --version
  4. For Gradle project: download Gradle and follow the installation instructions. After that, type the following in a terminal or in a command prompt:
    gradle -v
  5. Open the project you need in VS Code or your preferred IDE.

Usage

  1. Make sure you have the appropriate browser installed (https://www.selenium.dev/documentation/webdriver/browsers/)
  2. Open the project in VS Code or your preferred IDE.
  3. For Maven projects: run the tests using your preferred test runner or IDE. From terminal, in your Maven project e.g.
    mvn clean test
  4. For Gradle project: run the tests using your preferred test runner or IDE. From terminal, in your Gradle project e.g.
    gradle clean test
  5. Optional: check reports (depending on the project you run)

Tech

  • Java
  • Selenium WebDriver
  • JUnit
  • Maven
  • Gradle

Design patterns

  • Page Object Model

Tutorials:

  • First Selenium test
  • Selenium Maven project
  • Selenium Gradle project
  • Migrate from Maven to Gradle
  • Parallel run
  • Selenium Java Cucumber project

YT channel

Please check my YouTube channel for step by step implementation or detailed tutorials on automation and more: https://www.youtube.com/@TechWithAlexDuta

License

This project is licensed under the MIT License - see the LICENSE file for details.