Take a full page screenshot with Firefox on the command-line

后端 未结 6 1535
梦如初夏
梦如初夏 2020-12-04 04:34

I\'m running Firefox on a Xvfb in a VPS. What I want to do is to take a full page screenshot of the page.

I can redirect Firefox to particular page using

<         


        
6条回答
  •  自闭症患者
    2020-12-04 05:06

    The Developer Toolbar GCLI and Shift+F2 shortcut were removed in Firefox version 60. To take a screenshot in 60 or newer:

    • press Ctrl+Shift+K to open the developer console (⌥ Option+⌘ Command+K on macOS)
    • type :screenshot or :screenshot --fullpage

    Find out more regarding screenshots and other features


    For Firefox versions < 60:

    Press Shift+F2 or go to Tools > Web Developer > Developer Toolbar to open a command line. Write:

    screenshot
    

    and press Enter in order to take a screenshot.

    To fully answer the question, you can even save the whole page, not only the visible part of it:

    screenshot --fullpage
    

    And to copy the screenshot to clipboard, use --clipboard option:

    screenshot --clipboard --fullpage
    

    Firefox 18 changes the way arguments are passed to commands, you have to add "--" before them.

    You can find some documentation and the full list of commands here.

    PS. The screenshots are saved into the downloads directory by default.

提交回复
热议问题