This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
[IEDriver] getCurrentUrl() doesn't return actual URL for IE10 and IE11 #7966
Open
Description
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