I am curious how does waitForAngularEnabled() work? Though it doesn\'t seem complicated, however, I couldn\'t get any satisfied answers anywhere. So hopefully someone helps
The marked answer is good - still I'd like to answer your question with added details about browser.get:
To override the default behavior of Protractor to wait for Angular calls, we can disable the Angular wait with browser.waitForAngularEnabled(false). For the rest of the driver session, Protractor will not sync the Angular calls unless Angular wait is enabled using: browser.waitForAngularEnabled(true).
But I recommend using wrapped driver directly instead of toggling the waitForAngularEnabled property which can lead to an unstable script. We had an issue with parallel test execution (which we definitely didn't want to run sequentially) - which is obvious when all tests set waitForAngularEnabled concurrently.
Protractor uses the testability APIs exposed by AngularJS functionalities like $q, $timeout, and $html to sync the page created by AngularJS asynchronous components.
browser.get When we call browser.get method in our script to navigate to a web page, Protractor uses the selenium-webdriver's get method to navigate to requested page and then by default tries to sync the page using AngularJS testability API.
Protractor’s waitForAngular strategy considers that the current page has AngularJS library and calls the getTestabilityAPI method on global object window.angular.
browser.driver.get When using Protractor with non-Angular application without overriding the default behavior, we get an error – angular is not defined because, by default, Protractor will try to synch the page using window. angular API which is not available on the page.