testdriverai 7.3.5 → 7.3.6

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/docs/_data/examples-manifest.json +50 -50
  3. package/docs/v7/examples/ai.mdx +1 -1
  4. package/docs/v7/examples/assert.mdx +1 -1
  5. package/docs/v7/examples/captcha-api.mdx +1 -1
  6. package/docs/v7/examples/chrome-extension.mdx +1 -1
  7. package/docs/v7/examples/drag-and-drop.mdx +1 -1
  8. package/docs/v7/examples/element-not-found.mdx +1 -1
  9. package/docs/v7/examples/hover-image.mdx +1 -1
  10. package/docs/v7/examples/hover-text.mdx +1 -1
  11. package/docs/v7/examples/installer.mdx +1 -1
  12. package/docs/v7/examples/launch-vscode-linux.mdx +1 -1
  13. package/docs/v7/examples/match-image.mdx +1 -1
  14. package/docs/v7/examples/press-keys.mdx +1 -1
  15. package/docs/v7/examples/scroll-keyboard.mdx +1 -1
  16. package/docs/v7/examples/scroll-until-image.mdx +1 -1
  17. package/docs/v7/examples/scroll-until-text.mdx +1 -1
  18. package/docs/v7/examples/scroll.mdx +1 -1
  19. package/docs/v7/examples/type.mdx +1 -1
  20. package/docs/v7/examples/windows-installer.mdx +1 -1
  21. package/examples/ai.test.mjs +2 -1
  22. package/examples/assert.test.mjs +2 -2
  23. package/examples/captcha-api.test.mjs +3 -2
  24. package/examples/chrome-extension.test.mjs +3 -2
  25. package/examples/config.mjs +5 -0
  26. package/examples/drag-and-drop.test.mjs +2 -1
  27. package/examples/element-not-found.test.mjs +2 -1
  28. package/examples/exec-output.test.mjs +2 -1
  29. package/examples/exec-pwsh.test.mjs +2 -1
  30. package/examples/focus-window.test.mjs +2 -1
  31. package/examples/formatted-logging.test.mjs +2 -1
  32. package/examples/hover-image.test.mjs +2 -1
  33. package/examples/hover-text-with-description.test.mjs +2 -1
  34. package/examples/hover-text.test.mjs +2 -1
  35. package/examples/installer.test.mjs +3 -2
  36. package/examples/launch-vscode-linux.test.mjs +3 -2
  37. package/examples/match-image.test.mjs +2 -1
  38. package/examples/no-provision.test.mjs +2 -3
  39. package/examples/press-keys.test.mjs +7 -13
  40. package/examples/prompt.test.mjs +2 -1
  41. package/examples/scroll-keyboard.test.mjs +2 -1
  42. package/examples/scroll-until-image.test.mjs +2 -1
  43. package/examples/scroll-until-text.test.mjs +2 -1
  44. package/examples/scroll.test.mjs +2 -1
  45. package/examples/type.test.mjs +3 -2
  46. package/examples/windows-installer.test.mjs +2 -1
  47. package/package.json +1 -1
  48. package/sdk.js +49 -38
  49. package/vitest.config.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.3.6](https://github.com/testdriverai/testdriverai/compare/v7.3.5...v7.3.6) (2026-02-10)
2
+
3
+
4
+
1
5
  ## [7.3.5](https://github.com/testdriverai/testdriverai/compare/v7.3.4...v7.3.5) (2026-02-07)
2
6
 
3
7
 
@@ -2,104 +2,104 @@
2
2
  "$schema": "./examples-manifest.schema.json",
3
3
  "examples": {
4
4
  "assert.test.mjs": {
5
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852cedeae78746d7ac0c25",
6
- "lastUpdated": "2026-02-06T00:04:27.031Z"
5
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d756513c6b23f858ee6",
6
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
7
7
  },
8
8
  "drag-and-drop.test.mjs": {
9
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/6985279beae78746d7ac0ba4",
10
- "lastUpdated": "2026-02-06T00:04:26.811Z"
9
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7bd411cc20acdd4ac828",
10
+ "lastUpdated": "2026-02-10T18:51:20.317Z"
11
11
  },
12
12
  "exec-pwsh.test.mjs": {
13
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/6985279ceae78746d7ac0ba6",
14
- "lastUpdated": "2026-02-06T00:04:26.811Z"
13
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7bd5297b1f49cee2a55f",
14
+ "lastUpdated": "2026-02-10T18:51:20.317Z"
15
15
  },
16
16
  "match-image.test.mjs": {
17
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/6985279eeae78746d7ac0ba7",
18
- "lastUpdated": "2026-02-06T00:04:26.811Z"
17
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7bd7297b1f49cee2a560",
18
+ "lastUpdated": "2026-02-10T18:51:20.317Z"
19
19
  },
20
20
  "scroll-until-text.test.mjs": {
21
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/698527ae57e74ea13445e9ca",
22
- "lastUpdated": "2026-02-06T00:04:26.811Z"
21
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7c4d4f24dc8fa701f5ba",
22
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
23
23
  },
24
24
  "hover-text-with-description.test.mjs": {
25
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/698528d157e74ea13445e9fc",
26
- "lastUpdated": "2026-02-06T00:04:26.812Z"
25
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7c4a11cc20acdd4ac838",
26
+ "lastUpdated": "2026-02-10T18:51:20.318Z"
27
27
  },
28
28
  "windows-installer.test.mjs": {
29
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852931eae78746d7ac0be6",
30
- "lastUpdated": "2026-02-06T00:04:26.812Z"
29
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7c4f4f24dc8fa701f5bb",
30
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
31
31
  },
32
32
  "exec-output.test.mjs": {
33
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/698528d257e74ea13445e9fd",
34
- "lastUpdated": "2026-02-06T00:04:26.812Z"
33
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7c504f24dc8fa701f5bc",
34
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
35
35
  },
36
36
  "chrome-extension.test.mjs": {
37
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852a34eae78746d7ac0bf0",
38
- "lastUpdated": "2026-02-06T00:04:27.030Z"
37
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7ca711cc20acdd4ac83d",
38
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
39
39
  },
40
40
  "launch-vscode-linux.test.mjs": {
41
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/698527b057e74ea13445e9ce",
42
- "lastUpdated": "2026-02-06T00:04:26.812Z"
41
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7cb811cc20acdd4ac83e",
42
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
43
43
  },
44
44
  "hover-image.test.mjs": {
45
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852a31b8ceaf4540e27312",
46
- "lastUpdated": "2026-02-06T00:04:27.029Z"
45
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7c9211cc20acdd4ac83c",
46
+ "lastUpdated": "2026-02-10T18:51:20.319Z"
47
47
  },
48
48
  "installer.test.mjs": {
49
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852932eae78746d7ac0be8",
50
- "lastUpdated": "2026-02-06T00:04:26.812Z"
49
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7ce511cc20acdd4ac844",
50
+ "lastUpdated": "2026-02-10T18:51:20.320Z"
51
51
  },
52
52
  "type.test.mjs": {
53
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852d10eae78746d7ac0c2e",
54
- "lastUpdated": "2026-02-06T00:04:27.031Z"
53
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d364f24dc8fa701f5e7",
54
+ "lastUpdated": "2026-02-10T18:51:20.321Z"
55
55
  },
56
56
  "press-keys.test.mjs": {
57
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852a8ab8ceaf4540e2732c",
58
- "lastUpdated": "2026-02-06T00:04:27.030Z"
57
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7cf911cc20acdd4ac84a",
58
+ "lastUpdated": "2026-02-10T18:51:20.321Z"
59
59
  },
60
60
  "scroll-keyboard.test.mjs": {
61
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852befeae78746d7ac0c11",
62
- "lastUpdated": "2026-02-06T00:04:27.030Z"
61
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d92297b1f49cee2a5b2",
62
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
63
63
  },
64
64
  "scroll.test.mjs": {
65
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852ba9b8ceaf4540e2733d",
66
- "lastUpdated": "2026-02-06T00:04:27.030Z"
65
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d39297b1f49cee2a5a7",
66
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
67
67
  },
68
68
  "scroll-until-image.test.mjs": {
69
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852cefeae78746d7ac0c27",
70
- "lastUpdated": "2026-02-06T00:04:27.031Z"
69
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d76297b1f49cee2a5b0",
70
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
71
71
  },
72
72
  "prompt.test.mjs": {
73
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852cf0eae78746d7ac0c28",
74
- "lastUpdated": "2026-02-06T00:04:27.031Z"
73
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d774f24dc8fa701f5f0",
74
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
75
75
  },
76
76
  "focus-window.test.mjs": {
77
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852cf1eae78746d7ac0c2a",
78
- "lastUpdated": "2026-02-06T00:04:27.031Z"
77
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7d794f24dc8fa701f5f1",
78
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
79
79
  },
80
80
  "captcha-api.test.mjs": {
81
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852e9db3d27441a2d96ed7",
82
- "lastUpdated": "2026-02-06T00:04:27.031Z"
81
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7da36513c6b23f858eee",
82
+ "lastUpdated": "2026-02-10T18:51:20.322Z"
83
83
  },
84
84
  "element-not-found.test.mjs": {
85
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852e57eae78746d7ac0c3f",
86
- "lastUpdated": "2026-02-06T00:04:27.031Z"
85
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7dd44f24dc8fa701f5fc",
86
+ "lastUpdated": "2026-02-10T18:51:20.323Z"
87
87
  },
88
88
  "formatted-logging.test.mjs": {
89
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852e1ceae78746d7ac0c39",
90
- "lastUpdated": "2026-02-06T00:04:27.031Z"
89
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7dd0297b1f49cee2a5b7",
90
+ "lastUpdated": "2026-02-10T18:51:20.323Z"
91
91
  },
92
92
  "hover-text.test.mjs": {
93
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852f8beae78746d7ac0c5e",
94
- "lastUpdated": "2026-02-06T00:04:27.032Z"
93
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7e186513c6b23f858efc",
94
+ "lastUpdated": "2026-02-10T18:51:20.324Z"
95
95
  },
96
96
  "no-provision.test.mjs": {
97
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852fd7eae78746d7ac0c66",
98
- "lastUpdated": "2026-02-06T00:04:27.032Z"
97
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7e024f24dc8fa701f601",
98
+ "lastUpdated": "2026-02-10T18:51:20.323Z"
99
99
  },
100
100
  "ai.test.mjs": {
101
- "url": "https://console.testdriver.ai/runs/6985263ceae78746d7ac0abf/69852f70eae78746d7ac0c56",
102
- "lastUpdated": "2026-02-06T00:04:27.032Z"
101
+ "url": "https://console.testdriver.ai/runs/698b7bd24f24dc8fa701f584/698b7e1e297b1f49cee2a5ba",
102
+ "lastUpdated": "2026-02-10T18:51:20.324Z"
103
103
  }
104
104
  }
105
105
  }
@@ -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/69852f70eae78746d7ac0c56/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7e1e297b1f49cee2a5ba/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/69852cedeae78746d7ac0c25/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7d756513c6b23f858ee6/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/69852e9db3d27441a2d96ed7/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7da36513c6b23f858eee/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/69852a34eae78746d7ac0bf0/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7ca711cc20acdd4ac83d/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/6985279beae78746d7ac0ba4/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7bd411cc20acdd4ac828/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/69852e57eae78746d7ac0c3f/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7dd44f24dc8fa701f5fc/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/69852a31b8ceaf4540e27312/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7c9211cc20acdd4ac83c/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/69852f8beae78746d7ac0c5e/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7e186513c6b23f858efc/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/69852932eae78746d7ac0be8/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7ce511cc20acdd4ac844/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/698527b057e74ea13445e9ce/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7cb811cc20acdd4ac83e/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/6985279eeae78746d7ac0ba7/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7bd7297b1f49cee2a560/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/69852a8ab8ceaf4540e2732c/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7cf911cc20acdd4ac84a/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/69852befeae78746d7ac0c11/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7d92297b1f49cee2a5b2/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/69852cefeae78746d7ac0c27/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7d76297b1f49cee2a5b0/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/698527ae57e74ea13445e9ca/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7c4d4f24dc8fa701f5ba/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/69852ba9b8ceaf4540e2733d/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7d39297b1f49cee2a5a7/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/69852d10eae78746d7ac0c2e/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7d364f24dc8fa701f5e7/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/69852931eae78746d7ac0be6/replay"
15
+ src="https://testdriver-api.onrender.com/api/v1/testdriver/testcase/698b7c4f4f24dc8fa701f5bb/replay"
16
16
  width="100%"
17
17
  height="390"
18
18
  style={{ border: "1px solid #333", borderRadius: "8px" }}
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("AI Test", () => {
10
11
  it("should use ai to search for testdriver on Google", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
12
13
 
13
14
  // provision.chrome() automatically calls ready() and starts dashcam
14
15
  await testdriver.provision.chrome({
@@ -5,12 +5,12 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Assert Test", () => {
10
11
  it("should assert the testdriver login page shows", async (context) => {
11
12
  const testdriver = TestDriver(context, {
12
- preview: 'ide',
13
- ip: context.ip || process.env.TD_IP,
13
+ ...getDefaults(context),
14
14
  });
15
15
 
16
16
  // provision.chrome() automatically calls ready() and starts dashcam
@@ -4,12 +4,13 @@
4
4
  */
5
5
  import { describe, expect, it } from "vitest";
6
6
  import { TestDriver } from "../lib/vitest/hooks.mjs";
7
+ import { getDefaults } from "./config.mjs";
7
8
 
8
9
  console.log("DEBUG: process.env.TD_OS:", process.env.TD_OS);
9
10
 
10
11
  describe("testdriver.captcha() API", () => {
11
12
  it("should solve reCAPTCHA v3 with auto-detect", async (context) => {
12
- const testdriver = TestDriver(context);
13
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
13
14
 
14
15
  // Launch Chrome (remote debugging is enabled automatically on Linux)
15
16
  await testdriver.provision.chrome({
@@ -30,7 +31,7 @@ describe("testdriver.captcha() API", () => {
30
31
  }, 180000);
31
32
 
32
33
  it("should solve Cloudflare Turnstile", async (context) => {
33
- const testdriver = TestDriver(context);
34
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
34
35
 
35
36
  await testdriver.provision.chrome({
36
37
  url: "https://2captcha.com/demo/cloudflare-turnstile",
@@ -9,13 +9,14 @@
9
9
 
10
10
  import { describe, expect, it } from "vitest";
11
11
  import { TestDriver } from "../lib/vitest/hooks.mjs";
12
+ import { getDefaults } from "./config.mjs";
12
13
 
13
14
  describe("Chrome Extension Test", () => {
14
15
  it("should load hello-world Chrome extension from local path", async (context) => {
15
16
 
16
17
  console.log('connecting to', process.env.TD_IP)
17
18
 
18
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, cacheKey: new Date().getTime().toString() });
19
+ const testdriver = TestDriver(context, { ...getDefaults(context), cacheKey: new Date().getTime().toString() });
19
20
 
20
21
  // Determine OS-specific paths and commands
21
22
  const shell = testdriver.os === 'windows' ? 'pwsh' : 'sh';
@@ -65,7 +66,7 @@ describe("Chrome Extension Test", () => {
65
66
  });
66
67
 
67
68
  it("should load Loom from Chrome Web Store by extensionId", async (context) => {
68
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
69
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
69
70
 
70
71
  // Launch Chrome with Loom loaded by its Chrome Web Store ID
71
72
  // Loom ID: liecbddmkiiihnedobmlmillhodjkdmb
@@ -0,0 +1,5 @@
1
+ export const getDefaults = (context) => ({
2
+ ip: context.ip || process.env.TD_IP,
3
+ redraw: false,
4
+ preview: 'ide',
5
+ });
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  const isLinux = (process.env.TD_OS || "linux") === "linux";
10
11
 
@@ -12,7 +13,7 @@ describe("Drag and Drop Test", () => {
12
13
  it.skipIf(isLinux)(
13
14
  'should drag "New Text Document" to "Recycle Bin"',
14
15
  async (context) => {
15
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
16
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
16
17
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
17
18
 
18
19
  //
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Element Not Found Test", () => {
10
11
  it("should handle non-existent element gracefully without timing out", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  //
@@ -5,12 +5,13 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe.skip("Exec Output Test", () => {
10
11
  it(
11
12
  "should set date using PowerShell and navigate to calendar",
12
13
  async (context) => {
13
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
14
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
14
15
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
16
 
16
17
  //
@@ -5,12 +5,13 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe.skip("Exec PowerShell Test", () => {
10
11
  it(
11
12
  "should generate random email using PowerShell and enter it",
12
13
  async (context) => {
13
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
14
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
14
15
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
16
 
16
17
  //
@@ -5,12 +5,13 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Focus Window Test", () => {
10
11
  it.skip(
11
12
  "should click Microsoft Edge icon and focus Google Chrome",
12
13
  async (context) => {
13
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
14
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
14
15
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
16
 
16
17
  //
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Formatted Logging Test", () => {
10
11
  it("should demonstrate formatted logs in dashcam replay", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  // Find and click - logs will be nicely formatted
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  /**
10
11
  * Perform login flow for SauceLabs demo app
@@ -27,7 +28,7 @@ async function performLogin(client, username = "standard_user") {
27
28
 
28
29
  describe("Hover Image Test", () => {
29
30
  it("should click on shopping cart icon and verify empty cart", async (context) => {
30
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, redraw: false });
31
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
31
32
 
32
33
  // provision.chrome() automatically calls ready() and starts dashcam
33
34
  await testdriver.provision.chrome({
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  /**
10
11
  * Perform login flow for SauceLabs demo app
@@ -26,7 +27,7 @@ async function performLogin(client, username = "standard_user") {
26
27
  describe("Hover Text With Description Test", () => {
27
28
  it("should add TestDriver Hat to cart and verify", async (context) => {
28
29
  const testdriver = TestDriver(context, {
29
- ip: context.ip || process.env.TD_IP,
30
+ ...getDefaults(context),
30
31
  headless: true,
31
32
  });
32
33
  await testdriver.provision.chrome({
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Hover Text Test", () => {
10
11
  it("should click Sign In and verify error message", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  // Click on Sign In button using new find() API
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  const isLinux = (process.env.TD_OS || "linux") === "linux";
10
11
 
@@ -12,7 +13,7 @@ describe("Provision Installer", () => {
12
13
  it.skipIf(!isLinux)(
13
14
  "should download and install a .deb package on Linux",
14
15
  async (context) => {
15
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
16
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
16
17
 
17
18
  // Install bat (a cat clone with syntax highlighting) using provision.installer
18
19
  const filePath = await testdriver.provision.installer({
@@ -30,7 +31,7 @@ describe("Provision Installer", () => {
30
31
  it.skipIf(!isLinux)(
31
32
  "should download a shell script and verify it exists",
32
33
  async (context) => {
33
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
34
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
34
35
 
35
36
  // Download a shell script (nvm installer)
36
37
  const filePath = await testdriver.provision.installer({
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import { TestDriver } from "../lib/vitest/hooks.mjs";
3
+ import { getDefaults } from "./config.mjs";
3
4
 
4
5
  const isLinux = (process.env.TD_OS || "linux") === "linux";
5
6
 
@@ -7,7 +8,7 @@ describe("Launch VS Code on Linux", () => {
7
8
  it.skipIf(!isLinux)(
8
9
  "should launch VS Code on Debian/Ubuntu",
9
10
  async (context) => {
10
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
11
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
11
12
 
12
13
  // provision.vscode() automatically calls ready() and starts dashcam
13
14
  await testdriver.provision.vscode();
@@ -24,7 +25,7 @@ describe("Launch VS Code on Linux", () => {
24
25
  it.skipIf(!isLinux)(
25
26
  "should install and use a VS Code extension",
26
27
  async (context) => {
27
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
28
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
28
29
 
29
30
  // Launch VS Code with the Prettier extension installed
30
31
  await testdriver.provision.vscode({
@@ -7,6 +7,7 @@ import path, { dirname } from "path";
7
7
  import { fileURLToPath } from "url";
8
8
  import { describe, expect, it } from "vitest";
9
9
  import { TestDriver } from "../lib/vitest/hooks.mjs";
10
+ import { getDefaults } from "./config.mjs";
10
11
 
11
12
  /**
12
13
  * Perform login flow for SauceLabs demo app
@@ -33,7 +34,7 @@ const __dirname = dirname(__filename);
33
34
 
34
35
  describe("Match Image Test", () => {
35
36
  it.skip("should match shopping cart image and verify empty cart", async (context) => {
36
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
37
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
37
38
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
38
39
 
39
40
  //
@@ -5,12 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Assert Test", () => {
10
11
  it("should assert the testdriver login page shows", async (context) => {
11
- const testdriver = TestDriver(context, {
12
- ip: context.ip || process.env.TD_IP,
13
- });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context) });
14
13
 
15
14
  // Assert the TestDriver.ai Sandbox login page is displayed
16
15
  const result = await testdriver.assert(
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Press Keys Test", () => {
10
11
  it("should create tabs and navigate using keyboard shortcuts", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  const signInButton = await testdriver.find(
@@ -20,23 +21,16 @@ describe("Press Keys Test", () => {
20
21
  await testdriver.pressKeys(["ctrl", "t"]);
21
22
 
22
23
  // Poll for "Learn more" to appear
23
- let learnMore = await testdriver.find("Learn more");
24
- for (let i = 0; i < 10; i++) {
25
- learnMore = await learnMore.find();
26
- if (learnMore.found()) break;
27
- await new Promise((resolve) => setTimeout(resolve, 500));
28
- }
24
+ let imagesLink = await testdriver.find("Images", {timeout: 5000});
25
+
26
+ expect(imagesLink.found()).toBeTruthy();
29
27
 
30
28
  // Open DevTools
31
29
  await testdriver.pressKeys(["ctrl", "shift", "i"]);
32
30
 
33
31
  // Poll for "Elements" to appear
34
- let elements = await testdriver.find("Elements");
35
- for (let i = 0; i < 10; i++) {
36
- elements = await elements.find();
37
- if (elements.found()) break;
38
- await new Promise((resolve) => setTimeout(resolve, 500));
39
- }
32
+ let elements = await testdriver.find("Elements", {timeout: 5000});
33
+ expect(elements.found()).toBeTruthy();
40
34
 
41
35
  // Open another tab and navigate
42
36
  await testdriver.pressKeys(["ctrl", "t"]);
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe.skip("Prompt Test", () => {
10
11
  it("should execute AI-driven prompts", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  //
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Scroll Keyboard Test", () => {
10
11
  it("should navigate to webhamster.com and scroll with keyboard", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  //
@@ -5,10 +5,11 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  describe("Scroll Until Image Test", () => {
10
11
  it.skip("should scroll until brown colored house image appears", async (context) => {
11
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
12
13
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
14
 
14
15
  //
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
  import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+ import { getDefaults } from "./config.mjs";
8
9
 
9
10
  /**
10
11
  * Perform login flow for SauceLabs demo app
@@ -27,7 +28,7 @@ async function performLogin(client, username = "standard_user") {
27
28
 
28
29
  describe("Scroll Until Text Test", () => {
29
30
  it('should scroll until "testdriver socks" appears', async (context) => {
30
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
31
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
31
32
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
32
33
 
33
34
  //
@@ -7,10 +7,11 @@
7
7
 
8
8
  import { describe, expect, it } from "vitest";
9
9
  import { TestDriver } from "../lib/vitest/hooks.mjs";
10
+ import { getDefaults } from "./config.mjs";
10
11
 
11
12
  describe("Scroll Test", () => {
12
13
  it("should navigate and scroll down the page", async (context) => {
13
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
14
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
14
15
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
16
 
16
17
  // Give Chrome a moment to fully render the UI
@@ -1,9 +1,10 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import { TestDriver } from "../lib/vitest/hooks.mjs";
3
+ import { getDefaults } from "./config.mjs";
3
4
 
4
5
  describe("Type Test", () => {
5
6
  it("should enter standard_user in username field", async (context) => {
6
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
7
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
7
8
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
8
9
 
9
10
  //
@@ -20,7 +21,7 @@ describe("Type Test", () => {
20
21
  });
21
22
 
22
23
  it("should show validation message when clicking Sign In without password", async (context) => {
23
- const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
24
+ const testdriver = TestDriver(context, { ...getDefaults(context), headless: true });
24
25
  await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
25
26
 
26
27
  // First fill in username
@@ -11,6 +11,7 @@
11
11
 
12
12
  import { describe, it } from "vitest";
13
13
  import { TestDriver } from "../lib/vitest/hooks.mjs";
14
+ import { getDefaults } from "./config.mjs";
14
15
 
15
16
  const isLinux = (process.env.TD_OS || "linux") === "linux";
16
17
 
@@ -19,7 +20,7 @@ describe("Windows App Installation", () => {
19
20
  it.skipIf(isLinux)("should download, install, and launch GitButler on Windows", async (context) => {
20
21
  // Alternative approach using provision.installer helper
21
22
  const testdriver = TestDriver(context, {
22
- ip: context.ip || process.env.TD_IP,
23
+ ...getDefaults(context),
23
24
  os: 'windows'
24
25
  });
25
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testdriverai",
3
- "version": "7.3.5",
3
+ "version": "7.3.6",
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",
package/sdk.js CHANGED
@@ -1567,6 +1567,51 @@ class TestDriverSDK {
1567
1567
  return "C:\\PROGRA~1\\nodejs\\node_modules\\dashcam-chrome\\build";
1568
1568
  }
1569
1569
 
1570
+ /**
1571
+ * Wait for Chrome DevTools Protocol debugger to be ready on port 9222,
1572
+ * then wait for a page to report loaded.
1573
+ * Works on both Windows (PowerShell) and Linux (sh).
1574
+ * @param {number} [timeoutMs=60000] - Maximum time to wait in ms
1575
+ * @returns {Promise<void>}
1576
+ */
1577
+ async _waitForChromeDebuggerReady(timeoutMs = 60000) {
1578
+ const shell = this.os === "windows" ? "pwsh" : "sh";
1579
+
1580
+ if (this.os === "windows") {
1581
+ // Wait for port 9222 to be listening
1582
+ await this.exec(
1583
+ shell,
1584
+ `$timeout = ${Math.floor(timeoutMs / 1000)}; $elapsed = 0; while ($elapsed -lt $timeout) { try { $tcp = New-Object System.Net.Sockets.TcpClient; $tcp.Connect('127.0.0.1', 9222); $tcp.Close(); break } catch { Start-Sleep -Milliseconds 200; $elapsed += 0.2 } }`,
1585
+ timeoutMs,
1586
+ true,
1587
+ );
1588
+
1589
+ // Wait for a page target to appear via CDP
1590
+ await this.exec(
1591
+ shell,
1592
+ `$timeout = ${Math.floor(timeoutMs / 1000)}; $elapsed = 0; while ($elapsed -lt $timeout) { try { $r = Invoke-RestMethod -Uri 'http://localhost:9222/json' -TimeoutSec 2; if ($r | Where-Object { $_.type -eq 'page' }) { break } } catch {} Start-Sleep -Milliseconds 500; $elapsed += 0.5 }`,
1593
+ timeoutMs,
1594
+ true,
1595
+ );
1596
+ } else {
1597
+ // Wait for port 9222 to be listening
1598
+ await this.exec(
1599
+ shell,
1600
+ `timeout=${Math.floor(timeoutMs / 1000)}; elapsed=0; while [ $elapsed -lt $timeout ]; do nc -z localhost 9222 && break; sleep 0.2; elapsed=$((elapsed + 1)); done`,
1601
+ timeoutMs,
1602
+ true,
1603
+ );
1604
+
1605
+ // Wait for a page target to appear via CDP
1606
+ await this.exec(
1607
+ shell,
1608
+ `timeout=${Math.floor(timeoutMs / 1000)}; elapsed=0; while [ $elapsed -lt $timeout ]; do curl -s http://localhost:9222/json 2>/dev/null | grep -q '"type": "page"' && break; sleep 0.5; elapsed=$((elapsed + 1)); done`,
1609
+ timeoutMs,
1610
+ true,
1611
+ );
1612
+ }
1613
+ }
1614
+
1570
1615
  _createProvisionAPI() {
1571
1616
  const self = this;
1572
1617
 
@@ -1691,31 +1736,9 @@ class TestDriverSDK {
1691
1736
  );
1692
1737
  }
1693
1738
 
1694
- // Wait for Chrome to be ready
1739
+ // Wait for Chrome debugger port and page to be ready
1740
+ await this._waitForChromeDebuggerReady();
1695
1741
  await this.focusApplication("Google Chrome");
1696
-
1697
- // Wait for URL to load
1698
- try {
1699
- const urlObj = new URL(url);
1700
- const domain = urlObj.hostname;
1701
-
1702
- for (let attempt = 0; attempt < 30; attempt++) {
1703
- const result = await this.find(`${domain}`);
1704
-
1705
- if (result.found()) {
1706
- break;
1707
- } else {
1708
- await new Promise((resolve) => setTimeout(resolve, 1000));
1709
- }
1710
- }
1711
-
1712
- await this.focusApplication("Google Chrome");
1713
- } catch (e) {
1714
- console.warn(
1715
- `[provision.chrome] ⚠️ Could not parse URL "${url}":`,
1716
- e.message,
1717
- );
1718
- }
1719
1742
  },
1720
1743
 
1721
1744
  /**
@@ -1977,20 +2000,8 @@ with zipfile.ZipFile(io.BytesIO(zip_data)) as zf:
1977
2000
  );
1978
2001
  }
1979
2002
 
1980
- // Wait for Chrome to be ready
1981
- await this.focusApplication("Google Chrome");
1982
-
1983
- // Wait for New Tab to appear
1984
- for (let attempt = 0; attempt < 30; attempt++) {
1985
- const result = await this.find("New Tab");
1986
-
1987
- if (result.found()) {
1988
- break;
1989
- } else {
1990
- await new Promise((resolve) => setTimeout(resolve, 1000));
1991
- }
1992
- }
1993
-
2003
+ // Wait for Chrome debugger port and page to be ready
2004
+ await this._waitForChromeDebuggerReady();
1994
2005
  await this.focusApplication("Google Chrome");
1995
2006
  },
1996
2007
 
package/vitest.config.mjs CHANGED
@@ -13,7 +13,7 @@ export default defineConfig({
13
13
  testTimeout: 900000,
14
14
  hookTimeout: 900000,
15
15
  disableConsoleIntercept: true,
16
- maxConcurrency: 3,
16
+ maxConcurrency: 100,
17
17
  reporters: [
18
18
  "default",
19
19
  TestDriver(),