{"action":"created","issue":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/563","labels_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/563/comments","events_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/563/events","html_url":"https://github.com/webdriverio/webdriverio/issues/563","id":86490547,"number":563,"title":"How to capture JS errors globally?","user":{"login":"rasmusbergpalm","id":206013,"avatar_url":"https://avatars.githubusercontent.com/u/206013?v=3","gravatar_id":"","url":"https://api.github.com/users/rasmusbergpalm","html_url":"https://github.com/rasmusbergpalm","followers_url":"https://api.github.com/users/rasmusbergpalm/followers","following_url":"https://api.github.com/users/rasmusbergpalm/following{/other_user}","gists_url":"https://api.github.com/users/rasmusbergpalm/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmusbergpalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmusbergpalm/subscriptions","organizations_url":"https://api.github.com/users/rasmusbergpalm/orgs","repos_url":"https://api.github.com/users/rasmusbergpalm/repos","events_url":"https://api.github.com/users/rasmusbergpalm/events{/privacy}","received_events_url":"https://api.github.com/users/rasmusbergpalm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webdriverio/webdriverio/labels/Discussion","name":"Discussion","color":"207de5"},{"url":"https://api.github.com/repos/webdriverio/webdriverio/labels/Needs%20Investigation","name":"Needs Investigation","color":"bfdadc"},{"url":"https://api.github.com/repos/webdriverio/webdriverio/labels/Selenium%20Related","name":"Selenium Related","color":"ffffff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-09T07:32:57Z","updated_at":"2015-06-10T12:31:26Z","closed_at":null,"body":"I wish to trigger a jasmine error and capture a screenshot on any JS errors.\r\nIs there any way to instruct webdriverio to capture all JS errors?"},"comment":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/comments/110731570","html_url":"https://github.com/webdriverio/webdriverio/issues/563#issuecomment-110731570","issue_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/563","id":110731570,"user":{"login":"rasmusbergpalm","id":206013,"avatar_url":"https://avatars.githubusercontent.com/u/206013?v=3","gravatar_id":"","url":"https://api.github.com/users/rasmusbergpalm","html_url":"https://github.com/rasmusbergpalm","followers_url":"https://api.github.com/users/rasmusbergpalm/followers","following_url":"https://api.github.com/users/rasmusbergpalm/following{/other_user}","gists_url":"https://api.github.com/users/rasmusbergpalm/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmusbergpalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmusbergpalm/subscriptions","organizations_url":"https://api.github.com/users/rasmusbergpalm/orgs","repos_url":"https://api.github.com/users/rasmusbergpalm/repos","events_url":"https://api.github.com/users/rasmusbergpalm/events{/privacy}","received_events_url":"https://api.github.com/users/rasmusbergpalm/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T12:31:26Z","updated_at":"2015-06-10T12:31:26Z","body":"Yea, it doesn't seem like it's possible, w.o. native webdriver support for it, which likely won't happen.\r\nYou *could* read the log on every command, and fail if there were browser log levels above a certain threshold (SEVERE, ERROR, etc.), but that'd incur a lot of traffic on the wire i suppose.\r\nFor now I'm content with just outputting all the browser logs on any errors.\r\nFeel free to close this."}}