0% found this document useful (0 votes)
9 views

STQA-Journal

The document outlines a series of practical exercises for using Selenium IDE and Selenium WebDriver, including installation, creating test suites, and executing automated tests for various web page formats. It details specific test cases for HTML, XML, JSON, and JavaScript pages, as well as tasks involving data manipulation and verification in Java projects. Each practical exercise includes step-by-step instructions for setting up the environment and executing the code to achieve the desired outcomes.

Uploaded by

mayuripawar927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

STQA-Journal

The document outlines a series of practical exercises for using Selenium IDE and Selenium WebDriver, including installation, creating test suites, and executing automated tests for various web page formats. It details specific test cases for HTML, XML, JSON, and JavaScript pages, as well as tasks involving data manipulation and verification in Java projects. Each practical exercise includes step-by-step instructions for setting up the environment and executing the code to achieve the desired outcomes.

Uploaded by

mayuripawar927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

TY BSC CS

ROLL NO: 18

PRACTICAL 1

AIM: - Install Selenium IDE and create a test suite containing a minimum of 4 test
cases for different web page formats (e.g., HTML, XML, JSON, etc.).

Step 1: Install Selenium IDE

1.Install Selenium IDE Extension:


➔ Open your browser (Selenium IDE is available for Chrome and Firefox).
➔ Go to the browser's extension store:
Chrome: Selenium IDE Chrome Extension
Firefox: Selenium IDE Firefox Addon
➔ Click Add to Chrome or Add to Firefox.
➔ After installation, a Selenium IDE icon should appear in the browser toolbar.

Step 2: Open Selenium IDE

1. Launch Selenium IDE:


○ Click on the Selenium IDE icon in the toolbar.
○ You will be prompted with a welcome screen.
○ Choose Create a New Project.
○ Name your project (e.g., "Practical1").

1
TY BSC CS
ROLL NO: 18

Step 3: Create a Test Suite

2.Create a Test Suite:

○ In the Selenium IDE window, click on the Suites tab.


○ Click the + button to add a new suite.
○ Name the suite (e.g., "cases").

Step 4: Create Test Cases

Now, create test cases for different web page formats like HTML, XML, JSON.

Test Case 1: HTML Page Test

1. Test Case:
○ Click + next to Test Cases.
○ Name the test case (e.g., "test1").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
2
TY BSC CS
ROLL NO: 18

○ Run the test cases


Command Target Value

Open http://www.google.com

Type name=q ratnam

Click name=btnK

Test Case 2: XML Page Test

3
TY BSC CS
ROLL NO: 18

2. Test Case:
○ Click + next to Test Cases.
○ Name the test case (e.g., "test2").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
○ Run the test cases
Command Target Value

Open http://www.google.com

Type name=q Computer science

Click name=btnK

click partialLinkText=Wikipe
dia

verify title Computer science -


Wikipedia

Test Case 3: Json Page Test

4
TY BSC CS
ROLL NO: 18

3. Test Case:
○ Click + next to Test Cases.
○ Name the test case (e.g., "test3").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
○ Run the test cases
Command Target Value

Open https://www.google.com/

Type name=q python

click name=btnK

click partialLinkText=python

verify title Welcome to Python.org

click linkText=Downloads

click partialLinkText=Downlo
ad Python 3.12.7

5
TY BSC CS
ROLL NO: 18

Test Case 4: Javascript Page Test

4. Test Case:
○ Click + next to Test Cases.
○ Name the test case (e.g., "test4").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
○ Run the test cases
Command Target Value

Open https://
demo.guru99.com/test/
newtours/

Type name=userName 123

type name=password abc

click name=submit

verify title Login: Mercury Tours

6
TY BSC CS
ROLL NO: 18

PRACTICAL 2

AIM: - Conduct a test suite for two different websites using Selenium IDE. Perform
various actions like clicking links, filling forms, and verifying content

7
TY BSC CS
ROLL NO: 18

Step 1: Create a Test Suite

1.Create a Test Suite:

○ In the Selenium IDE window, click on the Suites tab.


○ Click the + button to add a new suite.
○ Name the suite (e.g., "Prac2 ").

Test Case 1: website testing 1

1.Test Case:

○ Click + next to Test Cases.


○ Name the test case (e.g., "test1").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
○ Run the test cases

Command Target Value

Open https://www.google.com/

Type name=q mumbai university

click name=btnK

8
TY BSC CS
ROLL NO: 18

Test Case 2: website testing 2

1.Test Case:

○ Click + next to Test Cases.


