[docs]: add docs for .keyPress()#1974
Merged
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Contributor
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Dev as Developer Code
participant Page as Page Object
participant Browser as Browser Engine (CDP/Playwright)
Note over Dev, Browser: NEW: Keyboard Interaction Flow (keyPress)
Dev->>Page: keyPress("Cmd+A", { delay: 100 })
Page->>Page: Parse key string and modifiers
Note right of Page: Maps "Cmd" to Meta (Mac) <br/>or Control (Windows/Linux)
Page->>Browser: keyboard.down("Meta")
Page->>Browser: keyboard.down("a")
opt If delay > 0
Page->>Page: Wait for 100ms
end
Page->>Browser: keyboard.up("a")
Page->>Browser: keyboard.up("Meta")
Browser-->>Page: Event completion
Page-->>Dev: Promise Resolved (void)
Note over Dev, Browser: Error Path (e.g. Invalid Key)
Dev->>Page: keyPress("InvalidKey")
Page->>Page: Validate key support
alt Unsupported Key
Page-->>Dev: Throw Error
else Valid Key
Page->>Browser: Execute sequence...
end
miguelg719
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
why
page.keyPress()were missingwhat changed
Summary by cubic
Added docs for
page.keyPress()in the v3 Page reference. Includes the method signature, supported keys and modifier combos, thedelayoption, and examples for single keys and combinations (Enter, Cmd+A, ArrowDown, Ctrl+C, with delay).Written for commit 0cbf3a9. Summary will update on new commits. Review in cubic