Creating comments in your tests

Before we carry on further with Selenium, this is a good time to mention how to create comments in your tests. As all good software developers know, having readable code and having comments can make maintenance in the future much easier. Unlike in software development, it is extremely hard, almost impossible, to write self-documenting code. To combat this, it is good practice to make sure that your tests have comments that future software testers can use.

Adding Selenium IDE comments

To add comments to your tests, perform the following steps:

  1. In the test that was created earlier, right-click on a step. For example, the verify step.
  2. The Selenium IDE context menu will be visible as shown in the following screenshot:

Get Learning Selenium Testing Tools - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.