Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(chromium): replace AutoDeElevate feature with --do-not-de-elevate switch (#43460)

Dmitry Gozman3865e4b9d3d8
diff --git a/packages/playwright-core/src/server/chromium/chromiumSwitches.ts b/packages/playwright-core/src/server/chromium/chromiumSwitches.ts
index 4d3f7bf222..fd5568c3b6 100644
--- a/packages/playwright-core/src/server/chromium/chromiumSwitches.ts
+++ b/packages/playwright-core/src/server/chromium/chromiumSwitches.ts
@@ -37,8 +37,6 @@ const disabledFeatures = [
'AvoidCorsURLLoaderRestartOnRedirect',
// See https://github.com/microsoft/playwright/issues/16126
'Translate',
- // See https://issues.chromium.org/u/1/issues/435410220
- 'AutoDeElevate',
// Prevents downloading optimization hints on startup.
'OptimizationHints',
// Prevents network time queries to clients2.google.com on startup.
@@ -99,4 +97,7 @@ export const chromiumSwitches = (options?: { android?: boolean }) => [
'--disable-search-engine-choice-screen',
// Prevents the "three dots" menu crash in IdentityManager::HasPrimaryAccount for ephemeral contexts.
options?.android ? '' : '--disable-sync',
+ // Prevents relaunching as non-admin when started from an elevated process on Windows.
+ // See https://issues.chromium.org/u/1/issues/435410220
+ '--do-not-de-elevate',
].filter(Boolean);