Debug Highlighting

Highlighting the Last Interacted Element

Debugging or analyzing test automation built on Selenium-based WebDriver can be challenging. Because test execution is often too fast to follow, it is difficult to visualize which element was matched by the last selector. To address this, a highlighting feature is available.

Highlighting the Current Selection

This feature marks every element that matches the current selector, allowing you to visually trace the execution path. A chain of Selenide selectors will result in a corresponding chain of highlighted elements.

For instance, the selector $('body').find('header'); will result in two highlights: the first on the entire <body> element, and the second on the <header> element found within it.

The highlight is displayed for a configured duration, after which it is automatically reset to ensure it doesn’t interfere with the next action. The default duration is 100 milliseconds if no value is specified.

āš ļø Note

The highlighting is disabled by default. Enabling it will increase the test runtime.

Configuration

These configurations are managed in the config/neodymium.properties file:

PropertyDescription
neodymium.debugUtils.highlightA boolean flag to enable or disable the highlighting feature.
neodymium.debugUtils.highlight.durationThe duration of the element highlight in milliseconds.

Example

neodymium.debugUtils.highlight = true
neodymium.debugUtils.highlight.duration = 100
Last modified February 18, 2026: remove numbers from filenames (27bdd4a5)