With the release of Dynatrace 1.175, we’ve improved the content validation capabilities of synthetic browser and clickpath monitors. The contains text content validation option now mimics the Find (Ctrl+F/Cmd+F) functionality of a web browser.
- This change has the potential to cause existing synthetic browser and clickpath monitors to fail.
- This change only affects the contains text validation option (see below). The behavior of the contains element and contains text in element validation options has not changed.
How the new validation approach differs
With the new enhanced content validation approach, validation is only performed against visible text on the selected page. This mimics the Find (Ctrl+F/Cmd+F) functionality of a browser and results in more accurate validation.
We now validate against the content of
document.body.innerText (https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText) for each frame of the target window/tab. Validation is case-insensitive.
When the Evaluate as regular expression option is used, the string is interpreted as regex, which is case-sensitive.
Why this change was made
We received feedback from customers stating that the new validation functionality is what customers had long expected the behavior of Contains text validation should be. This change will, therefore, make contains text content validation more predictable and accurate by avoiding false positives.
What do I need to do if my monitor fails?
If a monitor begins failing because of this change, the monitor will fail with the following error code:
1401 - Validate text match failed
In the multidimensional analysis view, you’ll see the exact content validation string that wasn’t found. For example,
Failure reason - Validation failed: Text "Success" not found.
To change/adapt the validation go to the monitor settings and change the validation string. If it’s a clickpath you can use the local playback functionality to validate the change.
We’re constantly improving the quality of our synthetic offering (for example, read about the latest changes to the synthetic recorder) and we have many new enhancements in the pipeline:
…and much more.
This syndicated content is provided by Dynatrace and was originally posted at https://www.dynatrace.com/news/blog/improved-content-validation-for-synthetic-browser-and-clickpath-monitors/