playwright-community / playwright-go

Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
https://playwright-community.github.io/playwright-go/
MIT License
2.11k stars 156 forks source link

[Bug]: Open fullscreen without "chrome is being controlled..." #458

Open skhaz opened 4 months ago

skhaz commented 4 months ago

I have the following code running the lastest version of Playwright and playwright-go

browser, err := pw.Chromium.LaunchPersistentContext(userDataDir, playwright.BrowserTypeLaunchPersistentContextOptions{
    Headless:          playwright.Bool(false),
    Viewport: nil,
    Args: []string{
        "--kiosk",
        "--start-maximized",
        //"--fullscreen",
        "--app=https://youtube.com",
        "--no-zygote",
        "--no-sandbox",
        "--disable-infobars",
        "--hide-scrollbars",
        "--disable-setuid-sandbox",
        "--disable-dev-shm-usage",
        "--ignore-deafault-args=enable-automation",
    },
})

However, it does not open full screen and there is a info bar in to top saying that is being controlled.

How to remove the infobar and make it true fullscreen?