Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

IE Driver getCurrentUrl() issue #132

Closed
sathishkumar-d opened this issue Oct 1, 2013 · 6 comments
Closed

IE Driver getCurrentUrl() issue #132

sathishkumar-d opened this issue Oct 1, 2013 · 6 comments

Comments

@sathishkumar-d
Copy link

Hi,

I am using protractor runner to kick start Selenium with IEDriver using
seleniumArgs: ['-Dwebdriver.ie.driver=IEDriverServer.exe']
in the config file.

Selenium with IEDriver works just fine and i can see the specs getting executed in the IE 10 browser.

But i am facing just one issue getCurrentUrl() API always returns the entry URL which was used in the first ptor.get and doesn't show any updates.

Though the page hashes are changing in the IE browser during spec execution getCurrentUrl() API always return the first get URL.

Note : Application is based on manual bootstrap with #/page based links.

Any suggestions?
Thanks in advance

@Jacob-Friesen
Copy link

I am currently using:

ptor.executeScript("return window.document.location.href").then(function(realUrl){
  expect(<your expected URL here>).toEqual(realUrl);
});

Instead of getCurrentUrl() when something like this happens. Although I am not manually boostrapping angular so there is a chance this may not work in your case as manual boostrapping can make things difficult.

@ffesseler
Copy link
Contributor

Same problem here with getCurrentUrl & IEDriverServer

@bbaia
Copy link

bbaia commented Oct 24, 2013

Same here.

I'm using Angular's $location.absUrl() with this client-side script:

/**
 * Return the current url using $location.absUrl().
 * 
 * arguments[0] {string} The selector housing an ng-app
 */
clientSideScripts.getLocationAbsUrl = function() {
  var el = document.querySelector(arguments[0]);
  return angular.element(el).injector().get('$location').absUrl();
};

@juliemr
Copy link
Member

juliemr commented Dec 28, 2013

I think this is closed with #254

@juliemr juliemr closed this as completed Dec 28, 2013
@mohsen1
Copy link

mohsen1 commented Apr 21, 2014

As of version '0.22.0', I'm still experiencing this issue. Replacing browser.getCurrentUrl with manual executeScript fixed it for me.

@KasMA1990
Copy link

I'm seeing the same issue here, also using IE10 and Protractor 0.22.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants