cbrowser 17.6.0 → 18.0.0
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/dist/browser.d.ts +4 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +37 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli.js +10 -5
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server-remote.d.ts.map +1 -1
- package/dist/mcp-server-remote.js +16 -0
- package/dist/mcp-server-remote.js.map +1 -1
- package/docs/Tool-Cognitive-Journey-Autonomous.md +264 -0
- package/docs/Tool-Competitive-Benchmark.md +287 -0
- package/docs/Tool-Empathy-Audit.md +325 -0
- package/docs/Tool-Hunt-Bugs.md +299 -0
- package/docs/Tool-Marketing-Campaign.md +292 -0
- package/docs/Tool-Persona-Create.md +268 -0
- package/docs/Tools-Accessibility.md +202 -0
- package/docs/Tools-Browser-Automation.md +305 -0
- package/docs/Tools-Cognitive-Journeys.md +227 -0
- package/docs/Tools-Marketing-Intelligence.md +265 -0
- package/docs/Tools-Overview.md +143 -0
- package/docs/Tools-Persona-System.md +294 -0
- package/docs/Tools-Session-State.md +272 -0
- package/docs/Tools-Testing-Quality.md +251 -0
- package/docs/Tools-Utilities.md +176 -0
- package/docs/Tools-Visual-Performance.md +272 -0
- package/package.json +1 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# Empathy Audit
|
|
2
|
+
|
|
3
|
+
**Experience your site through the eyes of someone with a disability.**
|
|
4
|
+
|
|
5
|
+
`empathy_audit` doesn't just check WCAG compliance — it simulates actual humans with motor tremors, vision impairment, ADHD, and other conditions navigating your site. You'll see where they struggle, what makes them give up, and get specific remediation guidance.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"url": "https://example.com/checkout",
|
|
14
|
+
"personas": ["motor-tremor", "low-vision", "cognitive-adhd"],
|
|
15
|
+
"task": "Complete a purchase"
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**What happens**:
|
|
20
|
+
1. Each disability persona attempts the task
|
|
21
|
+
2. Their specific impairments affect how they interact (tremor = missed clicks, low vision = can't read small text)
|
|
22
|
+
3. WCAG violations are detected and mapped to real user impact
|
|
23
|
+
4. You get actionable remediation for each issue
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Required | Default | Description |
|
|
30
|
+
|-----------|------|----------|---------|-------------|
|
|
31
|
+
| `url` | string | Yes | — | Page to audit |
|
|
32
|
+
| `personas` | array | No | All | Disability personas to simulate |
|
|
33
|
+
| `task` | string | No | General exploration | Specific task to attempt |
|
|
34
|
+
| `wcagLevel` | string | No | `AA` | WCAG conformance level: `A`, `AA`, `AAA` |
|
|
35
|
+
| `depth` | number | No | 1 | Pages to crawl |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Disability Personas
|
|
40
|
+
|
|
41
|
+
### `motor-tremor`
|
|
42
|
+
|
|
43
|
+
**Simulates**: Essential tremor, Parkinson's, cerebral palsy, repetitive strain injury.
|
|
44
|
+
|
|
45
|
+
**Behavioral Characteristics**:
|
|
46
|
+
- Mouse movement is imprecise with jitter
|
|
47
|
+
- Clicking small targets fails repeatedly
|
|
48
|
+
- Can't maintain hover long enough for menus
|
|
49
|
+
- Double-clicks unintentionally
|
|
50
|
+
- Strongly prefers keyboard navigation
|
|
51
|
+
|
|
52
|
+
**Common Barriers Detected**:
|
|
53
|
+
|
|
54
|
+
| Barrier | WCAG | User Experience |
|
|
55
|
+
|---------|------|-----------------|
|
|
56
|
+
| Small click targets | 2.5.5 | 8 attempts to click a 24px button |
|
|
57
|
+
| Hover-dependent menus | 2.1.1 | Menu closes before cursor reaches it |
|
|
58
|
+
| Time-limited forms | 2.2.3 | Session expired during slow typing |
|
|
59
|
+
| No keyboard shortcuts | 2.1.1 | Forced to use mouse for everything |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### `low-vision`
|
|
64
|
+
|
|
65
|
+
**Simulates**: Macular degeneration, glaucoma, cataracts, legal blindness with partial sight.
|
|
66
|
+
|
|
67
|
+
**Behavioral Characteristics**:
|
|
68
|
+
- Uses 200-400% browser zoom
|
|
69
|
+
- Relies on high contrast
|
|
70
|
+
- Loses page context when zoomed
|
|
71
|
+
- Can't perceive small text or icons
|
|
72
|
+
- Needs clear visual hierarchy
|
|
73
|
+
|
|
74
|
+
**Common Barriers Detected**:
|
|
75
|
+
|
|
76
|
+
| Barrier | WCAG | User Experience |
|
|
77
|
+
|---------|------|-----------------|
|
|
78
|
+
| Fixed-width containers | 1.4.10 | Content cut off at 200% zoom |
|
|
79
|
+
| Low contrast text | 1.4.3 | Can't read gray-on-white body text |
|
|
80
|
+
| Icon-only buttons | 1.1.1 | No idea what the hamburger menu does |
|
|
81
|
+
| Tiny form labels | 1.4.4 | Can't tell which field is which |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### `cognitive-adhd`
|
|
86
|
+
|
|
87
|
+
**Simulates**: ADHD, executive function challenges, attention difficulties.
|
|
88
|
+
|
|
89
|
+
**Behavioral Characteristics**:
|
|
90
|
+
- Scans rapidly, doesn't read thoroughly
|
|
91
|
+
- Clicks impulsively, sometimes wrong targets
|
|
92
|
+
- Abandons long forms or processes
|
|
93
|
+
- Easily distracted by movement/animation
|
|
94
|
+
- Loses track of progress in multi-step flows
|
|
95
|
+
|
|
96
|
+
**Common Barriers Detected**:
|
|
97
|
+
|
|
98
|
+
| Barrier | WCAG | User Experience |
|
|
99
|
+
|---------|------|-----------------|
|
|
100
|
+
| Wall of text | 3.1.5 | Glazed over and missed key info |
|
|
101
|
+
| Auto-playing video | 2.2.2 | Couldn't focus on the form |
|
|
102
|
+
| No progress indicator | 3.3.4 | Didn't know how many steps remained |
|
|
103
|
+
| Long forms | 3.3.2 | Abandoned at field 12 of 20 |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### `dyslexia`
|
|
108
|
+
|
|
109
|
+
**Simulates**: Reading difficulties, letter reversal, word recognition challenges.
|
|
110
|
+
|
|
111
|
+
**Behavioral Characteristics**:
|
|
112
|
+
- Slow reading speed
|
|
113
|
+
- Misreads similar words (their/there, form/from)
|
|
114
|
+
- Struggles with justified text
|
|
115
|
+
- Benefits from icons alongside text
|
|
116
|
+
- Needs generous line spacing
|
|
117
|
+
|
|
118
|
+
**Common Barriers Detected**:
|
|
119
|
+
|
|
120
|
+
| Barrier | WCAG | User Experience |
|
|
121
|
+
|---------|------|-----------------|
|
|
122
|
+
| Justified text | Best practice | Letters swim, lost place |
|
|
123
|
+
| Dense paragraphs | 1.4.12 | Couldn't parse the content |
|
|
124
|
+
| Ambiguous labels | 3.3.2 | Confused "Email" for "E-mail" link |
|
|
125
|
+
| Poor font choice | Best practice | Letters hard to distinguish |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### `deaf`
|
|
130
|
+
|
|
131
|
+
**Simulates**: Deaf, hard of hearing, auditory processing disorder.
|
|
132
|
+
|
|
133
|
+
**Behavioral Characteristics**:
|
|
134
|
+
- Can't hear audio content
|
|
135
|
+
- Misses audio alerts/notifications
|
|
136
|
+
- Depends entirely on visual information
|
|
137
|
+
- Needs captions or transcripts
|
|
138
|
+
- May need sign language
|
|
139
|
+
|
|
140
|
+
**Common Barriers Detected**:
|
|
141
|
+
|
|
142
|
+
| Barrier | WCAG | User Experience |
|
|
143
|
+
|---------|------|-----------------|
|
|
144
|
+
| Video without captions | 1.2.2 | Missed entire product demo |
|
|
145
|
+
| Audio-only alerts | 1.4.2 | Didn't know an error occurred |
|
|
146
|
+
| Phone-only support | Best practice | No way to get help |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### `color-blind`
|
|
151
|
+
|
|
152
|
+
**Simulates**: Protanopia, deuteranopia, tritanopia, and other color vision deficiencies.
|
|
153
|
+
|
|
154
|
+
**Behavioral Characteristics**:
|
|
155
|
+
- Can't distinguish red/green (most common)
|
|
156
|
+
- May confuse blue/yellow (less common)
|
|
157
|
+
- Depends on patterns, labels, position
|
|
158
|
+
- Struggles with color-coded status
|
|
159
|
+
|
|
160
|
+
**Common Barriers Detected**:
|
|
161
|
+
|
|
162
|
+
| Barrier | WCAG | User Experience |
|
|
163
|
+
|---------|------|-----------------|
|
|
164
|
+
| Red/green validation | 1.4.1 | Can't tell which fields have errors |
|
|
165
|
+
| Color-only charts | 1.4.1 | Graphs are meaningless |
|
|
166
|
+
| Status indicators | 1.4.1 | All traffic lights look the same |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Output
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"url": "https://example.com/checkout",
|
|
175
|
+
"wcagLevel": "AA",
|
|
176
|
+
"personas": {
|
|
177
|
+
"motor-tremor": {
|
|
178
|
+
"taskSuccess": false,
|
|
179
|
+
"abandonmentPoint": "Payment form - credit card expiry dropdown",
|
|
180
|
+
"timeToAbandon": 142,
|
|
181
|
+
"attempts": {
|
|
182
|
+
"clicks": 47,
|
|
183
|
+
"missedClicks": 23,
|
|
184
|
+
"successfulClicks": 24
|
|
185
|
+
},
|
|
186
|
+
"barriers": [
|
|
187
|
+
{
|
|
188
|
+
"type": "small-target",
|
|
189
|
+
"element": "#expiry-month",
|
|
190
|
+
"wcag": "2.5.5",
|
|
191
|
+
"severity": "critical",
|
|
192
|
+
"targetSize": "32x24",
|
|
193
|
+
"requiredSize": "44x44",
|
|
194
|
+
"userImpact": "Required 8 attempts to click, user patience exhausted",
|
|
195
|
+
"remediation": {
|
|
196
|
+
"summary": "Increase dropdown trigger to 44x44px minimum",
|
|
197
|
+
"code": "<select style='min-width: 44px; min-height: 44px;'>",
|
|
198
|
+
"effort": "low"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"low-vision": {
|
|
204
|
+
"taskSuccess": true,
|
|
205
|
+
"timeToComplete": 287,
|
|
206
|
+
"zoomLevel": "200%",
|
|
207
|
+
"barriers": [
|
|
208
|
+
{
|
|
209
|
+
"type": "low-contrast",
|
|
210
|
+
"element": ".help-text",
|
|
211
|
+
"wcag": "1.4.3",
|
|
212
|
+
"severity": "moderate",
|
|
213
|
+
"contrastRatio": "3.2:1",
|
|
214
|
+
"requiredRatio": "4.5:1",
|
|
215
|
+
"userImpact": "Couldn't read CVV help text, had to guess format",
|
|
216
|
+
"remediation": {
|
|
217
|
+
"summary": "Increase text contrast to 4.5:1",
|
|
218
|
+
"code": "color: #595959; /* was #999999 */",
|
|
219
|
+
"effort": "low"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"summary": {
|
|
226
|
+
"totalBarriers": 7,
|
|
227
|
+
"critical": 2,
|
|
228
|
+
"serious": 3,
|
|
229
|
+
"moderate": 2,
|
|
230
|
+
"wcagViolations": {
|
|
231
|
+
"A": 1,
|
|
232
|
+
"AA": 4
|
|
233
|
+
},
|
|
234
|
+
"recommendations": [
|
|
235
|
+
"Increase all interactive targets to 44px minimum",
|
|
236
|
+
"Add keyboard navigation to dropdown menus",
|
|
237
|
+
"Improve contrast ratio on help text",
|
|
238
|
+
"Add visible focus indicators"
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Use Cases
|
|
247
|
+
|
|
248
|
+
### 1. Pre-Launch Accessibility Review
|
|
249
|
+
|
|
250
|
+
Before launching a new feature, run empathy audits across all disability personas:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"url": "https://staging.example.com/new-feature",
|
|
255
|
+
"personas": ["motor-tremor", "low-vision", "cognitive-adhd", "deaf", "color-blind"],
|
|
256
|
+
"task": "Complete the new onboarding flow"
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### 2. Prioritizing Accessibility Fixes
|
|
263
|
+
|
|
264
|
+
You have 100 WCAG violations. Which ones matter?
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"url": "https://example.com",
|
|
269
|
+
"depth": 5
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The audit shows which violations caused actual abandonment vs minor inconvenience. Fix the critical ones first.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### 3. Compliance Documentation
|
|
278
|
+
|
|
279
|
+
Need evidence for VPAT or accessibility statement:
|
|
280
|
+
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"url": "https://example.com",
|
|
284
|
+
"wcagLevel": "AA",
|
|
285
|
+
"depth": 10
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Generates detailed barrier documentation with WCAG mappings.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Why This Is Different
|
|
294
|
+
|
|
295
|
+
| WCAG Checker | Empathy Audit |
|
|
296
|
+
|--------------|---------------|
|
|
297
|
+
| "Button has no accessible name" | "Blind user couldn't proceed because the 'Next' button had no label" |
|
|
298
|
+
| "Contrast ratio is 3.2:1" | "Low-vision user at 200% zoom couldn't read the error message and submitted invalid data" |
|
|
299
|
+
| "Target size is 32px" | "User with tremor failed to click the dropdown 8 times before giving up" |
|
|
300
|
+
| Counts violations | Predicts abandonment |
|
|
301
|
+
| Compliance-focused | User-experience-focused |
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## CI/CD Integration
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Fail build if critical accessibility barriers found
|
|
309
|
+
npx cbrowser empathy-audit https://staging.example.com \
|
|
310
|
+
--task "Complete checkout" \
|
|
311
|
+
--fail-on critical \
|
|
312
|
+
--output accessibility-report.html
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Related Tools
|
|
318
|
+
|
|
319
|
+
- [`cognitive_journey_autonomous`](/docs/Tool-Cognitive-Journey-Autonomous/) — Full journey simulation
|
|
320
|
+
- [`agent_ready_audit`](/docs/Tools-Utilities/) — AI agent friendliness
|
|
321
|
+
- [UX Analysis Suite](/docs/UX-Analysis-Suite/) — Full UX analysis capabilities
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
*Last updated: v17.6.0*
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# Hunt Bugs
|
|
2
|
+
|
|
3
|
+
**Turn AI loose on your site. See what's broken.**
|
|
4
|
+
|
|
5
|
+
`hunt_bugs` is autonomous exploratory testing. You give it a URL, it crawls your site looking for bugs — broken links, JavaScript errors, accessibility issues, visual glitches, and security problems. No test cases required.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"url": "https://example.com",
|
|
14
|
+
"scope": "all",
|
|
15
|
+
"depth": 4,
|
|
16
|
+
"maxPages": 50
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**What happens**:
|
|
21
|
+
1. AI starts at your URL and begins exploring
|
|
22
|
+
2. On each page, it checks for functional, visual, accessibility, and security issues
|
|
23
|
+
3. It follows links, fills forms, clicks buttons — looking for things that break
|
|
24
|
+
4. You get a report of everything found, with reproduction steps and screenshots
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type | Required | Default | Description |
|
|
31
|
+
|-----------|------|----------|---------|-------------|
|
|
32
|
+
| `url` | string | Yes | — | Starting URL |
|
|
33
|
+
| `scope` | string | No | `all` | Bug types: `all`, `functional`, `visual`, `accessibility`, `security` |
|
|
34
|
+
| `depth` | number | No | 3 | How deep to crawl |
|
|
35
|
+
| `maxPages` | number | No | 20 | Maximum pages to visit |
|
|
36
|
+
| `focus` | string | No | — | Focus area (e.g., "forms", "checkout", "navigation") |
|
|
37
|
+
| `exclude` | array | No | — | URL patterns to skip |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## What It Finds
|
|
42
|
+
|
|
43
|
+
### Functional Bugs
|
|
44
|
+
|
|
45
|
+
| Bug Type | How It's Detected |
|
|
46
|
+
|----------|-------------------|
|
|
47
|
+
| Broken links | Links that return 4xx/5xx errors |
|
|
48
|
+
| Dead ends | Pages with no way to navigate away |
|
|
49
|
+
| Form errors | Submissions that fail silently |
|
|
50
|
+
| JavaScript exceptions | Console errors during interaction |
|
|
51
|
+
| Failed network requests | XHR/fetch that error |
|
|
52
|
+
| Infinite loops | Redirect chains, infinite scrolls |
|
|
53
|
+
| Missing content | Empty states, placeholder text |
|
|
54
|
+
|
|
55
|
+
### Visual Bugs
|
|
56
|
+
|
|
57
|
+
| Bug Type | How It's Detected |
|
|
58
|
+
|----------|-------------------|
|
|
59
|
+
| Overlapping elements | Content that covers other content |
|
|
60
|
+
| Horizontal overflow | Content breaking viewport |
|
|
61
|
+
| Missing images | Broken `src` attributes |
|
|
62
|
+
| Layout breaks | Elements far from expected position |
|
|
63
|
+
| Z-index issues | Content hidden behind other layers |
|
|
64
|
+
| Responsive failures | Elements that break at viewport edges |
|
|
65
|
+
|
|
66
|
+
### Accessibility Bugs
|
|
67
|
+
|
|
68
|
+
| Bug Type | How It's Detected |
|
|
69
|
+
|----------|-------------------|
|
|
70
|
+
| Missing alt text | Images without descriptions |
|
|
71
|
+
| Low contrast | Text that fails WCAG contrast |
|
|
72
|
+
| Keyboard traps | Can't escape a component with keyboard |
|
|
73
|
+
| Missing labels | Form fields without associated labels |
|
|
74
|
+
| Focus issues | Interactive elements without focus styles |
|
|
75
|
+
| ARIA violations | Invalid ARIA attributes |
|
|
76
|
+
|
|
77
|
+
### Security Issues
|
|
78
|
+
|
|
79
|
+
| Bug Type | How It's Detected |
|
|
80
|
+
|----------|-------------------|
|
|
81
|
+
| Exposed credentials | Visible API keys, passwords |
|
|
82
|
+
| Insecure forms | HTTP forms on HTTPS pages |
|
|
83
|
+
| Data in URLs | Sensitive info in query strings |
|
|
84
|
+
| Missing HTTPS | Insecure resource loading |
|
|
85
|
+
| Open redirects | Redirects to external domains |
|
|
86
|
+
| Debug endpoints | Exposed dev/debug routes |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Output
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"url": "https://example.com",
|
|
95
|
+
"pagesVisited": 34,
|
|
96
|
+
"timeElapsed": 187,
|
|
97
|
+
"bugs": [
|
|
98
|
+
{
|
|
99
|
+
"severity": "critical",
|
|
100
|
+
"type": "functional",
|
|
101
|
+
"category": "form-error",
|
|
102
|
+
"url": "https://example.com/checkout",
|
|
103
|
+
"description": "Payment form silently fails when CVV is left empty",
|
|
104
|
+
"reproduction": [
|
|
105
|
+
"Navigate to /checkout",
|
|
106
|
+
"Fill all fields except CVV",
|
|
107
|
+
"Click 'Pay Now'",
|
|
108
|
+
"Form shows loading spinner but never completes"
|
|
109
|
+
],
|
|
110
|
+
"screenshot": "base64...",
|
|
111
|
+
"consoleErrors": [
|
|
112
|
+
"Uncaught TypeError: Cannot read property 'value' of null at payment.js:142"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"severity": "serious",
|
|
117
|
+
"type": "accessibility",
|
|
118
|
+
"category": "missing-label",
|
|
119
|
+
"url": "https://example.com/contact",
|
|
120
|
+
"description": "Phone number field has no associated label",
|
|
121
|
+
"wcag": "1.3.1",
|
|
122
|
+
"element": "<input type='tel' name='phone' placeholder='Phone'>",
|
|
123
|
+
"remediation": "Add <label for='phone'>Phone Number</label>"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"severity": "moderate",
|
|
127
|
+
"type": "visual",
|
|
128
|
+
"category": "overflow",
|
|
129
|
+
"url": "https://example.com/pricing",
|
|
130
|
+
"description": "Pricing table overflows viewport on mobile",
|
|
131
|
+
"viewport": "375x667",
|
|
132
|
+
"screenshot": "base64..."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"severity": "serious",
|
|
136
|
+
"type": "security",
|
|
137
|
+
"category": "exposed-credentials",
|
|
138
|
+
"url": "https://example.com/config",
|
|
139
|
+
"description": "API key visible in page source",
|
|
140
|
+
"evidence": "const API_KEY = 'sk-...'",
|
|
141
|
+
"recommendation": "Move API key to environment variable"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"summary": {
|
|
145
|
+
"critical": 1,
|
|
146
|
+
"serious": 4,
|
|
147
|
+
"moderate": 7,
|
|
148
|
+
"minor": 12,
|
|
149
|
+
"byType": {
|
|
150
|
+
"functional": 6,
|
|
151
|
+
"visual": 8,
|
|
152
|
+
"accessibility": 5,
|
|
153
|
+
"security": 5
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Use Cases
|
|
162
|
+
|
|
163
|
+
### 1. Pre-Release Smoke Test
|
|
164
|
+
|
|
165
|
+
Before deploying, run a quick bug hunt:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"url": "https://staging.example.com",
|
|
170
|
+
"scope": "functional",
|
|
171
|
+
"depth": 3,
|
|
172
|
+
"maxPages": 30
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Catches obvious breaks before they reach production.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### 2. Security Reconnaissance
|
|
181
|
+
|
|
182
|
+
Find exposed secrets and vulnerabilities:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"url": "https://example.com",
|
|
187
|
+
"scope": "security",
|
|
188
|
+
"depth": 5,
|
|
189
|
+
"maxPages": 100
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### 3. Accessibility Sweep
|
|
196
|
+
|
|
197
|
+
Find accessibility issues across the entire site:
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"url": "https://example.com",
|
|
202
|
+
"scope": "accessibility",
|
|
203
|
+
"depth": 5
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
For deeper analysis of specific issues, follow up with [empathy_audit](/docs/Tool-Empathy-Audit/).
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### 4. Focused Testing
|
|
212
|
+
|
|
213
|
+
Hunt bugs only in a specific area:
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"url": "https://example.com/checkout",
|
|
218
|
+
"focus": "checkout",
|
|
219
|
+
"exclude": ["/blog/*", "/docs/*"]
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## How It Explores
|
|
226
|
+
|
|
227
|
+
1. **Starts at your URL** and analyzes the page
|
|
228
|
+
2. **Identifies interactive elements** — links, buttons, forms
|
|
229
|
+
3. **Executes interactions** — clicks, fills, submits
|
|
230
|
+
4. **Records everything** — console logs, network, screenshots
|
|
231
|
+
5. **Follows promising paths** — prioritizes unexplored areas
|
|
232
|
+
6. **Avoids traps** — detects infinite loops, skips logout/delete
|
|
233
|
+
7. **Moves to next page** and repeats
|
|
234
|
+
|
|
235
|
+
The AI uses constitutional safety rules to avoid destructive actions — it won't click "Delete Account" or "Cancel Subscription".
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## CI/CD Integration
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Run in CI, fail if critical bugs found
|
|
243
|
+
npx cbrowser hunt-bugs https://staging.example.com \
|
|
244
|
+
--scope all \
|
|
245
|
+
--depth 3 \
|
|
246
|
+
--fail-on critical \
|
|
247
|
+
--output bugs.json
|
|
248
|
+
|
|
249
|
+
# Generate HTML report
|
|
250
|
+
npx cbrowser hunt-bugs https://example.com \
|
|
251
|
+
--output report.html
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Tips
|
|
257
|
+
|
|
258
|
+
### Start Shallow, Go Deep
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
// First run: quick sweep
|
|
262
|
+
{ "depth": 2, "maxPages": 20 }
|
|
263
|
+
|
|
264
|
+
// Second run: deep dive on problem areas
|
|
265
|
+
{ "url": "https://example.com/checkout", "depth": 5 }
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Exclude Known Issues
|
|
269
|
+
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
"exclude": [
|
|
273
|
+
"/legacy/*", // Old pages being deprecated
|
|
274
|
+
"/admin/*" // Requires auth
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Focus on What Matters
|
|
280
|
+
|
|
281
|
+
```json
|
|
282
|
+
// Only care about checkout working?
|
|
283
|
+
{ "focus": "checkout", "scope": "functional" }
|
|
284
|
+
|
|
285
|
+
// Preparing for accessibility audit?
|
|
286
|
+
{ "scope": "accessibility", "depth": 10 }
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Related Tools
|
|
292
|
+
|
|
293
|
+
- [`nl_test_file`](/docs/Tools-Testing-Quality/) — Run specific test scenarios
|
|
294
|
+
- [`empathy_audit`](/docs/Tool-Empathy-Audit/) — Deep accessibility testing
|
|
295
|
+
- [`competitive_benchmark`](/docs/Tool-Competitive-Benchmark/) — Compare against competitors
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
*Last updated: v17.6.0*
|