Reputation: 3592
My tests run Puppeteer in headless: false
mode and open several tabs.
If I am in another app window - whenever it opens a new tab - it focuses Chromium into view.
That is annoying. Is there any way to make it run in the background?
I'm on macOS 10.14
Upvotes: 6
Views: 3459
Reputation: 3023
Chromium.app/Contents
folder and open Info.plist
in an editor.node_modules/puppeteer/.local-chromium/mac-XXXXXX/chrome-mac/Chromium.app/Contents/Info.plist
)<dict>
and before the <key>
add the following: <key>LSBackgroundOnly</key>
<string>True</string>
Now Chromium should run in the background and won't steal the focus.
Source: Keep applications from stealing focus when opening in OS X
Upvotes: 10
Reputation: 484
Depending on what you're doing with the Website, it looks like it may not be feasible:
https://github.com/puppeteer/puppeteer/issues/2656
Upvotes: 0