Skip to content

feat(click): add selector and coordinate click modes#162

Open
nmsbnmsb1 wants to merge 1 commit intoepiral:mainfrom
nmsbnmsb1:feat-click
Open

feat(click): add selector and coordinate click modes#162
nmsbnmsb1 wants to merge 1 commit intoepiral:mainfrom
nmsbnmsb1:feat-click

Conversation

@nmsbnmsb1
Copy link
Copy Markdown

Description

This PR enhances the click command 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,400 correctly clicks at the specified location.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant