How to Start with Selenium Debugging?
โก Smart Summary
Breakpoints and Startpoints in Selenium IDE let testers pause and resume execution at chosen points. They simplify debugging, isolate failing steps, and speed up verification of login flows and validation logic during automation testing.

Breakpoints in Selenium
Breakpoints in Selenium are used to check the execution of your code. Whenever you implement a breakpoint in your code, the execution will stop right there. This helps you to verify that your code is working as expected. Breakpoints in Selenium help in debugging. Breakpoints are usually shown in the UI along with the source code.
Before looking at examples, it helps to know the two ways Selenium IDE lets you place these breakpoints.
Methods to Implement Breakpoints in Selenium
There are two methods to set breakpoints in Selenium WebDriver:
- In the first method,
- Right click on the command and select the ‘Toggle Breakpoint’. You can also use the shortcut key “B” from the keyboard.
- You can set a breakpoint just before the Test Case you want to examine.
- After setting breakpoints, click on the Run button to run the test case from the start to the breakpoint.
- Repeat the same step to deselect the Breakpoint.
- In the second method,
- Select Menu Bar -> ‘Actions’ -> select the Toggle Breakpoint. To deselect, repeat the same step.
How to Implement Breakpoints in Selenium
Now let us apply both methods to a real example so the steps are easy to follow.
To demonstrate, let us consider the following scenario. Validate the ‘username’ and ‘password’ when clicked on the ‘Sign in’ button.
First Method
Step 1) Open Selenium IDE and browser
Launch Firefox and Selenium IDE.
Step 2) Enter the base URL
Type the Base URL as —> https://demo.guru99.com/test/newtours/
Step 3) Click on the Record button
Navigate to the record button marked in the red box as shown in the screenshot below.
Step 4) Toggle the Breakpoint
- Under the tab “Table”, right click on the command (“clickandwait”).
- Under the “Command” column, select the ‘Toggle Breakpoint’. You can also use the shortcut key “B” from the keyboard.
When you toggle the breakpoint, it will open another window as shown below. You will see two yellow pipe marks in front of “clickandwait” under the ‘Command’ column.
It indicates two things,
- The yellow pipe shows that the test case was paused at that point. So when you click the ‘Run’ button, the execution starts from the beginning of the test case to this point. After that, one needs to start executing manually.
- A Test Script can have multiple breakpoints which can be set in the same manner as shown above.
Second Method
Step 1) Follow the above steps 1, 2 & 3 mentioned in the First method.
Step 2) In this step,
- Click on the option ‘Actions’ from the Menu bar and
- Click on the option “Toggle Breakpoint”.
This is all about the breakpoints in Selenium.
Start Point in Selenium
With breakpoints covered, the complementary feature is the Start Point, which controls where execution begins rather than where it pauses.
In Selenium, the Start Point indicates the point from where the execution should begin. The Start Point can be used when you want to run the test script from the middle of the code or a breakpoint.
To understand this, let us take an example of the login scenario. Suppose you have to login into the website and perform a series of tests and then try to debug one of those tests.
In this case, you have to login once and then re-run your tests as you are developing them. You can set the Start Points after the login function. So every time you perform a new test it will begin executing after the login function.
The table below summarizes the key differences between a Breakpoint and a Startpoint at a glance.
| Aspect | Breakpoint | Startpoint |
|---|---|---|
| Purpose | Pauses execution at a chosen command | Marks the command where execution begins |
| Shortcut key | B | S |
| Allowed per script | Multiple | Only one |
| Visual marker | Two yellow pipes | Green triangle |
| Typical use | Inspect state and isolate defects | Resume runs after login or setup |
Methods to set Start Point in Selenium
Like breakpoints, a Start Point can be set in two ways.
The Start Point can be selected by two methods:
1. Right click on any command under the ‘Command’ column in Selenium IDE. Select the option ‘Set/Clear Start Point’. You can also use the shortcut key ‘S’ from the keyboard to mark the start point (shown as a green triangle in the screenshot). Repeat the same step to deselect the Start Point.
2. Click “Actions” -> ‘Set/Clear Start Point’. This will select the Start Point, or repeat the same step to deselect it.
How to Set Start Point in Selenium
Let us see the first method with an example.
First Method
Step 1) Launch Firefox and Selenium IDE.
Step 2) Type the Base URL as —> https://demo.guru99.com/test/newtours/
Step 3) Click on the Record button (marked in the red rectangle box in the screenshot below).
Step 4) In this step,
- Under the tab “Table”, right click on the command “clickandwait”.
- Now select the option ‘Set/Clear Start Point’. You can also use the shortcut key “S” from the keyboard to select the same Set/Clear Start Point.
When you click on Set/Clear Start Point, it will open another window. In this window, you can see the green Triangle symbol before “type” under the ‘Command’ column.
This triangle symbol indicates that the test case starts at this point. So when you click the ‘Run’ button, the execution starts from that point onwards.
Note: There can only be one Start Point in a single test script. Also, the Start Point is dependent on the currently displayed page. The execution will fail if the user is on the wrong page.
Second Method
- Follow the above steps 1, 2 & 3 mentioned in the previous (First) method.
- Next, follow the following steps,
- Click on the option ‘Actions’ from the Menu bar and
- Click on the option “Set/Clear Start Point”.








