getLocationAbsUrl vs getCurrentUrl

后端 未结 4 1648
既然无缘
既然无缘 2021-02-18 22:36

In protractor, globally available browser object has two methods:

  • getLocationAbsUrl()

Returns the current absolute url f

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-18 23:11

    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.

提交回复
热议问题