Time for action – debugging tests - Selenium

These two steps are quite useful when your tests are not running and your want to execute a specific command.

  1. Highlight a command.

  2. Press the X key, this will make the command execute in Selenium IDE.

What just happened?

When a test is running you can press the Pause button to pause the test after the step that is currently being run. Once the test has been paused the Step button is no longer disabled and you can press it to step through the test as if you were stepping through an application.

If you are having issues with elements on the page you can type in their location and then click on the Find button. This will surround the element that you are looking for with a green border that flashes for a few seconds. It should look like the following screenshot:

The echo command is also a good way to write something from your test to the log. This is equivalent to Console.log in JavaScript. For example, echo | ${variableName}.

Also remember that if you are trying to debug a test script that you have created with Selenium IDE, you can set breakpoints in your test. You simply right-click on the line and select breakpoint from the list. It will be similar to the following screenshot:

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Selenium Topics