Skip to content

Fix scripting examples that call non-existent commands - #4791

Merged
soulgalore merged 1 commit into
mainfrom
docs-fix-scripting-commands
Jun 12, 2026
Merged

Fix scripting examples that call non-existent commands#4791
soulgalore merged 1 commit into
mainfrom
docs-fix-scripting-commands

Conversation

@soulgalore

Copy link
Copy Markdown
Member

Several scripting examples used commands that don't exist or don't do what
the text claims. switch.toTopFrame() and switch.toPreviousTab() aren't
part of the API, and switch.toNewTab() opens a fresh tab rather than
switching to a popup the page opened — so the iframe/popup recipes couldn't
work as written; they now use the real frame/window APIs. The custom-metrics
page claimed booleans are auto-converted to numbers, but values are stored
as-is (the example itself converts manually). And the "test the same URL
twice" tip called commands.navigate(url, alias), which ignores the alias
and doesn't measure — it should be commands.measure.start.

Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

  Several scripting examples used commands that don't exist or don't do what
  the text claims. switch.toTopFrame() and switch.toPreviousTab() aren't
  part of the API, and switch.toNewTab() opens a fresh tab rather than
  switching to a popup the page opened — so the iframe/popup recipes couldn't
  work as written; they now use the real frame/window APIs. The custom-metrics
  page claimed booleans are auto-converted to numbers, but values are stored
  as-is (the example itself converts manually). And the "test the same URL
  twice" tip called commands.navigate(url, alias), which ignores the alias
  and doesn't measure — it should be commands.measure.start.

  Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com
@soulgalore
soulgalore merged commit db5b036 into main Jun 12, 2026
20 checks passed
@soulgalore
soulgalore deleted the docs-fix-scripting-commands branch June 12, 2026 20:33
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.

1 participant