This project is a Java-based web automation framework using Selenium WebDriver and Cucumber for BDD (Behavior Driven Development). The project is built using Maven.
src/main/java/pages: Contains page object classes for different web pages.src/test/java/stepDefinitions: Contains step definition classes for Cucumber.src/test/resources/features: Contains feature files written in Gherkin syntax.src/test/resources/features/predefined.feature: Contains predefined steps grouped and explained for easy reference.
- Java 11 or higher
- Maven 3.6 or higher
- IntelliJ IDEA or any other preferred IDE
- Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git
- Navigate to the project directory:
cd your-repo-name - Install the dependencies:
mvn clean install
To run the tests, use the following command:
mvn test- Login: Tests for successful and unsuccessful login scenarios.
- Browser Navigation: Tests for basic browser actions like navigating to a URL, refreshing the page, and switching tabs.
- Element Actions: Tests for clicking elements, typing text, and verifying element visibility.
- Dropdowns and Checkboxes: Tests for interacting with dropdown menus and checkboxes.
- File Upload: Tests for uploading files.
- JavaScript Executions: Tests for executing JavaScript commands.
- IFrame and Modal Windows: Tests for switching to iframes and handling modal windows.
This project includes a set of predefined steps that are grouped and explained in the predefined.feature file. These steps cover a wide range of common actions such as browser navigation, element interactions, text actions, visibility checks, dropdown and checkbox interactions, action class methods, file uploads, wait methods, JavaScript executions, iframe and modal window handling, and others.
Predefined steps provide a reusable and standardized way to write test scenarios. They help in maintaining consistency across different test cases and make it easier for new contributors to understand and use the framework.
You can refer to the predefined.feature file to see the available steps and their usage. These steps can be directly used in your feature files to create new test scenarios without writing additional step definitions.
I welcome contributions to this project. If you would like to contribute, please fork the repository and submit your pull requests. Thank you for your support!