webdriverio/webdriverio

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

Open

#14.831 aperta il 27 ott 2025

Vedi su GitHub
 (4 commenti) (0 reazioni) (1 assegnatario)JavaScript (1793 fork)batch import
Bug 🐛help wanted

Metriche repository

Star
 (6029 star)
Metriche merge PR
 (Merge medio 15g 15h) (48 PR mergiate in 30 g)

Descrizione

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

Guida contributor