Skip to content

[πŸ› Bug]: SendKeys is sometimes not sending to the right InputBoxΒ #14612

@phuot

Description

@phuot

What happened?

I do have an XUnit automated test case that interact with a logging screen using chrome browser.
The test does the following:

  • wait for the email input box to be visible and send email address to it
  • make sure the pwd input box is displayed and send pwd to it
  • wait for the submit button is enabled and click on it.

Most of the times this test pass, but from time to time the test fails.
When it fails, the test taking a screenshot and we can see that the PWD (or part of it) is added to the email text input box.

ie:
image

How can we reproduce the issue?

// wait for the email field to be ready and submit email address
 _wait.Until(d => _driver.FindElement(By.Id("email")).Displayed);
 _driver.FindElement(By.Id("email")).SendKeys(emailAddress);

// make sure the pwd field is visible and submit pwd
 _wait.Until(d => _driver.FindElement(By.Id("password")).Displayed);
 _driver.FindElement(By.Id("password")).SendKeys(password);

// wait for the submit buttont to be enabled and click on it
_wait.Until(d => _driver.FindElement(By.Id("submit")).Displayed);
_wait.Until(d => _driver.FindElement(By.Id("submit")).Enabled);
_driver.FindElement(By.Id("submit")).Click();

Relevant log output

refer to the screenshot.

Operating System

windows 11 (dev machine), Microsoft Windows Server 2022 (azure build agent)

Selenium version

Selenium.WebDriver V4.25.0 (C# .NetCore)

What are the browser(s) and version(s) where you see this issue?

Chrome 130.0.6723.58

What are the browser driver(s) and version(s) where you see this issue?

Selenium.WebDriver.ChromeDriver v130.0.6723.5800, Selenium.WebDriver.MSEdgeDriver v129.0.2792.65

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions