Skip to content

Instantly share code, notes, and snippets.

@hydraslay
Last active March 25, 2020 08:22
Show Gist options
  • Save hydraslay/38bcf3a16c5e869ede803af85b6bcfa6 to your computer and use it in GitHub Desktop.
Save hydraslay/38bcf3a16c5e869ede803af85b6bcfa6 to your computer and use it in GitHub Desktop.
use following <script> and your page will be testable with protractor. this is simply confirm stable with no wait so you should wait for specific element to continue your test.
<script>
var Testability = (function () {
function Testability() {}
Testability.prototype.whenStable = function (callback) {
callback();
};
return Testability;
}());
var testability = window._synctractor = window._synctractor || new Testability();
window.getAngularTestability = function (_element) { return testability; };
window.getAllAngularTestabilities = function () { return [testability]; };
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment