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

getCurrentUrl() protractor tests failing on Internet Explorer 11 (latest) #778

Closed
elgalu opened this issue May 6, 2014 · 16 comments
Closed

Comments

@elgalu
Copy link
Contributor

elgalu commented May 6, 2014

I added IE11 to /spec/multiConf.js and I could confirm an IE issue when testing AJAX-changed urls:

Failures:

  1) protractor library should allow a mix of using protractor and using the driver directly
   Message:
     Expected 'http://localhost:8000/index.html' to equal 'http://localhost:8000/index.html#/form'.
   Stacktrace:
     Error: Failed expectation
    at null.<anonymous> (/usr/local/lib/node_modules/protractor/spec/basic/lib_spec.js:36:11)

  2) protractor library should allow a mix of using protractor and using the driver directly
   Message:
     Expected 'http://localhost:8000/index.html' to equal 'http://localhost:8000/index.html#/repeater'.
   Stacktrace:
     Error: Failed expectation
    at null.<anonymous> (/usr/local/lib/node_modules/protractor/spec/basic/lib_spec.js:40:11)

Finished in 7.078 seconds
10 tests, 23 assertions, 2 failures

To recreate just run npm test agains IE11

The tests that fails is it('should allow a mix of using protractor and using the driver directly' at /spec/basic/lib_spec.js

I could also recreate on TravisCI - SauceLabs during a PR:
https://travis-ci.org/angular/protractor/builds/24499725#L764

@KasMA1990
Copy link

getCurrentUrl also fails for some of us in IE10 ( #132 )

@elgalu
Copy link
Contributor Author

elgalu commented May 6, 2014

Thanks @KasMA1990 i think #132 should be reopened then this one be closed as duplicate.

@juliemr juliemr added the bug label May 16, 2014
@juliemr
Copy link
Member

juliemr commented May 16, 2014

Thanks for investigating - it's fine to track here and leave the old issue closed.

@juliemr
Copy link
Member

juliemr commented May 22, 2014

Here's an isolated SauceLabs test just looking at the changing URL. You can see from the screenshots that the URL in the browser looks correct, but it's not returning the path: https://saucelabs.com/jobs/36b8bad2d2144e009e9fc84052b8167a

Seems like an IEDriver bug. Let's make a simplified test case and report.

@elgalu
Copy link
Contributor Author

elgalu commented May 29, 2014

Right, I agree is an IEDriver bug.

I can also confirm by manually using webdriver JsonWireProtocol, e.g.

http://localhost:4444/wd/hub/sessions
http://localhost:4444/wd/hub/session/6fd6cb88-2d01-4ff5-80fe-ad2b78a0f548/url

Returns an outdated url on IE.
Making the simplified test case + report might take time, for now i'm ok using getLocationAbsUrl()

@elgalu
Copy link
Contributor Author

elgalu commented May 30, 2014

If someone feels like putting some time on this, take a look at selenium source:

/java/client/test/org/openqa/selenium/MiscTest.java

And improve getCurrentUrl() testing cases:

@Test
public void testShouldReportTheCurrentUrlCorrectly() {
  driver.get(pages.simpleTestPage);
  assertTrue(pages.simpleTestPage.equalsIgnoreCase(driver.getCurrentUrl()));

  driver.get(pages.javascriptPage);
  assertTrue(pages.javascriptPage.equalsIgnoreCase(driver.getCurrentUrl()));
}

@juliemr juliemr removed the bug label Jun 9, 2014
@juliemr juliemr added this to the Pending milestone Jun 20, 2014
@MrJH
Copy link

MrJH commented Jul 8, 2014

Are there any solutions or workarounds for this bug?

@elgalu
Copy link
Contributor Author

elgalu commented Jul 8, 2014

Workaround is using getLocationAbsUrl()

@MrJH
Copy link

MrJH commented Jul 8, 2014

Ah yes, missed the () ;)

@robertbarfield
Copy link

Awesome! You guys saved this guy a big headache with IE. Many thanks and I hope to offer something useful for you in the future.

@smahalingam
Copy link

getLocationAbsUrl() - Is supposed to work only on Angular pages ?

@juliemr
Copy link
Member

juliemr commented Jul 13, 2016

@sjelin can you confirm whether this is still an issue?

@sjelin sjelin removed their assignment Dec 21, 2016
@sjelin
Copy link
Contributor

sjelin commented Dec 21, 2016

@cnishina windows

@cnishina
Copy link
Member

Closing this as not reproducible. Test steps to reproduce:

  • Replace Firefox for Internet Explorer in spec/multiConf.js on the master branch.
  • Internet explorer version 11.576.14393.0
  • Using selenium standalone server 2.53.1, chromedriver 2.26 and IEDriver 32-bit version 2.53.1
  • Ran test 10 times. Did not see this error.

@abdulmoizeng
Copy link

abdulmoizeng commented Jan 11, 2018

Hi @cnishina @juliemr
I am still facing this issue on following versions

same issue on browser stack IE 10 as well, however It works fine on IE 11.

@wswebcreation
Copy link
Contributor

@abdulmoizeng

Protractor will never support / fix this because the browser is not supported by Microsoft since 2016. It's for all versions of IE (https://venturebeat.com/2016/01/12/microsoft-ends-support-for-ie8-ie9-ie10-and-windows-8/)

@angular angular locked as off-topic and limited conversation to collaborators Jan 13, 2018
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

10 participants