This repository contains a Selenium-based automation framework for testing the Airbnb website. The project uses the Page Object Model (POM) design pattern to create a maintainable and scalable test automation solution.
- Java 8
- Selenium WebDriver 4.10.0
- TestNG 7.4.0
- Maven
Airbnb_project/
├── src/
│ ├── main/java/
│ │ └── Pages/
│ │ ├── HomePage.java
│ │ ├── ListPage.java
│ │ ├── AppartmentPage.java
│ │ └── BookingPage.java
│ └── test/java/
│ ├── Base/
│ │ └── BaseTest.java
│ └── Search/
│ ├── DetailsTest.java
│ └── SearchTest.java
└── pom.xml
The framework follows the Page Object Model design pattern, with each page of the application represented by a dedicated class:
- HomePage: Handles interactions with the Airbnb home page, including search functionality and filters
- ListPage: Manages interactions with the search results page
- AppartmentPage: Handles interactions with the individual apartment listing page
- BookingPage: Manages interactions with the booking/reservation page
- BaseTest: Provides the foundation for all test classes, handling browser setup and teardown
- DetailsTest: Tests the end-to-end flow from search to booking
- SearchTest: Reserved for additional search-related test cases
- Clone this repository
- Ensure you have JDK 8 installed
- Download and configure the appropriate WebDriver (currently using EdgeDriver)
- Update the WebDriver path in
BaseTest.javato match your local configuration:System.setProperty("webdriver.chrome.driver", "path/to/your/driver");
- Run tests using Maven or TestNG
mvn clean testRun the DetailsTest.java file directly from your IDE.
This test verifies the end-to-end flow of:
- Searching for accommodations in "Al Haram"
- Setting check-in and check-out dates
- Adding guests (adults, children, and infants)
- Selecting an apartment from search results
- Handling window navigation and alerts
- Initiating the booking process
- Entering contact information
- The current implementation uses Edge WebDriver
- Implicit wait is set to 5 seconds
- Window handling is implemented for multi-window scenarios
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Mohammed Lukmanudin M - GitHub Profile