Skip to content

[πŸ› Bug]: Β #14887

@kbarnesMCC

Description

@kbarnesMCC

What happened?

Using the Javascript implementation (e.g. selenium-webdriver), I'm unable to get .clear() to work when used on an <input type="text" value="Hello, World!"> element within an open ShadowDOM.

How can we reproduce the issue?

// retrieve shadow root
const host = await this.driver.wait(
  // mcc-profile is a custom web element with an open Shadow DOM
  until.elementLocated(By.css('mcc-profile')),
  3000
)

// retrieve shadow root from host element
const shadowRoot = await host.getShadowRoot()

// retrieve display name from shadow root
const displayName = await shadowRoot.findElement(
  By.css('input[name = "displayName"]')
)

// clear display name
await displayName.clear()

Relevant log output

No special log output; observation that the displayName.clear() simply doesn't clear out the field.

If I put an equivalent <input type="text" value="Hello, World!"/> in the parent DOM, clear() works just fine.

Operating System

Ubuntu

Selenium version

Javascript (selenium-webdriver) 4.23.0

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

Firefox 130, Chrome 130

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

Webdriver (e.g. Builder.usingServer())

Are you using Selenium Grid?

4.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-defectSomething is not working as intendedJ-issue-templateApplied to issues not following the template, or missing information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions