Is there a way to capture errors occurring in the DOM in Selenium and probably flag the same as an error in the page?
DOM
Selenium
To give a brief exam
Put this script on your page and then check in Selenium for the JSError: