cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
seedsca
New member
Status: New idea

I'm trying to write a script that would have firefox take a screenshot from the command line, in headless mode. Only issue is that the site I'm trying to screenshot takes a couple of seconds to finish loading, so I only get a partially loaded screenshot. The only option available on the command line is --window-size...

I can take a screenshot inside the dev console with many more options, including --delay (https://developer.mozilla.org/en-US/docs/Tools/Taking_screenshots), it would be great if there as a way to replicate these options on the command line.

3 Comments
Status changed to: New idea
Jon
Community Manager
Community Manager

Thanks for submitting an idea to the Mozilla Connect community! Your idea is now open to votes (aka kudos) and comments.

Anonymous
Not applicable

Firefox isn't really meant to be fully scriptable from the command line, you might need to consider using something like the puppeterjs framework (it can run headless chrome or firefox)

Example for taking screenshots:

https://github.com/puppeteer/puppeteer/blob/main/examples/screenshot.js

seedsca
New member

Thanks @Anonymous I appreciate the info. I have setup Puppeteer scripts to do some robust automations. I am asking about this because it's already available on the dev tools, so I assume it's an easy thing to enable on the command line/headless side as well.

This would be quite a handy additions, in my opinion. 🙂