Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to debug Selenium Tests created by Parasoft Selenic

Matt Love
Matt Love Posts: 91 admin
edited October 2019 in Selenic

Parasoft Selenic makes it easy to record web UI workflows in Chrome and create/run Selenium test scripts in Eclipse, but what if you need to debug those test scripts? The Debug menu in Eclipse will fail the test right away with an IllegalStateException because the path to the Chrome WebDriver was not set.

You will not have seen this error using the Run with Selenic menu because Parasoft Selenic will prompt out-of-the-box for the WebDriver location and save it in a global preference for all future runs. You will need to copy the VM argument for the WebDriver from the Selenic configuration to the Debug configuration.

Open the Selenic Configurations dialog.

Click the button to Show Command Line.

Copy the argument that starts with "-Dwebdriver.chrome.driver="

Close the Selenic Configurations dialog and open Debug Configurations.

Switch to the Arguments tab and paste the WebDriver property in the VM arguments box. Make sure to add a space after any existing arguments.

Click the Debug button and the test will launch in the Eclipse debugger and stop at any breakpoints that you set.

This will give you a chance to inspect elements in the browser before continuing the test execution.

Tagged:

Tagged