Skip to content

fix: clarify evaluate_script selector guidance#2212

Draft
luohui1 wants to merge 1 commit into
ChromeDevTools:mainfrom
luohui1:fix/evaluate-script-selector-guidance
Draft

fix: clarify evaluate_script selector guidance#2212
luohui1 wants to merge 1 commit into
ChromeDevTools:mainfrom
luohui1:fix/evaluate-script-selector-guidance

Conversation

@luohui1

@luohui1 luohui1 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • clarify that evaluate_script runs with standard browser DOM APIs and CSS selectors
  • explain that snapshot uids should be passed through args rather than queried as DOM attributes
  • add an eval scenario covering UPC table lookup without :contains or uid/ref attribute selectors

Fixes #1892
Fixes #1895

Tests

  • npm run build
  • npm run docs:generate
  • npm run cli:generate
  • npm run format
  • npm exec eslint -- --cache .
  • npm exec prettier -- --check --cache .
  • $env:PUPPETEER_EXECUTABLE_PATH='C:\Program Files\Google\Chrome\Application\chrome.exe'; npm run test tests\tools\script.test.ts

Note: npm run check-format passes ESLint and Prettier on this Windows checkout, then exits non-zero because the script's trailing .; is parsed as an extra Prettier path.

@google-cla

google-cla Bot commented Jun 14, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant