In protractor, globally available browser
object has two methods:
Returns the current absolute url f
Basically they should do the same thing, return the URL of the page.
From this bug report:
https://github.com/angular/protractor/issues/132
it seems that IEDriver
for Selenium was always returning the first loaded page, not the current one. So the protractor team implemented a JS call to Angular's $location
to always return the URL correctly via Javascript, not Webdriver protocol.