Closed mbalabash closed 5 years ago
Tracium throws an error when i pass uri to local file in page.goto() of puppeteer. I added PR for this (https://github.com/aslushnikov/tracium/pull/4).
Tracium
page.goto()
puppeteer
Example of situation:
async function createChromeTrace(urlToHtmlFile, pathToTraceFile, browserOptions) { const options = { ...defaultBrowserOptions, ...browserOptions } const { headless, emulateNetworkConditions, emulateCpuThrottling } = options const browser = await puppeteer.launch({ headless }) const page = await browser.newPage() const client = await page.target().createCDPSession() if (emulateNetworkConditions) { const { networkConditions } = options await client.send('Network.emulateNetworkConditions', networkConditions) } if (emulateCpuThrottling) { const { cpuThrottlingRate } = options await client.send('Emulation.setCPUThrottlingRate', { rate: cpuThrottlingRate }) } await page.tracing.start({ path: pathToTraceFile }) try { await page.goto(urlToHtmlFile, { // urlToHtmlFile === file:///Users/mbalabash/Documents/projects/dev/estimo/temp/Fs0UMEq17trTKPUIcgyZj.html timeout: options.timeout, waitUntil: options.waitUntil, }) } catch (err) { handleSessionError(err, browser) } await page.tracing.stop() await browser.close() return pathToTraceFile }
fixed by #4, thanks!
Tracium
throws an error when i pass uri to local file inpage.goto()
ofpuppeteer
. I added PR for this (https://github.com/aslushnikov/tracium/pull/4).Example of situation: