testdriverai 7.9.39-test → 7.9.41-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/index.js CHANGED
@@ -494,65 +494,89 @@ class TestDriverAgent extends EventEmitter2 {
494
494
  );
495
495
  }
496
496
 
497
- try {
498
- let response;
499
-
500
- // "run" and "if" commands are special meta commands
501
- // that change the flow of execution
502
- if (command.command == "run") {
503
- response = await this.embed(command.file, depth, pushToHistory);
504
- } else if (command.command == "if") {
505
- response = await this.iffy(
506
- command.condition,
507
- command.then,
508
- command.else,
509
- depth,
510
- );
511
- } else {
512
- response = await this.commander.run(command, depth);
513
- }
497
+ const sentry = require("../lib/sentry");
498
+ return sentry.withSpan(
499
+ {
500
+ name: `command.${commandName}`,
501
+ op: "command",
502
+ attributes: { "command.name": commandName, "command.depth": depth },
503
+ },
504
+ async (span) => {
505
+ try {
506
+ let response;
507
+
508
+ // "run" and "if" commands are special meta commands
509
+ // that change the flow of execution
510
+ if (command.command == "run") {
511
+ response = await this.embed(command.file, depth, pushToHistory);
512
+ } else if (command.command == "if") {
513
+ response = await this.iffy(
514
+ command.condition,
515
+ command.then,
516
+ command.else,
517
+ depth,
518
+ );
519
+ } else {
520
+ response = await this.commander.run(command, depth);
521
+ }
514
522
 
515
- const endTime = Date.now();
516
- const duration = endTime - startTime;
523
+ const endTime = Date.now();
524
+ const duration = endTime - startTime;
517
525
 
518
- // Emit command success event with source mapping
519
- this.emitter.emit(events.command.success, {
520
- command: commandName,
521
- depth,
522
- data: command,
523
- duration,
524
- response,
525
- timestamp: endTime,
526
- sourcePosition: sourcePosition,
527
- });
526
+ if (span) {
527
+ span.setStatus({ code: 1 }); // OK
528
+ }
528
529
 
529
- // if the result of a command contains more commands, we perform the process again
530
- if (response && typeof response === "string") {
531
- return await this.actOnMarkdown(response, depth, false, false, false);
532
- }
533
- } catch (error) {
534
- const endTime = Date.now();
535
- const duration = endTime - startTime;
530
+ // Emit command success event with source mapping
531
+ this.emitter.emit(events.command.success, {
532
+ command: commandName,
533
+ depth,
534
+ data: command,
535
+ duration,
536
+ response,
537
+ timestamp: endTime,
538
+ sourcePosition: sourcePosition,
539
+ });
536
540
 
537
- // Emit command error event with source mapping
538
- this.emitter.emit(events.command.error, {
539
- command: commandName,
540
- depth,
541
- data: command,
542
- error: error.message,
543
- duration,
544
- timestamp: endTime,
545
- sourcePosition: sourcePosition,
546
- });
541
+ // if the result of a command contains more commands, we perform the process again
542
+ if (response && typeof response === "string") {
543
+ return await this.actOnMarkdown(
544
+ response,
545
+ depth,
546
+ false,
547
+ false,
548
+ false,
549
+ );
550
+ }
551
+ } catch (error) {
552
+ const endTime = Date.now();
553
+ const duration = endTime - startTime;
547
554
 
548
- return await this.haveAIResolveError(
549
- error,
550
- yaml.dump({ commands: [yml] }),
551
- depth,
552
- true,
553
- shouldSave,
554
- );
555
- }
555
+ if (span) {
556
+ span.setStatus({ code: 2, message: error.message });
557
+ }
558
+
559
+ // Emit command error event with source mapping
560
+ this.emitter.emit(events.command.error, {
561
+ command: commandName,
562
+ depth,
563
+ data: command,
564
+ error: error.message,
565
+ duration,
566
+ timestamp: endTime,
567
+ sourcePosition: sourcePosition,
568
+ });
569
+
570
+ return await this.haveAIResolveError(
571
+ error,
572
+ yaml.dump({ commands: [yml] }),
573
+ depth,
574
+ true,
575
+ shouldSave,
576
+ );
577
+ }
578
+ },
579
+ );
556
580
  }
