webdriverio/webdriverio

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

Open

#14,831 建立於 2025年10月27日

在 GitHub 查看
 (4 留言) (0 反應) (1 負責人)JavaScript (6,029 star) (1,793 fork)batch import
Bug 🐛help wanted

描述

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

貢獻者指南

[🐛 Bug]: selectByIndex doesn't fire the "input" event in Chrome · webdriverio/webdriverio#14831 | Good First Issue