Angular objects not recognized -Protractor-net

2019-04-17 14:26发布

问题:

Script fails on this step on protractor-net ....NgWebDriver.cs file probably on command step get('$browser') notifyWhenNoOutstandingRequests(callback) - Any idea on what $browser or notifyWhenNoOutstandingRequests used for?

this.jsExecutor.ExecuteAsyncScript(ClientSideScripts.WaitForAngular, this.rootElement)
angular.element(el).injector().get('$browser').notifyWhenNoOutstandingRequests(callback);

回答1:

Including the angDriver.IgnoreSynchronization=true statement solved it for me. Probably since my application is continuously polling for data so Requests never ends.