Type newlines as Enter (#61) - #299
Merged
Merged
Conversation
A literal newline is not a key. WebDriver addresses Enter through the normalized key value , so typing "123\n456" sent '\n' as a key value the browser ignored and the textarea received "123456". Original patch by Kevin Simler in #61. Rebased: the second call site moved from internal/proxy/router.go to internal/api/handlers_interaction.go when proxy was renamed to api (e61a1ed).
The original tests drove https://seleniumbase.io/demo_page. Live external sites stall and wedge the suite, so they now use the shared test server, which gains a textarea fixture on /inputs. Also covers element.type() in the JS client, which the CLI tests do not reach, and updates CLICKER to VIBIUM after the binary rename (9bc9c17).
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.
Rebase of @kevinsimler's #61, opened 2026-01-28. The fix is theirs, unchanged; only the surroundings had moved.
A literal newline is not a key. WebDriver addresses Enter through
\uE006, so typing"123\n456"sent'\n'as a key value the browser ignored:What changed from their PR
Nothing conceptual. Three pieces of scaffolding had moved underneath it in the eight months it was open:
internal/proxy/router.goe61a1ed; that loop is nowhandlers_interaction.go${CLICKER}in tests9bc9c17seleniumbase.ioTests now use the shared local server, which gains a textarea fixture on
/inputs. Their two cases are kept as they wrote them: one for a carriage return, one for a newline. Also addedelement.type()in the JS client, which the CLI tests do not reach.Verified
Against the unpatched binary, their split turns out to be well chosen:
So the CR case is a regression guard for behaviour that already worked, and the newline case is the fix. Mapping only
'\n'is correct and sufficient.Full
make testpasses.Closes #61