Know More about Breakpoints and Startpoints in Selenium - Selenium Webdriver Trainings

Breakpoints and startpoints in selenium are two important aspects one should learn thoroughly while learning selenium. Breakpoints are used to stop the execution of the code and the start point indicates the point from where the executions should start.

Breakpoints in Selenium

As mentioned earlier, breakpoints in selenium are used to check the execution of the code and the execution will stop there itself wherever you implement breakpoints. Breakpoints will be shown in the UI along with the source code.This will help to verify whether the code is working properly or not. Besides, breakpoints in selenium help in debugging. There are two different methods for setting breakpoints in selenium.

First Method

Select “Toggle Breakpoint” after right clicking on “Command”. You may also use shortcut key “B” for this purpose. Now you can set a breakpoint just before the test case you are planning to check. Once it is set, you can click on “Run” button to run the test from the start point to the breakpoint. Once checking is over, you can use the same method to deselect the breakpoint.

Second Method

Select “Menu Bar” and then “Actions”. Now select “Toggle Breakpoint”. You can use the same process to deselect also.

Methods to Implement Breakpoints in Selenium

First Method

  • Launch Firefox and Selenium IDE
  • Type the base URL
  • Click on the record button on the right side top corner.
  • Under the tag “Table”, right click on “Command”
  • Under “Command” click on “Toggle Breakpoint”.
  • Now a new window will get open and you can see two yellow marks before “click and wait” option under “Command”. The yellow marks indicate that the execution has stopped at that point. Click on “Run” button and the test will start from the beginning to the breakpoint. After that, one need to do testing manually. Multiple breakpoints can be set in a similar manner.

Second Method

In the second steps, the first three steps are similar. Then click on “Actions” from the menubar and click on “Toggle breakpoint”.

Startpoint in Selenium

Startpoint in selenium specify the point from where the execution should begin. Startpoint in Selenium can be used when you want to begin the testing from the middle of the code or after a breakpoint. As in the case of breakpoints, startpoint can also select by two different methods.

First Method

At first, you should right click on any command under “Command” column in Selenium IDE. Select “set/clear startpoint” option there. Repeat the same process to deselect also. You may use shortcut key “S” also for this purpose.

Second Method

Go to “Actions” and then to “set/clear startpoint” option. Repeat the same for deselecting also.

Methods to set Startpoint in Selenium

  • Launch Firefox and Selenium IDE
  • Type the base URL
  • Click on the record button on the right side top corner.
  • Under the tag “Table” click on “click and wait”
  • Select the option “Set/clear Startpoint”. Or you can use shortcut key “S”
  • When you click on “Click and wait” a new window will get opened. In that window, there is a green colored triangle before “Type” in the command column.This indicates the point from where the test starts. You can click on the “Run” button to start testing from that point.

Second Method

First three steps are same as in the first method. Now, click on “Actions” in the menu and then click on the options set/clear startpoint.

Leave a Reply

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