{"action":"closed","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest-splinter/issues/40","labels_url":"https://api.github.com/repos/pytest-dev/pytest-splinter/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest-splinter/issues/40/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest-splinter/issues/40/events","html_url":"https://github.com/pytest-dev/pytest-splinter/issues/40","id":96183838,"number":40,"title":"Saving HTML on test failure","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-20T23:03:48Z","updated_at":"2015-08-22T00:13:53Z","closed_at":"2015-08-22T00:13:53Z","body":"Similar to taking screenshots on test failure, I think that saving the HTML, with some replacements, seems to be useful.\r\n\r\nThis can be basically achieved by:\r\n\r\n    open(\"/tmp/t.html\", \"w\").write(browser.html)\r\n\r\nAnd the replacing `\"/static/` with `\"http://localhost:8000/static/`.\r\n\r\nWhat do you think?\r\nWould that be useful to ship (and possibly enable) by default?"}}