title: Is there a way to retrieve the current relative url in Protractor?
body: <p>I'm starting to test an Angular2 project and I want to retrieve the URL of the browser in some tests to check that redirections are made correctly.</p>
  
  <p>The problem is that the only method I can see in the API to retrieve the current URL is <a href="http://www.protractortest.org/#/api?view=webdriver.WebDriver.prototype.getCurrentUrl" rel="nofollow noreferrer">webdriver.WebDriver.getCurrentUrl</a>, but it returns the absolute path. This can be a pain if for some reason you change the testing port or hostname in the future. Is there any way to retrieve only the relative URL like you can do with <a href="http://www.protractortest.org/#/api?view=ProtractorBrowser.prototype.get" rel="nofollow noreferrer">browser.get</a>? Thanks.</p>