ST Abl
ST Abl
Report on
01
Activity Based Learning – Software Testing
Index
FIELD CONSTRAINTS
EMAIL-ID Required field must not be empty,must enter correct email format.
PASSWORD Required field must not be empty,it accepts minimum six cahrecters of digits,alphabet,special
character.
MOBILE NO. Required field must not be empty,it only accepts 10 numeric digits and should not accept 0 as
first cahrecter.
RADIO BUTTON Required field must not be empty,can select one option at a time.
CHECKBOX Required field must not be left empty,Can select multiple options at a time.
Page 2
Test cases table
Test Case Test Steps Expected Results Actual Results
Description Status
Valid inputs 1..Enter a valid name in the Success message Success message Pass
for all fields "First Name" Textbox.. "Naukri.com" homepage "Naukri.com" homepage
is displayed. is displayed.
2. Enter a valid email address in
the "Email Address" TextBox.
3. Enter a strong password in
the "Password" field.
Invalid First 1..Enter a Invalid name in Error message “ Numeric Error message “ Numeric
ee
Name the "First Name" Textbox.. and special characters and special characters
other than space .' not other than space .' not
allowed” allowed”
Invalid email 1.Enter a valid name in the Error message Error message Pass
address format "First Name" Textbox.. "Please enter a "Please enter a
valid email ID” valid email ID”
2 Enter a Invalid email address (e.g., (e.g.,
in the "Email Address" TextBox [email protected])." [email protected])."
3. Enter a strong password in is displayed is displayed.
the "Password" field.
4. Enter a valid 10-digit mobile
number in the "Mobile
Number" field.
5.Select either of the button
for “work Status.
Page 3
Invalid 1.Enter a valid name in the Error message"Spaces Error message"Spaces Pass
password "First Name" Textbox.. are not allowed” are not allowed”
{less than 6 (e.g., 123 34). (e.g., 123 34).
2 Enter a valid email address in
characters)
the "Email Address" TextBox If entered less then 6
3. Enter a strong Invalid character. Error message”Password
should be minimum 6
password in the "Password" (e.g.123)
Error message”Password characters”
field.
should be minimum 6
characters”
4. Enter a valid 10-digit mobile
number in the "Mobile
Number" field.
5.Select either of the button
for “work Status.
6..Select the "Current City” by
clicking on the disabled button..
Page 4
Trying to select .1.Enter a valid name in the Error message "Please Error message "Please Pass
Multiple “Radio - "First Name" Textbox. select either of the select either of the
Button” . options”. options”.
2. Enter a valid email address in
the "Email Address" TextBox
3. Enter a strong password in
the "Password" field..
4. Enter a valid 10-digit
mobile number in the "Mobile
Number" field..
5. Select multiple Radio
buttons for “work Status
6. ..Select the "Current City”
by clicking on the disabled
button..
7. .Select the checkbox to
agree and get imp updates.s.
Not selecting 1.Enter a valid name in the Error message "Please Error message "Please Pass
checkbox "First Name" Textbox.. select the chxkbox before select the chxkbox before
Trying to click clicking on the register clicking on the register
2 Enter a valid email address in
on Register button”.. button”.
the "Email Address" TextBox
button
3. Enter a strong password in
the "Password" field.
Page 5
AUTOMATION Testing Snapshots.
Page 6
2. Go to Naukri.com .
Page 7
Enter the “Valid information” in Full name TextField and Enter Valid email-id
in Email-id TextField and Enter Password more then 6 digits.
Enter the “Valid Mobile number” in Mobile number TextField and Select Work
Status by selecting either of the Button and Select the Current City and Select
the checkbox.
Page 8
After entering valid information, we will be navigated to ” Registration
Successful” page.
Page 9
Entering the OTP manually to verify the mobile number.
Page 10
CODE SNIPPET FOR AUTOMATING
REGISTRATION PAGE NAUKRI.COM WEBPAGE
package SoftwareTesting;
import java.time.Duration;
import java.util.List;
Page 11
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import
org.openqa.selenium.support.ui.ExpectedConditions;
import
org.openqa.selenium.support.ui.WebDriverWait;
Page 12
driver.findElement(By.xpath("//div[@class='focusable
optionWrap ']/../div[2]")).click();
WebDriverWait wait=new WebDriverWait(driver,
Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocat
ed(By.xpath("//span[.='Bengaluru']"))).click();
Thread.sleep(2000);
driver.findElement(By.xpath("//i[@class='ico
resman-icon resman-icon-check-box']")).click();
driver.findElement(By.xpath("//button[.='Register
now']")).click();
Thread.sleep(2000);
driver.get("https://www.naukri.com/mnjuser/homepa
ge");
driver.quit();
}
}
Conclusion
Automated software testing is a pivotal practice in
modern software development, ensuring the
consistent and efficient evaluation of software
applications. The presented script, which employs
Selenium WebDriver and Java, exemplifies the
power of automation in testing web forms. By
systematically inputting data, simulating
user interactions, and validating results, this script
Page 13
demonstrates how automated testing can save time,
reduce human error, and enhance the overall
quality of software.
Page 14