Skip to content

feat(keyboard): add array overload to pressSequentially#40748

Open
SebTardif wants to merge 1 commit intomicrosoft:mainfrom
SebTardif:feat/press-sequentially-array
Open

feat(keyboard): add array overload to pressSequentially#40748
SebTardif wants to merge 1 commit intomicrosoft:mainfrom
SebTardif:feat/press-sequentially-array

Conversation

@SebTardif
Copy link
Copy Markdown
Contributor

Summary

  • Adds string[] overload to Locator.pressSequentially so it can accept an array of key names in addition to a string of characters
  • Adds new Keyboard.pressSequentially method mirroring the same behavior
  • When given an array, each element is treated as a key name (same format as keyboard.press()) and pressed sequentially with optional delay between presses

Usage:

// Existing string behavior
await locator.pressSequentially('Hello');

// New array overload
await locator.pressSequentially(['Control+A', 'Delete', 'H', 'e', 'l', 'l', 'o']);

// Also available on Keyboard
await page.keyboard.pressSequentially(['Control+A', 'Delete']);

Fixes #40740

Add string[] overload to Locator.pressSequentially and new
Keyboard.pressSequentially method, as requested in microsoft#40740.

When given an array, each element is treated as a key name
(same format as keyboard.press()) and pressed sequentially
with optional delay between presses.

Fixes microsoft#40740
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Test results for "MCP"

12 failed
❌ [msedge] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-windows-latest-msedge
❌ [webkit] › mcp/annotate.spec.ts:230 › should capture annotations via show --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:251 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:273 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:297 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:330 › should annotate when context has no fixed viewport @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:367 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:398 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:427 › should switch screencast to -s session on show --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/annotate.spec.ts:476 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-webkit
❌ [webkit] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-webkit
❌ [webkit] › mcp/cli-devtools.spec.ts:231 › video-chapter @mcp-windows-latest-webkit

7019 passed, 1068 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Test results for "tests 1"

3 flaky ⚠️ [installation tests] › playwright-test-package-managers.spec.ts:28 › npm: playwright + @playwright/test should work `@package-installations-windows-latest`
⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/browser.spec.ts:54 › should dispatch page.on(close) upon browser.close and reject evaluate `@firefox-ubuntu-22.04-node20`

41745 passed, 850 skipped


Merge workflow run.

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.

[Feature]: keyboard.pressSequence() for batched named key presses

2 participants