playwright 1.56.0-alpha-2025-08-26 → 1.56.0-alpha-2025-08-27

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.
@@ -94,14 +94,11 @@ const evaluate = (0, import_tool.defineTool)({
94
94
  type: "destructive"
95
95
  },
96
96
  handle: async (page, params) => {
97
- if (params.ref && params.element) {
98
- const locator = await refLocator(page, { ref: params.ref, element: params.element });
99
- const result2 = await locator.evaluate(params.function);
100
- return {
101
- content: [{ type: "text", text: JSON.stringify(result2, null, 2) || "undefined" }]
102
- };
103
- }
104
- const result = await page.evaluate(params.function);
97
+ let locator;
98
+ if (params.ref && params.element)
99
+ locator = await refLocator(page, { ref: params.ref, element: params.element });
100
+ const receiver = locator ?? page;
101
+ const result = await receiver._evaluateFunction(params.function);
105
102
  return {
106
103
  content: [{ type: "text", text: JSON.stringify(result, null, 2) || "undefined" }]
107
104
  };
@@ -80,6 +80,8 @@ class WebServerPlugin {
80
80
  const port = new URL(this._options.url).port;
81
81
  throw new Error(`${this._options.url ?? `http://localhost${port ? ":" + port : ""}`} is already used, make sure that nothing is running on the port/url or set reuseExistingServer:true in config.webServer.`);
82
82
  }
83
+ if (!this._options.command)
84
+ throw new Error("config.webServer.command cannot be empty");
83
85
  debugWebServer(`Starting WebServer process ${this._options.command}...`);
84
86
  const { launchedProcess, gracefullyClose } = await (0, import_utils.launchProcess)({
85
87
  command: this._options.command,
@@ -333,7 +333,10 @@ ${(0, import_utils.stringifyStackFrames)(step.boxedStack).join("\n")}`;
333
333
  title: `Attach ${(0, import_utils.escapeWithQuotes)(name, '"')}`,
334
334
  category: "test.attach"
335
335
  });
336
- this._attach(await (0, import_util.normalizeAndSaveAttachment)(this.outputPath(), name, options), step.stepId);
336
+ this._attach(
337
+ await (0, import_util.normalizeAndSaveAttachment)(this.outputPath(), name, options),
338
+ step.group ? void 0 : step.stepId
339
+ );
337
340
  step.complete({});
338
341
  }
339
342
  _attach(attachment, stepId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.56.0-alpha-2025-08-26",
3
+ "version": "1.56.0-alpha-2025-08-27",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "license": "Apache-2.0",
62
62
  "dependencies": {
63
- "playwright-core": "1.56.0-alpha-2025-08-26"
63
+ "playwright-core": "1.56.0-alpha-2025-08-27"
64
64
  },
65
65
  "optionalDependencies": {
66
66
  "fsevents": "2.3.2"