<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.32.3]</li>
<li>Operating System: [macOS 12.6.5]</li>
<li>Browser: [Chromium]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<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><a href="https://github.com/ozyx/playwright-ui-repeateach-failure">Link to the GitHub repository with the repro</a></strong></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li><code class="notranslate">npx playwright test --ui</code></li>
<li>Try to run the only existing test in the repro (hit play on the single test)</li>
<li>Notice errors in the console:</li>
</ul>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Error: TypeError: Cannot read properties of undefined (reading '_createTestResult')
    at Be._onTestBegin (http://localhost:58924/trace/watch.575ca3b3.js:1:3028)
    at Be.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:1:1991)
    at window.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:3:296)
    at eval (eval at evaluate (:195:30), &lt;anonymous&gt;:2:10)
    at UtilityScript.evaluate (&lt;anonymous&gt;:197:17)
    at UtilityScript.&lt;anonymous&gt; (&lt;anonymous&gt;:1:44)Error: TypeError: Cannot read properties of undefined (reading 'resultsMap')
    at Be._onStepBegin (http://localhost:58924/trace/watch.575ca3b3.js:1:3534)
    at Be.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:1:2119)
    at window.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:3:296)
    at eval (eval at evaluate (:195:30), &lt;anonymous&gt;:2:10)
    at UtilityScript.evaluate (&lt;anonymous&gt;:197:17)
    at UtilityScript.&lt;anonymous&gt; (&lt;anonymous&gt;:1:44)Error: TypeError: Cannot read properties of undefined (reading 'resultsMap')
// etc..."><pre class="notranslate">Error: TypeError: Cannot <span class="pl-c1">read</span> properties of undefined (reading <span class="pl-s"><span class="pl-pds">'</span>_createTestResult<span class="pl-pds">'</span></span>)
    at Be._onTestBegin (http://localhost:58924/trace/watch.575ca3b3.js:1:3028)
    at Be.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:1:1991)
    at window.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:3:296)
    at <span class="pl-c1">eval</span> (eval at evaluate (:195:30), <span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:2:10)
    at UtilityScript.evaluate (<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:197:17)
    at UtilityScript.<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span> (<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:1:44)Error: TypeError: Cannot <span class="pl-c1">read</span> properties of undefined (reading <span class="pl-s"><span class="pl-pds">'</span>resultsMap<span class="pl-pds">'</span></span>)
    at Be._onStepBegin (http://localhost:58924/trace/watch.575ca3b3.js:1:3534)
    at Be.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:1:2119)
    at window.dispatch (http://localhost:58924/trace/watch.575ca3b3.js:3:296)
    at <span class="pl-c1">eval</span> (eval at evaluate (:195:30), <span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:2:10)
    at UtilityScript.evaluate (<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:197:17)
    at UtilityScript.<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span> (<span class="pl-k">&lt;</span>anonymous<span class="pl-k">&gt;</span>:1:44)Error: TypeError: Cannot <span class="pl-c1">read</span> properties of undefined (reading <span class="pl-s"><span class="pl-pds">'</span>resultsMap<span class="pl-pds">'</span></span>)
// etc...</pre></div>
<ul dir="auto">
<li>Run tests regularly: <code class="notranslate">npx playwright test</code></li>
<li>Notice that tests run 5 times as expected and pass</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Test should run</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Test does not run, errors appear in console</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.34.2]</li>
<li>Operating System: [macOS 13.2]</li>
<li>Browser: [WebKit]</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<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>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><a href="https://github.com/ArrayZoneYour/playwright-screenshot">https://github.com/ArrayZoneYour/playwright-screenshot</a></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>pnpm install</li>
<li>npm run test</li>
<li>npm run test:ui</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">[Describe expected behavior]</p>
<p dir="auto">webkit screenshot is the same as it display under ui mode</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/21001457/249116794-5038668f-c9fa-4319-8b08-161fe2657a03.png"><img src="https://user-images.githubusercontent.com/21001457/249116794-5038668f-c9fa-4319-8b08-161fe2657a03.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">[Describe actual behavior]</p>
<p dir="auto">webkit screenshot rotateY is not worked as expected</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://github.com/ArrayZoneYour/playwright-screenshot/blob/main/webkit.png?raw=true"><img src="https://github.com/ArrayZoneYour/playwright-screenshot/blob/main/webkit.png?raw=true" alt="" style="max-width: 100%;"></a></p>