-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add locator.pressSequentially
#5457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+80
−0
Conversation
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
9a79abd to
8f44cc1
Compare
locator.pressSequentially
Implements locator.pressSequentially() to type text character by character, simulating real keyboard input. This is useful for testing features like autocomplete, input validation, and character counters that require gradual typing. Co-authored-by: Inanc Gumus <[email protected]>
This method is no different than locator.Type, which was deprecated by Playwright.
8f44cc1 to
20e9642
Compare
8 tasks
Contributor
Author
|
Thanks for the original PR @rajan2345. We'll include your name in the |
ankur22
reviewed
Nov 26, 2025
ankur22
previously approved these changes
Nov 26, 2025
Contributor
ankur22
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀 Thanks for the change @rajan2345! Thanks for taking over @inancgumus 🙇
ankur22
reviewed
Nov 27, 2025
2fb66d2 to
c876a74
Compare
ankur22
approved these changes
Dec 3, 2025
codebien
approved these changes
Dec 3, 2025
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.
This PR continues from #5241. I've refactored the code to fix some remaining issues.
From the original PR (written by @rajan2345):
What?
Implements
locator.pressSequentially()to type text character by character, simulating real keyboard input. This is useful for testing features like autocomplete, input validation, and character counters that require gradual typing.Why?
This feature enables k6 users to test scenarios that require real keyboard events for each character, which
locator.fill()doesn't provide. It's particularly useful when migrating from Playwright to k6, as this is a commonly used Playwright API that k6 currently lacks.Checklist
make check) and all pass.Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
Related PR(s)/Issue(s)
Closes #5038