http://daipresents.com/2012/post-4906/
HTML側に
<script type="text/javascript">
window.jsErrors = [];
window.onerror = function(errorMessage) {
window.jsErrors[window.jsErrors.length] = errorMessage;
}
</script>
nightwatch側に
client
.url("https://pc3.parseapp.com/app.html")
.execute(function(data) {
return window.jsErrors;
}, [null], function(result) {
client.assert.equal(result.value.length, 0, "num script error should be 0");
});