selenium ide and extensions
TRANSCRIPT
SELENIUM IDE and Extensions
Automated testing tool
Created by: Yana AltunyanReviewed by: Vladimir SoghoyanOgma Applications
2
Selenium Types Selenium IDE IDE Features Creating and Running Test Suite and Case IDE Extensions (JavaScript)
07/12/2016Ogma Applications
Overview
Ogma Applications 3
Selenium IDE Selenium WebDriver Selenium Server (Grid) Selenium RC
07/12/2016
Selenium types
Ogma Applications 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/2016
Selenium IDE
Ogma Applications 5
IDE FeaturesSpeed 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/2016
Ogma Applications 6
IDE FeaturesCommand – 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/2015
Ogma Applications 7
IDE FeaturesLog – 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/2015
Ogma Applications 8
IDE Features
All Commands are shown in HTML code
07/12/2016
Ogma Applications 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/2016
Ogma Applications 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/2016
Ogma Applications 11
User extensions are JavaScript files that allow you to create your own customizations and features to add additional functionality.
07/12/2016
IDE Extensions
Ogma Applications 12
Adding User Extensions In The Selenium IDE Options->General tab Close Selenium and
open again Check new commands
availability
07/12/2016
Ogma Applications 13
New Commands from added Extension (generating random email)typeRandomEmail- types random emailtypeRandomEmailAndWait - This command will wait for page to reload
07/12/2016