mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

Doesn't wait redirected page after clicking on link #2101

Closed nvborisenko closed 1 year ago

nvborisenko commented 1 year ago

System

My element is

<a href="/redirect">Open</a>

where /redirect is a resource

Request Method: GET
Status Code: 302 Found

Response Headers:
  Location: https://www.my_sut.com/target

It means when I click on the link, then /target page should be opened. And it works.

But geckodriver doesn't wait until /target page loads. By the way, chromedriver does wait.

Using simple code:

var driver = new FirefoxDriver();
driver.Url = "https://my_sut.com";

driver.FindElement(By.Tag("a")).Click();
Console.WriteLine(driver.Url); // shows https://my_sut.com, not https://www.my_sut.com/target
whimboo commented 1 year ago

This is basically the same as issue #634 and can happen for any kind of navigation.