Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,24 @@ rodney attr "a#link" href # Print attribute value
rodney pdf output.pdf # Save page as PDF
```

### Console logs

```bash
rodney logs # Print all buffered console logs and exit
rodney logs -n 5 # Print last 5 buffered log entries
rodney logs -f # Print buffered logs, then stream new ones (Ctrl+C to stop)
rodney logs -f -n 5 # Print last 5 buffered logs, then stream new ones
rodney logs --json # JSON output (one object per line)
```

Text output format: `[level] message` (e.g. `[error] Uncaught TypeError: ...`).

JSON output format (one object per line):
```json
{"level":"info","source":"javascript","text":"Page initialized","timestamp":"2024-01-01T12:00:00.123Z"}
{"level":"error","source":"javascript","text":"Uncaught TypeError: ...","timestamp":"2024-01-01T12:00:00.456Z","url":"https://example.com/app.js","line":42}
```

### Run JavaScript

```bash
Expand Down
3 changes: 3 additions & 0 deletions help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Page info:
rodney attr <selector> <name> Print attribute value
rodney pdf [file] Save page as PDF

Console:
rodney logs [-f] [-n N] [--json] Print console logs (default: snapshot, -f to stream)

Interaction:
rodney js <expression> Evaluate JavaScript expression
rodney click <selector> Click an element
Expand Down
Loading