1

I want to generate a playwright report for one of the test cases for slow 3g and other different network conditions but as a result, I need the FCP,LCP, and other metric results in HTML Report to be generated which I am not able to achieve it.

test('network throttling', async ({ page }) => {
  await page.goto('http://localhost:3000/', { waitUntil: 'networkidle' });
  const client = await page.context().newCDPSession(page);
  await client.send('Network.enable');
  await client.send('Network.emulateNetworkConditions', {
    offline: false,
    downloadThroughput: (0.4 * 1024 * 1024) / 8,
    uploadThroughput: (0.4 * 1024 * 1024) / 8,
    latency: 2000,
  });
});
ali
  • 492
  • 2
  • 7
  • 18

0 Answers0