Você está na página 1de 15

SOFTWARE ENGINEERING ASSIGNMENT

ON

SELENIUM IDE

PREPARED BY-
Name- Gursimranjeet Singh Bawa
Roll No.- 2015CSA1059
Sem – 6 Sec – A

SUBMITTED TO-

Mr. Prabhsimran Singh


TESTING TOOL- SELENIUM

Selenium is a portable software-testing framework for web applications.


Selenium provides a playback tool for authoring tests without the need to learn
a test scripting language. Selenium works on Windows, Linux, and mac
OS platforms. It is open-source software, released under the Apache 2.0 license.

Selenium is composed of several components with each taking on a specific role


in aiding the development of web application test automation. But here we will
be working with Selenium IDE.

Selenium IDE:

Selenium IDE is a complete integrated development environment (IDE) for


Selenium tests. It is implemented as a Firefox Add-On, and allows recording,
editing, and debugging tests. It was previously known as Selenium Recorder.

The Selenium IDE for Firefox works with the Firefox 55 or lower version. It does
not work with the updated Firefox versions.

Steps to install Selenium IDE:


(It is open-source software, and is available on the official site of ‘selenium’)

 Open the site https://www.seleniumhq.org/


 Go into the Download section available on the site.
 Find the Selenium IDE
 Click on from addons.mozilla.org link available under Selenium IDE
 You will be directed to the Firefox’s add-ons page
 Click on Add to Firefox button.
 Automatic download will start.
 Install the add-on of Selenium.

Now Selenium IDE is installed as an ADD-ON of Firefox. Now we can use it to


various test cases.
USE OF SELENIUM IDE:

 Launch Firefox and Selenium IDE.


 Use shortcut key combination of Alt+Ctrl+S to open the Selenium IDE
window.

There on the right side of the Selenium IDE window we have the option of
recording the steps performed on the browser. We can click on this Red button
to start or stop recording.
VARIOUS BUTTONS AVAILABLE ON SELENIUM IDE TOOLBAR:

Playback Speed: This controls the speed of your Test Script Execution.

Record: This starts/ends your recording session.

Play entire test suite: This will sequentially play all the test cases listed in the

Test Case Pane.

Play current test cas:. This will play only the currently selected test case in the

Test Case Pane.

Pause/Resume: This will pause or resume your playback.

Step: This button will allow you to step into each command in your test script.

Apply rollup rules. This is an advanced functionality. It allows you to group Selenese

commands together and execute them as a single action.


Starting the Test Case.

1. Enter Command - Open

Target - http://yahoo.com
2. Enter Command - type
Target - name=p
Value - selenium
3. Enter Command - clickAndWait
Target - id=uh-search-button
Click on the Find button. (This will indicate the Search button available on the
web page.)

Run this set of commands and it will result in the following output.
We get the Search result.

Using few more commands:


assertTitle – This command will assert the title of current opened page
and return "[error] Actual value 'Actual Title' did not match 'Targeted
Title'" in log if targeted title and actual title did not match. Else it will be
pass and will go for executing next command.

1. Enter Command - Open

Target - http://yahoo.com

2. Enter Command - assertTitle

Target - Yahoo
It does not gives error as the target value is same as the title of the web page.

Trying Target – Yahoo 1 instead of Yahoo.

It has given error and stopped the execution.


assertTextPresent: This command is useful for verifying and
asserting selenium if given text is not present on page. It will
return false as error if specified text is not present on page and
will stop execution.
1. Enter Command – Open
Target - http://yahoo.com

2. Enter Command - type


Target - name=p
Value - selenium

3. Enter Command - clickAndWait


Target - id=uh-search-button

4. Enter Command - assertTextPresent


Target - Selenium – Wikipedia

As the target value is present in the web page it has given no error.
Lets try with the target value of ‘What is selenium’

As ‘What is selenium’ is not present in the web page, it has given error
and stopped execution.

Você também pode gostar