- Introduction
- Features
- Project Structure
- Getting Started
- Running Tests
- Test Reports
- Contributions
- Contacts
This repository contains an advanced Selenium WebDriver framework built using TestNG.
- Selenium Base Test: A base test class that sets up the Selenium WebDriver environment.
- Page Object Model (POM): All web pages are represented as classes with methods that interact with the elements on the page.
- TestUtilities: Utility classes to handle common tasks like taking screenshots, reading data from files, and interacting with browser cookies.
- Browser Driver Factory: Factory pattern implementation for initializing WebDriver instances for different browsers.
- Parallel Test Execution: TestNG is configured to run tests in parallel, improving execution time.
- Data-Driven Testing: Supports testing with data from CSV files, Excel spreadsheets, and TestNG DataProviders.
- Logging with Log4j: Detailed logging of test execution for easier debugging and analysis.
- Headless Browser Testing: Supports running tests in headless mode for faster execution in CI/CD environments.
- Test Reports: TestNG and custom listeners generate detailed test reports.
src/
├── main/
│ ├── java/
│ │ ├── base/ # Base classes for the framework
│ │ ├── pages/ # Page Object classes
│ │ ├── utils/ # Utility classes for various tasks
│ └── resources/ # Configuration files (e.g., log4j.properties)
└── test/
├── java/
│ ├── tests/ # Test classes
└── resources/
├── testng.xml # TestNG suite configuration file
└── data/ # Data files for data-driven testing
- Java JDK 8 or higher
- Maven
- WebDriver binaries and dependencies in pom.xml
- IDE (e.g., IntelliJ IDEA, Eclipse)
-
Clone the repository:
git clone https://github.com/avdhutssh/Advanced-Selenium-Webdriver.git cd Advanced-Selenium-Webdriver -
Install dependencies:
mvn clean install
You can run the tests using the following Maven command:
mvn testAlternatively, you can run specific test suites using TestNG XML files:
mvn test -DsuiteXmlFile=src/test/resources/testng.xmlTestNG generates a default report in the target/surefire-reports directory. You can configure custom reports by integrating tools like Allure or Extent Reports.
Contributions are welcome! Please fork the repository and submit a pull request to propose changes.
Feel free to reach out if you have any questions or suggestions.
Happy Learning!!!