<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.31.0</li>
<li>Operating System: Ubuntu 22.04.2</li>
<li>Browser: Firefox</li>
</ul>
<h3 dir="auto">Source code</h3>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import com.microsoft.playwright.BrowserType;
import com.microsoft.playwright.Playwright;
import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
public class PlaywrightBug {
    public static void main(String[] args) throws Exception {
        var proc = new ProcessBuilder(&quot;docker&quot;, &quot;run&quot;, &quot;--rm&quot;, &quot;-p&quot;, &quot;127.0.0.1:80:8080&quot;, &quot;ghcr.io/jglick/authenticated-jenkins:main&quot;).inheritIO().start();
        try (
                var playwright = Playwright.create();
                var browser = playwright.firefox().launch(new BrowserType.LaunchOptions().setHeadless(false));
                var context = browser.newContext();
                var page = context.newPage()) {
            while (!page.navigate(&quot;http://jenkins.127.0.0.1.nip.io/login&quot;).ok()) {
                System.err.println(&quot;Waiting for Jenkins to become ready…&quot;);
                Thread.sleep(1000);
            }
            page.getByPlaceholder(&quot;Username&quot;).fill(&quot;admin&quot;);
            page.getByPlaceholder(&quot;Password&quot;).fill(&quot;admin&quot;);
            // Does not work; label intercepts click: page.getByLabel(&quot;Keep me signed in&quot;).check()
            page.getByText(&quot;Keep me signed in&quot;).click();
            page.getByText(&quot;Sign in&quot;).click();
            assertThat(page.getByText(&quot;Welcome to Jenkins!&quot;)).isVisible();
        } finally {
            proc.destroy();
        }
        System.exit(0);
    }
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">microsoft</span>.<span class="pl-s1">playwright</span>.<span class="pl-s1">BrowserType</span>;
<span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">microsoft</span>.<span class="pl-s1">playwright</span>.<span class="pl-s1">Playwright</span>;
<span class="pl-k">import</span> <span class="pl-k">static</span> <span class="pl-s1">com</span>.<span class="pl-s1">microsoft</span>.<span class="pl-s1">playwright</span>.<span class="pl-s1">assertions</span>.<span class="pl-s1">PlaywrightAssertions</span>.<span class="pl-s1">assertThat</span>;
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">PlaywrightBug</span> {
    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) <span class="pl-k">throws</span> <span class="pl-smi">Exception</span> {
        <span class="pl-smi">var</span> <span class="pl-s1">proc</span> = <span class="pl-k">new</span> <span class="pl-smi">ProcessBuilder</span>(<span class="pl-s">"docker"</span>, <span class="pl-s">"run"</span>, <span class="pl-s">"--rm"</span>, <span class="pl-s">"-p"</span>, <span class="pl-s">"127.0.0.1:80:8080"</span>, <span class="pl-s">"ghcr.io/jglick/authenticated-jenkins:main"</span>).<span class="pl-en">inheritIO</span>().<span class="pl-en">start</span>();
        <span class="pl-k">try</span> (
                <span class="pl-smi">var</span> <span class="pl-s1">playwright</span> = <span class="pl-smi">Playwright</span>.<span class="pl-en">create</span>();
                <span class="pl-smi">var</span> <span class="pl-s1">browser</span> = <span class="pl-s1">playwright</span>.<span class="pl-en">firefox</span>().<span class="pl-en">launch</span>(<span class="pl-k">new</span> <span class="pl-smi">BrowserType</span>.<span class="pl-smi">LaunchOptions</span>().<span class="pl-en">setHeadless</span>(<span class="pl-c1">false</span>));
                <span class="pl-smi">var</span> <span class="pl-s1">context</span> = <span class="pl-s1">browser</span>.<span class="pl-en">newContext</span>();
                <span class="pl-smi">var</span> <span class="pl-s1">page</span> = <span class="pl-s1">context</span>.<span class="pl-en">newPage</span>()) {
            <span class="pl-k">while</span> (!<span class="pl-s1">page</span>.<span class="pl-en">navigate</span>(<span class="pl-s">"http://jenkins.127.0.0.1.nip.io/login"</span>).<span class="pl-en">ok</span>()) {
                <span class="pl-smi">System</span>.<span class="pl-s1">err</span>.<span class="pl-en">println</span>(<span class="pl-s">"Waiting for Jenkins to become ready…"</span>);
                <span class="pl-smi">Thread</span>.<span class="pl-en">sleep</span>(<span class="pl-c1">1000</span>);
            }
            <span class="pl-s1">page</span>.<span class="pl-en">getByPlaceholder</span>(<span class="pl-s">"Username"</span>).<span class="pl-en">fill</span>(<span class="pl-s">"admin"</span>);
            <span class="pl-s1">page</span>.<span class="pl-en">getByPlaceholder</span>(<span class="pl-s">"Password"</span>).<span class="pl-en">fill</span>(<span class="pl-s">"admin"</span>);
            <span class="pl-c">// Does not work; label intercepts click: page.getByLabel("Keep me signed in").check()</span>
            <span class="pl-s1">page</span>.<span class="pl-en">getByText</span>(<span class="pl-s">"Keep me signed in"</span>).<span class="pl-en">click</span>();
            <span class="pl-s1">page</span>.<span class="pl-en">getByText</span>(<span class="pl-s">"Sign in"</span>).<span class="pl-en">click</span>();
            <span class="pl-en">assertThat</span>(<span class="pl-s1">page</span>.<span class="pl-en">getByText</span>(<span class="pl-s">"Welcome to Jenkins!"</span>)).<span class="pl-en">isVisible</span>();
        } <span class="pl-k">finally</span> {
            <span class="pl-s1">proc</span>.<span class="pl-en">destroy</span>();
        }
        <span class="pl-smi">System</span>.<span class="pl-en">exit</span>(<span class="pl-c1">0</span>);
    }
}</pre></div>
<p dir="auto"><strong>Steps</strong><br>
Run the program.<br>
<strong>Expected</strong><br>
Passes.<br>
<strong>Actual</strong><br>
Sometimes passes. Sometimes Firefox opens a tab showing <a href="https://support.mozilla.org/en-US/kb/insecure-password-warning-firefox?as=u&amp;utm_source=inproduct" rel="nofollow">https://support.mozilla.org/en-US/kb/insecure-password-warning-firefox?as=u&amp;utm_source=inproduct</a> which blocks visibility of the login form and prevents the test from proceeding:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; com.microsoft.playwright.TimeoutError: Error {
  message='Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText(&quot;Keep me signed in&quot;)
  locator resolved to &lt;label for=&quot;remember_me&quot;&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
  name='TimeoutError
  stack='TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText(&quot;Keep me signed in&quot;)
  locator resolved to &lt;label for=&quot;remember_me&quot;&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
    at ProgressController.run (/tmp/playwright-java-1866671914204587060/package/lib/server/progress.js:88:26)
    at Frame.click (/tmp/playwright-java-1866671914204587060/package/lib/server/frames.js:1011:23)
    at FrameDispatcher.click (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/frameDispatcher.js:149:30)
    at DispatcherConnection.dispatch (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/dispatcher.js:319:46)
}
	at com.microsoft.playwright.impl.WaitableResult.get(WaitableResult.java:52)
	at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:111)
	at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:119)
	at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
	at com.microsoft.playwright.impl.FrameImpl.clickImpl(FrameImpl.java:252)
	at com.microsoft.playwright.impl.FrameImpl.lambda$click$8(FrameImpl.java:243)
	at com.microsoft.playwright.impl.LoggingSupport.lambda$withLogging$0(LoggingSupport.java:36)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
	at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:87)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:35)
	at com.microsoft.playwright.impl.FrameImpl.click(FrameImpl.java:243)
	at com.microsoft.playwright.impl.LocatorImpl.click(LocatorImpl.java:123)
	at com.microsoft.playwright.Locator.click(Locator.java:2183)
	at PlaywrightBug.main(PlaywrightBug.java:19)
