testdriverai 7.9.3-test → 7.9.4-test
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/agent/lib/sandbox.js +28 -0
- package/docs/_data/examples-manifest.json +50 -46
- package/docs/docs.json +0 -2
- package/docs/v7/examples/ai.mdx +1 -1
- package/docs/v7/examples/assert.mdx +1 -1
- package/docs/v7/examples/chrome-extension.mdx +1 -1
- package/docs/v7/examples/element-not-found.mdx +1 -1
- package/docs/v7/examples/exec-output.mdx +1 -1
- package/docs/v7/examples/exec-pwsh.mdx +1 -1
- package/docs/v7/examples/findall-coffee-icons.mdx +1 -1
- package/docs/v7/examples/focus-window.mdx +1 -1
- package/docs/v7/examples/formatted-logging.mdx +1 -1
- package/docs/v7/examples/hover-image.mdx +1 -1
- package/docs/v7/examples/hover-text-with-description.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/parse.mdx +1 -1
- package/docs/v7/examples/press-keys.mdx +1 -1
- package/docs/v7/examples/prompt.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.mdx +1 -1
- package/docs/v7/examples/type.mdx +1 -1
- package/docs/v7/examples/windows-installer.mdx +1 -1
- package/lib/core/Dashcam.js +3 -1
- package/package.json +1 -1
- package/examples/formatted-logging.test.mjs +0 -27
- package/examples/match-image.test.mjs +0 -55
package/agent/lib/sandbox.js
CHANGED
|
@@ -374,6 +374,34 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
|
|
|
374
374
|
});
|
|
375
375
|
self._recoverFromDiscontinuity();
|
|
376
376
|
}
|
|
377
|
+
|
|
378
|
+
// When the channel is detached or failed (e.g. sandbox terminated — 404/90001),
|
|
379
|
+
// reject all pending promises immediately so callers don't hang for the full
|
|
380
|
+
// command timeout (up to 5 minutes for dashcam stop).
|
|
381
|
+
if (current === 'detached' || current === 'failed') {
|
|
382
|
+
var pendingIds = Object.keys(self.ps);
|
|
383
|
+
if (pendingIds.length > 0) {
|
|
384
|
+
logger.warn(
|
|
385
|
+
'[realtime] Channel ' + current + ' with ' + pendingIds.length +
|
|
386
|
+
' pending request(s) — rejecting immediately' +
|
|
387
|
+
(reasonMsg ? ' (reason: ' + reasonMsg + ')' : '')
|
|
388
|
+
);
|
|
389
|
+
var channelErr = new Error(
|
|
390
|
+
'Channel ' + current + (reasonMsg ? ': ' + reasonMsg : '') +
|
|
391
|
+
' — sandbox session may have terminated'
|
|
392
|
+
);
|
|
393
|
+
channelErr.name = 'NotFoundError';
|
|
394
|
+
if (reason && reason.code) channelErr.code = reason.code;
|
|
395
|
+
for (var pi = 0; pi < pendingIds.length; pi++) {
|
|
396
|
+
var entry = self.ps[pendingIds[pi]];
|
|
397
|
+
if (entry) {
|
|
398
|
+
delete self.ps[pendingIds[pi]];
|
|
399
|
+
delete self._execBuffers[pendingIds[pi]];
|
|
400
|
+
entry.reject(channelErr);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
377
405
|
});
|
|
378
406
|
}
|
|
379
407
|
|
|
@@ -2,104 +2,104 @@
|
|
|
2
2
|
"$schema": "./examples-manifest.schema.json",
|
|
3
3
|
"examples": {
|
|
4
4
|
"assert.test.mjs": {
|
|
5
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
6
|
-
"lastUpdated": "2026-03-
|
|
5
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739c14b73310c7839439",
|
|
6
|
+
"lastUpdated": "2026-03-29T00:50:11.415Z"
|
|
7
7
|
},
|
|
8
8
|
"drag-and-drop.test.mjs": {
|
|
9
9
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b42fc0ac3cc632a918b",
|
|
10
10
|
"lastUpdated": "2026-03-03T00:32:25.275Z"
|
|
11
11
|
},
|
|
12
12
|
"exec-pwsh.test.mjs": {
|
|
13
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
14
|
-
"lastUpdated": "2026-03-
|
|
13
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738a14b73310c783941a",
|
|
14
|
+
"lastUpdated": "2026-03-29T00:35:42.355Z"
|
|
15
15
|
},
|
|
16
16
|
"match-image.test.mjs": {
|
|
17
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
18
|
-
"lastUpdated": "2026-03-
|
|
17
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738c14b73310c783941d",
|
|
18
|
+
"lastUpdated": "2026-03-29T00:35:43.814Z"
|
|
19
19
|
},
|
|
20
20
|
"scroll-until-text.test.mjs": {
|
|
21
21
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b99dc33133fc0da9440",
|
|
22
22
|
"lastUpdated": "2026-03-03T00:32:25.282Z"
|
|
23
23
|
},
|
|
24
24
|
"hover-text-with-description.test.mjs": {
|
|
25
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
26
|
-
"lastUpdated": "2026-03-
|
|
25
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738e14b73310c7839420",
|
|
26
|
+
"lastUpdated": "2026-03-29T00:34:21.945Z"
|
|
27
27
|
},
|
|
28
28
|
"windows-installer.test.mjs": {
|
|
29
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
30
|
-
"lastUpdated": "2026-03-
|
|
29
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739114b73310c7839426",
|
|
30
|
+
"lastUpdated": "2026-03-29T00:35:48.909Z"
|
|
31
31
|
},
|
|
32
32
|
"exec-output.test.mjs": {
|
|
33
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
34
|
-
"lastUpdated": "2026-03-
|
|
33
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739214b73310c7839428",
|
|
34
|
+
"lastUpdated": "2026-03-29T00:35:50.433Z"
|
|
35
35
|
},
|
|
36
36
|
"chrome-extension.test.mjs": {
|
|
37
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
38
|
-
"lastUpdated": "2026-03-
|
|
37
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738914b73310c7839418",
|
|
38
|
+
"lastUpdated": "2026-03-29T00:34:58.656Z"
|
|
39
39
|
},
|
|
40
40
|
"launch-vscode-linux.test.mjs": {
|
|
41
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
42
|
-
"lastUpdated": "2026-03-
|
|
41
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738f14b73310c7839422",
|
|
42
|
+
"lastUpdated": "2026-03-29T00:40:45.704Z"
|
|
43
43
|
},
|
|
44
44
|
"hover-image.test.mjs": {
|
|
45
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
46
|
-
"lastUpdated": "2026-03-
|
|
45
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739414b73310c783942c",
|
|
46
|
+
"lastUpdated": "2026-03-29T00:35:11.252Z"
|
|
47
47
|
},
|
|
48
48
|
"installer.test.mjs": {
|
|
49
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
50
|
-
"lastUpdated": "2026-03-
|
|
49
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739614b73310c783942e",
|
|
50
|
+
"lastUpdated": "2026-03-29T00:34:30.327Z"
|
|
51
51
|
},
|
|
52
52
|
"type.test.mjs": {
|
|
53
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
54
|
-
"lastUpdated": "2026-03-
|
|
53
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739814b73310c7839433",
|
|
54
|
+
"lastUpdated": "2026-03-29T00:35:14.781Z"
|
|
55
55
|
},
|
|
56
56
|
"press-keys.test.mjs": {
|
|
57
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
58
|
-
"lastUpdated": "2026-03-
|
|
57
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739a14b73310c7839436",
|
|
58
|
+
"lastUpdated": "2026-03-29T00:49:07.133Z"
|
|
59
59
|
},
|
|
60
60
|
"scroll-keyboard.test.mjs": {
|
|
61
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
62
|
-
"lastUpdated": "2026-03-
|
|
61
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739f14b73310c783943c",
|
|
62
|
+
"lastUpdated": "2026-03-29T00:36:02.857Z"
|
|
63
63
|
},
|
|
64
64
|
"scroll.test.mjs": {
|
|
65
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
66
|
-
"lastUpdated": "2026-03-
|
|
65
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a614b73310c783944a",
|
|
66
|
+
"lastUpdated": "2026-03-29T00:54:25.718Z"
|
|
67
67
|
},
|
|
68
68
|
"scroll-until-image.test.mjs": {
|
|
69
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
70
|
-
"lastUpdated": "2026-03-
|
|
69
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a114b73310c783943e",
|
|
70
|
+
"lastUpdated": "2026-03-29T00:34:41.409Z"
|
|
71
71
|
},
|
|
72
72
|
"prompt.test.mjs": {
|
|
73
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
74
|
-
"lastUpdated": "2026-03-
|
|
73
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a214b73310c7839440",
|
|
74
|
+
"lastUpdated": "2026-03-29T00:36:05.984Z"
|
|
75
75
|
},
|
|
76
76
|
"focus-window.test.mjs": {
|
|
77
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
78
|
-
"lastUpdated": "2026-03-
|
|
77
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a414b73310c7839442",
|
|
78
|
+
"lastUpdated": "2026-03-29T00:34:44.624Z"
|
|
79
79
|
},
|
|
80
80
|
"captcha-api.test.mjs": {
|
|
81
81
|
"url": "https://console.testdriver.ai/runs/698f7df69e27ce1528d7d087/698f7fb0d3b320ad547d9d44",
|
|
82
82
|
"lastUpdated": "2026-02-13T19:55:05.951Z"
|
|
83
83
|
},
|
|
84
84
|
"element-not-found.test.mjs": {
|
|
85
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
86
|
-
"lastUpdated": "2026-03-
|
|
85
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a914b73310c7839451",
|
|
86
|
+
"lastUpdated": "2026-03-29T00:36:12.298Z"
|
|
87
87
|
},
|
|
88
88
|
"formatted-logging.test.mjs": {
|
|
89
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
90
|
-
"lastUpdated": "2026-03-
|
|
89
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a714b73310c7839450",
|
|
90
|
+
"lastUpdated": "2026-03-29T00:36:10.628Z"
|
|
91
91
|
},
|
|
92
92
|
"hover-text.test.mjs": {
|
|
93
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
94
|
-
"lastUpdated": "2026-03-
|
|
93
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873ad14b73310c7839455",
|
|
94
|
+
"lastUpdated": "2026-03-29T00:34:52.886Z"
|
|
95
95
|
},
|
|
96
96
|
"no-provision.test.mjs": {
|
|
97
97
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62b7706a177a05bccd1cf",
|
|
98
98
|
"lastUpdated": "2026-03-03T00:32:25.279Z"
|
|
99
99
|
},
|
|
100
100
|
"ai.test.mjs": {
|
|
101
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
102
|
-
"lastUpdated": "2026-03-
|
|
101
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873ab14b73310c7839454",
|
|
102
|
+
"lastUpdated": "2026-03-29T00:58:59.287Z"
|
|
103
103
|
},
|
|
104
104
|
"popup-loading.test.mjs": {
|
|
105
105
|
"url": "https://console.testdriver.ai/runs/698bc89f7140c3fa7daaca8d/698bca7f7140c3fa7daacbf7",
|
|
@@ -134,12 +134,12 @@
|
|
|
134
134
|
"lastUpdated": "2026-02-13T19:55:05.953Z"
|
|
135
135
|
},
|
|
136
136
|
"findall-coffee-icons.test.mjs": {
|
|
137
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
138
|
-
"lastUpdated": "2026-03-
|
|
137
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8739e14b73310c783943b",
|
|
138
|
+
"lastUpdated": "2026-03-29T00:35:19.822Z"
|
|
139
139
|
},
|
|
140
140
|
"parse.test.mjs": {
|
|
141
|
-
"url": "https://console-test.testdriver.ai/runs/
|
|
142
|
-
"lastUpdated": "2026-03-
|
|
141
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873b014b73310c7839457",
|
|
142
|
+
"lastUpdated": "2026-03-29T00:36:19.092Z"
|
|
143
143
|
},
|
|
144
144
|
"flake-diffthreshold-001.test.mjs": {
|
|
145
145
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62bcafc0ac3cc632a91aa",
|
|
@@ -172,6 +172,10 @@
|
|
|
172
172
|
"flake-diffthreshold-01.test.mjs": {
|
|
173
173
|
"url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62bd0348bcf90ca081079",
|
|
174
174
|
"lastUpdated": "2026-03-03T00:32:25.283Z"
|
|
175
|
+
},
|
|
176
|
+
"exec-stream-logs.test.mjs": {
|
|
177
|
+
"url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873ae14b73310c7839456",
|
|
178
|
+
"lastUpdated": "2026-03-29T00:35:37.148Z"
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
}
|
package/docs/docs.json
CHANGED
|
@@ -34,13 +34,11 @@
|
|
|
34
34
|
"/v7/examples/exec-stream-logs",
|
|
35
35
|
"/v7/examples/findall-coffee-icons",
|
|
36
36
|
"/v7/examples/focus-window",
|
|
37
|
-
"/v7/examples/formatted-logging",
|
|
38
37
|
"/v7/examples/hover-image",
|
|
39
38
|
"/v7/examples/hover-text-with-description",
|
|
40
39
|
"/v7/examples/hover-text",
|
|
41
40
|
"/v7/examples/installer",
|
|
42
41
|
"/v7/examples/launch-vscode-linux",
|
|
43
|
-
"/v7/examples/match-image",
|
|
44
42
|
"/v7/examples/parse",
|
|
45
43
|
"/v7/examples/press-keys",
|
|
46
44
|
"/v7/examples/prompt",
|
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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873ab14b73310c7839454/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739c14b73310c7839439/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8738914b73310c7839418/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a914b73310c7839451/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
|
{/* exec-output.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739214b73310c7839428/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
|
{/* exec-pwsh.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8738a14b73310c783941a/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
18
18
|
|
|
19
19
|
{/* findall-coffee-icons.test.mjs output */}
|
|
20
20
|
<iframe
|
|
21
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
21
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739e14b73310c783943b/replay"
|
|
22
22
|
width="100%"
|
|
23
23
|
height="600"
|
|
24
24
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -12,7 +12,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
12
12
|
|
|
13
13
|
{/* focus-window.test.mjs output */}
|
|
14
14
|
<iframe
|
|
15
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a414b73310c7839442/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
17
17
|
|
|
18
18
|
{/* formatted-logging.test.mjs output */}
|
|
19
19
|
<iframe
|
|
20
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
20
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a714b73310c7839450/replay"
|
|
21
21
|
width="100%"
|
|
22
22
|
height="600"
|
|
23
23
|
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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739414b73310c783942c/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -18,7 +18,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
18
18
|
|
|
19
19
|
{/* hover-text-with-description.test.mjs output */}
|
|
20
20
|
<iframe
|
|
21
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
21
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8738e14b73310c7839420/replay"
|
|
22
22
|
width="100%"
|
|
23
23
|
height="600"
|
|
24
24
|
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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873ad14b73310c7839455/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739614b73310c783942e/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8738f14b73310c7839422/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8738c14b73310c783941d/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
17
17
|
|
|
18
18
|
{/* parse.test.mjs output */}
|
|
19
19
|
<iframe
|
|
20
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
20
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873b014b73310c7839457/replay"
|
|
21
21
|
width="100%"
|
|
22
22
|
height="600"
|
|
23
23
|
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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739a14b73310c7839436/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
|
@@ -17,7 +17,7 @@ Watch this test execute in a real sandbox environment:
|
|
|
17
17
|
|
|
18
18
|
{/* prompt.test.mjs output */}
|
|
19
19
|
<iframe
|
|
20
|
-
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
20
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a214b73310c7839440/replay"
|
|
21
21
|
width="100%"
|
|
22
22
|
height="600"
|
|
23
23
|
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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739f14b73310c783943c/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a114b73310c783943e/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c873a614b73310c783944a/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739814b73310c7839433/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://api-test.testdriver.ai/api/v1/testdriver/testcase/
|
|
15
|
+
src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69c8739114b73310c7839426/replay"
|
|
16
16
|
width="100%"
|
|
17
17
|
height="390"
|
|
18
18
|
style={{ border: "1px solid #333", borderRadius: "8px" }}
|
package/lib/core/Dashcam.js
CHANGED
|
@@ -430,10 +430,12 @@ class Dashcam {
|
|
|
430
430
|
this._log("debug", "Dashcam stop command output:", output);
|
|
431
431
|
} else {
|
|
432
432
|
// Linux/Mac with TD_API_ROOT
|
|
433
|
+
// Use 2>&1 to merge stderr into stdout so the replay URL is captured
|
|
434
|
+
// regardless of which stream the dashcam CLI writes it to.
|
|
433
435
|
const dashcamPath = await this._getDashcamPath();
|
|
434
436
|
output = await this.client.exec(
|
|
435
437
|
shell,
|
|
436
|
-
`TD_API_ROOT="${apiRoot}" "${dashcamPath}" stop`,
|
|
438
|
+
`TD_API_ROOT="${apiRoot}" "${dashcamPath}" stop 2>&1`,
|
|
437
439
|
300000,
|
|
438
440
|
process.env.TD_DEBUG == "true" ? false : true,
|
|
439
441
|
);
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Formatted Logging Demo
|
|
3
|
-
* Demonstrates nice Vitest-style formatted logs for Dashcam replay
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { describe, expect, it } from "vitest";
|
|
7
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
8
|
-
import { getDefaults } from "./config.mjs";
|
|
9
|
-
|
|
10
|
-
describe("Formatted Logging Test", () => {
|
|
11
|
-
it("should demonstrate formatted logs in dashcam replay", async (context) => {
|
|
12
|
-
const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
|
|
13
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
14
|
-
|
|
15
|
-
// Find and click - logs will be nicely formatted
|
|
16
|
-
const signInButton = await testdriver.find(
|
|
17
|
-
"Sign In, black button below the password field",
|
|
18
|
-
);
|
|
19
|
-
await signInButton.click();
|
|
20
|
-
|
|
21
|
-
// Assert - logs will show pass/fail with nice formatting
|
|
22
|
-
const result = await testdriver.assert(
|
|
23
|
-
"an error shows that fields are required",
|
|
24
|
-
);
|
|
25
|
-
expect(result).toBeTruthy();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TestDriver SDK - Match Image Test (Vitest)
|
|
3
|
-
* Converted from: testdriver/acceptance/match-image.yaml
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import path, { dirname } from "path";
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
8
|
-
import { describe, expect, it } from "vitest";
|
|
9
|
-
import { TestDriver } from "../lib/vitest/hooks.mjs";
|
|
10
|
-
import { getDefaults } from "./config.mjs";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Perform login flow for SauceLabs demo app
|
|
14
|
-
* @param {TestDriver} client - TestDriver client
|
|
15
|
-
* @param {string} username - Username (default: 'standard_user')
|
|
16
|
-
*/
|
|
17
|
-
async function performLogin(client, username = "standard_user") {
|
|
18
|
-
await client.focusApplication("Google Chrome");
|
|
19
|
-
const password = await client.extract("the password");
|
|
20
|
-
const usernameField = await client.find(
|
|
21
|
-
"username input",
|
|
22
|
-
);
|
|
23
|
-
await usernameField.click();
|
|
24
|
-
await client.type(username);
|
|
25
|
-
await client.pressKeys(["tab"]);
|
|
26
|
-
await client.type(password, { secret: true });
|
|
27
|
-
await client.pressKeys(["tab"]);
|
|
28
|
-
await client.pressKeys(["enter"]);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Get the directory of the current module
|
|
32
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
33
|
-
const __dirname = dirname(__filename);
|
|
34
|
-
|
|
35
|
-
describe("Match Image Test", () => {
|
|
36
|
-
it.skip("should match shopping cart image and verify empty cart", async (context) => {
|
|
37
|
-
const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
|
|
38
|
-
await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
|
|
39
|
-
|
|
40
|
-
//
|
|
41
|
-
// Perform login first
|
|
42
|
-
await performLogin(testdriver);
|
|
43
|
-
|
|
44
|
-
// Match and click the shopping cart icon
|
|
45
|
-
const cartImagePath = path.resolve(
|
|
46
|
-
__dirname,
|
|
47
|
-
"../../_testdriver/acceptance/screenshots/cart.png",
|
|
48
|
-
);
|
|
49
|
-
await testdriver.matchImage(cartImagePath, "click");
|
|
50
|
-
|
|
51
|
-
// Assert that you see an empty shopping cart
|
|
52
|
-
const result = await testdriver.assert("Your cart is empty");
|
|
53
|
-
expect(result).toBeTruthy();
|
|
54
|
-
});
|
|
55
|
-
});
|