feat(pick): atomic combobox select for react-select / ARIA / native (issue #2 P1)
The biggest manual-cost point in the dogfood reports: `select @ref` is a silent no-op on non-native dropdowns, and click+wait+Enter on react-select/ARIA/portal menus took ~20 turns of hand-written eval to get right. New `pick <selector> --option "<text>"` does it atomically in one in-page async routine: native <select> → set value + input/change; custom widget → focus + open (pointer/mouse sequence), poll up to 2.5s for the option to render anywhere (portals included), match by visible text, scroll it in, fire the full pointer/mouse sequence. ERRORS loudly if the option never appears — no silent success. Verified headless: native <select> → "Gamma"; portal combobox → "欧洲" (non-ASCII); missing option → explicit error. Documented in the skill.
This commit is contained in:
@@ -219,8 +219,16 @@ agent-browser press Enter # press a key at current focus
|
||||
agent-browser press Control+a # key combination
|
||||
agent-browser check @e3 # check checkbox
|
||||
agent-browser uncheck @e3 # uncheck
|
||||
agent-browser select @e4 "option-value" # select dropdown option
|
||||
agent-browser select @e4 "option-value" # native <select> only
|
||||
agent-browser select @e4 "a" "b" # select multiple
|
||||
agent-browser pick @e4 --option "Europe" # ANY combobox (react-select / ARIA /
|
||||
# native): opens it, waits for the menu
|
||||
# (incl. portal-rendered), matches by
|
||||
# visible text, fires the right events,
|
||||
# and ERRORS if the option never shows
|
||||
# (no silent no-op). Use this for custom
|
||||
# dropdowns where `select` returns ✓ but
|
||||
# changes nothing.
|
||||
agent-browser upload @e5 file1.pdf # upload file(s)
|
||||
agent-browser scroll down 500 # scroll page (up/down/left/right)
|
||||
agent-browser scrollintoview @e1 # scroll element into view
|
||||
|
||||
Reference in New Issue
Block a user