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

getCurrentUrl should return the current URL on a 404 page #4301

Closed
lukeis opened this issue Mar 3, 2016 · 10 comments
Closed

getCurrentUrl should return the current URL on a 404 page #4301

lukeis opened this issue Mar 3, 2016 · 10 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 4301

I am trying to assert that the browser has landed on a known 404 page.

driver.get("http://127.0.0.1/no_such_page.html");
assertEquals("http://127.0.0.1/no_such_page.html", driver.getCurrentUrl());

This passes on all flavors of firefox, but in chrome and IE with:

junit.framework.ComparisonFailure: expected:<[]http://127.0.0.1/no_...> but was:<[res://ieframe.dll/dnserror.htm#]http://127.0.0.1/no_...>

junit.framework.ComparisonFailure: expected:<[http://127.0.0.1/no_such_page.html]>
but was:<[data:text/html,chromewebdata]>

Reported by simonstewart@google.com on 2012-07-24 10:19:10

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-08-02 19:32:52

  • Labels added: Component-WebDriver

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I was able to reproduce it in IE9 on WIn7.

Chrome 21 (with chromedriver 22 and selenium 2.25) works as expected. What browser
and driver versions do you use?

Reported by barancev on 2012-08-04 21:33:30

  • Labels added: Browser-IE
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I am occasionally seeing this as well with pages that dont 404 or at least as far as
I can tell return OK.

Reported by carlchatfield on 2012-08-29 02:42:59

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

This issue is seen on chrome 24 as well

Reported by annam.muthuraman on 2013-02-01 07:33:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Replicated on OSX 10.8, Chromedriver version=26.0.1383.0, Chrome 27 & 28

Reported by remmelt on 2013-05-30 10:14:13

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Already fixed, as i understand.

Created test case PageLoadingTest#testShouldReturnURLOnNotExistedPage is passed at
selenium CI.

Reported by a.u.savchuk on 2013-10-02 15:43:54

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

In what driver version is this fixed as i can see the issue reproducing in Chrome v2.8
with selenium version 2.39, on Windows ?

Reported by capreoara6 on 2014-01-09 08:32:24

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Can see this issue on a Mac running Chrome 33.

Reported by MichaelYagudaev on 2014-04-08 22:47:49

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I was able to reproduce with the 2.41 version and IE 11. Any news about this bug?

Reported by n3v3rcheck on 2014-05-20 11:03:24

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:15:52

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
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

1 participant