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 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 at 16:41

1 Answer 1

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 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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