testdriverai 7.3.8 → 7.3.10
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.
- package/CHANGELOG.md +8 -0
- package/agent/lib/commands.js +27 -2
- package/agent/lib/sandbox.js +2 -0
- package/docs/_data/examples-manifest.json +64 -64
- package/docs/v7/assert.mdx +31 -0
- package/docs/v7/client.mdx +29 -0
- package/docs/v7/examples/ai.mdx +1 -1
- package/docs/v7/examples/assert.mdx +1 -1
- package/docs/v7/examples/captcha-api.mdx +1 -1
- package/docs/v7/examples/chrome-extension.mdx +1 -1
- package/docs/v7/examples/drag-and-drop.mdx +1 -1
- package/docs/v7/examples/element-not-found.mdx +1 -1
- package/docs/v7/examples/hover-image.mdx +1 -1
- package/docs/v7/examples/hover-text.mdx +1 -1
- package/docs/v7/examples/installer.mdx +1 -1
- package/docs/v7/examples/launch-vscode-linux.mdx +1 -1
- package/docs/v7/examples/match-image.mdx +1 -1
- package/docs/v7/examples/press-keys.mdx +1 -1
- package/docs/v7/examples/scroll-keyboard.mdx +1 -1
- package/docs/v7/examples/scroll-until-image.mdx +1 -1
- package/docs/v7/examples/scroll-until-text.mdx +1 -1
- package/docs/v7/examples/scroll.mdx +1 -1
- package/docs/v7/examples/type.mdx +1 -1
- package/docs/v7/examples/windows-installer.mdx +1 -1
- package/docs/v7/find.mdx +24 -0
- package/examples/z_flake-shared.mjs +1 -0
- package/interfaces/vitest-plugin.d.ts +19 -5
- package/interfaces/vitest-plugin.mjs +87 -16
- package/lib/vitest/hooks.mjs +36 -7
- package/lib/vitest/setup.mjs +10 -8
- package/mcp-server/dist/server.mjs +2 -2
- package/mcp-server/src/server.ts +2 -2
- package/package.json +1 -1
- package/sdk.d.ts +19 -2
- package/sdk.js +182 -82
- package/vitest.config.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [7.3.10](https://github.com/testdriverai/testdriverai/compare/v7.3.9...v7.3.10) (2026-02-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## [7.3.9](https://github.com/testdriverai/testdriverai/compare/v7.3.8...v7.3.9) (2026-02-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
1
9
|
## [7.3.8](https://github.com/testdriverai/testdriverai/compare/v7.3.7...v7.3.8) (2026-02-12)
|
|
2
10
|
|
|
3
11
|
|
package/agent/lib/commands.js
CHANGED
|
@@ -226,8 +226,8 @@ const createCommands = (
|
|
|
226
226
|
const assertTimestamp = Date.now();
|
|
227
227
|
const assertStartTime = assertTimestamp;
|
|
228
228
|
|
|
229
|
-
// Extract cache options
|
|
230
|
-
const { threshold = -1, cacheKey, os, resolution } = options;
|
|
229
|
+
// Extract cache and AI options
|
|
230
|
+
const { threshold = -1, cacheKey, os, resolution, ai } = options;
|
|
231
231
|
|
|
232
232
|
// Debug log cache settings
|
|
233
233
|
emitter.emit(
|
|
@@ -243,6 +243,7 @@ const createCommands = (
|
|
|
243
243
|
cacheKey,
|
|
244
244
|
os,
|
|
245
245
|
resolution,
|
|
246
|
+
ai,
|
|
246
247
|
});
|
|
247
248
|
|
|
248
249
|
const assertDuration = Date.now() - assertStartTime;
|
|
@@ -255,12 +256,17 @@ const createCommands = (
|
|
|
255
256
|
let cacheHit = false;
|
|
256
257
|
let similarity = null;
|
|
257
258
|
|
|
259
|
+
let confidence = null;
|
|
260
|
+
let reasoning = null;
|
|
261
|
+
|
|
258
262
|
if (typeof response.data === 'object' && response.data !== null) {
|
|
259
263
|
// New structured response
|
|
260
264
|
passed = response.data.passed;
|
|
261
265
|
responseText = response.data.content || response.data.reasoning || '';
|
|
262
266
|
cacheHit = response.cacheHit || response.data.cacheHit || false;
|
|
263
267
|
similarity = response.similarity || response.data.cacheSimilarity;
|
|
268
|
+
confidence = response.confidence != null ? response.confidence : (response.data.confidence != null ? response.data.confidence : null);
|
|
269
|
+
reasoning = response.data.reasoning || null;
|
|
264
270
|
} else {
|
|
265
271
|
// Old string response (backward compatibility)
|
|
266
272
|
responseText = response.data || '';
|
|
@@ -283,6 +289,10 @@ const createCommands = (
|
|
|
283
289
|
success: passed,
|
|
284
290
|
error: passed ? undefined : responseText,
|
|
285
291
|
cacheHit: cacheHit,
|
|
292
|
+
confidence: confidence,
|
|
293
|
+
reasoning: reasoning,
|
|
294
|
+
similarity: similarity,
|
|
295
|
+
screenshotUrl: response?.screenshotKey ?? null,
|
|
286
296
|
}).catch((err) => {
|
|
287
297
|
console.warn("Failed to track assert interaction:", err.message);
|
|
288
298
|
});
|
|
@@ -560,6 +570,10 @@ const createCommands = (
|
|
|
560
570
|
cacheHit: elementData.cacheHit,
|
|
561
571
|
selector: elementData.selector,
|
|
562
572
|
selectorUsed: elementData.selectorUsed,
|
|
573
|
+
confidence: elementData.confidence ?? null,
|
|
574
|
+
reasoning: elementData.reasoning ?? null,
|
|
575
|
+
similarity: elementData.similarity ?? null,
|
|
576
|
+
screenshotUrl: elementData.screenshotUrl ?? null,
|
|
563
577
|
}).catch((err) => {
|
|
564
578
|
console.warn("Failed to track click interaction:", err.message);
|
|
565
579
|
});
|
|
@@ -610,6 +624,9 @@ const createCommands = (
|
|
|
610
624
|
cacheHit: elementData.cacheHit,
|
|
611
625
|
selector: elementData.selector,
|
|
612
626
|
selectorUsed: elementData.selectorUsed,
|
|
627
|
+
confidence: elementData.confidence ?? null,
|
|
628
|
+
reasoning: elementData.reasoning ?? null,
|
|
629
|
+
similarity: elementData.similarity ?? null,
|
|
613
630
|
}).catch((err) => {
|
|
614
631
|
console.warn("Failed to track click interaction:", err.message);
|
|
615
632
|
});
|
|
@@ -679,6 +696,10 @@ const createCommands = (
|
|
|
679
696
|
cacheHit: elementData.cacheHit,
|
|
680
697
|
selector: elementData.selector,
|
|
681
698
|
selectorUsed: elementData.selectorUsed,
|
|
699
|
+
confidence: elementData.confidence ?? null,
|
|
700
|
+
reasoning: elementData.reasoning ?? null,
|
|
701
|
+
similarity: elementData.similarity ?? null,
|
|
702
|
+
screenshotUrl: elementData.screenshotUrl ?? null,
|
|
682
703
|
}).catch((err) => {
|
|
683
704
|
console.warn("Failed to track hover interaction:", err.message);
|
|
684
705
|
});
|
|
@@ -717,6 +738,10 @@ const createCommands = (
|
|
|
717
738
|
cacheHit: elementData.cacheHit,
|
|
718
739
|
selector: elementData.selector,
|
|
719
740
|
selectorUsed: elementData.selectorUsed,
|
|
741
|
+
confidence: elementData.confidence ?? null,
|
|
742
|
+
reasoning: elementData.reasoning ?? null,
|
|
743
|
+
similarity: elementData.similarity ?? null,
|
|
744
|
+
screenshotUrl: elementData.screenshotUrl ?? null,
|
|
720
745
|
}).catch((err) => {
|
|
721
746
|
console.warn("Failed to track hover interaction:", err.message);
|
|
722
747
|
});
|
package/agent/lib/sandbox.js
CHANGED
|
@@ -2,6 +2,7 @@ const WebSocket = require("ws");
|
|
|
2
2
|
const crypto = require("crypto");
|
|
3
3
|
const { events } = require("../events");
|
|
4
4
|
const logger = require("./logger");
|
|
5
|
+
const { version } = require("../../package.json");
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Generate Sentry trace headers for distributed tracing
|
|
@@ -135,6 +136,7 @@ const createSandbox = (emitter, analytics, sessionInstance) => {
|
|
|
135
136
|
let reply = await this.send({
|
|
136
137
|
type: "authenticate",
|
|
137
138
|
apiKey,
|
|
139
|
+
version,
|
|
138
140
|
});
|
|
139
141
|
|
|
140
142
|
if (reply.success) {
|
|
@@ -2,136 +2,136 @@
|
|
|
2
2
|
"$schema": "./examples-manifest.schema.json",
|
|
3
3
|
"examples": {
|
|
4
4
|
"assert.test.mjs": {
|
|
5
|
-
"url": "https://console.testdriver.ai/runs/
|
|
6
|
-
"lastUpdated": "2026-02-
|
|
5
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16d4a2aa03cd95d96b60",
|
|
6
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
7
7
|
},
|
|
8
8
|
"drag-and-drop.test.mjs": {
|
|
9
|
-
"url": "https://console.testdriver.ai/runs/
|
|
10
|
-
"lastUpdated": "2026-02-
|
|
9
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1528a2aa03cd95d96a2c",
|
|
10
|
+
"lastUpdated": "2026-02-12T00:06:25.196Z"
|
|
11
11
|
},
|
|
12
12
|
"exec-pwsh.test.mjs": {
|
|
13
|
-
"url": "https://console.testdriver.ai/runs/
|
|
14
|
-
"lastUpdated": "2026-02-
|
|
13
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d152aa2aa03cd95d96a33",
|
|
14
|
+
"lastUpdated": "2026-02-12T00:06:25.197Z"
|
|
15
15
|
},
|
|
16
16
|
"match-image.test.mjs": {
|
|
17
|
-
"url": "https://console.testdriver.ai/runs/
|
|
18
|
-
"lastUpdated": "2026-02-
|
|
17
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d152ba2aa03cd95d96a34",
|
|
18
|
+
"lastUpdated": "2026-02-12T00:06:25.197Z"
|
|
19
19
|
},
|
|
20
20
|
"scroll-until-text.test.mjs": {
|
|
21
|
-
"url": "https://console.testdriver.ai/runs/
|
|
22
|
-
"lastUpdated": "2026-02-
|
|
21
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1590a2aa03cd95d96a82",
|
|
22
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
23
23
|
},
|
|
24
24
|
"hover-text-with-description.test.mjs": {
|
|
25
|
-
"url": "https://console.testdriver.ai/runs/
|
|
26
|
-
"lastUpdated": "2026-02-
|
|
25
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d157fa2aa03cd95d96a73",
|
|
26
|
+
"lastUpdated": "2026-02-12T00:06:25.197Z"
|
|
27
27
|
},
|
|
28
28
|
"windows-installer.test.mjs": {
|
|
29
|
-
"url": "https://console.testdriver.ai/runs/
|
|
30
|
-
"lastUpdated": "2026-02-
|
|
29
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1591a2aa03cd95d96a84",
|
|
30
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
31
31
|
},
|
|
32
32
|
"exec-output.test.mjs": {
|
|
33
|
-
"url": "https://console.testdriver.ai/runs/
|
|
34
|
-
"lastUpdated": "2026-02-
|
|
33
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1592a2aa03cd95d96a85",
|
|
34
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
35
35
|
},
|
|
36
36
|
"chrome-extension.test.mjs": {
|
|
37
|
-
"url": "https://console.testdriver.ai/runs/
|
|
38
|
-
"lastUpdated": "2026-02-
|
|
37
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d15eea2aa03cd95d96ac8",
|
|
38
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
39
39
|
},
|
|
40
40
|
"launch-vscode-linux.test.mjs": {
|
|
41
|
-
"url": "https://console.testdriver.ai/runs/
|
|
42
|
-
"lastUpdated": "2026-02-
|
|
41
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d15eda2aa03cd95d96ac7",
|
|
42
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
43
43
|
},
|
|
44
44
|
"hover-image.test.mjs": {
|
|
45
|
-
"url": "https://console.testdriver.ai/runs/
|
|
46
|
-
"lastUpdated": "2026-02-
|
|
45
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d15dfa2aa03cd95d96abd",
|
|
46
|
+
"lastUpdated": "2026-02-12T00:06:25.198Z"
|
|
47
47
|
},
|
|
48
48
|
"installer.test.mjs": {
|
|
49
|
-
"url": "https://console.testdriver.ai/runs/
|
|
50
|
-
"lastUpdated": "2026-02-
|
|
49
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1640a2aa03cd95d96af3",
|
|
50
|
+
"lastUpdated": "2026-02-12T00:06:25.200Z"
|
|
51
51
|
},
|
|
52
52
|
"type.test.mjs": {
|
|
53
|
-
"url": "https://console.testdriver.ai/runs/
|
|
54
|
-
"lastUpdated": "2026-02-
|
|
53
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1665a2aa03cd95d96b08",
|
|
54
|
+
"lastUpdated": "2026-02-12T00:06:25.200Z"
|
|
55
55
|
},
|
|
56
56
|
"press-keys.test.mjs": {
|
|
57
|
-
"url": "https://console.testdriver.ai/runs/
|
|
58
|
-
"lastUpdated": "2026-02-
|
|
57
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16aca2aa03cd95d96b40",
|
|
58
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
59
59
|
},
|
|
60
60
|
"scroll-keyboard.test.mjs": {
|
|
61
|
-
"url": "https://console.testdriver.ai/runs/
|
|
62
|
-
"lastUpdated": "2026-02-
|
|
61
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d169fa2aa03cd95d96b35",
|
|
62
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
63
63
|
},
|
|
64
64
|
"scroll.test.mjs": {
|
|
65
|
-
"url": "https://console.testdriver.ai/runs/
|
|
66
|
-
"lastUpdated": "2026-02-
|
|
65
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d164ca2aa03cd95d96afc",
|
|
66
|
+
"lastUpdated": "2026-02-12T00:06:25.200Z"
|
|
67
67
|
},
|
|
68
68
|
"scroll-until-image.test.mjs": {
|
|
69
|
-
"url": "https://console.testdriver.ai/runs/
|
|
70
|
-
"lastUpdated": "2026-02-
|
|
69
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16ada2aa03cd95d96b42",
|
|
70
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
71
71
|
},
|
|
72
72
|
"prompt.test.mjs": {
|
|
73
|
-
"url": "https://console.testdriver.ai/runs/
|
|
74
|
-
"lastUpdated": "2026-02-
|
|
73
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16afa2aa03cd95d96b43",
|
|
74
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
75
75
|
},
|
|
76
76
|
"focus-window.test.mjs": {
|
|
77
|
-
"url": "https://console.testdriver.ai/runs/
|
|
78
|
-
"lastUpdated": "2026-02-
|
|
77
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16b0a2aa03cd95d96b44",
|
|
78
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
79
79
|
},
|
|
80
80
|
"captcha-api.test.mjs": {
|
|
81
|
-
"url": "https://console.testdriver.ai/runs/
|
|
82
|
-
"lastUpdated": "2026-02-
|
|
81
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16cfa2aa03cd95d96b57",
|
|
82
|
+
"lastUpdated": "2026-02-12T00:06:25.201Z"
|
|
83
83
|
},
|
|
84
84
|
"element-not-found.test.mjs": {
|
|
85
|
-
"url": "https://console.testdriver.ai/runs/
|
|
86
|
-
"lastUpdated": "2026-02-
|
|
85
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1705a2aa03cd95d96b79",
|
|
86
|
+
"lastUpdated": "2026-02-12T00:06:25.202Z"
|
|
87
87
|
},
|
|
88
88
|
"formatted-logging.test.mjs": {
|
|
89
|
-
"url": "https://console.testdriver.ai/runs/
|
|
90
|
-
"lastUpdated": "2026-02-
|
|
89
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d16eaa2aa03cd95d96b6b",
|
|
90
|
+
"lastUpdated": "2026-02-12T00:06:25.202Z"
|
|
91
91
|
},
|
|
92
92
|
"hover-text.test.mjs": {
|
|
93
|
-
"url": "https://console.testdriver.ai/runs/
|
|
94
|
-
"lastUpdated": "2026-02-
|
|
93
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1724a2aa03cd95d96b8d",
|
|
94
|
+
"lastUpdated": "2026-02-12T00:06:25.203Z"
|
|
95
95
|
},
|
|
96
96
|
"no-provision.test.mjs": {
|
|
97
|
-
"url": "https://console.testdriver.ai/runs/
|
|
98
|
-
"lastUpdated": "2026-02-
|
|
97
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d173ea2aa03cd95d96b9d",
|
|
98
|
+
"lastUpdated": "2026-02-12T00:06:25.203Z"
|
|
99
99
|
},
|
|
100
100
|
"ai.test.mjs": {
|
|
101
|
-
"url": "https://console.testdriver.ai/runs/
|
|
102
|
-
"lastUpdated": "2026-02-
|
|
101
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1763a2aa03cd95d96bae",
|
|
102
|
+
"lastUpdated": "2026-02-12T00:06:25.203Z"
|
|
103
103
|
},
|
|
104
104
|
"popup-loading.test.mjs": {
|
|
105
105
|
"url": "https://console.testdriver.ai/runs/698bc89f7140c3fa7daaca8d/698bca7f7140c3fa7daacbf7",
|
|
106
106
|
"lastUpdated": "2026-02-11T00:20:33.687Z"
|
|
107
107
|
},
|
|
108
108
|
"z_flake-diffthreshold-001.test.mjs": {
|
|
109
|
-
"url": "https://console.testdriver.ai/runs/
|
|
110
|
-
"lastUpdated": "2026-02-
|
|
109
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d186aa2aa03cd95d96c33",
|
|
110
|
+
"lastUpdated": "2026-02-12T00:06:25.204Z"
|
|
111
111
|
},
|
|
112
112
|
"z_flake-diffthreshold-01.test.mjs": {
|
|
113
|
-
"url": "https://console.testdriver.ai/runs/
|
|
114
|
-
"lastUpdated": "2026-02-
|
|
113
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1838a2aa03cd95d96c16",
|
|
114
|
+
"lastUpdated": "2026-02-12T00:06:25.203Z"
|
|
115
115
|
},
|
|
116
116
|
"z_flake-diffthreshold-05.test.mjs": {
|
|
117
|
-
"url": "https://console.testdriver.ai/runs/
|
|
118
|
-
"lastUpdated": "2026-02-
|
|
117
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d183ba2aa03cd95d96c1d",
|
|
118
|
+
"lastUpdated": "2026-02-12T00:06:25.203Z"
|
|
119
119
|
},
|
|
120
120
|
"z_flake-noredraw-cache.test.mjs": {
|
|
121
|
-
"url": "https://console.testdriver.ai/runs/
|
|
122
|
-
"lastUpdated": "2026-02-
|
|
121
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d18b0a2aa03cd95d96c61",
|
|
122
|
+
"lastUpdated": "2026-02-12T00:06:25.205Z"
|
|
123
123
|
},
|
|
124
124
|
"z_flake-redraw-nocache.test.mjs": {
|
|
125
|
-
"url": "https://console.testdriver.ai/runs/
|
|
126
|
-
"lastUpdated": "2026-02-
|
|
125
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1901a2aa03cd95d96c85",
|
|
126
|
+
"lastUpdated": "2026-02-12T00:06:25.205Z"
|
|
127
127
|
},
|
|
128
128
|
"z_flake-redraw-cache.test.mjs": {
|
|
129
|
-
"url": "https://console.testdriver.ai/runs/
|
|
130
|
-
"lastUpdated": "2026-02-
|
|
129
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d1976a2aa03cd95d96c9c",
|
|
130
|
+
"lastUpdated": "2026-02-12T00:06:25.205Z"
|
|
131
131
|
},
|
|
132
132
|
"z_flake-noredraw-nocache.test.mjs": {
|
|
133
|
-
"url": "https://console.testdriver.ai/runs/
|
|
134
|
-
"lastUpdated": "2026-02-
|
|
133
|
+
"url": "https://console.testdriver.ai/runs/698d1527a2aa03cd95d96a2b/698d190ca2aa03cd95d96c8a",
|
|
134
|
+
"lastUpdated": "2026-02-12T00:06:25.205Z"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
package/docs/v7/assert.mdx
CHANGED
|
@@ -13,6 +13,7 @@ Make AI-powered assertions about the current screen state using natural language
|
|
|
13
13
|
|
|
14
14
|
```javascript
|
|
15
15
|
await testdriver.assert(assertion)
|
|
16
|
+
await testdriver.assert(assertion, options)
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
## Parameters
|
|
@@ -21,6 +22,36 @@ await testdriver.assert(assertion)
|
|
|
21
22
|
Natural language description of what should be true
|
|
22
23
|
</ParamField>
|
|
23
24
|
|
|
25
|
+
<ParamField path="options" type="object">
|
|
26
|
+
Optional configuration
|
|
27
|
+
|
|
28
|
+
<Expandable title="properties">
|
|
29
|
+
<ParamField path="ai" type="object">
|
|
30
|
+
AI sampling configuration for this assert call (overrides global `ai` config from constructor).
|
|
31
|
+
|
|
32
|
+
<Expandable title="properties">
|
|
33
|
+
<ParamField path="temperature" type="number">
|
|
34
|
+
Controls randomness. `0` = deterministic, higher = more creative. Default: model default.
|
|
35
|
+
</ParamField>
|
|
36
|
+
|
|
37
|
+
<ParamField path="top" type="object">
|
|
38
|
+
Sampling parameters
|
|
39
|
+
|
|
40
|
+
<Expandable title="properties">
|
|
41
|
+
<ParamField path="p" type="number">
|
|
42
|
+
Top-P (nucleus sampling). Range: 0-1.
|
|
43
|
+
</ParamField>
|
|
44
|
+
|
|
45
|
+
<ParamField path="k" type="number">
|
|
46
|
+
Top-K sampling. `1` = most deterministic.
|
|
47
|
+
</ParamField>
|
|
48
|
+
</Expandable>
|
|
49
|
+
</ParamField>
|
|
50
|
+
</Expandable>
|
|
51
|
+
</ParamField>
|
|
52
|
+
</Expandable>
|
|
53
|
+
</ParamField>
|
|
54
|
+
|
|
24
55
|
## Returns
|
|
25
56
|
|
|
26
57
|
`Promise<boolean>` - `true` if assertion passes, throws error if assertion fails
|
package/docs/v7/client.mdx
CHANGED
|
@@ -52,6 +52,30 @@ const testdriver = new TestDriver(apiKey, options)
|
|
|
52
52
|
<ParamField path="environment" type="object">
|
|
53
53
|
Additional environment variables to pass to the sandbox
|
|
54
54
|
</ParamField>
|
|
55
|
+
|
|
56
|
+
<ParamField path="ai" type="object">
|
|
57
|
+
Global AI sampling configuration. Controls how the AI model generates responses for `find()` verification and `assert()` calls. Can be overridden per call.
|
|
58
|
+
|
|
59
|
+
<Expandable title="properties">
|
|
60
|
+
<ParamField path="temperature" type="number">
|
|
61
|
+
Controls randomness in AI responses. `0` = deterministic (best for verification), higher values = more creative. Default: `0` for find verification, model default for assert.
|
|
62
|
+
</ParamField>
|
|
63
|
+
|
|
64
|
+
<ParamField path="top" type="object">
|
|
65
|
+
Nucleus and top-k sampling parameters
|
|
66
|
+
|
|
67
|
+
<Expandable title="properties">
|
|
68
|
+
<ParamField path="p" type="number">
|
|
69
|
+
Top-P (nucleus sampling). Limits token choices to the smallest set whose cumulative probability exceeds P. Lower values = more focused responses. Range: 0-1.
|
|
70
|
+
</ParamField>
|
|
71
|
+
|
|
72
|
+
<ParamField path="k" type="number">
|
|
73
|
+
Top-K sampling. Limits token choices to the top K most likely tokens. `1` = always pick the most likely token. `0` = disabled (consider all tokens).
|
|
74
|
+
</ParamField>
|
|
75
|
+
</Expandable>
|
|
76
|
+
</ParamField>
|
|
77
|
+
</Expandable>
|
|
78
|
+
</ParamField>
|
|
55
79
|
</Expandable>
|
|
56
80
|
</ParamField>
|
|
57
81
|
|
|
@@ -68,6 +92,11 @@ const testdriver = new TestDriver({
|
|
|
68
92
|
analytics: true
|
|
69
93
|
});
|
|
70
94
|
|
|
95
|
+
// With AI config for stricter verification
|
|
96
|
+
const testdriver = new TestDriver({
|
|
97
|
+
ai: { temperature: 0, top: { p: 0.9, k: 40 } }
|
|
98
|
+
});
|
|
99
|
+
|
|
71
100
|
// Or pass API key explicitly
|
|
72
101
|
const testdriver = new TestDriver('your-api-key', {
|
|
73
102
|
os: 'windows'
|
package/docs/v7/examples/ai.mdx
CHANGED
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* ai.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1763a2aa03cd95d96bae/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* assert.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d16d4a2aa03cd95d96b60/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* captcha-api.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d16cfa2aa03cd95d96b57/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* chrome-extension.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d15eea2aa03cd95d96ac8/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* drag-and-drop.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1528a2aa03cd95d96a2c/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* element-not-found.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1705a2aa03cd95d96b79/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* hover-image.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d15dfa2aa03cd95d96abd/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* hover-text.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1724a2aa03cd95d96b8d/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* installer.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1640a2aa03cd95d96af3/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* launch-vscode-linux.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d15eda2aa03cd95d96ac7/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* match-image.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d152ba2aa03cd95d96a34/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* press-keys.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d16aca2aa03cd95d96b40/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll-keyboard.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d169fa2aa03cd95d96b35/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll-until-image.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d16ada2aa03cd95d96b42/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll-until-text.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1590a2aa03cd95d96a82/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* scroll.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d164ca2aa03cd95d96afc/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* type.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1665a2aa03cd95d96b08/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* windows-installer.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698d1591a2aa03cd95d96a84/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
package/docs/v7/find.mdx
CHANGED
|
@@ -41,6 +41,30 @@ const element = await testdriver.find(description, options)
|
|
|
41
41
|
<ParamField path="zoom" type="boolean" default={false}>
|
|
42
42
|
Enable two-phase zoom mode for better precision in crowded UIs with many similar elements.
|
|
43
43
|
</ParamField>
|
|
44
|
+
|
|
45
|
+
<ParamField path="ai" type="object">
|
|
46
|
+
AI sampling configuration for this find call (overrides global `ai` config from constructor).
|
|
47
|
+
|
|
48
|
+
<Expandable title="properties">
|
|
49
|
+
<ParamField path="temperature" type="number">
|
|
50
|
+
Controls randomness. `0` = deterministic. Default: `0` for find verification.
|
|
51
|
+
</ParamField>
|
|
52
|
+
|
|
53
|
+
<ParamField path="top" type="object">
|
|
54
|
+
Sampling parameters
|
|
55
|
+
|
|
56
|
+
<Expandable title="properties">
|
|
57
|
+
<ParamField path="p" type="number">
|
|
58
|
+
Top-P (nucleus sampling). Range: 0-1.
|
|
59
|
+
</ParamField>
|
|
60
|
+
|
|
61
|
+
<ParamField path="k" type="number">
|
|
62
|
+
Top-K sampling. `1` = most deterministic.
|
|
63
|
+
</ParamField>
|
|
64
|
+
</Expandable>
|
|
65
|
+
</ParamField>
|
|
66
|
+
</Expandable>
|
|
67
|
+
</ParamField>
|
|
44
68
|
</Expandable>
|
|
45
69
|
</ParamField>
|
|
46
70
|
|