playwright-core 1.57.0-alpha-2025-11-11 → 1.57.0-alpha-2025-11-12

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.
@@ -301,7 +301,7 @@ class Locator {
301
301
  return this.toString();
302
302
  }
303
303
  toString() {
304
- return (0, import_locatorGenerators.asLocator)("javascript", this._selector);
304
+ return (0, import_locatorGenerators.asLocatorDescription)("javascript", this._selector);
305
305
  }
306
306
  }
307
307
  class FrameLocator {
@@ -85,6 +85,15 @@ class Request extends import_channelOwner.ChannelOwner {
85
85
  method() {
86
86
  return this._fallbackOverrides.method || this._initializer.method;
87
87
  }
88
+ async body() {
89
+ return (this._fallbackOverrides.postDataBuffer || (await this._channel.body()).body)?.toString("utf-8") || null;
90
+ }
91
+ async bodyBuffer() {
92
+ return this._fallbackOverrides.postDataBuffer || (await this._channel.body()).body || null;
93
+ }
94
+ async bodyJSON() {
95
+ return this._postDataJSON(await this.body());
96
+ }
88
97
  postData() {
89
98
  return (this._fallbackOverrides.postDataBuffer || this._initializer.postData)?.toString("utf-8") || null;
90
99
  }
@@ -93,6 +102,9 @@ class Request extends import_channelOwner.ChannelOwner {
93
102
  }
94
103
  postDataJSON() {
95
104
  const postData = this.postData();
105
+ return this._postDataJSON(postData);
106
+ }
107
+ _postDataJSON(postData) {
96
108
  if (!postData)
97
109
  return null;
98
110
  const contentType = this.headers()["content-type"];