Added getJSErrors method. JS errors on the current page can be retrieved using this method.