The main website for this assessment is https://www.saucedemo.com/. You will need to use Java programming language and the Selenium WebDriver API to complete this assessment.
- Java Development Kit (JDK) installed ✔️
- Integrated Development Environment (IDE) of your choice ✔️
- Selenium WebDriver API installed ✔️
- Open the project in your preferred IDE.
- Create a Java project in your IDE for the assessment.
- Create a project file for each test case.
- Write Java code to automate each test case.
- Execute the test cases and verify that they pass.
- If any test case fails, debug the code and fix the issue.
- Submit your completed Java project files for each test case as your assessment submission.
- Open the URL https://www.saucedemo.com/
- Verify that the correct URL is loaded
- Verify the existence of the Username field
- Verify the existence of the Password field
- Verify the existence of the Login button
- Open the URL https://www.saucedemo.com/
- Enter valid username in the Username field
- Enter valid password in the Password field
- Click on the Login button
- Verify that user is logged in successfully and is redirected to the Products page
- Open the URL https://www.saucedemo.com/
- Enter invalid username in the Username field
- Enter invalid password in the Password field
- Click on the Login button
- Verify that the error message is displayed
- Login with valid credentials
- Click on the Add to Cart button for the first available item
- Verify that the item is added to the cart
- Verify that the Cart icon in the top right corner of the page is updated with the number of items in the cart
- Login with valid credentials
- Click on the Add to Cart button for the first available item
- Click on the Cart icon in the top right corner of the page
- Click on the Remove button for the item
- Verify that the item is removed from the cart
- Verify that the Cart icon in the top right corner of the page is updated with the correct number of items in the cart
- Login with valid credentials
- Click on the Add to Cart button for the first available item
- Click on the Cart icon in the top right corner of the page
- Click on the Checkout button
- Enter the necessary personal and payment details in the checkout page
- Click on the Finish button
- Verify that the order confirmation page is displayed
- Login with valid credentials
- Click on the Add to Cart button for the first available item
- Click on the Cart icon in the top right corner of the page
- Click on the Checkout button
- Enter only the First Name in the checkout page
- Click on the Continue button
- Verify that the error message is displayed
- Login with valid credentials
- Click on the Menu button on the top left corner of the page
- Click on the Logout button
- Verify that user is logged out successfully and is redirected to the Login page
- Login with valid credentials
- Click on the Sort dropdown on the Products page
- Select a value from the dropdown list
- Verify that the items are sorted correctly