Skip to content

Commit b33cd25

Browse files
authored
add output example file (#15)
1 parent aa9f856 commit b33cd25

1 file changed

Lines changed: 156 additions & 0 deletions

File tree

OUTPUT-EXAMPLE.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Result Example
2+
3+
JSON example containing all possible step types produced by the sequence recorder.
4+
5+
```json
6+
[
7+
{
8+
"timestamp": 1718723999000,
9+
"type": "goto",
10+
"url": "https://example.com/login",
11+
"windowWidth": 1280,
12+
"windowHeight": 720
13+
},
14+
{
15+
"timestamp": 1718724000000,
16+
"css": "#login-button",
17+
"xpath": "/html/body/div/button",
18+
"type": "click",
19+
"value": "Login",
20+
"frame": ""
21+
},
22+
{
23+
"timestamp": 1718724001000,
24+
"css": "canvas.game-surface",
25+
"xpath": "/html/body/div/canvas",
26+
"type": "bclick",
27+
"value": "",
28+
"frame": "",
29+
"coords": {
30+
"x": 150,
31+
"y": 200,
32+
"width": 800,
33+
"height": 600
34+
}
35+
},
36+
{
37+
"timestamp": 1718724002000,
38+
"css": "canvas.shadow-canvas",
39+
"xpath": "/html/node/shadow",
40+
"type": "bclick",
41+
"value": "",
42+
"frame": "",
43+
"coords": {
44+
"x": 100,
45+
"y": 50,
46+
"width": 640,
47+
"height": 480
48+
},
49+
"shadow_host_css": "#my-web-component"
50+
},
51+
{
52+
"timestamp": 1718724003000,
53+
"css": ".row-item",
54+
"xpath": "/html/body/div/table/tr[2]",
55+
"type": "dblclick",
56+
"value": "Edit row",
57+
"frame": ""
58+
},
59+
{
60+
"timestamp": 1718724005000,
61+
"css": ".nav-menu > li:nth-child(2)",
62+
"xpath": "/html/body/nav/ul/li[2]",
63+
"type": "mouseover",
64+
"value": "Products",
65+
"frame": ""
66+
},
67+
{
68+
"timestamp": 1718724006000,
69+
"css": "#username",
70+
"xpath": "/html/body/div/form/input[1]",
71+
"type": "fill_value",
72+
"value": "user@example.com",
73+
"frame": ""
74+
},
75+
{
76+
"timestamp": 1718724007000,
77+
"css": ".search-input",
78+
"xpath": "/html/body/div/form/input[2]",
79+
"type": "bfill_value",
80+
"value": "search query",
81+
"frame": ""
82+
},
83+
{
84+
"timestamp": 1718724008000,
85+
"css": "#username",
86+
"xpath": "/html/body/div/form/input[1]",
87+
"type": "press_key",
88+
"value": 13,
89+
"frame": ""
90+
},
91+
{
92+
"timestamp": 1718724009000,
93+
"css": "#accept-terms",
94+
"xpath": "/html/body/div/form/input[3]",
95+
"type": "change",
96+
"subtype": "check",
97+
"checked": true,
98+
"frame": ""
99+
},
100+
{
101+
"timestamp": 1718724010000,
102+
"css": "#country",
103+
"xpath": "/html/body/div/form/select[1]",
104+
"type": "change",
105+
"subtype": "select",
106+
"selected": 2,
107+
"value": "us",
108+
"frame": ""
109+
},
110+
{
111+
"timestamp": 1718724011000,
112+
"css": "#tags",
113+
"xpath": "/html/body/div/form/select[2]",
114+
"type": "change",
115+
"subtype": "select_multi",
116+
"selected": [true, false, true, false],
117+
"value": "tag-a",
118+
"frame": ""
119+
},
120+
{
121+
"timestamp": 1718724012000,
122+
"css": "#iframe-btn",
123+
"xpath": "/html/body/div/button",
124+
"type": "click",
125+
"value": "Submit",
126+
"frame": "#content-iframe"
127+
}
128+
]
129+
```
130+
131+
## Step Types Reference
132+
133+
| Type | Description |
134+
|------|-------------|
135+
| `goto` | Navigate to a URL; first step in every recording |
136+
| `click` | Standard left click on an element |
137+
| `bclick` | Click on a canvas surface, includes `coords` (`x`, `y`, `width`, `height`). May include `shadow_host_css` when targeting a canvas inside a shadow DOM |
138+
| `dblclick` | Double click on an element |
139+
| `mouseover` | Hover over an element (debounced at 500ms) |
140+
| `fill_value` | Value entered into an `<input>` or `<textarea>` (captured on blur or Enter) |
141+
| `bfill_value` | Buffered fill — keystroke-reconstructed value when the DOM `.value` is empty (e.g. virtual keyboards, frameworks that clear the field) |
142+
| `press_key` | Key press, currently only Enter (`value: 13`), emitted after a `fill_value`/`bfill_value` on Enter |
143+
| `change` (`check`) | Checkbox or radio button toggled; includes `checked` boolean |
144+
| `change` (`select`) | Single `<select>` dropdown changed; includes `selected` index and `value` |
145+
| `change` (`select_multi`) | Multi-select `<select>` changed; includes `selected` boolean array and `value` |
146+
147+
## Common Fields
148+
149+
| Field | Description |
150+
|-------|-------------|
151+
| `timestamp` | Unix timestamp in milliseconds |
152+
| `css` | CSS selector for the target element |
153+
| `xpath` | XPath selector for the target element |
154+
| `type` | Event type identifier |
155+
| `value` | Element value or trimmed text content (max 20 chars for clicks) |
156+
| `frame` | CSS selector of the containing iframe, empty string if top-level |

0 commit comments

Comments
 (0)