0

Criteria:

  • Preferably a browser extension or desktop app.
  • Platform is a Windows 10 desktop.
  • Browser shall be any of the usual suspects (Firefox, Chrome, Edge, you name it).
  • I need to periodically (such as once a minute) take a screenshot of a browser window and save it to a directory. The page in question uses autorefresh, so the contents do change.
  • Must be able to operate even if the browser window is in the background.
  • Nice to have: if it can capture only a well defined part of the page (based on coordinates or html element id), it's even better.

Background: I have an application that does really long processing sessions (hours to days). It has a web UI with a page autorefresing itself and showing a progress bar and some status information. I'm interested in how the progress bar and the status text changes over time. (Sadly, the same information can not be extracted from the application logs.)

2
  • Have you checked out Snag-it? It's likely that it will pull the browser into the foreground to perform the task, however. Combined with a program like MacroExpress, you may be able to accomplish your objective. Possibly MacroExpress alone will do the trick, but you added the region feature.
    – fred_dot_u
    Jan 18, 2022 at 14:36
  • a completely different approach: perhaps try something "server based" like http2pic... it should be easily scritable and with a cron job you can time it however you want. ;-) Jan 18, 2022 at 16:41

2 Answers 2

0

You can probably code this in Python using the selenium library. You could run the browser (say, Chrome) headless using selenium, open the application in the browser with selenium, and send whatever keystrokes are needed to activate it. Then you would pause the selenium process repeatedly. Each time the process awakes you would take the desired screen shot. Here's an example of part of what you need. https://pythonspot.com/selenium-take-screenshot/

1
  • There is no indication that the OP is willing (or even able) to code it himself. The question nowhere mentions a library is desired, so we must assume he's asking for a ready-made program.
    – Alejandro
    May 7, 2022 at 15:49
0

There is a chrome extension called FireShot that allows you to capture screenshots. It has an API available so you can kick off a screenshot via javascript if you have the ability to modify the code of this application you're watching.

1
  • It's been a while since I asked this question and I have moved on from the original problem. But OK, I'll take a look at FireShot and give some feedback as soon as I get my hands free. Thanks! Nov 11, 2022 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.