title: Create multiple windows with persistent context using playwright
body: <p>I'm trying to launch multiple windows that are using the same user data dir.</p>
  <p>When launching using <a href="https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context" rel="nofollow noreferrer">browserType.launchPersistentContext(userDataDir[, options])]</a> and then using <a href="https://playwright.dev/docs/api/class-browsercontext#browser-context-new-page" rel="nofollow noreferrer">browserContext.newPage()</a> multiple times:</p>
  <pre><code>import playwright from 'playwright'
  
  const browserContext = await playwright.chromium.launchPersistentContext('/tmp/profile', { headless: false })
  
  await (await browserContext.newPage()).goto('https://example.com')
  await (await browserContext.newPage()).goto('https://example.com')
  await (await browserContext.newPage()).goto('https://example.com')
  </code></pre>
  <p>it will launch one window and then open one tab per page.</p>
  <p>Unfortunately, <a href="https://playwright.dev/docs/api/class-browsercontext#browser-context-browser" rel="nofollow noreferrer">browserContext.browser()</a> specifically doesn't work for persistent contexts:</p>
  <blockquote>
  <p>Returns the browser instance of the context. If it was launched as a persistent context null gets returned.</p>
  </blockquote>
  <p>so I cannot create multiple contexts.</p>
  <p>How would I go with making it open multiple windows when using persistent contexts?</p>