playwright-core 1.54.1-beta-1753912139000 → 1.54.1-beta-1753992917000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,6 +51,8 @@ const disabledFeatures = (assistantMode) => [
|
|
|
51
51
|
"ThirdPartyStoragePartitioning",
|
|
52
52
|
// See https://github.com/microsoft/playwright/issues/16126
|
|
53
53
|
"Translate",
|
|
54
|
+
// See https://issues.chromium.org/u/1/issues/435410220
|
|
55
|
+
"AutoDeElevate",
|
|
54
56
|
assistantMode ? "AutomationControlled" : ""
|
|
55
57
|
].filter(Boolean);
|
|
56
58
|
const chromiumSwitches = (assistantMode, channel) => [
|
package/lib/server/launchApp.js
CHANGED
|
@@ -50,18 +50,31 @@ async function launchApp(browserType, options) {
|
|
|
50
50
|
"--test-type="
|
|
51
51
|
);
|
|
52
52
|
if (!channel && !options.persistentContextOptions?.executablePath)
|
|
53
|
-
channel = (0, import_registry.
|
|
53
|
+
channel = (0, import_registry.findChromiumChannelBestEffort)(options.sdkLanguage);
|
|
54
54
|
}
|
|
55
55
|
const controller = new import_progress.ProgressController((0, import_instrumentation.serverSideCallMetadata)(), browserType);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
let context;
|
|
57
|
+
try {
|
|
58
|
+
context = await controller.run((progress) => browserType.launchPersistentContext(progress, "", {
|
|
59
|
+
ignoreDefaultArgs: ["--enable-automation"],
|
|
60
|
+
...options?.persistentContextOptions,
|
|
61
|
+
channel,
|
|
62
|
+
noDefaultViewport: options.persistentContextOptions?.noDefaultViewport ?? true,
|
|
63
|
+
acceptDownloads: options?.persistentContextOptions?.acceptDownloads ?? ((0, import_utils.isUnderTest)() ? "accept" : "internal-browser-default"),
|
|
64
|
+
colorScheme: options?.persistentContextOptions?.colorScheme ?? "no-override",
|
|
65
|
+
args
|
|
66
|
+
}), 0);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
if (channel) {
|
|
69
|
+
error = (0, import_utils.rewriteErrorMessage)(error, [
|
|
70
|
+
`Failed to launch "${channel}" channel.`,
|
|
71
|
+
"Using custom channels could lead to unexpected behavior due to Enterprise policies (chrome://policy).",
|
|
72
|
+
"Install the default browser instead:",
|
|
73
|
+
(0, import_utils.wrapInASCIIBox)(`${(0, import_registry.buildPlaywrightCLICommand)(options.sdkLanguage, "install")}`, 2)
|
|
74
|
+
].join("\n"));
|
|
75
|
+
}
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
65
78
|
const [page] = context.pages();
|
|
66
79
|
if (browserType.name() === "chromium" && process.platform === "darwin") {
|
|
67
80
|
context.on("page", async (newPage) => {
|
|
@@ -31,7 +31,7 @@ __export(registry_exports, {
|
|
|
31
31
|
Registry: () => Registry,
|
|
32
32
|
browserDirectoryToMarkerFilePath: () => browserDirectoryToMarkerFilePath,
|
|
33
33
|
buildPlaywrightCLICommand: () => buildPlaywrightCLICommand,
|
|
34
|
-
|
|
34
|
+
findChromiumChannelBestEffort: () => findChromiumChannelBestEffort,
|
|
35
35
|
installBrowsersForNpmInstall: () => installBrowsersForNpmInstall,
|
|
36
36
|
registry: () => registry,
|
|
37
37
|
registryDirectory: () => registryDirectory,
|
|
@@ -1238,7 +1238,7 @@ async function installBrowsersForNpmInstall(browsers) {
|
|
|
1238
1238
|
/* forceReinstall */
|
|
1239
1239
|
);
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1241
|
+
function findChromiumChannelBestEffort(sdkLanguage) {
|
|
1242
1242
|
let channel = null;
|
|
1243
1243
|
for (const name of ["chromium", "chrome", "msedge"]) {
|
|
1244
1244
|
try {
|
|
@@ -1278,7 +1278,7 @@ const registry = new Registry(require("../../../browsers.json"));
|
|
|
1278
1278
|
Registry,
|
|
1279
1279
|
browserDirectoryToMarkerFilePath,
|
|
1280
1280
|
buildPlaywrightCLICommand,
|
|
1281
|
-
|
|
1281
|
+
findChromiumChannelBestEffort,
|
|
1282
1282
|
installBrowsersForNpmInstall,
|
|
1283
1283
|
registry,
|
|
1284
1284
|
registryDirectory,
|