SathyaVasaganE FirstCry Documentation
SathyaVasaganE FirstCry Documentation
1 Introduction 3
2 Test Objective 3
3 Test Environment 3
5 Test Steps 3
6 Test Cases 4
7 Test Execution 4
8 Test Results 4
9 Detailed Results 4
11 Conclusion 9
Introduction:
This document outlines the Selenium WebDriver-based test automation script for testing
functionalities on the FirstCry website. The script performs automated UI testing for searching
products, logging in, and viewing product details.
Test Objective:
The primary objective of this test is to verify the core functionalities of the FirstCry website,
including product search, login authentication, and product details page navigation.
Test Environment:
Operating System: Windows 10 / 11
Browser: Google Chrome (latest version)
Selenium WebDriver: Latest version
Java Version: JDK 11+
Testing Framework: None (Standalone Java program)
Test Steps:
1. Open the Chrome browser and navigate to the FirstCry website.
2. Execute the search functionality for a specific product.
3. Validate that search results appear.
4. Navigate to the login page and input credentials.
5. Verify if the OTP screen appears after login attempt.
6. Click on a product from the search results.
7. Verify if the product details page loads correctly.
8. Close the browser after execution.
Test Cases:
Test Test Scenario Expected Result Actual Status
Case ID Result
TC001 Search for a product Search results page should As Passed
display relevant products expected
TC002 Login with mobile OTP verification page should As Passed
number appear expected
TC003 Navigate to a product The product details page should As Passed
details page load expected
Test Execution:
The test execution follows sequential steps where each test case is executed in order within a
single Java program.
Test Results:
All test cases were executed successfully without failures, confirming that the website's key
functionalities work as expected.
Detailed Results:
The search feature correctly retrieves relevant product listings.
The login function directs users to the OTP input page, indicating a successful
authentication process.
Clicking a product successfully navigates to the product details page, verifying UI
responsiveness.
// Maximize browser
driver.manage().window().maximize();
try {
// Run test cases one by one
testSearchProduct();
testLogin();
testProductDetailsPage();
} catch (Exception e) {
e.printStackTrace();
} finally {
tearDown(); // Close browser at the end
}
}
// Click on Continue
WebElement continueButton =
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//span[contains(text(),'CON
TINUE')]")));
continueButton.click();
// Locate the outer span that contains the full product title
WebElement productTitle =
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("J14SB_42")));
if (productTitle.isDisplayed()) {
System.out.println("Test Passed: Product details page is displayed.");
} else {
System.out.println("Test Failed: Product details page is not displayed.");
}
}
Output:
Fig 1: testSearchProduct()
Fig 2: testLogin()
Fig 3: testProductDetailsPage()
Conclusion:
The automated test execution successfully validated essential functionalities of the FirstCry
website, including search, login, and product navigation. All test cases passed as expected,
indicating that the website operates efficiently under test conditions. The use of Selenium
WebDriver enabled seamless interaction with web elements, ensuring accurate validation of
results. Future enhancements can include additional test scenarios such as cart functionality,
payment flow, and responsiveness across different devices for a more comprehensive
evaluation.