Skip to content

Commit f2d84da

Browse files
committed
fix --disable-features switch
1 parent 9ea07ad commit f2d84da

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

webdriver-ts/src/puppeteerAccess.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ export async function startBrowser(benchmarkOptions: BenchmarkOptions): Promise<
111111
const window_width = width,
112112
window_height = height;
113113

114+
const disableFeatures = [
115+
"Translate", // avoid translation popups
116+
"PrivacySandboxSettings4", // avoid privacy popup
117+
"IPH_SidePanelGenericMenuFeature" // bookmark popup see https://github.com/krausest/js-framework-benchmark/issues/1688
118+
];
119+
114120
const args = [
115121
`--window-size=${window_width},${window_height}`,
116122
"--js-flags=--expose-gc", // needed for gc() function
@@ -119,9 +125,7 @@ export async function startBrowser(benchmarkOptions: BenchmarkOptions): Promise<
119125
"--no-first-run",
120126
"--ash-no-nudges",
121127
"--disable-extensions",
122-
"--disable-features=Translate", // avoid translation popups
123-
"--disable-features=PrivacySandboxSettings4", // avoid privacy popup
124-
"--disable-features=IPH_SidePanelGenericMenuFeature" // bookmark popup see https://github.com/krausest/js-framework-benchmark/issues/1688
128+
`--disable-features=${disableFeatures.join()}`
125129
];
126130
if (benchmarkOptions.headless) args.push("--headless=new");
127131

0 commit comments

Comments
 (0)