Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Feature Idea: Synthetic Simple Browser Validation String - Can It Be Negated?



I am converting a few hundred web site monitors from our config at a different vendor’s site to New Relic Synthetics. I am doing this via a script, using the other vendor’s and NR’s API. It is working fine.

However, the other vendor allows interpretation of the “validationString” to be either ‘should contain’ or ‘should not contain’. My best reading is that a NR validationString is always/only ‘should contain’. Is that correct or is there a way to interpret the string as a ‘should not contain’?

New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


Hi, @Avery.Salmon: You are correct. New Relic Synthetics can only ensure that a validation string is present in the response, not that it is absent.


I’ll get this post moved over to the Feature Ideas section of the Explorers Hub @Avery.Salmon - and I’ll get your request for Does Not Contain support added internally .


Thanks Phil & Ryan,

I have already (manually) created a few Scripted Browser checks and those went quite well. I assume that I can implement my need for “does not contain” via a scripted browser with the appropriate assert(). True?

However, looking here:

I cannot spot a $browser.waitForAndFindElement locator that returns web page text. (Expect I am just missing it.) . Do you have an example of this?

Also, if you have an example of adding script to a check via API that would be very welcome!

Thanks, Avery


@Avery.Salmon - Yes, an assert is absolutely the easiest way to implement a “does not contain” check.

An API test might be easier assuming the content you are wanting to ensure is not present is loaded in the initial GET request vs added into the page via javascript or the result of an ajax call. With an API type of check, the response body is easily retrieved and can be asserted against as seen in the documentation

Additionally we have examples of how to create scripted checks in the documentation as well.