Support & information center

rtcIgnoreErrorContains()

Instructs the test run to ignore errors that contain certain text.

rtcIgnoreErrorContains() enables you to force the test to succeed when certain types of failure messages are caught and you’d like to ignore them. This can be useful for web applications trying to connect via localhost addresses to an installed native or Electron application for example (since such attempts throw exceptions in the console log when the application isn’t installed). It can also be useful to ignore failing to load a page’s favicon for example.

Arguments

NameTypeDescription
errorMessagestringThe error text to ignore

Notes

  • When the errorMessage text appears as a substring of an error or warning message (as exact match) then it will not cause the test to fail or throw a warning
  • The message itself still gets collected and will show as an issue on the probe level, but will not affect the probe’s test run result or appear in the aggregate test result page
  • Multiple such commands can be added to a test script as needed

Example

client.rtcIgnoreErrorContains("favicon");Code language: JavaScript (javascript)

The above will cause a test not to throw a warning because the page’s favicon.ico file cannot be loaded and returns a 404 error.

Was this article helpful?

Related Articles