<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info: Typo in Documentation</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">The code for use <a href="https://playwright.dev/docs/test-parallel#serial-mode" rel="nofollow">Serial Mode</a> has a typo</p>
<ul dir="auto">
<li><strong>Actual:</strong> <code class="notranslate">let page: Page; </code></li>
<li><strong>Expected:</strong> <code class="notranslate">let page = Page; </code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, Page } from '@playwright/test';

// Annotate entire file as serial.
test.describe.configure({ mode: 'serial' });

let page: Page;  // &lt;--- here is the typo use = instead of :

test.beforeAll(async ({ browser }) =&gt; {
  page = await browser.newPage();
});

test.afterAll(async () =&gt; {
  await page.close();
});

test('runs first', async () =&gt; {
  await page.goto('https://playwright.dev/');
});

test('runs second', async () =&gt; {
  await page.getByText('Get Started').click();
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-v">Page</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span>

<span class="pl-c">// Annotate entire file as serial.</span>
<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-c1">describe</span><span class="pl-kos">.</span><span class="pl-en">configure</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">mode</span>: <span class="pl-s">'serial'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">let</span> <span class="pl-s1">page</span>: <span class="pl-v">Page</span><span class="pl-kos">;</span>  <span class="pl-c">// &lt;--- here is the typo use = instead of :</span>

<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">beforeAll</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> browser <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-s1">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">afterAll</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'runs first'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">'https://playwright.dev/'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'runs second'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">getByText</span><span class="pl-kos">(</span><span class="pl-s">'Get Started'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">click</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">We are in the process of converting our tests from TestCafe to Playwright. We have a test the uses an api to get a password rest email. The response is an html page for the password reset. The api works properly in TestCafe and Postman but returns &lt;Buffer 5b 5d&gt; in Playwright. I tried .body(), .text(), .json() for the response and no luck with any.</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.3]</li>
<li>Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]</li>
<li>Browser: [All, Chromium, Firefox, WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7255854/242435176-5cb647a4-f9a3-48a3-81d5-8a82d7a65fd2.png"><img width="931" alt="image" src="https://user-images.githubusercontent.com/7255854/242435176-5cb647a4-f9a3-48a3-81d5-8a82d7a65fd2.png" style="max-width: 100%;"></a>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const getApiForgotPasswordEmail = await this.apiContext.get(process.env.MAILTRAP_API+'/messages/'+resetEmailId+'/body.html',
  {
    headers:{
      'Accept': 'text/html, application/json',
      'Authorization': process.env.MAILTRAP_TOKEN,
      },
  })

  expect(getApiForgotPasswordEmail.ok()).toBeTruthy();
  const forgotPasswordEmailResponseCode = await getApiForgotPasswordEmail.status();
  console.log(forgotPasswordEmailResponseCode);
  const forgotPasswordEmailBody = await getApiForgotPasswordEmail.body();
  console.log('email body:');
  console.log(forgotPasswordEmailBody);"><pre class="notranslate"><code class="notranslate">const getApiForgotPasswordEmail = await this.apiContext.get(process.env.MAILTRAP_API+'/messages/'+resetEmailId+'/body.html',
  {
    headers:{
      'Accept': 'text/html, application/json',
      'Authorization': process.env.MAILTRAP_TOKEN,
      },
  })

  expect(getApiForgotPasswordEmail.ok()).toBeTruthy();
  const forgotPasswordEmailResponseCode = await getApiForgotPasswordEmail.status();
  console.log(forgotPasswordEmailResponseCode);
  const forgotPasswordEmailBody = await getApiForgotPasswordEmail.body();
  console.log('email body:');
  console.log(forgotPasswordEmailBody);
</code></pre></div>
<ul dir="auto">
<li>[X ] I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Test file (self-contained)</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="await apiUtils.getForgotPasswordEmail(newPatientNumber);"><pre class="notranslate"><code class="notranslate">await apiUtils.getForgotPasswordEmail(newPatientNumber);
</code></pre></div>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>[Run the test]</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">The html for an email will be returned.</p>
<p dir="auto">This is an example what is returned when the test is ran with TestCafe<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7255854/242436330-be718df4-5a58-45ef-900a-1e245aee86b1.png"><img width="606" alt="image" src="https://user-images.githubusercontent.com/7255854/242436330-be718df4-5a58-45ef-900a-1e245aee86b1.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Receive  the response &lt;Buffer 5b 5d&gt;</p>