HomeSelenium

New Selenium IDE – Debugging options

New Selenium IDE – Debugging options

As part of exploring the other Selenium IDE features in-depth, I will explain the below different debugging options in Selenium IDE:

  1. Toggle breakpoints
  2. Disable/Enable all breakpoints
  3. Step Over
  4. pause/resume
  5. pause on exceptions
  6. stop
  7. play to this point
  8. record from here
  9. play from here

Let’s get started with a practical demonstration.

New Selenium IDE – Debugging options

Follow the below steps for exploring the Selenium IDE’s debugging options.

1) Launch the Selenium IDE having any Test Recorded init as shown below:

New Selenium IDE Saving Tests - recorded Test

2) Right-click on any step say Step 4 and select ‘Toggle breakpoint’ option as shown below:

Debugging options Selenium IDE - Right click Toggle breakpoint

3) Observe that a breakpoint will be added to the selected step as shown below:

Debugging options Selenium IDE - breakpoint added

4) Click on the ‘Run Current Test’ option and observe that the execution will stop at the step having the breakpoint as shown below:

Debugging options Selenium IDE - execution paused

5) Now click on ‘Resume Test Execution’ option to continue with the execution as shown below:

Note: In real-time, where we have to investigate the issues which come during the execution, we need to place breakpoints at the required steps, identify the route cause of the issue and then resume the test execution.

Debugging options Selenium IDE - resume the execution

6) Observe that the complete Test got executed as shown below on clicking the ‘Resume Test Execution’ option in the previous step.

Debugging options Selenium IDE - executed completely

7) Let’s remove the breakpoint which is added in step 4.

Right-click on Step 4 having the breakpoint added and select ‘Toggle breakpoint’ option as shown below:

Debugging options Selenium IDE - remove breakpoint

8) Observe that the breakpoint which got added to the step 4 earlier got removed as shown below:

Debugging options Selenium IDE - removed breakpoint

9) Instead of right-clicking and selecting ‘Toggle Breakpoint’ option, we can also click on the numbers of the steps in Selenium IDE to add the breakpoints.

Click on the numbers 2, 3, 4 and 5 shown below:

Debugging options Selenium IDE - click breakpoint

Observe that the breakpoints got added on clicking the above numbers as shown below:

Debugging options Selenium IDE - breakpoints added

10) We can also remove the existing breakpoints by clicking on the numbers.

Let’s click on the numbers 3 & 4 to remove the breakpoints as shown below:

Debugging options Selenium IDE - remove two

Observe that the breakpoints got removed on clicking the said numbers as shown below:

Debugging options Selenium IDE - two removed

11) Click on the ‘Run Current Test’ option and observe that the execution will stop at the step having the first breakpoint as shown below:

Debugging options Selenium IDE - paused at step2

12) Click on ‘Step over current command’ option as shown below:

Debugging options Selenium IDE - step over current command

13) Observe that the current paused step (Step 2) got executed and the execution paused at the next step (i.e. Step 3) as shown below:

Debugging options Selenium IDE - stepover paused

Note: We can use this ‘Step over current command’ option multiple times, to execute the Selenium IDE steps one after the other with the intention of investigating and identifying the issue.

14) Now click on ‘Resume Test Execution’ option to continue with the execution as shown below:

Debugging options Selenium IDE - rte

Observe that the execution will be resumed and will be paused at the next breakpoint as shown below:

Debugging options Selenium IDE - paused at breakpoint

15) Stop the execution by clicking on ‘Stop’ option as shown below:

Debugging options Selenium IDE - stop execution

Observe that the execution has  been aborted as shown below:

Debugging options Selenium IDE - stopped

16) Now let’s click on ‘Disable breakpoints’ option as shown below:

Debugging options Selenium IDE - Disable breakpoints

Observe that the breakpoint options got disabled as shown below:

Debugging options Selenium IDE - got disabled

Click on the ‘Run Current Test’ option and observe that all the steps will get executed without pausing as all the breakpoints are disabled:

Debugging options Selenium IDE - executed disabled

17) Now let’s turn off the ‘Disable breakpoints’ option by clicking it as shown below:

Debugging options Selenium IDE - turn off

Observe that the breakpoint options got enabled again as shown below:

Debugging options Selenium IDE - enabled again

Click on the ‘Run Current Test’ option and observe that the execution will be paused at the first breakpoint as shown below:

Debugging options Selenium IDE - enabled paused

Click on the ‘Resume test execution’ option until all the steps got executed successfully as shown  below:

Debugging options Selenium IDE - e2 completed

Remove the existing breakpoints by clicking on the step numbers having the breakpoints added and observe that the breakpoints got removed as shown below:

Debugging options Selenium IDE - r2 removed

18) Right-click on Step 2 and select ‘Play to this point’ option as shown below:

Debugging options Selenium IDE - play to this point

Observe that the execution will start and pause at the selected step point as shown below:

Note: breakpoint will be automatically added by the Selenium IDE during execution as shown below.

Debugging options Selenium IDE - played to the required point

Remove the breakpoint and run the current test until the complete test got executed successfully as shown below:

Debugging options Selenium IDE - e3 completed

19) Right-click on any step say Step 1  and select ‘Play from here’ option as shown below:

Debugging options Selenium IDE - play from here

Observe that the execution started from the selected step and all the steps following the selected step got executed successfully as shown below:

Debugging options Selenium IDE - e4 completed

20) Right-click on any step say Step 2  and select ‘Record from here’ option as shown below:

Debugging options Selenium IDE - record from here

Observe that the execution will happen until the selected step and a dialog in Selenium IDE asking to start recording will be displayed. Click on ‘Start Recording’ button as shown below:

Debugging options Selenium IDE - start recording

Observe that the recording will start as shown below:

Debugging options Selenium IDE - recording started

While the recording is on, select any option say ‘Volvo’ in the multiselection box field as shown below:

Debugging options Selenium IDE - recording selection

Switch to Selenium IDE and observe that the above selection got recorded at step 3 and click on the ‘Stop Recording’ option as shown below:

Debugging options Selenium IDE - stop recording

21) Now, let’s try the last option ‘Pause on exceptions’.

In order to get an exception, select any step say Step 3 and modify the value to a non-existing value (i.e. xyz) as shown below:

Debugging options Selenium IDE - xyz exception

Click on ‘Pause on exceptions’ as shown below:

Debugging options Selenium IDE - pause on exceptions

Observe that an exception will occur while executing step 3 as the lable=xyz is not available in the multiselection box field. As the exception occurs in step 3, the execution will be paused as shown below.

Debugging options Selenium IDE - e5 paused

Here concludes the practical demonstration of all the Debugging options in Selenium IDE.

In the next article, I will practically demonstrate another Selenium IDE feature to be explored (Refer other features to be explored here)

Next Steps:

  • > Check complete Selenium Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning ?

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp