Skip to content

fix(input): select empty-value options by text - #2501

Merged
Lightning00Blade merged 1 commit into
ChromeDevTools:mainfrom
Iams4kura:bugfix/select-empty-option-value-20260808t001432z
Aug 10, 2026
Merged

Lightning00Blade merged 1 commit into
ChromeDevTools:mainfrom
Iams4kura:bugfix/select-empty-option-value-20260808t001432z

Conversation

@Iams4kura

Copy link
Copy Markdown
Contributor

Summary

  • Fixes: When fill targets a native select option whose visible text matches the requested value but whose DOM value is the empty string, the tool reports success while the previously selected option remains selected.
  • Root cause: selectOption tests the option's DOM value for truthiness before calling Locator.fill. An empty string is a valid option value, but the truthiness check skips the fill while optionFound remains true, so the handler returns a false success.

Regression evidence

  • Before: npx --yes -p node@24 -c 'node --version && npm run test tests/tools/input.test.ts -- --test-name-pattern=empty.value.by.text' exited 1

  • After: npx --yes -p node@24 -c 'node --version && npm run test tests/tools/input.test.ts -- --test-name-pattern=empty.value.by.text' exited 0

Verification

  • npx --yes -p node@24 -c 'node --version && npm run test tests/tools/input.test.ts'
  • npx --yes -p node@24 -c 'node --version && npm run build'
  • npx --yes -p node@24 -c 'node --version && npm run check-format'
  • npx --yes -p node@24 -c 'node --version && npm run gen'

The full npm run test was also attempted. On this machine it reaches an
unrelated Chrome 151 Page.captureScreenshot: Page is too large failure; the
same screenshot test fails identically on the exact unmodified base SHA under
Node 24. The complete affected input test suite passes.

Scope

  • 2 files changed, +40 / -2 lines

@google-cla

google-cla Bot commented Aug 8, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Lightning00Blade
Lightning00Blade self-requested a review August 10, 2026 10:40

@Lightning00Blade Lightning00Blade left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Lightning00Blade
Lightning00Blade added this pull request to the merge queue Aug 10, 2026
Merged via the queue into ChromeDevTools:main with commit b969c45 Aug 10, 2026
26 of 29 checks passed
pull Bot pushed a commit to firas9941/chrome-devtools-mcp that referenced this pull request Aug 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.8.0](ChromeDevTools/chrome-devtools-mcp@chrome-devtools-mcp-v1.7.0...chrome-devtools-mcp-v1.8.0)
(2026-08-25)


### 🎉 Features

* Add additional params to get_heapsnapshot_edges
([ChromeDevTools#2561](ChromeDevTools#2561))
([b58c613](ChromeDevTools@b58c613))
* add optional stack traces to list_console_messages
([ChromeDevTools#2505](ChromeDevTools#2505))
([85c73a0](ChromeDevTools@85c73a0))
* add PWA automation tools
([ChromeDevTools#2430](ChromeDevTools#2430))
([0ea5c8d](ChromeDevTools@0ea5c8d)),
closes
[ChromeDevTools#2270](ChromeDevTools#2270)
* Add query_heapsnapshot MCP tool
([ChromeDevTools#2553](ChromeDevTools#2553))
([fadbf41](ChromeDevTools@fadbf41))
* allow evaluate_script to skip the stable DOM wait
([ChromeDevTools#2346](ChromeDevTools#2346))
([781e2fb](ChromeDevTools@781e2fb))
* make pageId required for page-scoped tools by default
([ChromeDevTools#1777](ChromeDevTools#1777))
([50a16fa](ChromeDevTools@50a16fa))
* Report memory kept alive by contexts in get_heapsnapshot_summary
([ChromeDevTools#2570](ChromeDevTools#2570))
([4103808](ChromeDevTools@4103808))
* Show self and retained sizes for edges
([ChromeDevTools#2529](ChromeDevTools#2529))
([2a7eb76](ChromeDevTools@2a7eb76))
* support uploading multiple files with upload_file
([ChromeDevTools#2257](ChromeDevTools#2257))
([c8a2393](ChromeDevTools@c8a2393))
* Use ranges with human readable sizes
([ChromeDevTools#2589](ChromeDevTools#2589))
([61e312f](ChromeDevTools@61e312f))


### 🛠️ Fixes

* **cli:** adjust chrome-devtools start defaults
([ChromeDevTools#2597](ChromeDevTools#2597))
([c6cff23](ChromeDevTools@c6cff23))
* **cli:** enable tools which require --memoryDebugging on the CLI
([ChromeDevTools#2585](ChromeDevTools#2585))
([1c92ba0](ChromeDevTools@1c92ba0))
* **clI:** print the errror message alone instead of JSON in the CLI
([ChromeDevTools#2580](ChromeDevTools#2580))
([fce756a](ChromeDevTools@fce756a))
* **cli:** update the CLI skill
([ChromeDevTools#2569](ChromeDevTools#2569))
([0e108ea](ChromeDevTools@0e108ea))
* do not append page url when the previously selected page is gone.
([ChromeDevTools#2588](ChromeDevTools#2588))
([6506425](ChromeDevTools@6506425))
* do not block tool calls on a roots/list the client is slow to answer
([ChromeDevTools#2477](ChromeDevTools#2477))
([d93e667](ChromeDevTools@d93e667)),
closes
[ChromeDevTools#2476](ChromeDevTools#2476)
* do not enable invalidation tracking in performance traces
([ChromeDevTools#2500](ChromeDevTools#2500))
([f00778d](ChromeDevTools@f00778d)),
closes
[ChromeDevTools#2499](ChromeDevTools#2499)
* do not validate local files for remote browsers
([ChromeDevTools#2573](ChromeDevTools#2573))
([c0a7417](ChromeDevTools@c0a7417))
* ensure debugger statements are skipped by devtools
([ChromeDevTools#2555](ChromeDevTools#2555))
([f8572f0](ChromeDevTools@f8572f0))
* fix formatter bugs
([ChromeDevTools#2552](ChromeDevTools#2552))
([b247315](ChromeDevTools@b247315))
* flakiness in wait for helper
([ChromeDevTools#2541](ChromeDevTools#2541))
([12f989a](ChromeDevTools@12f989a))
* **input:** select empty-value options by text
([ChromeDevTools#2501](ChromeDevTools#2501))
([b969c45](ChromeDevTools@b969c45))
* new flags for page id routing moved to the end of metrics json
([ChromeDevTools#2613](ChromeDevTools#2613))
([6dba5c7](ChromeDevTools@6dba5c7))
* puppeteer actions would not follow symlinks anymore
([ChromeDevTools#2592](ChromeDevTools#2592))
([1bac85c](ChromeDevTools@1bac85c))
* require .heapsnapshot (or .heaptimeline) as file extension
([ChromeDevTools#2579](ChromeDevTools#2579))
([b750168](ChromeDevTools@b750168))
* respect screenshot bounds on HiDPI displays
([ChromeDevTools#2536](ChromeDevTools#2536))
([ebf58f2](ChromeDevTools@ebf58f2))
* warn on unknown CLI args
([ChromeDevTools#2577](ChromeDevTools#2577))
([e450369](ChromeDevTools@e450369))


### 📄 Documentation

* add Bob MCP client configuration
([ChromeDevTools#2364](ChromeDevTools#2364))
([5c16940](ChromeDevTools@5c16940))
* fix commands
([ChromeDevTools#2546](ChromeDevTools#2546))
([9331b63](ChromeDevTools@9331b63))


### 🏗️ Refactor

* make validatePath return resolved url
([ChromeDevTools#2572](ChromeDevTools#2572))
([57adfa9](ChromeDevTools@57adfa9))
* move config files out of bin
([ChromeDevTools#2578](ChromeDevTools#2578))
([5d02839](ChromeDevTools@5d02839))
* move files to folders that better represent their use
([ChromeDevTools#2564](ChromeDevTools#2564))
([06b7a5c](ChromeDevTools@06b7a5c))
* **performance:** use default trace categories from DevTools
([ChromeDevTools#2571](ChromeDevTools#2571))
([cb89762](ChromeDevTools@cb89762))
* replace debug with NodeJS native
([ChromeDevTools#2562](ChromeDevTools#2562))
([f44f3c6](ChromeDevTools@f44f3c6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants