{"action":"created","issue":{"url":"https://api.github.com/repos/gemini-testing/gemini/issues/798","repository_url":"https://api.github.com/repos/gemini-testing/gemini","labels_url":"https://api.github.com/repos/gemini-testing/gemini/issues/798/labels{/name}","comments_url":"https://api.github.com/repos/gemini-testing/gemini/issues/798/comments","events_url":"https://api.github.com/repos/gemini-testing/gemini/issues/798/events","html_url":"https://github.com/gemini-testing/gemini/issues/798","id":241825773,"number":798,"title":"Capture multiple elements on page","user":{"login":"artemyarulin","id":6191712,"avatar_url":"https://avatars0.githubusercontent.com/u/6191712?v=4","gravatar_id":"","url":"https://api.github.com/users/artemyarulin","html_url":"https://github.com/artemyarulin","followers_url":"https://api.github.com/users/artemyarulin/followers","following_url":"https://api.github.com/users/artemyarulin/following{/other_user}","gists_url":"https://api.github.com/users/artemyarulin/gists{/gist_id}","starred_url":"https://api.github.com/users/artemyarulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artemyarulin/subscriptions","organizations_url":"https://api.github.com/users/artemyarulin/orgs","repos_url":"https://api.github.com/users/artemyarulin/repos","events_url":"https://api.github.com/users/artemyarulin/events{/privacy}","received_events_url":"https://api.github.com/users/artemyarulin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-10T19:46:40Z","updated_at":"2017-10-06T12:53:03Z","closed_at":"2017-07-10T20:48:44Z","author_association":"NONE","body":"Hi, is there any way to capture multiple elements using one selector? \r\n\r\nI have a page with all components available in our project and was thinking to cover those with gemini, but following code:\r\n\r\n```\r\ngemini.suite('components', suite => {\r\n  suite\r\n    .setUrl('/components')\r\n    .setCaptureElements('.component') // page has many blocks with .component class which I would like to capture\r\n    .capture('normal')\r\n})\r\n```\r\nDoes capture only first component, while I was expecting having an array of screenshots as the result. There are two workaround that I found:\r\n1) setCaptureElements to full page, but then screenshot would be really big (we have hundred of components)\r\n2) Write test manually for each component - would take too much time.\r\n\r\nIs there any better way for that? \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gemini-testing/gemini/issues/comments/334746049","html_url":"https://github.com/gemini-testing/gemini/issues/798#issuecomment-334746049","issue_url":"https://api.github.com/repos/gemini-testing/gemini/issues/798","id":334746049,"user":{"login":"cameron-martin","id":1467158,"avatar_url":"https://avatars0.githubusercontent.com/u/1467158?v=4","gravatar_id":"","url":"https://api.github.com/users/cameron-martin","html_url":"https://github.com/cameron-martin","followers_url":"https://api.github.com/users/cameron-martin/followers","following_url":"https://api.github.com/users/cameron-martin/following{/other_user}","gists_url":"https://api.github.com/users/cameron-martin/gists{/gist_id}","starred_url":"https://api.github.com/users/cameron-martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameron-martin/subscriptions","organizations_url":"https://api.github.com/users/cameron-martin/orgs","repos_url":"https://api.github.com/users/cameron-martin/repos","events_url":"https://api.github.com/users/cameron-martin/events{/privacy}","received_events_url":"https://api.github.com/users/cameron-martin/received_events","type":"User","site_admin":false},"created_at":"2017-10-06T12:53:03Z","updated_at":"2017-10-06T12:53:03Z","author_association":"NONE","body":"I'm afraid this isn't a good enough solution for me because the elements that I want to take a screenshot of don't have the same parent. My use case is automatically taking screenshots of all examples in a react-styleguidist project.\r\n\r\nThe best solution that I've come to so far is wrapping each example in a div with a `data-example-id` attribute, which is an incrementing id. I then specify the example count in the gemini tests and then create examples in a loop. However, this means you need to update the example count manually each time you add an example which is far from ideal.\r\n\r\nCan this issue be re-opened?"}}
{"actor":{"display_login":"cameron-martin"}}