Skip to content

Click() doesn't wait for page load if submit button delays form submission #1026

@barancev

Description

@barancev

System

  • Version: geckodriver 0.19
  • Platform: windows 7
  • Firefox: nightly 58.0a1 (2017-10-22) (64-bit)
  • Selenium: java 3.6

Testcase

WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("http://demo.litecart.net/admin/");
driver.findElement(By.cssSelector("button[name=login]")).click();
driver.findElement(By.cssSelector("a[title=Logout]")).click();
Thread.sleep(200); // to make sure navigation started
driver.get("http://demo.litecart.net/admin/");

It's expected that driver.get(..) operation in the end of this snipped waits until navigation completed, that is until next page loaded after Logout link click.

Instead, it interrupts the operation and Logout does not happen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions