Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pageTimings empty #64

Open
amezioud opened this issue Apr 29, 2020 · 2 comments
Open

pageTimings empty #64

amezioud opened this issue Apr 29, 2020 · 2 comments

Comments

@amezioud
Copy link

Hello,

I'm using [email protected] [email protected] and [email protected]

const puppeteer = require('puppeteer');
const PuppeteerHar = require('puppeteer-har');

(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
console.log("create page");

const har = new PuppeteerHar(page);
await har.start({ path: 'results.har' });
console.log('Har started');

await page.goto('https://********/portail');

await har.stop();
await browser.close();
})();

How can I stop having empty "pageTimings" please ?

{"log":{"version":"1.2","creator":{"name":"chrome-har","version":"0.11.7","comment":"https://github.com/sitespeedio/chrome-har"},"pages":[{"id":"page_1","startedDateTime":"2020-04-29T14:00:06.681Z","title":"https://********/portail","**pageTimings":{}**}],"entries":[{"cache":{},"startedDateTime":"2020-04-29T14:00:06.682Z","_requestId":"5380B4DD08F8636FEB1F2EC3A5914CE6","_initialPriority":"VeryHigh","_priority":"VeryHigh","pageref":"page_1","request":{"method":"GET","url":

@soulgalore
Copy link
Member

Hi @amezioud at the moment we don't add them from the trace, in Browsertime we add it later after the HARs been generated, so I guess you could do the same, run some JS in puppeteer and get the data from the browser and add it to the HAR.

@amezioud
Copy link
Author

Do you have an example please ?

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants