1.

Can you debug the tests in Selenium IDE? If yes, then how?

Answer»

Selenium is an automation tool allow us to record and PLAYBACK application under test without having knowledge of scripting by using selenium IDE. Selenium IDE uses Selenese language to write test cases in different programming languages like Java, C#, PHP, Perl, Python, Ruby, etc. Resulting tests can be run on against different browsers.

Debugging is the process of identifying and fixing the errors that may be present in the class. It is important to debug the code in order to remove the errors so that the application will run as expected.

The following are the ways to debug the script.

  • Insert a breakpoint from where you want to execute step by step
  • Run the test case
  • At the given breakpoint, execution will be paused
  • To proceed with the next step, click on the Blue button
  • To run commands at a time, click on the run button

To make the debugging process more robust, we can install and use Power Debugger add-on.

  • Step 1: OPEN Firefox browser, search for Power Debugger in Google and click on https://addons.mozilla.org/en-US/firefox/addon/power-debugger-selenium-ide/ link.
  • Step 2: Add-ons page appears on the web. Click on Add to Firefox button.
  • Step 3: Open ‘Selenium IDE’ and you can see a new icon, “Pause on Fail” on the recording toolbar. Click it to turn it ON. Clicking it again would be TURNED to “OFF”.
  • Step 4:  We can use breakpoints to understand the error during the execution. To insert a breakpoint on a particular step, “Right Click” and select “Toggle Breakpoint” from the menu options.
  • Step 5After inserting the breakpoint, a particular step will be displayed with a pause icon.
  • Step 6: When we execute the test script, the script execution will be paused where the breakpoint is INSERTED. This pause will help the user to evaluate the value/presence of an element when the execution is in progress.


Discussion

No Comment Found