0

Selenium IE webdriver's getCurrentUrl() leaves out the part of url after the hash. For example, if the current url on the page is https://hostname/some/thing/here#something/after/hash , then the driver.getCurrentUrl() with IE just returns 'https://hostname/some/thing/here' and leaves out hash and the part after that.

This part works well with Chrome and Gecko driver, seeing this behavior in IE. I'm using RemoteDriver but I'm sure this would happen in local driver as well.

Any ideas ?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
Girish
  • 1,981
  • 3
  • 17
  • 18
  • it works fine in java and python – PDHide Feb 23 '21 at 23:03
  • you have any example website – PDHide Feb 23 '21 at 23:04
  • 1
    `driver.getCurrentUrl()` is working fine with the IE 11 browser. I have tested the issue with the C# and JAVA language and found that both return the correct result. Here is my test result for [C# test](https://imgur.com/a/xDa3Ref) and [JAVA Test](https://imgur.com/a/UfLUP4k). I suggest you try to make a test with the local IE driver and check the result. If the issue persists then try to provide more information about the issue may help to narrow down the issue. – Deepak-MSFT Feb 24 '21 at 02:02
  • Thanks all for your validations . As I'm on Mac, I asked someone in my org to test it locally on Windows, it was not reproducible. So may be it's the Grid Setup issue - will share more details once I have the solution. – Girish Mar 09 '21 at 16:20

0 Answers0