How to take a screenshot that includes a scrolling element within a web page in Firefox?

70

35

I need to take a screenshot of an entire webpage. The trick is that I need the screenshot to include the entire contents of a single element that does not fit in the screen.

It is a single column table that has a scrollbar due to its height. It is not an IFRAME (which would be simple to load in its own tab).

The column contains formatted text and a few small images.

For long web pages that scroll, it is trivial to perform this task. But how can it be accomplished when it contains an individual element within the page that scrolls?

To be clear, I need to capture the entire page, not just the element itself.

I would like to accomplish this using Firefox on Windows.

RockPaperLizard

Posted 2016-06-13T06:28:32.630

Reputation: 5 415

2Ever consider saving the page as a PDF? The catch with this method is some websites have a “print view” which is what the PDF will contain, but in some cases this technique can work. – JakeGould – 2016-06-13T06:30:51.880

@JakeGould Thanks Jake. Would that work to scroll and element within a page? – RockPaperLizard – 2016-06-13T07:17:46.290

Welp, missed the part about the scrolling element. That is too idiosyncratic for me to comment on so all I can say is I can’t be confident now that the PDF printing method will work. Best of luck with other ideas presented here. – JakeGould – 2016-06-13T07:23:13.090

Possibly useful: Firefox plugin to save complete rendered page as image on [softwarerecs.se].

– a CVn – 2016-06-13T10:57:40.770

If I understand correctly, the scrolling element in question is probably being forced to less than it's full height. Setting the height style attribute to auto on that element may help. – tehwalris – 2016-06-13T18:47:43.010

There is a tool we use at my work called SnagIt that will do this (I believe). – Steve – 2016-06-13T19:25:20.750

@tehwalris That's a great idea. Thanks! I'll give that a try as well. I could even create a CSS overlay to do that automatically. – RockPaperLizard – 2016-06-13T21:36:45.573

Answers

87

My suggestion is to use the Firefox's built in feature that allows you to take screenshots of single DOM element.

Just pop open the developer tools → Find the element → Right Click and take screenshot

enter image description here

It didn't work on one of my internal site so cannot say it will work for all.

Update after OP's Edit:

If you intend to record full page along with whole of DOM element content as shown below, you should live edit the height of DOM element but...

enter image description here

It is going to push a lot of DOM elements out of viewport and screenshot or AFAIK any other tool will not capture it, which beats your purpose I think.

Read below from https://en.wikipedia.org/wiki/Screenshot

A screenshot, screen capture, screen cap, cap, screen dump, or screengrab is an image taken by a person to record the visible items displayed on the monitor, television, or other visual output device in use.

If I really had to do it your way, I would either create a GIF or take two screenshots one full page and other only of the DOM element to merge into one.

pun

Posted 2016-06-13T06:28:32.630

Reputation: 5 311

Thank you so much for your answer (and great image!), but unfortunately this does not answer the question. I need to take a screenshot of the entire page including the element, not just of the element itself. – RockPaperLizard – 2016-06-13T19:14:42.573

5@RockPaperLizard actually @pun's answer DOES answer your question... he just didn't apply it to your use case. You can follow his answer but select the <body> element and it will give you the desired screenshot. – Digital Chris – 2016-06-13T19:34:28.763

2If you edit the height of the DOM element so there are no internal scrollbars then use FireShot to capture the whole page, it should work. – None – 2016-06-14T17:52:15.507

I was able to get one screenshot like this, but no more. It still produces the camera shutter sound, just puts nothing in the clipboard. Same goes for the command in developer toolbar, no file gets created. – MrFox – 2017-12-22T14:16:55.933

@MrFox A png file is created in the Downloads folder. – AxiomaticNexus – 2019-08-15T15:38:55.880

24

You can use the screenshot command from the Developer Toolbar:

  1. Press Shift + F2 to open the toolbar or select it from the Web Developer Tools menu.

  2. In the toolbar, type the command screenshot --fullpage fullpage.png.

To capture a single element you can use its css selector with the --selector flag e.g.

screenshot --selector #hot-network-questions

will get you the image below

enter image description here

topher

Posted 2016-06-13T06:28:32.630

Reputation: 361

4

@RockPaperLizard I found another post with the same answer and OP was edited by you.

– pun – 2016-06-13T08:55:11.460

@pun Thank you. But I need to take a screenshot of the entire page with the element expanded, not just the element itself. – RockPaperLizard – 2016-06-13T19:13:43.023

