Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Can I provide flags to the browsers? #328

Closed
jyepesr1 opened this issue Jan 26, 2023 · 1 comment
Closed

How Can I provide flags to the browsers? #328

jyepesr1 opened this issue Jan 26, 2023 · 1 comment

Comments

@jyepesr1
Copy link

jyepesr1 commented Jan 26, 2023

When I execute codegen, I want to run the chromium browser with the following flags

chromium --disable-dev-shm-usage --disable-blink-features=AutomationControlled --disable-component-extensions-with-background-pages

Is there any way I can provide those flags?

@ninadingole
Copy link
Collaborator

would this help?

pw, err := playwright.Run()
if err != nil {
  log.Fatalf("could not launch playwright: %v", err)
}
browser, err := pw.Chromium.Launch(playwright.BrowserTypeLaunchOptions{
  Args:     []string{"--disable-dev-shm-usage", "--disable-blink-features=AutomationControlled", "--disable-component-extensions-with-background-pages"},
  Headless: playwright.Bool(false),
})
if err != nil {
  log.Fatalf("could not launch Chromium: %v", err)
}

@playwright-community playwright-community locked and limited conversation to collaborators Mar 22, 2024
@canstand canstand converted this issue into discussion #432 Mar 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants