-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
screenshots zero-length when taking multiple screenshots in custom action (empty screenshots) #1161
Comments
Try running your screenshot after a nightmare.goto(url).then(() => nightmare.snap('.navbar')) I once had a similar issue where code was being ran before the page was loaded. |
Hm... Sadly that doesn't fix the bug... :/. Thanks for the idea though! |
Answered in the stack overflow here: https://stackoverflow.com/questions/44580348/nightmare-js-screenshot-buffer-length-0 |
I wanted to leave a little note here that I had this same issue while running nightmare in docker and was able to google enough to find that the docker shared memory is 64mb by default and is the cause of this and a few other things changing it to 128mb fixed it but you may need more or less I submitted #1570 to add more info onto the readme. |
I'm kind of stuck on an issue and I'm not sure if I'm understanding the custom action or not. I'm running a nightmare.js script where where I'm trying to take a screenshot of multiple elements on a page.
The first element is captured just fine, but every other element that is below the fold is captured with a zero length. I am struggling to debug this issue. Any help would be incredibly appreciated.
Basically this script walks through a page and selects all the elements on the page that match a selector. Then, using async it collects the responses and returns a buffer of objects. The issue is that the elements below the fold do not get screenshotted (buffer length ends up at zero). I tried to wait() and scroll to the element, but I have not had any success as of yet.
The code is:
(I've also posted this on stackoverflow here
The text was updated successfully, but these errors were encountered: