https://github.com/noushinb/selenium-webdriver-java-testing-example
This repository demonstrates using Selenium WebDriver with Java, JUnit, BDD, Cucumber, and Gherkin for browser automation and UI testing. It includes a framework for WebDriver management, reusable UI methods, page objects, and example tests with scenarios.
https://github.com/noushinb/selenium-webdriver-java-testing-example
bdd cucumber gherkin java junit page-object-model qa-automation selenium selenium-webdriver-java-junit-cucumber-gherkin test-automation
Last synced: 5 months ago
JSON representation
This repository demonstrates using Selenium WebDriver with Java, JUnit, BDD, Cucumber, and Gherkin for browser automation and UI testing. It includes a framework for WebDriver management, reusable UI methods, page objects, and example tests with scenarios.
- Host: GitHub
- URL: https://github.com/noushinb/selenium-webdriver-java-testing-example
- Owner: NoushinB
- Created: 2024-07-19T15:59:07.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-01-30T11:34:52.000Z (5 months ago)
- Last Synced: 2025-01-30T12:24:17.732Z (5 months ago)
- Topics: bdd, cucumber, gherkin, java, junit, page-object-model, qa-automation, selenium, selenium-webdriver-java-junit-cucumber-gherkin, test-automation
- Language: Java
- Homepage:
- Size: 159 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Selenium WebDriver Java Testing Example
This repository provides an example of using **Selenium WebDriver** with **Java**, **JUnit**, **Cucumber**, and **Gherkin** for browser automation and UI testing. It includes a simple framework for managing WebDriver instances, reusable UI methods, page objects, and example tests that interact with a web form on [Boni García's Selenium WebDriver page](https://bonigarcia.dev/selenium-webdriver-java/web-form.html).
The tests are written using the **Cucumber** framework in **Gherkin** syntax, which allows for behavior-driven development (BDD) style scenarios. **JUnit** is used as the test runner to execute the feature files.
## Overview
This project demonstrates how to build a basic Selenium WebDriver testing framework in Java. The repository contains:
- **Driver management** with thread-safe WebDriver instances.
- **Reusable UI methods** and **page objects** for interacting with web elements.
- **Sample test scenarios** that cover various web components (text input, password fields, checkboxes, dropdowns, etc.).
- **Cucumber-based feature files** for defining test scenarios in a behavior-driven development (BDD) style.## Cucumber-Based Feature Files
This repository includes comprehensive Cucumber feature files written in Gherkin syntax. These files define test scenarios for behavior-driven development (BDD) and cover a wide range of functionalities:
- **Infinite Scroll**:
- Validates dynamic content loading as the user scrolls to the bottom of the page.
- Ensures new content is appended without triggering a full-page reload.- **Drag and Drop**:
- Tests drag-and-drop functionality, verifying that elements are repositioned correctly.- **Dropdown Menu Interaction**:
- Scenarios for interacting with dropdown buttons and verifying menu item visibility and selection.- **Home Page Navigation**:
- Tests navigation to various pages using specific buttons on the home page.- **Web Form Components**:
- Covers interaction with various form elements, including:
- Text inputs and password fields.
- Dropdown menus (select and datalist).
- File uploads.
- Checkboxes and radio buttons.
- Date picker, color picker, and range slider components.- **Navigation Page**:
- Validates button interactions and dynamic content updates.- **Additional Scenarios**:
- Tests advanced UI interactions, including:
- Color selection using a color picker.
- Date selection via a date picker.
- Adjusting values with a range slider.