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) => [
@@ -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.findChromiumChannel)(options.sdkLanguage);
53
+ channel = (0, import_registry.findChromiumChannelBestEffort)(options.sdkLanguage);
54
54
  }
55
55
  const controller = new import_progress.ProgressController((0, import_instrumentation.serverSideCallMetadata)(), browserType);
56
- const context = await controller.run((progress) => browserType.launchPersistentContext(progress, "", {
57
- ignoreDefaultArgs: ["--enable-automation"],
58
- ...options?.persistentContextOptions,
59
- channel,
60
- noDefaultViewport: options.persistentContextOptions?.noDefaultViewport ?? true,
61
- acceptDownloads: options?.persistentContextOptions?.acceptDownloads ?? ((0, import_utils.isUnderTest)() ? "accept" : "internal-browser-default"),
62
- colorScheme: options?.persistentContextOptions?.colorScheme ?? "no-override",
63
- args
64
- }), 0);
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
- findChromiumChannel: () => findChromiumChannel,
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 findChromiumChannel(sdkLanguage) {
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
- findChromiumChannel,
1281
+ findChromiumChannelBestEffort,
1282
1282
  installBrowsersForNpmInstall,
1283
1283
  registry,
1284
1284
  registryDirectory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-core",
3
- "version": "1.54.1-beta-1753912139000",
3
+ "version": "1.54.1-beta-1753992917000",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",