webdriverio / webdriverio/webdriverio

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

Open
#14,831 4 comments 0 reactions 1 assignee View on GitHub

@harsha509 is already working on this.

Since Nov 14, 2025.

Bug 🐛 help wanted
Dominant language
TypeScript
Stars
9.8k
Forks
2.7k
Avg merge
2d 13h
Merged PRs (30d)
69

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.