To Reproduce
Please provide a mini reproduction rather than just a description. For example:
package main
import (
"log"
"time"
"github.com/playwright-community/playwright-go"
)
func main() {
pw, err := playwright.Run()
if err != nil {
log.Fatalf("could not start playwright: %v", err)
}
defer pw.Stop()
option := playwright.BrowserTypeLaunchOptions{
Headless: playwright.Bool(false),
}
browser, err := pw.Firefox.Launch(option)
if err != nil {
log.Fatalf("could not launch browser: %v", err)
}
defer browser.Close()
context, err := browser.NewContext()
if err != nil {
log.Fatalf("could not create context: %v", err)
}
defer context.Close()
sites := []string{
"https://weibo.com",
"https://google.com",
"https://wikipedia.org",
}
for _, site := range sites {
page, err := context.NewPage()
if err != nil {
log.Fatalf("could not create page: %v", err)
}
if _, err := page.Goto(site); err != nil {
log.Fatalf("could not goto: %v", err)
}
log.Printf("Visiting: %s", site)
}
time.Sleep(1 * time.Minute)
}
Additional context
Add any other context about the problem here.
The program starts to access multiple websites. The Firefox browser opens multiple windows, while using Chromium opens multiple tab pages. How to set up Firefox to open multiple tab pages instead of multiple windows?
Environments
Bug description
To Reproduce Please provide a mini reproduction rather than just a description. For example:
Additional context Add any other context about the problem here.
The program starts to access multiple websites. The Firefox browser opens multiple windows, while using Chromium opens multiple tab pages. How to set up Firefox to open multiple tab pages instead of multiple windows?