testdriverai 7.2.9 → 7.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/testdriver.yml +127 -0
- package/.testdriver/last-sandbox +7 -0
- package/agent/events.js +1 -0
- package/agent/index.js +71 -54
- package/agent/lib/sandbox.js +11 -1
- package/agents.md +393 -0
- package/debug/01-table-initial.png +0 -0
- package/debug/02-after-ai-explore.png +0 -0
- package/debug/02-after-scroll.png +0 -0
- package/docs/docs.json +93 -125
- package/docs/v7/_drafts/caching.mdx +2 -2
- package/docs/v7/{getting-started → _drafts}/installation.mdx +0 -66
- package/docs/v7/{features/coverage.mdx → _drafts/powerful.mdx} +1 -90
- package/docs/v7/{features → _drafts}/scalable.mdx +126 -4
- package/docs/v7/_drafts/screenshot.mdx +155 -0
- package/docs/v7/_drafts/writing-tests.mdx +25 -0
- package/docs/v7/{api/act.mdx → ai.mdx} +27 -27
- package/docs/v7/{api/assert.mdx → assert.mdx} +3 -3
- package/docs/v7/aws-setup.mdx +338 -0
- package/docs/v7/caching.mdx +128 -0
- package/docs/v7/ci-cd.mdx +605 -0
- package/docs/v7/{api/click.mdx → click.mdx} +4 -4
- package/docs/v7/cloud.mdx +120 -0
- package/docs/v7/customizing-devices.mdx +129 -0
- package/docs/v7/{api/doubleClick.mdx → double-click.mdx} +5 -5
- package/docs/v7/enterprise.mdx +135 -0
- package/docs/v7/examples.mdx +5 -0
- package/docs/v7/{api/exec.mdx → exec.mdx} +3 -3
- package/docs/v7/{api/find.mdx → find.mdx} +17 -21
- package/docs/v7/{api/focusApplication.mdx → focus-application.mdx} +3 -3
- package/docs/v7/generating-tests.mdx +32 -0
- package/docs/v7/{api/hover.mdx → hover.mdx} +3 -3
- package/docs/v7/locating-elements.mdx +71 -0
- package/docs/v7/making-assertions.mdx +32 -0
- package/docs/v7/{api/mouseDown.mdx → mouse-down.mdx} +7 -7
- package/docs/v7/{api/mouseUp.mdx → mouse-up.mdx} +8 -8
- package/docs/v7/performing-actions.mdx +51 -0
- package/docs/v7/{api/pressKeys.mdx → press-keys.mdx} +3 -3
- package/docs/v7/quickstart.mdx +162 -0
- package/docs/v7/reusable-code.mdx +240 -0
- package/docs/v7/{api/rightClick.mdx → right-click.mdx} +5 -5
- package/docs/v7/running-tests.mdx +181 -0
- package/docs/v7/{api/scroll.mdx → scroll.mdx} +3 -3
- package/docs/v7/secrets.mdx +115 -0
- package/docs/v7/self-hosted.mdx +66 -0
- package/docs/v7/{api/type.mdx → type.mdx} +3 -3
- package/docs/v7/variables.mdx +111 -0
- package/docs/v7/waiting-for-elements.mdx +66 -0
- package/docs/v7/what-is-testdriver.mdx +54 -0
- package/lib/vitest/hooks.mjs +80 -68
- package/package.json +1 -1
- package/sdk.d.ts +22 -9
- package/sdk.js +177 -44
- package/test/manual/reconnect-provision.test.mjs +49 -0
- package/test/manual/reconnect-signin.test.mjs +41 -0
- package/test/testdriver/ai.test.mjs +30 -0
- package/test/testdriver/setup/testHelpers.mjs +0 -1
- package/test/testdriver/windows-installer.test.mjs +61 -0
- package/tests/table-sort-enrollments.test.mjs +72 -0
- package/tests/table-sort-experiment.test.mjs +42 -0
- package/tests/table-sort-setup.test.mjs +59 -0
- package/vitest.config.mjs +1 -0
- package/docs/v7/api/assertions.mdx +0 -403
- package/docs/v7/features/ai-native.mdx +0 -413
- package/docs/v7/features/application-logs.mdx +0 -353
- package/docs/v7/features/browser-logs.mdx +0 -414
- package/docs/v7/features/cache-management.mdx +0 -402
- package/docs/v7/features/continuous-testing.mdx +0 -346
- package/docs/v7/features/data-driven-testing.mdx +0 -441
- package/docs/v7/features/easy-to-write.mdx +0 -280
- package/docs/v7/features/enterprise.mdx +0 -656
- package/docs/v7/features/fast.mdx +0 -406
- package/docs/v7/features/managed-sandboxes.mdx +0 -384
- package/docs/v7/features/network-monitoring.mdx +0 -568
- package/docs/v7/features/parallel-execution.mdx +0 -381
- package/docs/v7/features/powerful.mdx +0 -531
- package/docs/v7/features/sandbox-customization.mdx +0 -229
- package/docs/v7/features/stable.mdx +0 -473
- package/docs/v7/features/system-performance.mdx +0 -616
- package/docs/v7/features/test-analytics.mdx +0 -373
- package/docs/v7/features/test-cases.mdx +0 -393
- package/docs/v7/features/test-replays.mdx +0 -408
- package/docs/v7/features/test-reports.mdx +0 -308
- package/docs/v7/getting-started/debugging-tests.mdx +0 -382
- package/docs/v7/getting-started/quickstart.mdx +0 -90
- package/docs/v7/getting-started/running-tests.mdx +0 -173
- package/docs/v7/getting-started/setting-up-in-ci.mdx +0 -612
- package/docs/v7/getting-started/writing-tests.mdx +0 -534
- package/docs/v7/overview/what-is-testdriver.mdx +0 -386
- package/docs/v7/presets/chrome-extension.mdx +0 -248
- package/docs/v7/presets/chrome.mdx +0 -300
- package/docs/v7/presets/electron.mdx +0 -460
- package/docs/v7/presets/vscode.mdx +0 -417
- package/docs/v7/presets/webapp.mdx +0 -393
- package/vitest.config.js +0 -18
- /package/docs/v7/{commands → _drafts/commands}/assert.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/exec.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/focus-application.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/hover-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/hover-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/if.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/match-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/press-keys.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/remember.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/run.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll-until-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll-until-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/scroll.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/type.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait-for-image.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait-for-text.mdx +0 -0
- /package/docs/v7/{commands → _drafts/commands}/wait.mdx +0 -0
- /package/docs/v7/{getting-started → _drafts}/configuration.mdx +0 -0
- /package/docs/v7/{features → _drafts}/observable.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/linux.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/macos.mdx +0 -0
- /package/docs/v7/{platforms → _drafts/platforms}/windows.mdx +0 -0
- /package/docs/v7/{playwright.mdx → _drafts/playwright.mdx} +0 -0
- /package/docs/v7/{overview → _drafts}/readme.mdx +0 -0
- /package/docs/v7/{features → _drafts}/reports.mdx +0 -0
- /package/docs/v7/{api/client.mdx → client.mdx} +0 -0
- /package/docs/v7/{api/dashcam.mdx → dashcam.mdx} +0 -0
- /package/docs/v7/{api/elements.mdx → elements.mdx} +0 -0
- /package/docs/v7/{api/sandbox.mdx → sandbox.mdx} +0 -0
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Browser Logs"
|
|
3
|
-
description: "Console output, JavaScript errors, and browser debugging information"
|
|
4
|
-
icon: "browser"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
View complete browser console output including JavaScript errors, warnings, info logs, and custom application logging from your tests.
|
|
8
|
-
|
|
9
|
-
## Browser Console Output
|
|
10
|
-
|
|
11
|
-
Access all browser console logs in test replays:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Browser Console:
|
|
15
|
-
┌────────────────────────────────────────────────────┐
|
|
16
|
-
│ [0:05] ℹ️ Application started v2.1.4 │
|
|
17
|
-
│ [0:08] ℹ️ API endpoint: https://api.example.com │
|
|
18
|
-
│ [0:12] ✓ User session initialized │
|
|
19
|
-
│ [0:15] ⚠️ Deprecated function used: getUserId() │
|
|
20
|
-
│ [0:18] ℹ️ Fetching user data... │
|
|
21
|
-
│ [0:22] ✓ User data loaded │
|
|
22
|
-
│ [0:25] ❌ TypeError: Cannot read property 'id' │
|
|
23
|
-
│ at UserProfile.render (app.js:234:15) │
|
|
24
|
-
│ [0:28] ⚠️ Re-rendering component │
|
|
25
|
-
│ [0:30] ℹ️ Navigation: /dashboard │
|
|
26
|
-
└────────────────────────────────────────────────────┘
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Log Types
|
|
30
|
-
|
|
31
|
-
Browser console captures all standard log levels:
|
|
32
|
-
|
|
33
|
-
<CardGroup cols={2}>
|
|
34
|
-
<Card title="console.log()" icon="circle-info" color="blue">
|
|
35
|
-
General information
|
|
36
|
-
- Application state
|
|
37
|
-
- Debug messages
|
|
38
|
-
- Custom logging
|
|
39
|
-
- Development info
|
|
40
|
-
</Card>
|
|
41
|
-
|
|
42
|
-
<Card title="console.info()" icon="info" color="cyan">
|
|
43
|
-
Informational messages
|
|
44
|
-
- API calls
|
|
45
|
-
- User actions
|
|
46
|
-
- State changes
|
|
47
|
-
- System events
|
|
48
|
-
</Card>
|
|
49
|
-
|
|
50
|
-
<Card title="console.warn()" icon="triangle-exclamation" color="yellow">
|
|
51
|
-
Warnings
|
|
52
|
-
- Deprecated APIs
|
|
53
|
-
- Performance issues
|
|
54
|
-
- Missing data
|
|
55
|
-
- Validation warnings
|
|
56
|
-
</Card>
|
|
57
|
-
|
|
58
|
-
<Card title="console.error()" icon="circle-xmark" color="red">
|
|
59
|
-
Errors
|
|
60
|
-
- JavaScript errors
|
|
61
|
-
- API failures
|
|
62
|
-
- Runtime exceptions
|
|
63
|
-
- Unhandled rejections
|
|
64
|
-
</Card>
|
|
65
|
-
|
|
66
|
-
<Card title="console.debug()" icon="bug" color="gray">
|
|
67
|
-
Debug information
|
|
68
|
-
- Detailed traces
|
|
69
|
-
- Internal state
|
|
70
|
-
- Development logs
|
|
71
|
-
- Verbose output
|
|
72
|
-
</Card>
|
|
73
|
-
|
|
74
|
-
<Card title="console.table()" icon="table" color="purple">
|
|
75
|
-
Tabular data
|
|
76
|
-
- Array display
|
|
77
|
-
- Object properties
|
|
78
|
-
- Data structures
|
|
79
|
-
- Formatted output
|
|
80
|
-
</Card>
|
|
81
|
-
</CardGroup>
|
|
82
|
-
|
|
83
|
-
## JavaScript Errors
|
|
84
|
-
|
|
85
|
-
Catch runtime errors and exceptions:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
JavaScript Errors:
|
|
89
|
-
┌────────────────────────────────────────────────────┐
|
|
90
|
-
│ [0:25] ❌ TypeError: Cannot read property 'id' │
|
|
91
|
-
│ │
|
|
92
|
-
│ Error Details: │
|
|
93
|
-
│ Type: TypeError │
|
|
94
|
-
│ Message: Cannot read property 'id' of undefined │
|
|
95
|
-
│ │
|
|
96
|
-
│ Stack Trace: │
|
|
97
|
-
│ at UserProfile.render (app.js:234:15) │
|
|
98
|
-
│ at App.renderProfile (app.js:56:8) │
|
|
99
|
-
│ at HTMLButtonElement.<anonymous> (app.js:42:12) │
|
|
100
|
-
│ │
|
|
101
|
-
│ Source Location: │
|
|
102
|
-
│ File: app.js │
|
|
103
|
-
│ Line: 234 │
|
|
104
|
-
│ Column: 15 │
|
|
105
|
-
│ │
|
|
106
|
-
│ Context: │
|
|
107
|
-
│ 232: renderProfile() { │
|
|
108
|
-
│ 233: const user = this.getUser(); │
|
|
109
|
-
│ 234: console.log(user.id); // Error here │
|
|
110
|
-
│ 235: return `<div>${user.name}</div>`; │
|
|
111
|
-
│ 236: } │
|
|
112
|
-
└────────────────────────────────────────────────────┘
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Unhandled Promise Rejections
|
|
116
|
-
|
|
117
|
-
Track async errors:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
Promise Rejections:
|
|
121
|
-
┌────────────────────────────────────────────────────┐
|
|
122
|
-
│ [0:32] ❌ Unhandled Promise Rejection │
|
|
123
|
-
│ │
|
|
124
|
-
│ Reason: NetworkError: Failed to fetch │
|
|
125
|
-
│ Promise: Promise {<rejected>} │
|
|
126
|
-
│ │
|
|
127
|
-
│ Origin: │
|
|
128
|
-
│ at fetchUserData (api.js:45) │
|
|
129
|
-
│ at async loadDashboard (app.js:123) │
|
|
130
|
-
│ │
|
|
131
|
-
│ Request Details: │
|
|
132
|
-
│ URL: https://api.example.com/user/123 │
|
|
133
|
-
│ Method: GET │
|
|
134
|
-
│ Status: Network failure │
|
|
135
|
-
└────────────────────────────────────────────────────┘
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Custom Application Logging
|
|
139
|
-
|
|
140
|
-
Your application's console output:
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
// Your application code
|
|
144
|
-
console.log('User logged in:', user.email);
|
|
145
|
-
console.info('Loading dashboard data...');
|
|
146
|
-
console.warn('API response time exceeded 2s');
|
|
147
|
-
console.error('Failed to save user preferences');
|
|
148
|
-
|
|
149
|
-
// Debug complex objects
|
|
150
|
-
console.table([
|
|
151
|
-
{ id: 1, name: 'Alice', role: 'Admin' },
|
|
152
|
-
{ id: 2, name: 'Bob', role: 'User' }
|
|
153
|
-
]);
|
|
154
|
-
|
|
155
|
-
// All captured in TestDriver replays
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Replay Console Output:**
|
|
159
|
-
```
|
|
160
|
-
[0:15] ℹ️ User logged in: alice@example.com
|
|
161
|
-
[0:18] ℹ️ Loading dashboard data...
|
|
162
|
-
[0:25] ⚠️ API response time exceeded 2s
|
|
163
|
-
[0:30] ❌ Failed to save user preferences
|
|
164
|
-
|
|
165
|
-
[0:35] 📊 Table:
|
|
166
|
-
┌─────┬───────┬────────┐
|
|
167
|
-
│ id │ name │ role │
|
|
168
|
-
├─────┼───────┼────────┤
|
|
169
|
-
│ 1 │ Alice │ Admin │
|
|
170
|
-
│ 2 │ Bob │ User │
|
|
171
|
-
└─────┴───────┴────────┘
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## React DevTools Logs
|
|
175
|
-
|
|
176
|
-
Framework-specific debugging:
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
React Logs:
|
|
180
|
-
┌────────────────────────────────────────────────────┐
|
|
181
|
-
│ [0:12] ⚛️ React component mounted: <UserProfile> │
|
|
182
|
-
│ [0:15] ⚛️ Props changed: { userId: 123 } │
|
|
183
|
-
│ [0:18] ⚛️ State updated: { loading: true } │
|
|
184
|
-
│ [0:22] ⚛️ Effect ran: useEffect (deps: [userId]) │
|
|
185
|
-
│ [0:25] ⚛️ Component re-rendered │
|
|
186
|
-
│ [0:28] ⚛️ Effect cleanup executed │
|
|
187
|
-
│ [0:30] ⚛️ Component unmounted │
|
|
188
|
-
└────────────────────────────────────────────────────┘
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
## Third-Party Library Logs
|
|
192
|
-
|
|
193
|
-
Monitor external dependencies:
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
Library Logs:
|
|
197
|
-
┌────────────────────────────────────────────────────┐
|
|
198
|
-
│ [0:08] 📦 axios: Request sent to /api/user │
|
|
199
|
-
│ [0:10] 📦 axios: Response received (200 OK) │
|
|
200
|
-
│ [0:15] 📦 lodash: _.debounce called │
|
|
201
|
-
│ [0:20] 📦 moment: Date formatted (YYYY-MM-DD) │
|
|
202
|
-
│ [0:25] 📦 analytics: Event tracked: button_click │
|
|
203
|
-
│ [0:30] ⚠️ analytics: Network request failed │
|
|
204
|
-
└────────────────────────────────────────────────────┘
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Browser Warnings
|
|
208
|
-
|
|
209
|
-
Security and performance warnings:
|
|
210
|
-
|
|
211
|
-
```
|
|
212
|
-
Browser Warnings:
|
|
213
|
-
┌────────────────────────────────────────────────────┐
|
|
214
|
-
│ [0:05] ⚠️ Mixed Content: Insecure resource loaded │
|
|
215
|
-
│ https://example.com loaded http://cdn... │
|
|
216
|
-
│ │
|
|
217
|
-
│ [0:12] ⚠️ Cookie without SameSite attribute │
|
|
218
|
-
│ Set-Cookie: session=abc123 │
|
|
219
|
-
│ │
|
|
220
|
-
│ [0:18] ⚠️ Synchronous XMLHttpRequest deprecated │
|
|
221
|
-
│ Use async requests instead │
|
|
222
|
-
│ │
|
|
223
|
-
│ [0:25] ⚠️ localStorage quota exceeded (5MB limit) │
|
|
224
|
-
│ Consider using IndexedDB for large data │
|
|
225
|
-
└────────────────────────────────────────────────────┘
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Filter Console Logs
|
|
229
|
-
|
|
230
|
-
Find specific log messages:
|
|
231
|
-
|
|
232
|
-
<Tabs>
|
|
233
|
-
<Tab title="By Level">
|
|
234
|
-
```
|
|
235
|
-
Show only:
|
|
236
|
-
☑ Errors
|
|
237
|
-
☑ Warnings
|
|
238
|
-
☐ Info
|
|
239
|
-
☐ Log
|
|
240
|
-
☐ Debug
|
|
241
|
-
```
|
|
242
|
-
</Tab>
|
|
243
|
-
|
|
244
|
-
<Tab title="By Source">
|
|
245
|
-
```
|
|
246
|
-
Filter by source:
|
|
247
|
-
All sources
|
|
248
|
-
app.js
|
|
249
|
-
vendor.js
|
|
250
|
-
analytics.js
|
|
251
|
-
React DevTools
|
|
252
|
-
```
|
|
253
|
-
</Tab>
|
|
254
|
-
|
|
255
|
-
<Tab title="By Message">
|
|
256
|
-
```
|
|
257
|
-
Search messages:
|
|
258
|
-
"TypeError"
|
|
259
|
-
"API"
|
|
260
|
-
"user"
|
|
261
|
-
Regular expressions supported
|
|
262
|
-
```
|
|
263
|
-
</Tab>
|
|
264
|
-
|
|
265
|
-
<Tab title="By Timestamp">
|
|
266
|
-
```
|
|
267
|
-
Time range:
|
|
268
|
-
Full test duration
|
|
269
|
-
Around error (±10s)
|
|
270
|
-
Last 30 seconds
|
|
271
|
-
Custom range
|
|
272
|
-
```
|
|
273
|
-
</Tab>
|
|
274
|
-
</Tabs>
|
|
275
|
-
|
|
276
|
-
## Console API Coverage
|
|
277
|
-
|
|
278
|
-
All console methods captured:
|
|
279
|
-
|
|
280
|
-
```javascript
|
|
281
|
-
// Standard logging
|
|
282
|
-
console.log('Basic log');
|
|
283
|
-
console.info('Info message');
|
|
284
|
-
console.warn('Warning');
|
|
285
|
-
console.error('Error');
|
|
286
|
-
console.debug('Debug info');
|
|
287
|
-
|
|
288
|
-
// Grouping
|
|
289
|
-
console.group('User Actions');
|
|
290
|
-
console.log('Click button');
|
|
291
|
-
console.log('Submit form');
|
|
292
|
-
console.groupEnd();
|
|
293
|
-
|
|
294
|
-
// Timing
|
|
295
|
-
console.time('API Call');
|
|
296
|
-
// ... some operation ...
|
|
297
|
-
console.timeEnd('API Call'); // "API Call: 234.5ms"
|
|
298
|
-
|
|
299
|
-
// Assertions
|
|
300
|
-
console.assert(user.id, 'User ID is required');
|
|
301
|
-
|
|
302
|
-
// Counting
|
|
303
|
-
console.count('render'); // "render: 1"
|
|
304
|
-
console.count('render'); // "render: 2"
|
|
305
|
-
|
|
306
|
-
// Stack traces
|
|
307
|
-
console.trace('Trace point');
|
|
308
|
-
|
|
309
|
-
// Clear (noted but not cleared in replay)
|
|
310
|
-
console.clear();
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
## Export Browser Logs
|
|
314
|
-
|
|
315
|
-
Download console output:
|
|
316
|
-
|
|
317
|
-
<Tabs>
|
|
318
|
-
<Tab title="Plain Text">
|
|
319
|
-
```
|
|
320
|
-
[0:05] INFO Application started v2.1.4
|
|
321
|
-
[0:15] WARN Deprecated function used: getUserId()
|
|
322
|
-
[0:25] ERROR TypeError: Cannot read property 'id'
|
|
323
|
-
at UserProfile.render (app.js:234:15)
|
|
324
|
-
```
|
|
325
|
-
</Tab>
|
|
326
|
-
|
|
327
|
-
<Tab title="JSON">
|
|
328
|
-
```json
|
|
329
|
-
{
|
|
330
|
-
"consoleLogs": [
|
|
331
|
-
{
|
|
332
|
-
"timestamp": "0:05",
|
|
333
|
-
"level": "info",
|
|
334
|
-
"message": "Application started v2.1.4",
|
|
335
|
-
"source": "app.js:12"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"timestamp": "0:25",
|
|
339
|
-
"level": "error",
|
|
340
|
-
"message": "TypeError: Cannot read property 'id'",
|
|
341
|
-
"stack": "at UserProfile.render (app.js:234:15)...",
|
|
342
|
-
"source": "app.js:234"
|
|
343
|
-
}
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
```
|
|
347
|
-
</Tab>
|
|
348
|
-
|
|
349
|
-
<Tab title="CSV">
|
|
350
|
-
```csv
|
|
351
|
-
Timestamp,Level,Message,Source
|
|
352
|
-
0:05,INFO,Application started v2.1.4,app.js:12
|
|
353
|
-
0:15,WARN,Deprecated function used,app.js:89
|
|
354
|
-
0:25,ERROR,TypeError: Cannot read property 'id',app.js:234
|
|
355
|
-
```
|
|
356
|
-
</Tab>
|
|
357
|
-
</Tabs>
|
|
358
|
-
|
|
359
|
-
## Integration with Test Assertions
|
|
360
|
-
|
|
361
|
-
Verify console output in tests:
|
|
362
|
-
|
|
363
|
-
```javascript
|
|
364
|
-
import { test } from 'vitest';
|
|
365
|
-
import { chrome } from 'testdriverai/presets';
|
|
366
|
-
|
|
367
|
-
test('check for console errors', async (context) => {
|
|
368
|
-
const { testdriver, dashcam } = await chrome(context, {
|
|
369
|
-
url: 'https://example.com'
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
await testdriver.find('submit button').click();
|
|
373
|
-
|
|
374
|
-
// After test, check dashcam for console errors
|
|
375
|
-
// Replay will show any JavaScript errors
|
|
376
|
-
console.log('Check console:', dashcam.url);
|
|
377
|
-
});
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
## Learn More
|
|
381
|
-
|
|
382
|
-
<CardGroup cols={2}>
|
|
383
|
-
<Card
|
|
384
|
-
title="Application Logs"
|
|
385
|
-
icon="terminal"
|
|
386
|
-
href="/v7/features/application-logs"
|
|
387
|
-
>
|
|
388
|
-
TestDriver SDK logs
|
|
389
|
-
</Card>
|
|
390
|
-
|
|
391
|
-
<Card
|
|
392
|
-
title="Network Monitoring"
|
|
393
|
-
icon="network-wired"
|
|
394
|
-
href="/v7/features/network-monitoring"
|
|
395
|
-
>
|
|
396
|
-
HTTP requests and responses
|
|
397
|
-
</Card>
|
|
398
|
-
|
|
399
|
-
<Card
|
|
400
|
-
title="Test Replays"
|
|
401
|
-
icon="video"
|
|
402
|
-
href="/v7/features/test-replays"
|
|
403
|
-
>
|
|
404
|
-
Complete test execution videos
|
|
405
|
-
</Card>
|
|
406
|
-
|
|
407
|
-
<Card
|
|
408
|
-
title="Observability"
|
|
409
|
-
icon="microscope"
|
|
410
|
-
href="/v7/features/observable"
|
|
411
|
-
>
|
|
412
|
-
Complete debugging guide
|
|
413
|
-
</Card>
|
|
414
|
-
</CardGroup>
|