LIST OF EXPERIMENTS
[Link]. NAME OF THE EXPERIMENT
1 Introduction to Selenium IDE
2 Installation Procedure of Selenium IDE
3 Selenium IDE Interface
4 Recording in Context Sensitive Mode and Analog Mode
5 GUI Checkpoint for Single Property
6 GUI Checkpoint for Single Object/Window
7 GUI Checkpoint for Multiple Objects
8 Test Case for Calculator in Windows Application
INTRODUCTION TO SELENIUM
A Free / Open-Source automated testing suite for web applications across different
browsers (Chrome, Firefox, Safari, Opera, Internet Explorer & Chromium), Platforms
(Windows, Linux, Mac & Solaris) and Programming Languages (C#, Java, Python, Perl, PHP &
Ruby).
It covers functional test (Tests whether the software or application is working or not) on web
applications.
It validates the behaviour of a web applications.
It records and play back test automation for the web applications or web sites.
With the Selenium IDE, we can do:
i) Record a new test in a new project
ii) Open an existing project
iii) Create a new project
iv) Close the Selenium IDE
INSTALLATION PROCEDURE OF SELENIUM IDE
Steps to install and add an extension to the Chrome browser:
Step 1: Launch the Chrome browser.
Step 2: Search with the keyword 'Selenium IDE for Chrome' in the browser.
Step 3: Click on the option shown in the below screen.
Step 4: Click on the "Add to Chrome" option.
Step 5: Click on "Add extension."
Step 6: Restart the Chrome browser once the above is complete.
Step 7: Open Selenium IDE from Chrome and start the testing on any web application
WELCOME SCREEN
Upon launching the IDE, you will be presented with a welcome dialog. This will give you
quick access to the following options:
• Record a new test in a new project
• Open an existing project
• Create a new project
• Close the IDE
If this is your first time using the IDE (or you are starting a new project), then select the first
option.
SELENIUM IDE INTERFACE:
Selenium IDE is divided into different components, each having their own features and
functionalities. We have categorized SIX different components of Selenium IDE, which includes:
1. MENU BAR: It consists of the following buttons:
a) Create a new Project
b) Open an existing project
c) Save the project
2. TOOL BAR: It consists of the following buttons:
a) Play all tests
b) Play current test
c) Start Recording
d) Pause/Stop/Resume
3. ADDRESS BAR: Shows the base address of website (current URL)
4. TEST CASE PANE: It shows all the test cases that are recorded in the form of test cases.
5. TEST SCRIPT EDITOR BOX: It shows the Test Scripts and user interactions that were
recorded by the IDE. It includes 3 Columns:
a) Command: Actual operation or action performed on the browser element.
b) Target: Web Element on which operation has to be performed.
c) Value: Actual Parameters need to send.
6. TEST EXECUTION RESULT SUMMARY: It shows the pass or fail status of various
test cases.
Program 1:
AIM: Recording in context sensitive mode and analog mode using Selenium IDE
Objective:
• Student should be able to
• Describes Context Sensitive mode
• Record a test script
• Read the test script
• Run the recorded test and analyze the results
Context Sensitive Recording mode:
✓ It is the default mode of recording which takes full advantage of Quick Test Professional's
test object model.
✓ It recognizes objects in the application regardless of their location on the screen.
✓ It records the operations that are performed in an application by identifying the GUI
objects.
Analog recording
✓ records the inputs from keyboard, mouse clicks, the x and y coordinates that are travelled
by the mouse pointer across the screen.
✓ It can’t capture GUI windows and objects.
PROCEDURE:
I. Recording (recording user interactions with the browser)
Step-1: Open Selenium IDE from Chrome/Firefox Browser
Step-2: Select the option “Record a new test in a new project” from Selenium IDE Welcome
screen.
Step-3: Name the Project Name as “Project1” and click on “OK” button.
Step-4: Type [Link] as Base URL and Click on “Start Recording” Button.
Step-5: It will redirect you to the that webpage and what operations you perform will be recorded.
Meanwhile, you will get the notifications of the actions performed by the IDE at the extreme
right corner of your web browser.
Step -6: Now, go the IDE and click on the "Stop Recording" button to stop recording your actions
further.
Step-7: Type the test name as “Test1” in the text box and click on “OK” button.
II. Playing Back (Executing the Recorded Script)
• Click on the "Run Current Test" button present on the tool bar menu of the IDE.
• It will execute all of your interactions with the browser and gives you an overall summary of
the executed test script.
III. Saving the Test Suite
• Click on the save button present on the extreme right corner of the menu bar.
• Save the entire test suite as "Demo Test1".
Program 2:
AIM: GUI checkpoint for single property (How to automate click command
in Selenium IDE)
Objective: Student should be able to
✓ Explain how to check the behavior of GUI objects
✓ Create a test that checks GUI objects
✓ Run the test on different versions of an application and examine the results
Graphical User Interface:
• GUI testing evaluates design elements such as layout, colors, fonts, font sizes, labels, text
boxes, text formatting, captions, buttons, lists, icons, links and content.
• GUI testing processes can be either done by the two categories are manual or automatic, and
are often performed by third -party companies, rather than developers or end users.
• Usually, the software author writes out the intended function of a menu or graphical button.
• Selenium IDE contains huge list of commands.
• “Click” is one of the commands in Selenium IDE.
• Click command is used in Selenium IDE to click on any GUI element in the web application.
Ex:
1) Clicking on a Button
2) Selecting a Radio Button or Check Box
3) Clicking on a Link
4) Clicking inside a Text Box or Text Area Field Box
PROCEDURE: (To click on Drop Down Button using Selenium IDE Click
Command)
Step-1: Open Selenium IDE from Chrome/Firefox Browser
Step-2: Select the option “Create a new project” from Selenium IDE Welcome screen.
Step-3: Type the Project Name as “Project2” and Click on “OK” button.
Step-4: Select the First Row in Test Scripts Editor Box.
Step-5: Type “Open” in Command Box and “ / “ in Target Box as showed in the following:
Note:
“ / “ is used to open the Base URL web application (Ex: [Link]
Step-6: Select the Second Row in Test Scripts Editor Box.
Step-7: Type “Click” in Command Box and “ xpath=//button[@class=’dropbtn’] “ in Target
Box as showed in the following:
Step-8: Click on the "Run Current Test" button present on the tool bar menu of the IDE.
Step-9: Enter the Base URL as “ [Link]
Step-10: Click on “Start Play Back” Button.
It will redirect you to the web application “[Link]” and clicks the “Dropdown”
button to show the button options as shown below:
Step-11: Then go to Selenium IDE and see the overall summary of the executed test script which
is shown below:
Step-12: Click on the save button present on the extreme right corner of the menu bar.
Step-13. Save the entire test suite as "Demo Test2".
Program 3:
AIM: GUI checkpoint for single object/window
Objective: Student should be able to
✓ Explain how to check the behavior of GUI objects
✓ Create a test that checks GUI objects
✓ Run the test on different versions of an application and examine the results
PROCEDURE: (To Resize Window Object using Set Window Size Command)
Step-1: Open Selenium IDE from Chrome/Firefox Browser
Step-2: Select the option “Create a new project” from Selenium IDE Welcome screen.
Step-3: Type the Project Name as “Project3” and Click on “OK” button.
Step-4: Select the First Row in Test Scripts Editor Box.
Step-5: Type “Open” in Command Box and “ / “ in Target Box as showed in the following:
Note:
“ / “ is used to open the Base URL web application (Ex: [Link]
Step-6: Select the Second Row in Test Scripts Editor Box.
Step-7: Type “Set Window Size” in Command Box and “800x600“ in Target Box as showed in
the following:
Step-8: Click on the "Run Current Test" button present on the tool bar menu of the IDE.
Step-9: Enter the Base URL as “ [Link]
Step-10: Click on “Start Play Back” Button.
Step-11: Then go to Selenium IDE and see the overall summary of the executed test script and the
web application window will be showed as below:
Step-12: Click on the save button present on the extreme right corner of the menu bar.
Step-13. Save the entire test suite as "Demo Test3".
Program 4:
AIM: GUI Checkpoint for Multiple Objects
Objective: Student should be able to
✓ Explain how to check the behavior of GUI objects
✓ Create a test that checks GUI objects
✓ Run the test on different versions of an application and examine the results
PROCEDURE:
Step-1: Open Selenium IDE from Chrome/Firefox Browser
Step-2: Select the option “Record a new test in a new project” from Selenium IDE Welcome
screen.
Step-3: Name the Project Name as “Project4” and Click on “OK” button.
Step-4: Type [Link] as Base URL and Click on “Start Recording” Button.
Step-5: It will redirect you to the that webpage and what operations you perform will be recorded.
Meanwhile, you will get the notifications of the actions performed by the IDE at the extreme
right corner of your web browser.
Step-6: Click on “Open a popup window” text link to open popup window as showed below:
Step-7: Close the Pop-up window
Step-8: Click on “ClickAfterTextDissappears” Button to display a Message Box which is showed
below:
Step-9: Click on “OK” Button in Hello Message Box.
Step-10: Now, go the IDE and click on the "Stop Recording" button to stop recording your
actions further.
Step-11: Type the test name as “Test4” in the text box and click on “OK” button.
Step-12: Click on the save button present on the extreme right corner of the menu bar.
Step-13. Save the entire test suite as "Demo Test4".