1

I am using Google Chrome to create screenshots of several sites in an automatic way. For that I am using the captureVisibleTab() function the API provides. Because this is an endless task I want to minimize the Chrome window so it can run in the background. Unfortunately the function works only when the tab is visible (ok, the function name indicates that already). But is there any possibility to create screenshots with Chrome when the window is minimized?

ccg
  • 313
  • 2
  • 8

1 Answers1

0

captureVisableTab() works fine for minimized windows. I just ran chrome.tabs.captureVisibleTab(windowId, null, function(dataUrl){ console.log(dataUrl) }); where `windowId was the id of a minimized window. Keep in mind though that it will only work for the front most tab in any particular window.

abraham
  • 46,583
  • 10
  • 100
  • 152
  • 1
    This is no longer true. Newer Chrome versions give the error `Failed to capture tab: image readback failed` when the window is minimized. – GetFree Apr 11 '20 at 05:57