Repository navigation
Feat/form update - #218
Open
ssricardo wants to merge 4 commits into
Open
Feat/form update#218ssricardo wants to merge 4 commits into
ssricardo wants to merge 4 commits into
Conversation
…page change reports - form: lists a form's fields grouped by the question they answer - snapshot -i keeps the text right before a form control as its label - click, fill, press, select, check and uncheck report what appeared or went away on the page
- reports no longer echo field values, so a typed password never comes back - only click and press report changed elements and "(no visible change)", and wait a human's reaction time; fill, select and check report new and gone elements only and don't wait on a quiet page - the report's snapshots no longer move the document refs resolve against, so a ref from before a navigation fails again - form is named in the tool description, and shows password values as (hidden)
Keep page change reports while waiting for tabs the step opened.
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.
Hey Namu!
Thanks for great idea, creating this extension + mcp.
Here's PR 1 (of 2) points that IMO can be improved.
Improvements for Forms
This PR aims to provide more info for the agents, in order fill out forms, especially the ones with dynamic behavior (like new fields created on the fly).
To do so (in short):
label for'x'properly linked).In my tests in a dynamic form that we use in our company, it was way faster and correct than without the changes.
Without them actually it needed a lot of screenshots and sometimes couldn't make it.
Changes Description (from AI)
Description of the changes and their goals
What changed
This branch improves Browser MCP's form-filling workflow and gives agents clearer feedback after each interaction.
1. New
formcommand2. Better labels in
snapshot -i<div>labels, legends, or placeholders), the snapshot now keeps the text right before a form control as ahint/question.<label>elements.3. Page change reports after interactions
click,fill,press,select,check, andunchecknow report what appeared or disappeared on the page after the action.Follow-up safety & performance fixes
Security
(hidden).Performance
clickandpressreport changed elements, note(no visible change)when nothing happens, and wait roughly a human reaction time.fill,select, andcheckonly report new/gone elements and skip waiting when the page is quiet, since forms are usually filled in batches.Ref stability
Files most affected
packages/mcp/src/commands/form.ts(new)packages/mcp/src/commands/snapshot.tspackages/mcp/src/commands/engine.tspackages/mcp/src/commands/commands.ts