webdriverio/webdriverio

[馃悰 Bug]: selectByIndex doesn't fire the "input" event in Chrome

Open

#14831 opened on Oct 27, 2025

View on GitHub
聽(4 comments)聽(0 reactions)聽(1 assignee)JavaScript聽(6,029 stars)聽(1,793 forks)batch import
Bug 馃悰help wanted

Description

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.20.0

Node.js Version

24.8

Mode

WDIO Testrunner

Which capabilities are you using?

What happened?

I tried to use the API selectByIndex and realized that the input event wasn't dispatched in Chrome. I tested both chrome stable and canary versions.

It's not clear to me if this is a bug in webdriver.io or a bug in Chrome BiDi implementation, because webdriver.io implementation is finally just a click: https://github.com/webdriverio/webdriverio/blob/e86efccd84e20b01713a43113d166d8deb397edc/packages/webdriverio/src/commands/element/selectByIndex.ts#L33-L70

My understanding is that the Chrome implementation is in https://source.chromium.org/chromium/chromium/src/+/main:chrome/test/chromedriver/element_commands.cc;l=285-297, and ultimately to this minified JS, but it's difficult for me to go beyond that.

What is your expected behavior?

The input event should be triggered and dispatched.

How to reproduce the bug.

  1. Clone the project https://github.com/julienw/webdriver-select-by-index-bug
  2. Run npm install
  3. Run npm test

=> notice this fails in chrome but not in Firefox

Relevant log output

Nothing seems relevant

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Contributor guide