Allow selenium to check for javascript errors on the page

Remove foo() that was there for testing
Merge pull request #626 from hudmol/selenium-raise-javascript-errors

Make selenium raise an exception when a javascript error is detected on the page