This is a web automation framework using Playwright with Java, Maven, TestNG and ExtentReports for browser automation testing. Playwright is a powerful tool for automating interactions with web browsers, and this framework provides a structured approach to writing and running browser tests in Java.
Before running the tests, ensure you have the following dependencies installed:
-
The Playwright Java library
-
Java Development Kit (JDK) version 11 or later
-
Apache Maven
-
TestNg
-
IntelliJ IDEA (or any other Java IDE)
Modular architecture using the Page Object Model design pattern
Support for multiple browsers (chromium, Firefox and webkit)
Configuration using properties file
Test data driving using excel (Fillo library )
Test Reporting using ExtentReports
-
Clone the repository(https://github.com/devqa07/PlaywrightJavaAutomationFramework.git) from GitHub
-
Install the required software/dependencies and bindings
-
Open the project in your preferred IDE (e.g. IntelliJ IDEA or Eclipse).
-
Modify the config.properties file in the src/test/resources directory to run the tests in chrome, firefox and microsoft edge browsers.
-
We can run the individual tests from src/test/java/com.dev.tests.tests package or Simply run mvn test command from commandline, also complete suite can be executed with testng.xml.
-
After test execution, test reports can be viewed in the /test-output/TestExecutionReport/TestExecutionReport.html directory.