Skip to content

[BUG] Firefox new page opens as new window instead of tab. #4123

@shirshak55

Description

@shirshak55
import { firefox, chromium } from "playwright"

async function main() {
  let browser = await firefox.launch({ headless: false })

  let context = await browser.newContext()

  let page = await context.newPage()
  let page1 = await context.newPage()

  await page.goto("https://microsoft.com")
  await page1.goto("https://microsoft.com")
}

async function main2() {
  let browser = await chromium.launch({ headless: false })

  let context = await browser.newContext()

  let page = await context.newPage()
  let page1 = await context.newPage()

  await page.goto("https://microsoft.com")
  await page1.goto("https://microsoft.com")
}

main().catch((e) => {
  console.error(e)
})

main2().catch((e) => {
  console.error(e)
})

Here is screenshot . Clearly code is nearly same with firefox and chromium replaced. But the behavior is weird firefox spawns window which is supposed to be tab. And Chrome behaves properly.

image

Plus this following code shows 2 window now in past it used to show 1 window with 2 tabs.

  let browser = await chromium.launch({ headless: false })
  let page = await context.newPage()
  let page1 = await context.newPage()

Discovered while upgrading the plugin.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions