2021年3月31日星期三

Playwright close unnumbered page

I use code

const {chromium} = require('playwright');  (async () => {      const userDataDir = '\NewData';      const browser = await chromium.launchPersistentContext(userDataDir,{headless:false});      const page = await browser.newPage();      await page.goto('https://www.google.com/')  })()  

But the browser runs one blank tab before opening google, I think this is because I wrote the cookies incorrectly, but I have no desire to rewrite them. How can I close the first tab?

https://stackoverflow.com/questions/66897187/playwright-close-unnumbered-page April 01, 2021 at 09:06AM

没有评论:

发表评论