○ Name the test case (e.g., "test2").
○ Test cases to write in the selenium IDE
○ Write the below commands in selenium IDE
○ Run the test cases

Command Target Value

Open https://www.yahoo.com/

Type id=ybar-sbq mumbai university

send keys id=ybar-sbq ${KEY_ENTER}

9
TY BSC CS
ROLL NO: 18

PRACTICAL 3
AIM: Install Selenium Server (Selenium RC) and demonstrate its usage by executing a
script in Java or PHP to automate browser actions.
STEPS:
Go to this website for download eclipse IDE:
https://eclipseide.org/
1. open eclipse

10
TY BSC CS
ROLL NO: 18

2. Click on: eclipse IDE for java developer

11
TY BSC CS
ROLL NO: 18

3. Click on install

4. Click on launch
5. Open eclipse idle and create new project

12
TY BSC CS
ROLL NO: 18

6. Click on finish

7. Then right click on src go to build path go to configure build path

13
TY BSC CS
ROLL NO: 18

8. Then go to libraries click on classpath and click on add external jars


Add two jar files:

9. click apply and close

14
TY BSC CS
ROLL NO: 18

10. write the code in module.java

11. rename the filename as per the class name before debugging and
execute the code.

15
TY BSC CS
ROLL NO: 18

12. run the code

13. here is the final Output:

16
TY BSC CS
ROLL NO: 18

PRACTICAL 4
AIM: Write a program using Selenium WebDriver to automate the login process on a
specific web page. Verify successful login with appropriate assertions.
STEPS:
1. Open eclipse and select new java project and click finish.

2. Go to build path and in classpath add external jar files and click apply
and close.

17
TY BSC CS
ROLL NO: 18

3. add the code in the module java and refactor the file as loginpage.

4. Run the code and enter the admin and login password.

18
TY BSC CS
ROLL NO: 18

5. Here is the final output.

19
TY BSC CS
ROLL NO: 18

PRACTICAL 5
AIM: Write a program using Selenium WebDriver to update 10 student records
in an Excel file. Perform data manipulation and verification.
STEPS:
1. Open Eclipse select new java project entry name of the project.

2. Open src in that open module.java and copy L5 code from the
selenium folder and paste the code in the module.java file.

20
TY BSC CS
ROLL NO: 18

3. open build path in that open configure build path and add
External Jar file in class path.

4. go to build path and select Add libraries and in that select Junit
and click on Next and then Finish.

21
TY BSC CS
ROLL NO: 18

5. rename the Filename as Class name which is Updatestudrec.java.

22
TY BSC CS
ROLL NO: 18

6. Click on Run.

23
TY BSC CS
ROLL NO: 18

7. Here is the Final Output:

PRACTICAL: 6

24
TY BSC CS
ROLL NO: 18

AIM: Write a program using Selenium WebDriver to select the number of


students who have scored more than 60 in any one subject (or all subjects).
Perform data extraction and analysis.
STEPS:
1. Open Eclipse select new java project entry name of the project.

2. Open src in that open module.java and copy L6 code from the
selenium folder and paste the code in the module.java file.

25
TY BSC CS
ROLL NO: 18

3. open build path in that open configure build path and add
External Jar file in class path.

4. go to build path and select Add libraries and in that select Junit
and click on Next and then Finish.

26
TY BSC CS
ROLL NO: 18

5. rename the Filename as Class name which is studcount.java.

27
TY BSC CS
ROLL NO: 18

6. Click on Run.

7. Here is the Final Output:

PRACTICAL 7
AIM: Write a program using Selenium WebDriver to provide the total number of
objects present or available on a web page. Perform object
identification and counting.
STEPS:

28
TY BSC CS
ROLL NO: 18

1. Open Eclipse and create new java project and click finish.

2. go to build path and in that click on class path and add external jar file.

29
TY BSC CS
ROLL NO: 18

3. Write the code in the module.java and refactor it and write class name of
the code i.e., nlinks.

4. save and run the code.

5. Here is the final output:

30
TY BSC CS
ROLL NO: 18

PRACTICAL NO: 8
AIM: Write a program using Selenium WebDriver to get the number of items in a list
or combo box on a web page. Perform element identification and counting.
STEPS:
1. Create new Java project.

31
TY BSC CS
ROLL NO: 18

2. Write Code in the Module.java and Refactor it has the class name given
i.e ListCount

3. Now go to Build Path and in Build path select configuration.

32
TY BSC CS
ROLL NO: 18

4. In Configuration Click Classpath and Add External Jar Files Required for
the Program.

5. Now Run the code and you will get the final output as follow:

33

You might also like