This project demonstrates automated browser testing for Amazon using Selenium WebDriver with Java. The automation script performs a series of actions on Amazon India's website, including navigating to product pages, adding items to cart, and manipulating cart quantities.
The automation flow includes:
- Opening Amazon India website
- Navigating to "Today's Deals"
- Selecting OPPO phone deals
- Adding OPPO A31 to cart
- Navigating to cart and changing quantity
- Finding and adding another phone (OPPO A54) to cart
- Java 8
- Maven
- Chrome browser
- ChromeDriver (matching your Chrome version)
-
Clone this repository:
git clone https://github.com/your-username/amazon-automation.git cd amazon-automation -
ChromeDriver configuration:
- Download ChromeDriver from ChromeDriver website
- Place it in your preferred location
- Update the path in
Amazon3.javaif needed:System.setProperty("webdriver.chrome.driver", "D:\\chromedriver_win32\\chromedriver.exe");
-
Build the project:
mvn clean install
To run the automation script:
mvn exec:java -Dexec.mainClass="Amazon3"
amazon-automation/
├── .idea/ # IntelliJ IDEA configuration files
├── src/
│ └── main/
│ └── java/
│ └── Amazon3.java # Main automation script
├── pom.xml # Maven configuration file
└── README.md # Project documentation
- Selenium WebDriver (v4.1.2)
- TestNG (latest release)
Mohammed Lukmanudin M - GitHub Profile