selenium-google-code-issue-archive icon indicating copy to clipboard operation
selenium-google-code-issue-archive copied to clipboard

[IEDriver] getCurrentUrl() doesn't return actual URL for IE10 and IE11

Open lukeis opened this issue 8 years ago • 3 comments

Originally reported on Google Code with ID 7966

This issues seems to be specific for Angular-based apps. In a few words, after you open
some page, make an action on it (click) and then other page with new URL is opened
in the browser, getCurrentUrl() still returns the URL of the previous one.

What steps will reproduce the problem?

1. Open page https://www.roku.com/products/compare
2. Click on 'Add to cart' for any product, then 'View cart', then 'Checkout'
3. Invoke getCurrentUrl() method

Expected output: "https://www.roku.com/checkout#!/shipping" should be returned by method
as actual URL, which is displayed in browser's address panel

Actual output: "https://www.roku.com/checkout" is returned by getCurrentUrl()


Selenium version: 2.43.1
OS: Windows 7
Browser: Internet Explorer 
Browser version: 10 & 11

[code]
WebDriver driver = new InternetExplorerDriver();

driver.manage().window().maximize();

driver.get("https://www.roku.com/products/compare");
//adding 'Roku 1' to cart
driver.findElement(By.cssSelector("[model=\"products['2710R']\"] button")).click();
//click on 'View cart'
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("[ng-show=\"cart.items.length
> 0\"]"))).click();
//click on 'Checkout >'
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("[ng-click=\"nextStep()\"]"))).click();

//wait till field in Billing address form is displayed
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.name("billingFirstName")));

System.out.println(driver.getCurrentUrl());
[/code]

Reported by AutomationEngineerWD on 2014-09-26 07:40:19

lukeis avatar Mar 04 '16 09:03 lukeis

Reported by barancev on 2014-09-26 14:34:26

  • Labels added: Browser-IE

lukeis avatar Mar 04 '16 09:03 lukeis

Reproduced

Reported by barancev on 2014-09-29 19:30:28

  • Status changed: Accepted
  • Labels removed: Status-Untriaged

lukeis avatar Mar 04 '16 09:03 lukeis

Reported by luke.semerau on 2015-09-17 17:47:06

  • Labels added: Restrict-AddIssueComment-Commit

lukeis avatar Mar 04 '16 09:03 lukeis