feat(shot): enter text before the capture - #9
Merged
Merged
Conversation
A form that validates, counts, or suggests as it is typed into could not be shot in that state when it keeps its own controller. shot now takes --enter <target>=<text>: the text field the target is or holds takes focus and its text is replaced, as the platform's keyboard does. The target ends at the first '='. Taps and entries run in the order given on the command line, so an entry can precede the tap that submits it; the parser keeps each option's values in order but not the order between options, which is read back from the arguments. A target with no text field, or more than one, makes the shot an error. The on-screen keyboard is not drawn. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 22, 2026
Merged
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
koji-1009
added this pull request to stack #11
September 22, 2026 23:54
Shooting the example's LoginForm with --enter found no way to name its fields: they have no keys, both are TextFields, and text:Email matches the label's Text, which holds no field. A label: target finds the widget whose semantics label is exactly the string, which is how a text field publishes its labelText or hintText, so label:Email names that field and not a heading or a button beside it. It names buttons by their text too. Semantics are turned on for the shot only when a target uses them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
A form that validates, counts, or suggests as it is typed into could not be shot in that state when it keeps its own controller. shot now takes --enter =: the text field the target is or holds takes focus and its text is replaced, as the platform's keyboard does. The target ends at the first '='.
Shooting
example/'sLoginFormfound that its fields could not be named: they have no keys, both areTextFields, andtext:Emailmatches the label'sText, which holds no field. Alabel:target now names a widget by its semantics label, as a text field publishes itslabelTextorhintText:--enter 'label:Email=example@example.com' --enter 'label:Password=secret'Part of the v0.2.0 stack: #7 → #8 → #9 → #10.
🤖 Generated with Claude Code