Skip to content
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 to pass arguments to the browser executable? #42

Closed
tkrotoff opened this issue Feb 20, 2020 · 2 comments
Closed

How to pass arguments to the browser executable? #42

tkrotoff opened this issue Feb 20, 2020 · 2 comments

Comments

@tkrotoff
Copy link

How to pass arguments to the browser executable?

Use case:

For GitHub Actions to work with Playwright, we need to pass --no-sandbox to chromium

I think the arguments should be passed somewhere here: https://github.com/mmarkelov/jest-playwright/blob/v0.0.10/src/PlaywrightEnvironment.js#L48

@mmarkelov
Copy link
Member

@tkrotoff you can pass it with jest-playwright.config.js:

module.exports = {
	launchBrowserApp: {
		args: ['--no-sandbox']
	}
}

@arjunattam
Copy link

arjunattam commented Feb 20, 2020

Note that WebKit will crash when launched with --no-sandbox, which is a valid arg for Chromium only. For now, I recommend using

args: process.env.BROWSER === 'chromium' ? ['--no-sandbox'] : []

Follow this as we look for a better fix: microsoft/playwright#1063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants