This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sometime it happens while automating the angular app, view gets loaded entirely but performing any action | |
* on that view fails the test. This could happen because angular $http calls are still pending in backend. | |
* We can have explicit wait in this way to ensure that angular has made all the $http calls. | |
* Wait until angular finishes the $http calls while loading the view | |
*/ | |
public void waitForAngular() { | |
final String javaScriptToLoadAngular = | |
"var injector = window.angular.element('body').injector();" + | |
"var $http = injector.get('$http');" + |