feat(click): add selector and coordinate click modes#162
Open
nmsbnmsb1 wants to merge 1 commit intoepiral:mainfrom
Open
feat(click): add selector and coordinate click modes#162nmsbnmsb1 wants to merge 1 commit intoepiral:mainfrom
nmsbnmsb1 wants to merge 1 commit intoepiral:mainfrom
Conversation
Add enhanced click support across the shared protocol, CLI parsing, and daemon dispatch so click can target refs, CSS selectors, or viewport coordinates. Update CLI help and command text to document the new click modes and add typed coord parsing in the CLI flags. Sync README and bb-browser skill docs with selector and coordinate click examples.
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.
Description
This PR enhances the
clickcommand by adding support for CSS selectors and coordinate-based clicking.Currently, the CLI's click command is limited to reference-based interaction. This update adds:
--selector(alias-s): Allows clicking an element using a standard CSS selector.--coord <x,y>: Allows clicking at specific viewport coordinates.Why?
Sometimes elements are difficult to identify via the default snapshot reference (e.g., hidden layers or complex DOM structures). These additional modes provide more precision for browser automation.
Test Result
Verified manually:
bb-browser click --selector ".play-button"correctly triggers clicks.bb-browser click --coord 600,400correctly clicks at the specified location.