Network demos¶
Four tasks for observing browser network activity, cookies, console output, and network idle detection.
capture¶
Record every network request while a page loads — returns a HAR-ish summary.
curl -s -X POST localhost:8765/tasks/network/capture -d '{}'
curl -s -X POST localhost:8765/tasks/network/capture -d '{"url":"https://quotes.toscrape.com"}'
flowchart TD
Start[capture-network starts recording]
Body["block steps run"]
Goto[goto URL]
Idle[wait-network-idle]
Stop[return HAR summary under data.har]
Start --> Body
Body --> Goto --> Idle
Body --> Stop
Concepts: capture-network block, HAR-style output.
Use this to discover XHR endpoints before switching to Backend → http-get.
cookies¶
Read and write browser cookies for the current session.
Concepts: session persistence, cookie jar inspection, auth debugging.
Pairs with persistent profiles for login sessions that survive restarts.
console¶
Capture browser console log lines during a flow.
Concepts: capture-console, debugging JS errors on target pages.
idle¶
Wait until network activity settles — useful before extraction on SPAs.
Concepts: SPA loading patterns, when wait-for selector isn't enough.
Debugging workflow¶
- Run
network/captureon the target URL - Inspect
data.harfor XHR/fetch endpoints - If an API is available, switch to
http-get(no browser needed) - If DOM rendering is required, use
wait-for-network-idlebeforeextract
What's next?¶
- Backend → http-get — call discovered APIs directly
- Secrets — auth tokens for authenticated requests