feat: add timeout parameter to click action #379
+58
−3
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.
Add Timeout Parameter to Click Action
Summary
Adds
timeoutparameter to theclickcommand, exposing Playwright's built-in timeout option to prevent indefinite hangs on problematic pages.Why this is Critical for AI Agents
AI agents using agent-browser get stuck indefinitely when clicking elements on:
Blockers:
Changes
CLI (
cli/src/commands.rs):agent-browser click @e1 --timeout 500 # Fail after milliseconds instead of hangingJSON Protocol (
src/protocol.ts,src/types.ts):{"action": "click", "selector": "@e1", "timeout": 500}extract_timeout()helper that properly parses and filters--timeoutflagclick({ timeout })optionskills/agent-browser/SKILL.mdwith exampleTests Added:
Testing
Breaking Changes
None. Timeout is optional and backward compatible with existing usage.