This repository contains different Java Selenium projects to show how to automate web testing. Each folder has specific examples to practice real-world test cases and learn best practices for web automation.
- What It Does: Automates an air ticket booking website.
- Features Tested:
- Dropdown selection (e.g., number of passengers or travel class).
- Choosing "From" and "To" destinations using the search bar.
- Selecting travel dates using a calendar.
- Searching for available flights.
- Why It’s Useful: Shows how to handle dynamic web elements and verify search results.
- What It Does: Tests different types of dropdown menus.
- Features Tested:
- Static dropdowns (fixed options).
- Dynamic dropdowns (options that change based on user input).
- Autosuggest dropdowns.
- Dropdowns that update dynamically.
- Why It’s Useful: Covers all common dropdown types to ensure they work correctly.
- What It Does: Tests checkboxes on a webpage.
- Features Tested:
- Checking and unchecking checkboxes.
- Validating changes using assertions.
- Counting how many checkboxes are on the page.
- Why It’s Useful: Helps learn how to work with checkboxes and use assertions.
- What It Does: Automates form filling and submission.
- Features Tested:
- Entering data into a form.
- Submitting the form automatically.
- Printing the success message after submission.
- Why It’s Useful: Demonstrates a complete test workflow from filling to validating forms.
- What It Does: Tests user registration and login functionality.
- Features Tested:
- Registering a new user.
- Logging in with valid credentials.
- Checking for errors with invalid logins.
- Why It’s Useful: Focuses on testing website authentication.
- What It Does: Practices using assertions in tests.
- Features Tested:
- Verifying expected results on a webpage.
- Using assertions to confirm tests are working correctly.
- Why It’s Useful: Builds confidence in writing test cases with proper validation.
- Download or clone this repository.
- Open any folder in your favorite IDE (e.g., IntelliJ or Eclipse).
- Add Selenium WebDriver and browser drivers (e.g., ChromeDriver).
- Run the test scripts to see them in action.
- Java JDK 8 or higher.
- Selenium WebDriver (latest version).
- Browser drivers (e.g., ChromeDriver for Chrome).
- TestNG (optional, for better reports and assertions).
Explore the folders, try out the tests, or use them to build your own projects.
Happy Testing! 😊