In this chapter we will learn How to Record And Playback Selenium IDE Test Case.
Steps to Record Selenium IDE Test Script
1. Launch Firefox and Launch Selenium IDE by Clicking on Tools => Selenium IDE. A pop-up window would be displayed. Type the Base URL value: http://store.demoqa.com. Click on the Record button to start the recording of the Test Case.
2. In Firefox, navigate to http://store.demoqa.com. Firefox should take you to the page similar to the one shown below.
3. Right-click on any blank space within the page, this will bring up the Selenium IDE context menu. Select the Show Available Commands option. Then, select assertTitle ONLINE STORE | Toolsqa Dummy Test site. This is a command that makes sure that the page title is correct.
4. Click on My Account link to enter credentials.
5. Enter UserName TestUser in the first text box and Password [email protected]@123 in the second text box. Then click on LogIn button to submit.
Note: These credentials are not correct. Once submit, the application will show the error message. Please create your own User.
6. Stop the recording by clicking on the Record button. In the Table tab of Test Step Pane you can see the commands recorded by selenium IDE.
7. In the Source tab it shows the HTML Code generated by Selenium IDE.
Steps to Save Selenium IDE Test Script
1. Save the test case for future use by clicking on File -> Save Test Case As.
2. Choose your location, and then name the test as Invalid Login. Click the Save button.
3. Saved test case name will appear on the left hand side.
4. The file was saved as HTML.
Steps to PlayBack Selenium IDE Test Script
1. To Play the current recorded test, open a new tab window in Firefox and click on the Play button in Selenium IDE
Noticed Selenium IDE will run the complete test which was earlier recorded. Once the test is finished, it will display the result in the Test Case Pane.