Caused by: com.microsoft.playwright.TimeoutError: Error {
  message='Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText(&quot;Keep me signed in&quot;)
  locator resolved to &lt;label for=&quot;remember_me&quot;&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
  name='TimeoutError
  stack='TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText(&quot;Keep me signed in&quot;)
  locator resolved to &lt;label for=&quot;remember_me&quot;&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
    at ProgressController.run (/tmp/playwright-java-1866671914204587060/package/lib/server/progress.js:88:26)
    at Frame.click (/tmp/playwright-java-1866671914204587060/package/lib/server/frames.js:1011:23)
    at FrameDispatcher.click (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/frameDispatcher.js:149:30)
    at DispatcherConnection.dispatch (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/dispatcher.js:319:46)
}
	at com.microsoft.playwright.impl.Connection.dispatch(Connection.java:199)
	at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:181)
	at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:109)
	... 12 more"><pre class="notranslate"><code class="notranslate">Exception in thread "main" com.microsoft.playwright.TimeoutError: Error {
  message='Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText("Keep me signed in")
  locator resolved to &lt;label for="remember_me"&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
  name='TimeoutError
  stack='TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText("Keep me signed in")
  locator resolved to &lt;label for="remember_me"&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
    at ProgressController.run (/tmp/playwright-java-1866671914204587060/package/lib/server/progress.js:88:26)
    at Frame.click (/tmp/playwright-java-1866671914204587060/package/lib/server/frames.js:1011:23)
    at FrameDispatcher.click (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/frameDispatcher.js:149:30)
    at DispatcherConnection.dispatch (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/dispatcher.js:319:46)
}
	at com.microsoft.playwright.impl.WaitableResult.get(WaitableResult.java:52)
	at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:111)
	at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:119)
	at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
	at com.microsoft.playwright.impl.FrameImpl.clickImpl(FrameImpl.java:252)
	at com.microsoft.playwright.impl.FrameImpl.lambda$click$8(FrameImpl.java:243)
	at com.microsoft.playwright.impl.LoggingSupport.lambda$withLogging$0(LoggingSupport.java:36)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
	at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:87)
	at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:35)
	at com.microsoft.playwright.impl.FrameImpl.click(FrameImpl.java:243)
	at com.microsoft.playwright.impl.LocatorImpl.click(LocatorImpl.java:123)
	at com.microsoft.playwright.Locator.click(Locator.java:2183)
	at PlaywrightBug.main(PlaywrightBug.java:19)
