<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.3]</li>
<li>Operating System: [All]</li>
<li>Browser: [All]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<p dir="auto">The POST request here: <a href="https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/server/chromium/chromium.ts#L192C28-L199">https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/server/chromium/chromium.ts#L192C28-L199</a><br>
is correct, but the method <code class="notranslate">fetchData</code> defined here: </p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/utils/network.ts#L97-L111">playwright/packages/playwright-core/src/utils/network.ts</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 97 to 111
      in
      <a data-pjax="true" class="commit-tease-sha" href="/microsoft/playwright/commit/ec972fb7c140908560347ea215d30016fda2508d">ec972fb</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L97" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="97"></td>
          <td id="LC97" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">fetchData</span><span class="pl-kos">(</span><span class="pl-s1">params</span>: <span class="pl-smi">HTTPRequestParams</span><span class="pl-kos">,</span> <span class="pl-s1">onError</span>?: <span class="pl-kos">(</span><span class="pl-s1">params</span>: <span class="pl-smi">HTTPRequestParams</span><span class="pl-kos">,</span> <span class="pl-s1">response</span>: <span class="pl-s1">http</span><span class="pl-kos">.</span><span class="pl-smi">IncomingMessage</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">Error</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span>: <span class="pl-smi">Promise</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L98" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="98"></td>
          <td id="LC98" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Promise</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L99" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="99"></td>
          <td id="LC99" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-en">httpRequest</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-s1">response</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L100" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="100"></td>
          <td id="LC100" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span> <span class="pl-c1">!==</span> <span class="pl-c1">200</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L101" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="101"></td>
          <td id="LC101" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-k">const</span> <span class="pl-s1">error</span> <span class="pl-c1">=</span> <span class="pl-s1">onError</span> ? <span class="pl-k">await</span> <span class="pl-en">onError</span><span class="pl-kos">(</span><span class="pl-s1">params</span><span class="pl-kos">,</span> <span class="pl-s1">response</span><span class="pl-kos">)</span> : <span class="pl-k">new</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">`fetch failed: server returned code <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-c1">statusCode</span><span class="pl-kos">}</span></span>. URL: <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">params</span><span class="pl-kos">.</span><span class="pl-c1">url</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td>
          <td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td>
          <td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-k">return</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td>
          <td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-kos">}</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L105" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="105"></td>
          <td id="LC105" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-k">let</span> <span class="pl-s1">body</span> <span class="pl-c1">=</span> <span class="pl-s">''</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L106" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="106"></td>
          <td id="LC106" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'data'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">chunk</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">body</span> <span class="pl-c1">+=</span> <span class="pl-s1">chunk</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L107" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="107"></td>
          <td id="LC107" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'error'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">error</span>: <span class="pl-smi">any</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L108" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="108"></td>
          <td id="LC108" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">       <span class="pl-s1">response</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'end'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">body</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L109" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="109"></td>
          <td id="LC109" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L110" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="110"></td>
          <td id="LC110" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L111" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="111"></td>
          <td id="LC111" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-kos">}</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
 is not passing the header <code class="notranslate">"Content-type": "application/json"</code><br>
so when Selenium Hub receives the request, it drops the body of the request.<p></p>
<p dir="auto">It's the only instance where the method is doing a "POST" rather than a "GET", which I guess has resulted in this slipping through.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Setup a Remote Selenium Grid Hub</li>
<li>Follow the docs</li>
<li>Run the tests</li>
<li>Read the Selenium Grid Hub logs</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto">Propagate the Selenium Grid capabilities from the environment variable</p>
<p dir="auto">[Describe actual behavior]</p>
<p dir="auto">Does not propagate Selenium Grid capabilities from the environment variable</p>
<p dir="auto">As far as I can understand it is possible to take a full page screenshot when calling <code class="notranslate">await page.screenshot({ path: 'screenshot.png', fullPage: true });</code>, but not after a test run / on failure.<br>
The option to take full page screenshots on failure (something like <code class="notranslate">screenshot: { mode: 'only-on-failure', fullPage: true }</code>) would make it easier to analyze failed tests because sometimes the reason for the test to fail might be outside of the current viewport.</p>