{"action":"created","issue":{"url":"https://api.github.com/repos/segmentio/nightmare/issues/553","repository_url":"https://api.github.com/repos/segmentio/nightmare","labels_url":"https://api.github.com/repos/segmentio/nightmare/issues/553/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/nightmare/issues/553/comments","events_url":"https://api.github.com/repos/segmentio/nightmare/issues/553/events","html_url":"https://github.com/segmentio/nightmare/pull/553","id":145609709,"number":553,"title":"Goto should fail if the page doesn’t load","user":{"login":"Mr0grog","id":74178,"avatar_url":"https://avatars.githubusercontent.com/u/74178?v=3","gravatar_id":"","url":"https://api.github.com/users/Mr0grog","html_url":"https://github.com/Mr0grog","followers_url":"https://api.github.com/users/Mr0grog/followers","following_url":"https://api.github.com/users/Mr0grog/following{/other_user}","gists_url":"https://api.github.com/users/Mr0grog/gists{/gist_id}","starred_url":"https://api.github.com/users/Mr0grog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mr0grog/subscriptions","organizations_url":"https://api.github.com/users/Mr0grog/orgs","repos_url":"https://api.github.com/users/Mr0grog/repos","events_url":"https://api.github.com/users/Mr0grog/events{/privacy}","received_events_url":"https://api.github.com/users/Mr0grog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2016-04-04T07:43:32Z","updated_at":"2016-04-12T04:10:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/segmentio/nightmare/pulls/553","html_url":"https://github.com/segmentio/nightmare/pull/553","diff_url":"https://github.com/segmentio/nightmare/pull/553.diff","patch_url":"https://github.com/segmentio/nightmare/pull/553.patch"},"body":"~~**This is just a work-in-progress at the moment, but filing the PR as there are open questions…**~~\r\n\r\nThis adds tests (which fail), but no implementation—I need to work out the best solution for https://github.com/atom/electron/issues/5013 and https://github.com/atom/electron/issues/4396 (this second one I can’t actually reproduce, so it may have been fixed). For the former, the simplest solution is probably tracking the URL of the failed page and comparing it to the URL of the main frame. Need to make sure that works right for redirects, though. A more exacting solution might be to track resource requests on the `session` object, though doing so requires a bit more rigamarole.\r\n\r\nThere is also an open question of how this should behave w/r/t error responses (e.g. 404, 500, etc). For now, I’m planning to take the approach that any valid response (including things like 404s and 500s) are successes (after all, you might be trying to test a 404 page with Nightmare), but I can also imagine someone wanting the option to treat any non-2xx response as a failure. Maybe that’s something to wait for as a feature request, though? Curious what others think."},"comment":{"url":"https://api.github.com/repos/segmentio/nightmare/issues/comments/208694577","html_url":"https://github.com/segmentio/nightmare/pull/553#issuecomment-208694577","issue_url":"https://api.github.com/repos/segmentio/nightmare/issues/553","id":208694577,"user":{"login":"Mr0grog","id":74178,"avatar_url":"https://avatars.githubusercontent.com/u/74178?v=3","gravatar_id":"","url":"https://api.github.com/users/Mr0grog","html_url":"https://github.com/Mr0grog","followers_url":"https://api.github.com/users/Mr0grog/followers","following_url":"https://api.github.com/users/Mr0grog/following{/other_user}","gists_url":"https://api.github.com/users/Mr0grog/gists{/gist_id}","starred_url":"https://api.github.com/users/Mr0grog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mr0grog/subscriptions","organizations_url":"https://api.github.com/users/Mr0grog/orgs","repos_url":"https://api.github.com/users/Mr0grog/repos","events_url":"https://api.github.com/users/Mr0grog/events{/privacy}","received_events_url":"https://api.github.com/users/Mr0grog/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T04:10:43Z","updated_at":"2016-04-12T04:10:43Z","body":"I just added documentation in the README for this. (Can’t believe I forgot to do that!) I’ve also updated the code so it no longer uses `webRequest` listeners, but will wait to actually push that until there’s an actual electron release that it works with."}}