Check for JavaScript Errors
Telerik Testing Framework allows you to verify if there are any JavaScript errors on the currently loaded page. The below example demonstrates how to collect the errors in a list and a possible approach how to use these. The sample code will fail the test if there are errors on the page.
The page in the current example does not actually contain JavaScript errors. Therefore these are invoked on purpose to demonstrate the feature.
Note! The JS error check step detects only JavaScript errors. Any errors related to not loaded resources will not be detected. An example for such console error is listed below:
Failed to load resource: the server responded with a status of 404 (Not Found)