Caused by: com.microsoft.playwright.TimeoutError: Error {
  message='Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText("Keep me signed in")
  locator resolved to &lt;label for="remember_me"&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
  name='TimeoutError
  stack='TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for getByText("Keep me signed in")
  locator resolved to &lt;label for="remember_me"&gt;Keep me signed in&lt;/label&gt;
attempting click action
  waiting for element to be visible, enabled and stable
  element is visible, enabled and stable
  scrolling into view if needed
  done scrolling
  performing click action
============================================================
    at ProgressController.run (/tmp/playwright-java-1866671914204587060/package/lib/server/progress.js:88:26)
    at Frame.click (/tmp/playwright-java-1866671914204587060/package/lib/server/frames.js:1011:23)
    at FrameDispatcher.click (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/frameDispatcher.js:149:30)
    at DispatcherConnection.dispatch (/tmp/playwright-java-1866671914204587060/package/lib/server/dispatchers/dispatcher.js:319:46)
}
	at com.microsoft.playwright.impl.Connection.dispatch(Connection.java:199)
	at com.microsoft.playwright.impl.Connection.processOneMessage(Connection.java:181)
	at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:109)
	... 12 more
</code></pre></div>
<p dir="auto">We have retries set to 1 globally. Occasionally we have a fixture timeout during setup. If this happens on a test that is skipped during runtime with <code class="notranslate">test.skip()</code>, the initial fixture timeout fails the build despite that the retry successfully skipped.</p>
<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.35</li>
<li>Operating System: Ubuntu 20.04</li>
<li>Browser: Chromium (presumably all)</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Screenshots</h3>
<p dir="auto">Initial attempt: fixture timeout</p>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/1878152/253138918-fb1b9cdc-1292-44ac-b3ab-5549be51a588.png"><img width="990" alt="image" src="https://user-images.githubusercontent.com/1878152/253138918-fb1b9cdc-1292-44ac-b3ab-5549be51a588.png" style="max-width: 100%;"></a>
<p dir="auto">Retry: fixture completes, test skipped during runtime</p>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/1878152/253138965-33bc2c6d-6340-4c11-9287-b587285c0a49.png"><img width="987" alt="image" src="https://user-images.githubusercontent.com/1878152/253138965-33bc2c6d-6340-4c11-9287-b587285c0a49.png" style="max-width: 100%;"></a>
<p dir="auto">Build failure:</p>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/1878152/253139002-ab974b96-9be3-4e76-b84c-91a6019fe416.png"><img width="987" alt="image" src="https://user-images.githubusercontent.com/1878152/253139002-ab974b96-9be3-4e76-b84c-91a6019fe416.png" style="max-width: 100%;"></a>
<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"> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Config file</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
  globalSetup: './src/etc/global-setup.ts',
  globalTeardown: './src/etc/global-teardown.ts',
  testDir: './src/tests',
  timeout: 60_000,
  expect: {
    timeout: 8_000,
  },
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: Number.isNaN(+process.env.RETRIES!) ? (process.env.CI ? 1 : 0) : +process.env.RETRIES!,
  workers: 3,
  reporter: [
    [process.env.CI ? 'dot' : 'line'],
    ['html', { outputFolder: 'reports/html', open: 'never' }],
    ['junit', { outputFile: 'reports/junit/junit.xml' }],
  ],
  use: {
    actionTimeout: 15_000,
    navigationTimeout: 30_000,
    baseURL: process.env.ORIGINAL_BASE_URL,
    screenshot: 'only-on-failure',
    trace: !!process.env.CI ? 'retain-on-failure' : 'on',
    video: !!process.env.CI ? 'retain-on-failure' : 'off',
  },

  projects: [
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
        permissions: ['clipboard-read', 'clipboard-write'],
        launchOptions: {
          slowMo: +(process.env.SLOWMO ?? '0'),
          devtools: process.env.PWDEBUG === 'console',
        },
      },
    },
  ],

  // Folder for test artifacts such as screenshots, videos, traces, etc.
  outputDir: 'reports/artifacts',
};

