mirror of
https://github.com/actionbook/actionbook.git
synced 2026-09-19 03:28:06 +08:00
24c05c128c
* Add browser click interaction tests * Expand browser click interaction coverage * [packages/cli-v2]feat: implement browser click command with shared element resolution Add full browser click implementation with CDP mouse event dispatch, selector/coordinate parsing, --button/--count/--new-tab flags, navigation detection, and XPath support. Extract element resolution into a shared browser::element utility for reuse by future interaction commands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [packages/cli-v2]fix: use shared resolver for --new-tab href check and add click to help Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add browser type interaction tests * [packages/cli-v2]feat: implement browser type command Keystroke-by-keystroke text input via CDP Input.dispatchKeyEvent. Resolves element through shared element utility, focuses and positions cursor at end before typing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [packages/cli-v2]fix: populate context URL/title and use char count in browser type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add browser fill interaction tests * [packages/cli-v2]feat: implement browser fill command Direct value setting via native input setter with synthetic input event dispatch. No keystroke simulation — replaces existing value entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [packages/cli-v2]fix: pick native value setter based on element type in browser fill Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add textarea fill regression test * Add browser select interaction tests * [packages/cli-v2]feat: implement browser select command Select dropdown options by value or visible text (--by-text flag). Dispatches input and change events after selection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * [packages/cli-v2]fix: use resolved node for select instead of re-querying with querySelector Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Format interaction files for lint * [packages/cli-v2]fix: scroll into view before click and replace fixed navigation delay Scroll elements into the viewport via DOM.scrollIntoViewIfNeeded before computing bounding-box coordinates, so clicks on off-screen elements land correctly. Replace the hardcoded 500ms post-click sleep with a polling loop that detects URL changes at 50ms intervals (2s timeout), avoiding unnecessary delays for non-navigating clicks and catching slow SPA transitions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
560 B
JSON
18 lines
560 B
JSON
{
|
|
"name": "@actionbookdev/cli-v2",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "Actionbook CLI v2 - Browser automation for AI agents",
|
|
"scripts": {
|
|
"build": "cargo build --release",
|
|
"test": "cargo test",
|
|
"test:ut": "cargo test --lib",
|
|
"test:e2e": "RUN_E2E_TESTS=true cargo test --test e2e -- --test-threads=1",
|
|
"lint": "pnpm lint:fmt && pnpm lint:clippy",
|
|
"lint:fmt": "cargo fmt -- --check",
|
|
"lint:clippy": "cargo clippy -- -D warnings",
|
|
"fmt": "cargo fmt",
|
|
"clean": "cargo clean"
|
|
},
|
|
"license": "MIT"
|
|
} |