- Selenium Tutorial
- Selenium - Home
- Selenium - Overview
- Selenium - IDE
- Selenium - Environment Setup
- Selenium - Remote Control
- Selenium - Selenese Commands
- Selenium - WebDriver
- Selenium - Locators
- Selenium - User Interactions
- Selenium - Test Design Techniques
- Selenium - TestNG
- Selenium - Grid
- Selenium Useful Resources
- Selenium - Quick Guide
- Selenium - Useful Resources
- Selenium - Automation Practice
- Selenium - Discussion
Selenium - IDE Test Creation
The following steps are involved in creating Selenium tests using IDE −
- Recording and adding commands in a test
- Saving the recorded test
- Saving the test suite
- Executing the recorded test
Recording and Adding Commands in a Test
We will use www.ncalculators.com to demonstrate the features of Selenium.
Step 1 − Launch the Firefox browser and navigate to the website - https://www.ncalculators.com/
Step 2 − Open Selenium IDE from the Tools menu and press the record button that is on the top-right corner.
Step 3 − Navigate to "Math Calculator" >> "Percent Calculator >> enter "10" as number1 and 50 as number2 and click "calculate".
Step 4 − User can then insert a checkpoint by right clicking on the webelement and select "Show all available commands" >> select "assert text css=b 5"
Step 5 − The recorded script is generated and the script is displayed as shown below.
Saving the Recorded Test
Step 1 − Save the Test Case by navigating to "File" >> "Save Test" and save the file in the location of your choice. The file is saved as .HTML as default.
The test can also be saved with an extension htm, shtml, and xhtml.
Saving the Test Suite
A test suite is a collection of tests that can be executed as a single entity.
Step 1 − Create a test suite by navigating to "File" >> "New Test Suite" as shown below.
Step 2 − The tests can be recorded one by one by choosing the option "New Test Case" from the "File" Menu.
Step 3 − The individual tests are saved with a name along with saving a "Test Suite".
Executing the Recorded Test
The recorded scripts can then be executed either by clicking "Play entire suite" or "Play current test" button in the toolbar.
Step 1 − The Run status can be seen in the status pane that displays the number of tests passed and failed.
Step 2 − Once a step is executed, the user can see the result in the "Log" Pane.
Step 3 − After executing each step, the background of the test step turns "Green" if passed and "Red" if failed as shown below.
Kickstart Your Career
Get certified by completing the courseGet Started