{"action":"closed","issue":{"url":"https://api.github.com/repos/segmentio/nightmare/issues/625","repository_url":"https://api.github.com/repos/segmentio/nightmare","labels_url":"https://api.github.com/repos/segmentio/nightmare/issues/625/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/nightmare/issues/625/comments","events_url":"https://api.github.com/repos/segmentio/nightmare/issues/625/events","html_url":"https://github.com/segmentio/nightmare/issues/625","id":153601993,"number":625,"title":"How to get to the \"bottom\" of an infinite scroll page?","user":{"login":"nick2012","id":3883332,"avatar_url":"https://avatars.githubusercontent.com/u/3883332?v=3","gravatar_id":"","url":"https://api.github.com/users/nick2012","html_url":"https://github.com/nick2012","followers_url":"https://api.github.com/users/nick2012/followers","following_url":"https://api.github.com/users/nick2012/following{/other_user}","gists_url":"https://api.github.com/users/nick2012/gists{/gist_id}","starred_url":"https://api.github.com/users/nick2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick2012/subscriptions","organizations_url":"https://api.github.com/users/nick2012/orgs","repos_url":"https://api.github.com/users/nick2012/repos","events_url":"https://api.github.com/users/nick2012/events{/privacy}","received_events_url":"https://api.github.com/users/nick2012/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-07T16:01:55Z","updated_at":"2016-05-27T20:10:24Z","closed_at":"2016-05-27T20:10:24Z","body":"```\r\nNightmare.action('scrollPage', function (done) {\r\n  this.evaluate_now(function () {\r\n\tvar hitRockBottom = false; \r\n\twhile (!hitRockBottom) {\r\n\t\t// console.log(\"1\");\r\n    // Scroll the page (not sure if this is the best way to do so...)\r\n    this.scrollTo(100000, 0);\r\n\r\n    // Check if we've hit the bottom\r\n    hitRockBottom = this.evaluate(function() {\r\n\t\t// console.log(\"0\");\r\n        return this.exists('selector') === null;\r\n    }); }\r\n  }, done)\r\n})\r\n```"}}
{"actor":{"display_login":"rosshinkley"}}