GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.02k stars 9.32k forks source link

How to configure triggered of the end of a navigation? #15886

Closed ChristopherPHolder closed 3 months ago

ChristopherPHolder commented 3 months ago

How can I configure a navigation audit to end at a specific time?

Lets say i have an application that when you navigate to it, it loads the page and continuously updates the content inside of it.

How would i be able to do something like this?

  await flow.startNavigation();

  await page.goto(homeUrl, { waitUntil: 'load' });
  await page.waitForSelector('After this is here i consider navigation as ended');

  await flow.endNavigation();

The issue is that after that moment were the content is loaded a bunch of things are still happening.

I receive in information from a socket and condinously update the date so it does not really consider the site has finished loading and i get this type of message:

image

This is an example url where i have experiences this issue: https://betjack.com