557
581
 
558
582
  async executeCommands(
@@ -1230,9 +1230,11 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
1230
1230
  startTime: Date.now(),
1231
1231
  };
1232
1232
 
1233
- if (message.type === "output") {
1234
- p.catch(function () { });
1235
- }
1233
+ // Prevent unhandled rejections from late Ably responses that arrive
1234
+ // after the caller has moved on (e.g. test retry, cleanup). The await
1235
+ // chain still receives the rejection; this just marks the promise as
1236
+ // "handled" so Node does not emit unhandledRejection.
1237
+ p.catch(function () { });
1236
1238
 
1237
1239
  this._throttledPublish(this._sessionChannel, "command", message)
1238
1240
  .then(function () {
@@ -1467,6 +1469,18 @@ const createSandbox = function (emitter, analytics, sessionInstance) {
1467
1469
  this.authenticated = false;
1468
1470
  this.instance = null;
1469
1471
  this._lastConnectParams = null;
1472
+
1473
+ // Reject all pending promises so active callers get a clear error
1474
+ // instead of hanging forever. The safety .catch() in _sendAbly()
1475
+ // ensures these rejections never surface as unhandled.
1476
+ var pendingIds = Object.keys(this.ps);
1477
+ var closedError = new Error('Sandbox connection closed');
1478
+ for (var i = 0; i < pendingIds.length; i++) {
1479
+ var entry = this.ps[pendingIds[i]];
1480
+ if (entry && typeof entry.reject === 'function') {
1481
+ try { entry.reject(closedError); } catch (_) { /* already settled */ }
1482
+ }
1483
+ }
1470
1484
  this.ps = {};
1471
1485
  }
1472
1486
 
package/agent/lib/sdk.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const { events } = require("../events");
2
2
  const { getSentryTraceHeaders } = require("./http");
3
+ const sentry = require("../../lib/sentry");
3
4
 
4
5
  // get the version from package.json
5
6
  const { version } = require("../../package.json");
@@ -20,6 +21,7 @@ const DEFAULT_RETRY_CONFIG = {
20
21
  'ENOTFOUND',
21
22
  'ENETUNREACH',
22
23
  'ERR_NETWORK',
24
+ 'ERR_BAD_RESPONSE',
23
25
  'ECONNABORTED',
24
26
  'EPIPE',
25
27
  'EAI_AGAIN',
@@ -35,14 +37,7 @@ const DEFAULT_RETRY_CONFIG = {
35
37
  * @returns {boolean} Whether the request should be retried
36
38
  */
37
39
  function isRetryableError(error, config = DEFAULT_RETRY_CONFIG) {
38
- // Network-level errors (no response received)
39
- if (!error.response) {
40
- return config.retryableNetworkCodes.includes(error.code);
41
- }
42
-
43
- // HTTP status code based retries
44
- const status = error.response?.status;
45
- return config.retryableStatusCodes.includes(status);
40
+ return true;
46
41
  }
47
42
 
48
43
  /**
@@ -102,6 +97,18 @@ async function withRetry(fn, options = {}) {
102
97
 
103
98
  const delayMs = calculateRetryDelay(attempt, error, config);
104
99
 
100
+ // Log retry errors to Sentry for visibility
101
+ sentry.captureException(error, {
102
+ tags: { phase: 'retry', attempt: attempt + 1 },
103
+ extra: {
104
+ maxRetries: config.maxRetries,
105
+ delayMs,
106
+ code: error.code,
107
+ status: error.response?.status,
108
+ url: error.config?.url?.replace(/X-Amz-\w+=[\w%]+/g, 'X-Amz-***=REDACTED'),
109
+ },
110
+ });
111
+
105
112
  // Call onRetry callback if provided
106
113
  if (options.onRetry) {
107
114
  options.onRetry(attempt + 1, error, delayMs);
@@ -46,7 +46,7 @@ const createSystem = (emitter, sandbox, config) => {
46
46
  timeout: 10000,
47
47
  }),
48
48
  {
49
- retryConfig: { maxRetries: 5, baseDelayMs: 1000 },
49
+ retryConfig: { maxRetries: 3, baseDelayMs: 1000 },
50
50
  },
51
51
  );
52
52
 
@@ -2,16 +2,16 @@
2
2
  "$schema": "./examples-manifest.schema.json",
3
3
  "examples": {
4
4
  "assert.test.mjs": {
5
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e0c0ec56e77d2d2b48",
6
- "lastUpdated": "2026-04-09T00:47:56.308Z"
5
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84576d5b12767ca15e3d2",
6
+ "lastUpdated": "2026-04-10T00:51:33.963Z"
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/69d6f2cec0ec56e77d2d2b3a/69d6f2d1c0ec56e77d2d2b3c",
14
- "lastUpdated": "2026-04-09T00:30:09.363Z"
13
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84560d5b12767ca15e3c6",
14
+ "lastUpdated": "2026-04-10T00:35:14.640Z"
15
15
  },
16
16
  "match-image.test.mjs": {
17
17
  "url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c8738c14b73310c783941d",
@@ -22,84 +22,84 @@
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/69d6f2cec0ec56e77d2d2b3a/69d6f2d3c0ec56e77d2d2b3d",
26
- "lastUpdated": "2026-04-09T00:29:07.375Z"
25
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84563d5b12767ca15e3c7",
26
+ "lastUpdated": "2026-04-10T00:33:38.923Z"
27
27
  },
28
28
  "windows-installer.test.mjs": {
29
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2d6c0ec56e77d2d2b40",
30
- "lastUpdated": "2026-04-09T00:30:14.179Z"
29
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84568d5b12767ca15e3ca",
30
+ "lastUpdated": "2026-04-10T00:35:21.576Z"
31
31
  },
32
32
  "exec-output.test.mjs": {
33
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2d7c0ec56e77d2d2b41",
34
- "lastUpdated": "2026-04-09T00:30:15.528Z"
33
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456ad5b12767ca15e3cb",
34
+ "lastUpdated": "2026-04-10T00:35:23.589Z"
35
35
  },
36
36
  "chrome-extension.test.mjs": {
37
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2d0c0ec56e77d2d2b3b",
38
- "lastUpdated": "2026-04-09T00:29:36.485Z"
37
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8455ed5b12767ca15e3c5",
38
+ "lastUpdated": "2026-04-10T00:34:24.409Z"
39
39
  },
40
40
  "launch-vscode-linux.test.mjs": {
41
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2d5c0ec56e77d2d2b3e",
42
- "lastUpdated": "2026-04-09T00:37:50.393Z"
41
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84565d5b12767ca15e3c8",
42
+ "lastUpdated": "2026-04-10T00:41:22.597Z"
43
43
  },
44
44
  "hover-image.test.mjs": {
45
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2d9c0ec56e77d2d2b42",
46
- "lastUpdated": "2026-04-09T00:29:45.158Z"
45
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456cd5b12767ca15e3cc",
46
+ "lastUpdated": "2026-04-10T00:34:37.536Z"
47
47
  },
48
48
  "installer.test.mjs": {
49
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2dbc0ec56e77d2d2b43",
50
- "lastUpdated": "2026-04-09T00:29:14.938Z"
49
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8456fd5b12767ca15e3cd",
50
+ "lastUpdated": "2026-04-10T00:33:50.808Z"
51
51
  },
52
52
  "type.test.mjs": {
53
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2dcc0ec56e77d2d2b46",
54
- "lastUpdated": "2026-04-09T00:29:48.386Z"
53
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84572d5b12767ca15e3d0",
54
+ "lastUpdated": "2026-04-10T00:34:42.548Z"
55
55
  },
56
56
  "press-keys.test.mjs": {
57
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2dec0ec56e77d2d2b47",
58
- "lastUpdated": "2026-04-09T00:46:49.783Z"
57
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84574d5b12767ca15e3d1",
58
+ "lastUpdated": "2026-04-10T00:50:25.456Z"
59
59
  },
60
60
  "scroll-keyboard.test.mjs": {
61
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e3c0ec56e77d2d2b4a",
62
- "lastUpdated": "2026-04-09T00:30:27.053Z"
61
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8457bd5b12767ca15e3d4",
62
+ "lastUpdated": "2026-04-10T00:35:39.270Z"
63
63
  },
64
64
  "scroll.test.mjs": {
65
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e8c0ec56e77d2d2b4e",
66
- "lastUpdated": "2026-04-09T00:55:13.692Z"
65
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84584d5b12767ca15e3d8",
66
+ "lastUpdated": "2026-04-10T00:56:48.320Z"
67
67
  },
68
68
  "scroll-until-image.test.mjs": {
69
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e4c0ec56e77d2d2b4b",
70
- "lastUpdated": "2026-04-09T00:29:24.528Z"
69
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8457dd5b12767ca15e3d5",
70
+ "lastUpdated": "2026-04-10T00:34:06.264Z"
71
71
  },
72
72
  "prompt.test.mjs": {
73
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e5c0ec56e77d2d2b4c",
74
- "lastUpdated": "2026-04-09T00:30:29.837Z"
73
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84580d5b12767ca15e3d6",
74
+ "lastUpdated": "2026-04-10T00:35:44.027Z"
75
75
  },
76
76
  "focus-window.test.mjs": {
77
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2e7c0ec56e77d2d2b4d",
78
- "lastUpdated": "2026-04-09T00:29:27.218Z"
77
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84582d5b12767ca15e3d7",
78
+ "lastUpdated": "2026-04-10T00:34:10.512Z"
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/69d6f2cec0ec56e77d2d2b3a/69d6f2eac0ec56e77d2d2b4f",
86
- "lastUpdated": "2026-04-09T00:30:34.117Z"
85
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84587d5b12767ca15e3d9",
86
+ "lastUpdated": "2026-04-10T00:35:49.919Z"
87
87
  },
88
88
  "formatted-logging.test.mjs": {
89
89
  "url": "https://console-test.testdriver.ai/runs/69c8738614b73310c7839412/69c873a714b73310c7839450",
90
90
  "lastUpdated": "2026-03-29T00:36:10.628Z"
91
91
  },
92
92
  "hover-text.test.mjs": {
93
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2edc0ec56e77d2d2b51",
94
- "lastUpdated": "2026-04-09T00:29:33.199Z"
93
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8458bd5b12767ca15e3db",
94
+ "lastUpdated": "2026-04-10T00:34:19.364Z"
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/69d6f2cec0ec56e77d2d2b3a/69d6f2ebc0ec56e77d2d2b50",
102
- "lastUpdated": "2026-04-09T00:58:39.073Z"
101
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84589d5b12767ca15e3da",
102
+ "lastUpdated": "2026-04-10T01:00:48.870Z"
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/69d6f2cec0ec56e77d2d2b3a/69d6f2e1c0ec56e77d2d2b49",
138
- "lastUpdated": "2026-04-09T00:29:52.990Z"
137
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d84579d5b12767ca15e3d3",
138
+ "lastUpdated": "2026-04-10T00:34:49.549Z"
139
139
  },
140
140
  "parse.test.mjs": {
141
- "url": "https://console-test.testdriver.ai/runs/69d6f2cec0ec56e77d2d2b3a/69d6f2eec0ec56e77d2d2b52",
142
- "lastUpdated": "2026-04-09T00:30:38.622Z"
141
+ "url": "https://console-test.testdriver.ai/runs/69d8455cd5b12767ca15e3c4/69d8458ed5b12767ca15e3dc",
142
+ "lastUpdated": "2026-04-10T00:35:56.788Z"
143
143
  },
144
144
  "flake-diffthreshold-001.test.mjs": {
145
145
  "url": "https://console.testdriver.ai/runs/69a62b3aaa712ecd3dea730a/69a62bcafc0ac3cc632a91aa",
@@ -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/69d6f2ebc0ec56e77d2d2b50/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84589d5b12767ca15e3da/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/69d6f2e0c0ec56e77d2d2b48/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84576d5b12767ca15e3d2/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/69d6f2d0c0ec56e77d2d2b3b/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8455ed5b12767ca15e3c5/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/69d6f2eac0ec56e77d2d2b4f/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84587d5b12767ca15e3d9/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/69d6f2d7c0ec56e77d2d2b41/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456ad5b12767ca15e3cb/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/69d6f2d1c0ec56e77d2d2b3c/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84560d5b12767ca15e3c6/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/69d6f2e1c0ec56e77d2d2b49/replay"
21
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84579d5b12767ca15e3d3/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/69d6f2e7c0ec56e77d2d2b4d/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84582d5b12767ca15e3d7/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://api-test.testdriver.ai/api/v1/testdriver/testcase/69d6f2d9c0ec56e77d2d2b42/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456cd5b12767ca15e3cc/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/69d6f2d3c0ec56e77d2d2b3d/replay"
21
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84563d5b12767ca15e3c7/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/69d6f2edc0ec56e77d2d2b51/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8458bd5b12767ca15e3db/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/69d6f2dbc0ec56e77d2d2b43/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8456fd5b12767ca15e3cd/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/69d6f2d5c0ec56e77d2d2b3e/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84565d5b12767ca15e3c8/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/69d6f2eec0ec56e77d2d2b52/replay"
20
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8458ed5b12767ca15e3dc/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/69d6f2dec0ec56e77d2d2b47/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84574d5b12767ca15e3d1/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/69d6f2e5c0ec56e77d2d2b4c/replay"
20
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84580d5b12767ca15e3d6/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/69d6f2e3c0ec56e77d2d2b4a/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8457bd5b12767ca15e3d4/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/69d6f2e4c0ec56e77d2d2b4b/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d8457dd5b12767ca15e3d5/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/69d6f2e8c0ec56e77d2d2b4e/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84584d5b12767ca15e3d8/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/69d6f2dcc0ec56e77d2d2b46/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84572d5b12767ca15e3d0/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/69d6f2d6c0ec56e77d2d2b40/replay"
15
+ src="https://api-test.testdriver.ai/api/v1/testdriver/testcase/69d84568d5b12767ca15e3ca/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
package/lib/sentry.js CHANGED
@@ -414,6 +414,18 @@ function startTransaction(name, op = "cli") {
414
414
  return Sentry.startSpan({ name, op });
415
415
  }
416
416
 
417
+ /**
418
+ * Execute a callback within a Sentry performance span.
419
+ * If Sentry is not enabled, the callback is executed directly.
420
+ * @param {Object} options - Span options ({ name, op, attributes })
421
+ * @param {Function} callback - Async callback receiving the span
422
+ * @returns {Promise<*>} Result of the callback
423
+ */
424
+ async function withSpan(options, callback) {
425
+ if (!isEnabled()) return callback(null);
426
+ return Sentry.startSpan(options, callback);
427
+ }
428
+
417
429
  /**
418
430
  * Flush pending events before process exit
419
431
  * @param {number} timeout - Timeout in milliseconds
@@ -436,5 +448,6 @@ module.exports = {
436
448
  getTraceId,
437
449
  attachLogListeners,
438
450
  startTransaction,
451
+ withSpan,
439
452
  flush,
440
453
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "7.9.39-test",
3
+ "version": "7.9.41-test",
4
4
  "description": "Next generation autonomous AI agent for end-to-end testing of web & desktop",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",