The document discusses Selenium IDE, an integrated development environment for automating web application testing through Selenium scripts. It can be used to record, edit, debug and run test cases in Firefox. Key features include controls for playback speed and debugging tools. User extensions allow adding custom commands by creating JavaScript files. The process of creating and running test cases and test suites within the IDE is also outlined.
2. Selenium Types
Selenium IDE
IDE Features
Creating and Running Test Suite and Case
IDE Extensions (JavaScript)
07/12/2016Ogma Applications 2
Overview
3. Selenium IDE
Selenium WebDriver
Selenium Server (Grid)
Selenium RC
07/12/2016Ogma Applications 3
Selenium types
4. Selenium IDE is an integrated development environment for Selenium
scripts. It is implemented as a Firefox extension.
It allows you to record, edit, and debug tests.
07/12/2016Ogma Applications 4
Selenium IDE
5. IDE Features
Speed Control: controls how fast your test case runs.
Run All: Runs the entire test suite when a test suite with
multiple test cases is loaded.
Run: Runs the currently selected test. When only a single test is
loaded this button and the Run All button have the same effect.
Pause/Resume: Allows stopping and re-starting of a running
test case.
Step: Allows you to “step” through a test case by running it
one command at a time. Use for debugging test cases.
Apply Rollup Rules: This advanced feature allows repetitive
sequences of Selenium commands to be grouped into a single
action.
Reload
Test Scheduler
Record: Records the user’s browser actions.
07/12/2016Ogma Applications 5
6. IDE Features
Command – Tells Selenium
what to do using actions or
assertions
Target – Tells Selenium which
HTML element a command
refers to
Value – Used for any
command that might need a
value of some kind
08/04/2015Ogma Applications 6
7. IDE Features
Log – When test case run, error messages
and information messages showing the
progress are displayed in this pane
automatically. Useful for debugging
Reference - The Reference pane will display
documentation on the current command.
UI-Element - A mapping between a
meaningful name for a page element, and
the means to locate that page element's
DOM node. The page element is located via a
locator. UI elements belong to pagesets*.
Rollup - Logic that describes how one or
more Selenium commands can be grouped
into a single command, and how that single
command may be expanded into its
component Selenium commands*.
08/04/2015Ogma Applications 7
9. IDE Features: Commands
Selenium commands come in three
“flavors”: Actions,Accessors, and Assertions.
Actions - commands that generally manipulate
the state of the application.
Accessors - examine the state of the application
and store the results in variables, e.g.
“storeTitle”.
Assertions - are like Accessors, but they verify
that the state of the application conforms to
what is expected.
07/12/2016Ogma Applications 9
10. Creating and Running Test
Suite and Case
The procedure for creating automated test case
consists of the following steps:
Start a Firefox window and navigate to the
page URL you want to test.
Click on the Tools menu, Selenium IDE, as
described in the following figure
Fill in the Base URL field at the top with the
starting URL of the page being tested and
then clink on the button Record .
Having the Record button enabled, start
the test case by making the data entry on
the system
At the end of test case, disable the Record
button. You can save the test case at the
File menu, Save Test Case.
To run the test case automatically, just click
on the button Play current test case
At the end of successful execution,
Selenium-IDE window will display the list of
steps executed successfully.
A test suite is a collection of test cases.
07/12/2016Ogma Applications 10
11. User extensions are JavaScript files that allow you to
create your own customizations and features to add
additional functionality.
07/12/2016Ogma Applications 11
IDE Extensions
12. Adding User Extensions In
The Selenium IDE
Options->General tab
Close Selenium and open
again
Check new commands
availability
07/12/2016Ogma Applications 12
13. New Commands from added
Extension (generating random email)
typeRandomEmail- types random
email
typeRandomEmailAndWait - This
command will wait for page to reload
07/12/2016Ogma Applications 13
Editor's Notes
Selenium IDE – If you want to create quick bug reproduction scripts, and/or create scripts to aid in automation-aided exploratory testing then you want to use Selenium IDE; a Firefox add-on that will do simple record-and-playback of interactions with the browser.
Selenium WebDriver – If you want to create robust, browser-based regression automation suites and tests and/or scale and distribute scripts across many environments
then you want to use Selenium WebDriver; a collection of language specific bindings to drive a browser -- the way it is meant to be driven.
Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated. The Selenium Server (used by both WebDriver and Remote Control) now also includes built-in grid capabilities.
Selenium Server – With the release of Selenium 2.0, the Selenium Server now has built-in Grid functionality. Grid allows you to scale by distributing tests on several machines ( parallel execution ), manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS, minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.
Selenium RC – see WebDriver*