export default config;"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span>
<span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-v">PlaywrightTestConfig</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-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">devices</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-k">const</span> <span class="pl-s1">config</span>: <span class="pl-v">PlaywrightTestConfig</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-c1">globalSetup</span>: <span class="pl-s">'./src/etc/global-setup.ts'</span><span class="pl-kos">,</span>
  <span class="pl-c1">globalTeardown</span>: <span class="pl-s">'./src/etc/global-teardown.ts'</span><span class="pl-kos">,</span>
  <span class="pl-c1">testDir</span>: <span class="pl-s">'./src/tests'</span><span class="pl-kos">,</span>
  <span class="pl-c1">timeout</span>: <span class="pl-c1">60_000</span><span class="pl-kos">,</span>
  <span class="pl-c1">expect</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">timeout</span>: <span class="pl-c1">8_000</span><span class="pl-kos">,</span>
  <span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
  <span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span>
  <span class="pl-c1">retries</span>: <span class="pl-v">Number</span><span class="pl-kos">.</span><span class="pl-en">isNaN</span><span class="pl-kos">(</span><span class="pl-c1">+</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">RETRIES</span><span class="pl-c1">!</span><span class="pl-kos">)</span> ? <span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">0</span><span class="pl-kos">)</span> : <span class="pl-c1">+</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">RETRIES</span><span class="pl-c1">!</span><span class="pl-kos">,</span>
  <span class="pl-c1">workers</span>: <span class="pl-c1">3</span><span class="pl-kos">,</span>
  <span class="pl-c1">reporter</span>: <span class="pl-kos">[</span>
    <span class="pl-kos">[</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-s">'dot'</span> : <span class="pl-s">'line'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span><span class="pl-s">'html'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">outputFolder</span>: <span class="pl-s">'reports/html'</span><span class="pl-kos">,</span> <span class="pl-c1">open</span>: <span class="pl-s">'never'</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
    <span class="pl-kos">[</span><span class="pl-s">'junit'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">outputFile</span>: <span class="pl-s">'reports/junit/junit.xml'</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-c1">use</span>: <span class="pl-kos">{</span>
    <span class="pl-c1">actionTimeout</span>: <span class="pl-c1">15_000</span><span class="pl-kos">,</span>
    <span class="pl-c1">navigationTimeout</span>: <span class="pl-c1">30_000</span><span class="pl-kos">,</span>
    <span class="pl-c1">baseURL</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">ORIGINAL_BASE_URL</span><span class="pl-kos">,</span>
    <span class="pl-c1">screenshot</span>: <span class="pl-s">'only-on-failure'</span><span class="pl-kos">,</span>
    <span class="pl-c1">trace</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-s">'retain-on-failure'</span> : <span class="pl-s">'on'</span><span class="pl-kos">,</span>
    <span class="pl-c1">video</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-s">'retain-on-failure'</span> : <span class="pl-s">'off'</span><span class="pl-kos">,</span>
  <span class="pl-kos">}</span><span class="pl-kos">,</span>

  <span class="pl-c1">projects</span>: <span class="pl-kos">[</span>
    <span class="pl-kos">{</span>
      <span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span>
      <span class="pl-c1">use</span>: <span class="pl-kos">{</span>
        ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-c1">permissions</span>: <span class="pl-kos">[</span><span class="pl-s">'clipboard-read'</span><span class="pl-kos">,</span> <span class="pl-s">'clipboard-write'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-c1">launchOptions</span>: <span class="pl-kos">{</span>
          <span class="pl-c1">slowMo</span>: <span class="pl-c1">+</span><span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">SLOWMO</span> <span class="pl-c1">??</span> <span class="pl-s">'0'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
          <span class="pl-c1">devtools</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">PWDEBUG</span> <span class="pl-c1">===</span> <span class="pl-s">'console'</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-kos">,</span>
  <span class="pl-kos">]</span><span class="pl-kos">,</span>

  <span class="pl-c">// Folder for test artifacts such as screenshots, videos, traces, etc.</span>
  <span class="pl-c1">outputDir</span>: <span class="pl-s">'reports/artifacts'</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>

<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">config</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Test file (pseudocode)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { expect, test } from '../fixtures/sometimes-times-out.fixture';

test.describe.configure({ retries: 1 });

it('should check the box using setChecked', async ({ page }) =&gt; {
  test.skip(true, 'Skipped for some reason');
});"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">expect</span><span class="pl-kos">,</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'../fixtures/sometimes-times-out.fixture'</span><span class="pl-kos">;</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">retries</span>: <span class="pl-c1">1</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-en">it</span><span class="pl-kos">(</span><span class="pl-s">'should check the box using setChecked'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <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">test</span><span class="pl-kos">.</span><span class="pl-en">skip</span><span class="pl-kos">(</span><span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-s">'Skipped for some reason'</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">If needed, I can try to create an MRE with a fixture that sometimes times out. I also have the trace of the failure and the HTML report that I can send to a project member privately, but not post to GitHub.</p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the test until the fixture times out on the first attempt</li>
<li><code class="notranslate">echo $?</code> to check process return code</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">Retried test that skipped during runtime doesn't fail the build</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Retried test that skipped during runtime fails the build</p>