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 local host 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
Name | Type | Description |
---|---|---|
errorMessage | string | The error text to ignore |
Notes
- When the errorMessage text appears as a sub-string 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");