shiplightai 0.1.93 → 0.1.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of shiplightai might be problematic. Click here for more details.
- package/README.md +2 -1
- package/dist/cjs/debugger-pw.cjs +24 -24
- package/dist/cjs/fixture.cjs +58 -58
- package/dist/cjs/index.cjs +37 -37
- package/dist/cjs/reporter.cjs +48 -48
- package/dist/cli.js +130 -101
- package/dist/debugger-pw.js +24 -24
- package/dist/fixture.js +58 -58
- package/dist/index.js +40 -40
- package/dist/reporter.js +48 -48
- package/dist/spec/actions.md +702 -0
- package/dist/spec/yaml.md +1047 -0
- package/package.json +3 -4
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
# Shiplight Actions
|
|
2
|
+
|
|
3
|
+
Every action a `.test.yaml` statement can name in its `action:` field, with
|
|
4
|
+
its parameters. Generated from the engine's action registry at build time and
|
|
5
|
+
filtered to the actions the YAML transpiler can emit, so this list cannot
|
|
6
|
+
describe an action the installed version does not support, or omit one it does.
|
|
7
|
+
|
|
8
|
+
Fields other than `intent`, `action`, `locator`, and `xpath` are passed to
|
|
9
|
+
the action as arguments — see `shiplight spec yaml` for the statement
|
|
10
|
+
grammar itself.
|
|
11
|
+
|
|
12
|
+
## Targeting an element
|
|
13
|
+
|
|
14
|
+
Actions marked **element-targeted** below act on a specific element. In a
|
|
15
|
+
`.test.yaml` you address it with `locator:` (preferred) or `xpath:`.
|
|
16
|
+
|
|
17
|
+
The engine's own schema for these actions takes an `element_index` instead —
|
|
18
|
+
that is the *live session* form, where `act` works against a DOM it has just
|
|
19
|
+
inspected and indices are still meaningful. A saved test cannot use it: an
|
|
20
|
+
index is meaningless once the page reloads, which is why a locator is what
|
|
21
|
+
gets persisted. `element_index` is therefore omitted from the schemas below;
|
|
22
|
+
writing it into YAML has no effect (the transpiler ignores it, and the
|
|
23
|
+
resulting step runs with no target).
|
|
24
|
+
|
|
25
|
+
28 actions.
|
|
26
|
+
|
|
27
|
+
> Engine actions with no YAML form (agent-only): `extract_activation_code`, `perform_accurate_operation`.
|
|
28
|
+
|
|
29
|
+
## ai_extract
|
|
30
|
+
|
|
31
|
+
Use AI to extract information from the page and save it to a variable. MCP-only tool.
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"element_description": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Description of the element to extract (e.g., \"the price of the product\")"
|
|
40
|
+
},
|
|
41
|
+
"variable_name": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Name of the variable to store the extracted value"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"element_description",
|
|
48
|
+
"variable_name"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## ai_wait_until
|
|
56
|
+
|
|
57
|
+
Wait until a specific condition is met on the page (e.g., "page loads", "spinner disappears", "button becomes enabled"). Use this instead of wait when the goal is to wait for something to happen rather than waiting a fixed duration.
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"condition": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "The condition to wait for (e.g., \"the loading spinner disappears\")"
|
|
66
|
+
},
|
|
67
|
+
"timeout_seconds": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"exclusiveMinimum": 0,
|
|
70
|
+
"description": "Timeout in seconds (default: 60)"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"condition"
|
|
75
|
+
],
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## clear_input
|
|
82
|
+
|
|
83
|
+
Clear the contents of an input field, textarea, or other editable element.
|
|
84
|
+
|
|
85
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"timeout_ms": {
|
|
92
|
+
"type": "number",
|
|
93
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## click
|
|
102
|
+
|
|
103
|
+
Click an interactive element.
|
|
104
|
+
|
|
105
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"timeout_ms": {
|
|
112
|
+
"type": "number",
|
|
113
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## close_tab
|
|
122
|
+
|
|
123
|
+
Close a browser tab by index. If no index is specified, closes the current tab.
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"type": "object",
|
|
128
|
+
"properties": {
|
|
129
|
+
"index": {
|
|
130
|
+
"type": "integer",
|
|
131
|
+
"minimum": 0,
|
|
132
|
+
"description": "Index of the tab to close (0-based). Defaults to current tab if not specified."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## done
|
|
141
|
+
|
|
142
|
+
Mark the current task as complete. Use when you have finished all requested actions.
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": {
|
|
148
|
+
"success": {
|
|
149
|
+
"type": "boolean",
|
|
150
|
+
"description": "Whether the task was completed successfully"
|
|
151
|
+
},
|
|
152
|
+
"summary": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "Summary of what was accomplished or why it failed"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"success",
|
|
159
|
+
"summary"
|
|
160
|
+
],
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## double_click
|
|
167
|
+
|
|
168
|
+
Double-click an interactive element.
|
|
169
|
+
|
|
170
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"timeout_ms": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## extract_email_content
|
|
187
|
+
|
|
188
|
+
Extract verification codes, magic links, or custom content from emails received via Mailgun. Polls the Mailgun inbox for matching emails and uses AI to extract the requested content.
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"forward_email": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "Email address where emails are forwarded to (Mailgun inbox)"
|
|
197
|
+
},
|
|
198
|
+
"extraction_type": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"enum": [
|
|
201
|
+
"verification_code",
|
|
202
|
+
"activation_link",
|
|
203
|
+
"custom"
|
|
204
|
+
],
|
|
205
|
+
"description": "Type of content to extract: verification_code for OTP codes, activation_link for magic links, custom for custom prompts"
|
|
206
|
+
},
|
|
207
|
+
"prompt": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Custom extraction prompt (required when extraction_type is custom)"
|
|
210
|
+
},
|
|
211
|
+
"filter_from_email": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "Filter emails by sender address"
|
|
214
|
+
},
|
|
215
|
+
"filter_to_email": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "Filter emails by recipient address"
|
|
218
|
+
},
|
|
219
|
+
"filter_subject": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "Filter emails by subject (partial match)"
|
|
222
|
+
},
|
|
223
|
+
"filter_body_contains": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "Filter emails by body content (partial match)"
|
|
226
|
+
},
|
|
227
|
+
"timeout": {
|
|
228
|
+
"type": "number",
|
|
229
|
+
"description": "Timeout in seconds for polling (default: 60)"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"required": [
|
|
233
|
+
"forward_email",
|
|
234
|
+
"extraction_type"
|
|
235
|
+
],
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## generate_2fa_code
|
|
242
|
+
|
|
243
|
+
Generate a 2FA code from an OTP secret key. The code is saved to the "otp_code" variable. To use the otp_code, you must use `$otp_code` to access it.
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"type": "object",
|
|
248
|
+
"properties": {
|
|
249
|
+
"otp_secret_key": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "The OTP secret key to generate the 2FA code from"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": [
|
|
255
|
+
"otp_secret_key"
|
|
256
|
+
],
|
|
257
|
+
"additionalProperties": false,
|
|
258
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## get_dropdown_options
|
|
263
|
+
|
|
264
|
+
Get all options from a native dropdown
|
|
265
|
+
|
|
266
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"type": "object",
|
|
271
|
+
"properties": {},
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## go_back
|
|
278
|
+
|
|
279
|
+
Navigate back to the previous page in browser history.
|
|
280
|
+
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {},
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## go_to_url
|
|
291
|
+
|
|
292
|
+
Navigate to a specific URL. Use this to visit web pages. Set new_tab=true to open in a new tab.
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"type": "object",
|
|
297
|
+
"properties": {
|
|
298
|
+
"url": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "URL to navigate to (HTTP/HTTPS URL, or a path like \"/home\")"
|
|
301
|
+
},
|
|
302
|
+
"new_tab": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"description": "If true, open the URL in a new tab instead of the current page. Default is false."
|
|
305
|
+
},
|
|
306
|
+
"timeout_seconds": {
|
|
307
|
+
"type": "number",
|
|
308
|
+
"exclusiveMinimum": 0,
|
|
309
|
+
"description": "Navigation timeout in seconds. Default is 20 seconds."
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"url"
|
|
314
|
+
],
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## hover
|
|
321
|
+
|
|
322
|
+
Hover over an interactive element.
|
|
323
|
+
|
|
324
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
325
|
+
|
|
326
|
+
```json
|
|
327
|
+
{
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"timeout_ms": {
|
|
331
|
+
"type": "number",
|
|
332
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"additionalProperties": false,
|
|
336
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## input_text
|
|
341
|
+
|
|
342
|
+
Type text into an input field. To replace existing content, use clear_input first.
|
|
343
|
+
|
|
344
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
345
|
+
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"type": "object",
|
|
349
|
+
"properties": {
|
|
350
|
+
"text": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"description": "Text to type into the input. To use a placeholder, write {{ placeholder_name }} using exact placeholder name. Use clear_input first if you want to replace existing content."
|
|
353
|
+
},
|
|
354
|
+
"timeout_ms": {
|
|
355
|
+
"type": "number",
|
|
356
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"text"
|
|
361
|
+
],
|
|
362
|
+
"additionalProperties": false,
|
|
363
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## press
|
|
368
|
+
|
|
369
|
+
Press a single keyboard key or key combination. Supports combinations like `Control+A` for select all. Does NOT support sequences - call this action multiple times to press keys in sequence.
|
|
370
|
+
|
|
371
|
+
```json
|
|
372
|
+
{
|
|
373
|
+
"type": "object",
|
|
374
|
+
"properties": {
|
|
375
|
+
"keys": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"description": "A single key or key combination to press (e.g. Escape, Backspace, Insert, PageDown, Delete, Tab, Enter). Key combinations like `Control+o`, `Control+Shift+T`, `ControlOrMeta+a` are supported. Note: This does NOT support sequences - to press multiple keys in sequence (e.g., Control+A then Backspace), call this action multiple times."
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"required": [
|
|
381
|
+
"keys"
|
|
382
|
+
],
|
|
383
|
+
"additionalProperties": false,
|
|
384
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
## reload_page
|
|
389
|
+
|
|
390
|
+
Reload the current page. WARNING: This will reset any in-progress forms or multi-step flows (like login). Only use when you need to refresh stale data or clear a stuck state. Do NOT use during login, checkout, or form submission flows.
|
|
391
|
+
|
|
392
|
+
```json
|
|
393
|
+
{
|
|
394
|
+
"type": "object",
|
|
395
|
+
"properties": {},
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
## right_click
|
|
402
|
+
|
|
403
|
+
Right-click an interactive element.
|
|
404
|
+
|
|
405
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
406
|
+
|
|
407
|
+
```json
|
|
408
|
+
{
|
|
409
|
+
"type": "object",
|
|
410
|
+
"properties": {
|
|
411
|
+
"timeout_ms": {
|
|
412
|
+
"type": "number",
|
|
413
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"additionalProperties": false,
|
|
417
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## save_variable
|
|
422
|
+
|
|
423
|
+
Save a value to a named variable for later use in the test.
|
|
424
|
+
|
|
425
|
+
```json
|
|
426
|
+
{
|
|
427
|
+
"type": "object",
|
|
428
|
+
"properties": {
|
|
429
|
+
"name": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"description": "Variable name to save"
|
|
432
|
+
},
|
|
433
|
+
"value": {
|
|
434
|
+
"type": "string",
|
|
435
|
+
"description": "Value to save in the variable"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"required": [
|
|
439
|
+
"name",
|
|
440
|
+
"value"
|
|
441
|
+
],
|
|
442
|
+
"additionalProperties": false,
|
|
443
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
## scroll
|
|
448
|
+
|
|
449
|
+
Scroll the page by specified number of pages (set down=True to scroll down, down=False to scroll up, num_pages=number of pages to scroll like 0.5 for half page, 1.0 for one page, etc.).
|
|
450
|
+
|
|
451
|
+
```json
|
|
452
|
+
{
|
|
453
|
+
"type": "object",
|
|
454
|
+
"properties": {
|
|
455
|
+
"down": {
|
|
456
|
+
"type": "boolean",
|
|
457
|
+
"description": "True to scroll down, False to scroll up"
|
|
458
|
+
},
|
|
459
|
+
"num_pages": {
|
|
460
|
+
"type": "number",
|
|
461
|
+
"minimum": 0,
|
|
462
|
+
"description": "Number of pages to scroll (0.5 = half page, 1.0 = one page, etc.)"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"required": [
|
|
466
|
+
"down",
|
|
467
|
+
"num_pages"
|
|
468
|
+
],
|
|
469
|
+
"additionalProperties": false,
|
|
470
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## scroll_on_element
|
|
475
|
+
|
|
476
|
+
Scroll on a scrollable element horizontally and vertically.
|
|
477
|
+
|
|
478
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
479
|
+
|
|
480
|
+
```json
|
|
481
|
+
{
|
|
482
|
+
"type": "object",
|
|
483
|
+
"properties": {
|
|
484
|
+
"delta_x": {
|
|
485
|
+
"type": "number",
|
|
486
|
+
"description": "The number of pixels to scroll horizontally. Positive values scroll right, negative values scroll left."
|
|
487
|
+
},
|
|
488
|
+
"delta_y": {
|
|
489
|
+
"type": "number",
|
|
490
|
+
"description": "The number of pixels to scroll vertically. Positive values scroll down, negative values scroll up."
|
|
491
|
+
},
|
|
492
|
+
"timeout_ms": {
|
|
493
|
+
"type": "number",
|
|
494
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"additionalProperties": false,
|
|
498
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## scroll_to_text
|
|
503
|
+
|
|
504
|
+
Scroll the page until specified text becomes visible.
|
|
505
|
+
|
|
506
|
+
```json
|
|
507
|
+
{
|
|
508
|
+
"type": "object",
|
|
509
|
+
"properties": {
|
|
510
|
+
"text": {
|
|
511
|
+
"type": "string",
|
|
512
|
+
"description": "Text to scroll to on the page"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"text"
|
|
517
|
+
],
|
|
518
|
+
"additionalProperties": false,
|
|
519
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
520
|
+
}
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
## select_dropdown_option
|
|
524
|
+
|
|
525
|
+
Select an option from a dropdown/select element by value, label, or index.
|
|
526
|
+
|
|
527
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
528
|
+
|
|
529
|
+
```json
|
|
530
|
+
{
|
|
531
|
+
"type": "object",
|
|
532
|
+
"properties": {
|
|
533
|
+
"option": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Option value, label, or index to select"
|
|
536
|
+
},
|
|
537
|
+
"timeout_ms": {
|
|
538
|
+
"type": "number",
|
|
539
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"required": [
|
|
543
|
+
"option"
|
|
544
|
+
],
|
|
545
|
+
"additionalProperties": false,
|
|
546
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
## set_date_for_native_date_picker
|
|
551
|
+
|
|
552
|
+
Set a date in a native HTML date picker input (<input type="date">).
|
|
553
|
+
|
|
554
|
+
IMPORTANT: ONLY use this action for input elements that have type="date" attribute (native HTML date picker).
|
|
555
|
+
Do NOT use it for custom/non-native date pickers
|
|
556
|
+
|
|
557
|
+
The date must be in YYYY-MM-DD format (e.g., 2024-03-15).
|
|
558
|
+
|
|
559
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
560
|
+
|
|
561
|
+
```json
|
|
562
|
+
{
|
|
563
|
+
"type": "object",
|
|
564
|
+
"properties": {
|
|
565
|
+
"date": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
568
|
+
"description": "Date in YYYY-MM-DD format (e.g., 2024-03-15)"
|
|
569
|
+
},
|
|
570
|
+
"timeout_ms": {
|
|
571
|
+
"type": "number",
|
|
572
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"required": [
|
|
576
|
+
"date"
|
|
577
|
+
],
|
|
578
|
+
"additionalProperties": false,
|
|
579
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
## switch_tab
|
|
584
|
+
|
|
585
|
+
Switch to a different browser tab by index (0-based).
|
|
586
|
+
|
|
587
|
+
```json
|
|
588
|
+
{
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"tab_index": {
|
|
592
|
+
"type": "integer",
|
|
593
|
+
"minimum": 0,
|
|
594
|
+
"description": "Index of the tab to switch to (0-based). Use 0 for first tab, 1 for second, etc."
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"required": [
|
|
598
|
+
"tab_index"
|
|
599
|
+
],
|
|
600
|
+
"additionalProperties": false,
|
|
601
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
602
|
+
}
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
## upload_file
|
|
606
|
+
|
|
607
|
+
Click on target element (usually contains hints like "Upload file" or "Choose file" etc.) to trigger the file upload dialog, and choose the files to upload
|
|
608
|
+
|
|
609
|
+
**Element-targeted** — address it with `locator:` or `xpath:`.
|
|
610
|
+
|
|
611
|
+
```json
|
|
612
|
+
{
|
|
613
|
+
"type": "object",
|
|
614
|
+
"properties": {
|
|
615
|
+
"paths": {
|
|
616
|
+
"anyOf": [
|
|
617
|
+
{
|
|
618
|
+
"type": "string"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"type": "array",
|
|
622
|
+
"items": {
|
|
623
|
+
"type": "string"
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
"description": "Path to a file, relative to the test project root (e.g. \"fixtures/data.csv\"), or an array of such paths."
|
|
628
|
+
},
|
|
629
|
+
"timeout_ms": {
|
|
630
|
+
"type": "number",
|
|
631
|
+
"description": "Per-action timeout in ms. Overrides the default 5s action timeout."
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
"required": [
|
|
635
|
+
"paths"
|
|
636
|
+
],
|
|
637
|
+
"additionalProperties": false,
|
|
638
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
639
|
+
}
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
## verify
|
|
643
|
+
|
|
644
|
+
Verify that a statement is true based on the current page state. Use this to check assertions about the page content, element visibility, or any condition.
|
|
645
|
+
|
|
646
|
+
```json
|
|
647
|
+
{
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"statement": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"description": "The nature language statement to verify (e.g., \"The login was successful\")"
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
"required": [
|
|
656
|
+
"statement"
|
|
657
|
+
],
|
|
658
|
+
"additionalProperties": false,
|
|
659
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
660
|
+
}
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
## wait
|
|
664
|
+
|
|
665
|
+
Wait for a specified number of seconds before continuing.
|
|
666
|
+
|
|
667
|
+
```json
|
|
668
|
+
{
|
|
669
|
+
"type": "object",
|
|
670
|
+
"properties": {
|
|
671
|
+
"seconds": {
|
|
672
|
+
"type": "number",
|
|
673
|
+
"exclusiveMinimum": 0,
|
|
674
|
+
"description": "Number of seconds to wait"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"required": [
|
|
678
|
+
"seconds"
|
|
679
|
+
],
|
|
680
|
+
"additionalProperties": false,
|
|
681
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
682
|
+
}
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
## wait_for_download_complete
|
|
686
|
+
|
|
687
|
+
Wait for an in-progress download to complete.
|
|
688
|
+
|
|
689
|
+
```json
|
|
690
|
+
{
|
|
691
|
+
"type": "object",
|
|
692
|
+
"properties": {
|
|
693
|
+
"timeout_seconds": {
|
|
694
|
+
"type": "number",
|
|
695
|
+
"exclusiveMinimum": 0,
|
|
696
|
+
"description": "Maximum time in seconds to wait for download to complete (default: 10)"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"additionalProperties": false,
|
|
700
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
701
|
+
}
|
|
702
|
+
```
|