Hi Everyone,
The goal is to measure the response time of the page display.
All the requests (56 in my case) making up the page must be completed.
I tried the methods “page.waitForLoadState(‘networkidle’);” and page.waitForLoadState(‘domcontentloaded’);"
Here is the result: 0 ms → Between t1 and t0
RUN :
var src=page.goto(‘http:// MY URL’, { waitUntil: ‘networkidle’ });
sleep(0.3);
var t0 = Date.now();
page.waitForLoadState(‘networkidle’);
var t1 = Date.now();
console.log(“------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>” + t1);
console.log((t1-t0));
console.log(“------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>” + t0);
CONSOLE.LOG:
INFO[0010] ------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>1642091416660 source=console
INFO[0010] 0 source=console
INFO[0010] ------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>1642091416660 source=console
It seems that these two methods do not work!
Is there another way to do it?
thanks
Regards
LBouet