0

I am currently using Backstop JS and having a little trouble with getting it to take screenshots of elements that are shown only when in view?

I have a class that gets added when they are in view, however Backstop isn't taking this into account and instead taking pictures of what looks like empty spaces.

I imagine there needs to be a loop in the onReady.js file that applies the 'in view' class to each element before it's run (however not sure).

Could anyone point me in the right direction?

Let me know if you need any more information!

Thanks

marko
  • 27
  • 6
  • There are a few things you could try. You could automate how a user would bring these elements into view using a `puppeteer` script and set it as an `onBeforeScript` for your scenario. Alternatively you could use that `puppeteer` script to inject the class you want on to the elements you want to capture before any screen captures are taken. – AJC24 Oct 30 '18 at 09:06
  • ^^ I meant to say `onReadyScript`. – AJC24 Oct 30 '18 at 14:40

0 Answers0