Is is possible to capture errors occurring in DOM in Selenium and use that to flag an error in the test page?
What I'm saying is, if I try to bind an event on a non-existing HTML control, my browser will throw this error: element xyz not found in the console.
Now when my test fails, I want the same error to be logged or displayed. Is this possible?