Skip to content

Commit 7d08c77

Browse files
committed
Only pass no-sandbox for Chromium
1 parent 3dd7ae3 commit 7d08c77

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Playwright.NUnit.Testing/Base/TestBase.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ public async Task OneTimeSetUpAsync() {
1616
_pw = await Microsoft.Playwright.Playwright.CreateAsync();
1717

1818
var launch = new BrowserTypeLaunchOptions {
19-
Headless = true, // flip to false to watch the run
20-
Args = ["--no-sandbox"] // helpful in some CI agents
19+
Headless = true
2120
};
2221

22+
if (_kind == BrowserKind.Chromium) {
23+
launch.Args = ["--no-sandbox"];
24+
}
25+
2326
_browser = _kind switch {
2427
BrowserKind.Chromium => await _pw.Chromium.LaunchAsync(launch),
2528
BrowserKind.Firefox => await _pw.Firefox.LaunchAsync(launch),

0 commit comments

Comments
 (0)