Selenium IDE Tutorial

Selenium IDE Tutorial

I) Selenium IDE Introduction:

> It is a Tool, used to develop Selenium Test Cases.

> It is Firefox plug in, works only on Firefox Browser.

> It provides Graphical user interface for Recording user actions using Firefox Browser.

> Firebug Add on is used to inspect elements.

> Selenium IDE should only be used as a prototyping tool.

We can't develop complex Test cases using Selenium IDE.

> Test Step in Selenium IDE Test Case

Command + Target + value

Command - forms the functionality of the Test step

Target - Identifies the Element on the web page.

Value - Input data (This applicable only for few commands)


Type     id=Email     abcd123
II) Selenium IDE Installation:

> using Firefox browser, download selenium IDE from the website.

> Firefox will protect you from installing add ons from unfamiliar locations, so we  will need to click "Allow" to proceed with the installation.

> Install multiple items to support Java, Ruby, Python etc... formats.

> Restart Firefox browser.

> After Firefox reboots then we can use Selenium IDE.
III) Selenium IDE Features
1) File Menu:
> File menu has options for Test Case and Test Suite

> Using this menu we can

Create a new Test case,

Open a Test Case,

Save a Test Case,

Export Test case in a Language of our choice.

All these options are also available for Test suite.

> close Selenium IDE

Selenium Test case format is html
2) Edit menu:
The Edit menu allows copy, cut, paste, delete, undo, and select all operations for editing the commands in our test case.

3) Actions menu:
It has options for Record and Run Test case, Run Test suite, Insert/Remove Breakpoints, pause/resume Test case execution.

4) Options Menu:
Option menu allows the changing of settings, we can set timeout value etc...

5) Help menu:
It provides help documentation for Selenium IDE.
Test Case Pane:
Our Test script is displayed in the Test Case pane,
It has two tabs,

i) Table format
Displays Command and parameters

ii) Source format
Displays the test case in the native format (HTML)
Create Test Cases 

    Type Steps using element locators and Selenese commands

Record Test Case:
During Record Selenium IDE generates steps for user actions on AUT.

Element identification and Operation on element both available in steps.

In Selenium IDE no Object Repository, so no centralized maintenance of Elements.
Difference between UFT and selenium in case of maintenance of Objects/elements

In UFT centralized maintenance of Objects/elements

In Selenium no centralized maintenance of Objects/elements
IV) Create & Execute Test cases

In two ways we can create Test cases in Selenium IDE:

i) By Recording our actions on AUT

ii) By Typing steps using Selenium IDE commands (Selenese commands) and Element locators
Test Recording:
> During Test recording Selenium IDE generates steps for user actions on AUT.

> It generates normal steps and Verification points

> User can edit recorded Test cases

Selenium IDE Test step consists of Command, Element locator and Value (Input)
Value is only for some commands

Command    Target        value

type    id=Email    abcd123   
> No centralized maintenance of Elements in Selenium IDE.

> Selenium IDE test case format is .html
Using Breakpoints and step command we can execute Selenium IDE test case step by step.

We can add Comments
When an "assert" command fails then test execution will be aborted.

When a "verify" command fails then test will continue execution and logging the failure.


Post a Comment