Spaces:
Sleeping
Sleeping
File size: 1,838 Bytes
6eb6c4e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | {
"name": "page-edit",
"description": "Safe in-page editing: navigate to Wikipedia, resolve the search box from an observe snapshot by role, type {{text}} into it WITHOUT submitting, then press Escape. Demonstrates observe->find->type/press_key editing while the consequential submit stays gated.",
"engine": "chromium",
"variables": {
"text": "text to type into the search box, e.g. 'dracull browser'"
},
"steps": [
{
"name": "open the editing tab",
"tool": "tab_open",
"args": {
"url": "https://en.wikipedia.org/"
},
"expect": {
"data.url": "wikipedia.org"
},
"save": {
"edit_tab": "tab_id"
}
},
{
"name": "snapshot the interactive elements",
"tool": "observe",
"save": {
"snapshot_id": "data.snapshot_id"
}
},
{
"name": "type into the search box (no submit — submit needs user approval)",
"tool": "type",
"find": {
"role": "textbox",
"text": "wikipedia"
},
"args": {
"text": "{{text}}",
"submit": false
},
"save": {
"typed_text": "data.text"
}
},
{
"name": "dismiss the suggestion dropdown",
"tool": "press_key",
"args": {
"key": "Escape"
}
},
{
"name": "verify the box holds the typed text",
"tool": "observe",
"save": {
"final_snapshot": "data.snapshot_id"
}
},
{
"name": "screenshot the edited page",
"tool": "screenshot",
"save": {
"screenshot": "data.path"
}
},
{
"name": "close the editing tab",
"tool": "tab_close",
"args": {
"tab_id": "{{edit_tab}}"
}
}
]
}
|