This will avoid the error message:
Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file://phantom/run-jasmine.js. Domains, protocols and ports must match.
after the tests runs.
clearInterval(interval);
result.time = (new Date().getTime() - start);
result.failed ? failFx(result) : readyFx(result);
- phantom.exit(result.failed == 0 ? 0 : 2);
+
+ // See: https://github.com/ariya/phantomjs/issues/12697
+ // phantomjs 1.9.8
+ page.close();
+ setTimeout(function(){ phantom.exit(result.failed == 0 ? 0 : 2); }, 0);
}
// timeout