Forrest logo
back to the firefox tool

firefox:tldr:84734

firefox: Take a screenshot of a web page in headless mode.
$ firefox --headless --screenshot ${path-to-output_file-png} ${https:--example-com-}
try on your machine

The command you provided is used to take a screenshot of a webpage using Mozilla Firefox in headless mode.

Here's a breakdown of the command:

  • firefox: This is the command to launch Mozilla Firefox browser.

  • --headless: This flag is used to run Firefox in headless mode, which means it will run without a graphical user interface (GUI).

  • --screenshot: This flag specifies that we want to take a screenshot of the webpage.

  • ${path-to-output_file-png}: This is a placeholder for the path and name of the output file. You need to replace it with the actual path and desired name for your output file. Make sure to provide the correct file extension, such as .png.

  • ${https:--example-com-}: This is a placeholder for the URL of the webpage you want to take a screenshot of. Again, you need to replace it with the actual URL of the webpage. Make sure to include the http:// or https:// protocol prefix.

To use this command, you need to have Mozilla Firefox installed on your system and access to the terminal or command prompt.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the firefox tool