etaoin.dev

A namespace to cover Chrome's devtools features.

ajax?

(ajax? request)
Whether it's an XHR request.

build-request

(build-request logs)
Takes a vector of request logs of the same ID
and builda request map.

get-ajax

(get-ajax driver)
Return a list of XHR (Ajax) HTTP requests made by a browser.

get-performance-logs

(get-performance-logs driver)
Get a seq of special `performance` logs that come from
a dev console. Works only when a special `perfLoggingPrefs`
was set (see the `:dev` key when running a driver).

get-requests

(get-requests driver)
Return a list of HTTP requests made by a browser.

group-requests

(group-requests logs)
Group a set of request logs by their ID.

log->request

(log->request acc log)
A helper for a further reduce (see below).
Acc is an accumulation map.

logs->ajax

(logs->ajax logs)
The same as `logs->requests` but return only AJAX requests.

logs->requests

(logs->requests logs)
From a list of log entries, create a list of requests.

parse-json

(parse-json string)

parse-method

(parse-method method)
Turns a string like 'Network.SomeAction'
into a keyword :network/someaction.

process-log

(process-log log)
Takes a log map, parses its message and merges
the message into the map.

request-done?

(request-done? request)
Whether a request has been done. It doesn't necessarily
mean it was successful though.

request-failed?

(request-failed? request)
True if a request has been failed.

request-success?

True when a request has been finished and not failed.

request?

(request? log)
True if a log entry belongs to a network domain.

try-parse-int

(try-parse-int line)