Introduction to Selenium IDE
Selenium IDE is a Firefox add-on which quickly creates tests because of its record-and-playback functionality. It is the most straightforward tool, easy to install, and learn. IDE in Selenium IDE means Integrated Development Environment. Selenium IDE should not be used for developing and maintaining sophisticated test suites and can only be used just as a prototyping tool.
It supports autocomplete while creating tests which helps:
- To enter commands quickly.
- Invalid commands will get restricted.
Selenium IDE Features
1] Menu Bar:
Located at the topmost portion contains commonly used commands like Open, Save, Create.
- Project Name is the name given to the project while creating. It can also be renamed.
- Create project is used to create a new project.
- Open Project is used to open any existing project that is saved in your system.
- Save project is used to save the project on the system after it is being created.
2] Tool Bar:
- Speed Control is used to control the speed of Test Script Execution.
- Run all tests in a suite will play all the test cases listed in the Test Case Pane in sequential order.
- Run current test will play only the currently selected test case.
- Run current command will execute one command at a time and is used for debugging purposes.
3] Address Bar:
- It contains a dropdown menu which remembers all the previous values.
- The Selenese command open will navigate to the URL mentioned in the Address Bar.
- We will use http://newtours.demoaut.com as a Base URL in this tutorial as this site contains all the elements needed for further topics.
4] Test Case Pane:
- Selenium IDE will enable you to open more than one test case at a time, and thus the test case pane lists all the currently opened test cases.
- The summary of the number of test cases that were run and failed is available at the bottom portion.
- We can easily navigate between test case and test suite from here.
An editor is a place where all the action happens.
- For creating steps, first, you need to type the name of the command in the Command text box.
- It will automatically start displaying a dropdown list of commands which match the text that you are currently typing.
- Target is like a parameter we want to pass (like username, password), and Value is the input value (like ABC, 123) for those Targets.
6] Log Pane:
The Log Pane displays the runtime messages occurring during the execution of a test case and provides real-time updates about what Selenium IDE is currently doing.
Logs can be categorized into four types:
- Info: It shows the currently executing command.
- Warn: It contains all the warning messages that come across in particular conditions.
- Error: The error messages generated when Selenium IDE fails to execute any command, or a specific condition specified by “verify” or “assert” commands does not fulfill.
7] Reference Pane:
The Reference Pane shows a brief description of the currently selected Selenese command, description of the locator, and value used in that command.
8] Disable Breakpoints, Pause Execution and Start/Stop recording
- Disable Breakpoints: It will disable all those steps which are having the breakpoints set for debugging.
- Pause Execution: We can use this option to pause execution if there is any exception in the test case.
- Start/Stop Recording: This is used to stop and start recording the execution happening on a web application.
- Selenium IDE (Integrated Development Environment) is the most straightforward tool in the Selenium Suite and can only be used as a prototyping tool.
- Firebug (or any similar add-on) is used for obtaining locator values.
- The menu bar is used to create, open, and save test cases into formats that can be used by Selenium RC and WebDriver.
- HTML is the only default format for Selenese commands.
- The Base URL helps in retrieving the relative URL.
- The Test Case Pane displays the list of all currently opened test cases and a summary of test runs.
- The Editor acts as an interface for your test scripts.
- The Log and Reference tab provides feedback and other helpful information while executing tests.