How Does WPT Determine when a page is Done Visually

I read into the documentation of SpeedIndex and how visual completeness is measured. My question is how does WPT know if the page is visually complete without anymore changes to come?

It just uses the state of the page at the end of the test you are running and considers that the end state. The description in the SpeedIndex docs are intentionally vague because it doesn’t apply just to WebPageTest page load tests and could in theory be used for arbitrary videos.

As a follow up question, how does it determine the page is at its end state?

Under normal conditions: after the onload event fires for the page, it waits for there to be 2 seconds of no network activity.

You can also change it to stop at the onload event if you check the option in the advanced settings.

There are also other settings that can cause it to wait longer (minimum test duration, waiting for a specific request, etc).

I see, thank you!