I was able to get one screenshot like this, but no more. It still produces the camera shutter sound, just not the file. Same goes for right-clicking the element in developer mode and copying it that way. No image gets send to the clipboard. – MrFox – 2017-12-22T14:13:38.360

8

Using Firefox's Responsive Design Mode, set the width to something normal and the height such that it's enough to encompass the entire page. Then click the screenshot button (the camera icon).

Ouroborus

Posted 2016-06-13T06:28:32.630

Reputation: 2 549

After much struggling with taking a screenshot of a stubborn web page, I remembered your tip. It worked great (and was the only answer here that worked for this specific page). Thank you! The only challenge was setting the height to the appropriate value. I found the best technique was to go into Developer Mode while in Responsive Design Mode and inspect the layout of the tall element to determine its new height. If you have a better technique, please let us know! :) – RockPaperLizard – 2020-02-29T06:17:56.503

4

There is Software called Snagit that may solve your issue. This software can take the screen shot in different types, like a scrolling window and also can record video.

It is a paid application, but does have a trial available as well.

Gurumurthy.G

Posted 2016-06-13T06:28:32.630

Reputation: 421

if you find this as an answer mark it and post it in comment What does that mean? – A.L – 2016-06-13T15:14:03.553

I've used SnagIt for years. It's a very useful piece of software. – Roy Tinker – 2016-06-14T17:08:54.037

3

I use Screenpresso. It allows you to take a scrolling screenshot. Basically you take a screenshot, scroll down and take another and so on, then Screenpresso stitches them together. Screenpresso is also free.

FYI, the shortcut keys for scrolling screenshot is WindowsKey+Shift+PrintScreen. You then need to click the window you would like to scroll. When you get to the next part to screenshot, right click, scroll down, right click and so on. Whe you are finished, left click and they will get stitched together. Make sure to get some overlap on each screenshot so the stitching process works better.

garethb

Posted 2016-06-13T06:28:32.630

Reputation: 141

1

There is an extension called Nimbus Screen Capture which is perfectly suited to this task.

You have the option to capture:

  • the visible part of the page (useful to not include the browser elements as opposed to alt+Print Scrn)
  • a fragment of the page (whereby you can hover over regions on the screen in order to find the fragment you want - these regions correspond to their underlying HTML elements)
  • selected area (you manually click and drag where you want the screenshot, supports scrolling while dragging)
  • the entire page

nimbus

Keith Hall

Posted 2016-06-13T06:28:32.630

Reputation: 331

Thank you for your answer, I appreciate it. Unfortunately, it does not look like Nimbus Screen Capture can capture the entire contents of a scrolling element within a page. If I'm mistaken, could you provide more detail on how to accomplish this with that tool? – RockPaperLizard – 2016-06-14T16:22:15.953

@RockPaperLizard you are right, it doesn't seem to support this - I had thought that the fragment mode would cover scrolling elements, or that the selected area mode would work but, while the window can be scrolled in this mode, it seems that the scrolling elements can't. – Keith Hall – 2016-06-15T08:46:37.693

Thanks for confirming I just wasn't seeing it. Maybe they will add that functionality to a future version. – RockPaperLizard – 2016-06-15T09:33:43.670

0

Options to fit everything on one page:

  • Use <Ctrl>- to fit everything on one page
  • Rotate your screen to portrait mode
  • Use a second screen in portrait mode and locate it below the first one
  • Combine all of the above

Another option is to take a screen shot of the upper part of what you want to capture. Scroll down, take the next screen shoot. Repeat this until you've captured everything.
Optionally: combine the screen shots into one big image using an image editor (e.g. gimp).

NZD

Posted 2016-06-13T06:28:32.630

Reputation: 2 142

1Until I got to item #4, I thought you were only suggesting to combine all the items! I was imagining having 20 screens and stacking them one on top of the other... LOL. Then I got to #4, and learned that you meant the items to be used individually or combined. – RockPaperLizard – 2016-06-13T07:20:23.280

But if you zoom out the page, there is no way to scale it back out without distortion. – NiCk Newman – 2016-06-14T13:17:55.510

0

To take screenshots you can add an Extension like easy screenshot. Then It will be much easier for you to take screen shots.

user606374

Posted 2016-06-13T06:28:32.630

Reputation: 1

0

For DESKTOP programs, with scrolling window ApowerSoft capture did the job for me.

T.Todua

Posted 2016-06-13T06:28:32.630

Reputation: 2 436