Public Vars

Back

get-logs (clj)

(source)

function

(get-logs driver) (get-logs driver logtype)
Have `driver` return Javascript console log entries. Each log entry is a map with the following structure: ```Clojure {:level :warning, :message "1,2,3,4 anonymous (:1)", :timestamp 1511449388366, :source nil, :datetime #inst "2017-11-23T15:03:08.366-00:00"} ``` Empirical knowledge about browser differences: - Chrome: - Returns all recorded logs. - Clears the logs once they have been read. - JS console logs have `:console-api` for `:source` field. - Entries about errors will have SEVERE level. - PhantomJS (obsolete and no longer tested): - Return all recorded logs since the last URL change. - Does not clear recorded logs on subsequent invocations. - JS console logs have nil for `:source` field. - Entries about errors will have WARNING level, as coded [here](https://github.com/detro/ghostdriver/blob/be7ffd9d47c1e76c7bfa1d47cdcde9164fd40db8/src/session.js#L494).

Examples