Tell Puppeteer to open Chrome tab instead of window

前端 未结 1 1717
太阳男子
太阳男子 2021-01-13 18:43

If I have an existing Google Chrome window open, I\'d like to tell puppeteer to open a new tab instead of opening a new window. Is there a way to do that? is there some opti

相关标签:
1条回答
  • 2021-01-13 19:14
    const browser = puppeteer.launch();
    const page = browser.newPage();
    

    This will actually open a new tab on your current browser instance. You can checkout the page class docs here and the browser class docs here.

    0 讨论(0)
提交回复
热议问题