Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
364 views
in Technique[技术] by (71.8m points)

javascript - Is there any way to hide a Puppeteer browser that has the option 'headless: false'?

I am working on an electron application that makes use of Puppeteer for some process.

This is the block of code I use to summon browsers:

var browser = await puppeteer.launch({
    headless: false,
    ignoreHTTPSErrors: true,
    defaultViewport: { width: 1920, height:1080 },
});

For specific reasons, I need the headless option to be false for the app to work, but at the same time I would like it if the app didn't actually bring up visible web browsers.

Is there any way (and I really mean ANY way. docker containers, remote servers, etc. I'm open to any and all suggestions) I can make these browsers invisible to the user while keeping the headless: false line of code?

I couldn't find any similar questions for this.

Thank You

question from:https://stackoverflow.com/questions/65852306/is-there-any-way-to-hide-a-puppeteer-browser-that-has-the-option-headless-fals

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...