Open BALAMOHANP opened 1 year ago
Hi @BALAMOHANP , did you find any work around for this.
I'm trying to run playaduit multiple times within the same test but once the analysis is done by audit the browser is auto closed for me due to which I'm unable to move to other parts of the page.
Having a same issue. Unfortunately playwright-lighthouse does not support user-flows api yet
@abhinaba-ghosh would be really cool to have support of https://github.com/GoogleChrome/lighthouse/blob/main/docs/user-flows.md
I would like to audit my Single page application's performance using lighthouse by running it in Timespan as well as snapshot modes ( reference link: https://github.com/GoogleChrome/lighthouse/blob/HEAD/docs/user-flows.md ) using the LH library in playwright. But when I tried the below code similar to puppeteer, I am getting an exception as below,
TypeError: this._page.target is not a function
155 | View Cart 156 | /
Please review the code and help me to fix it.
Code :
const playwright = require('playwright'); const { playAudit } = require('playwright-lighthouse'); import lighthouseDesktopConfig from 'lighthouse/lighthouse-core/config/lr-desktop-config'; import { url, username, password, testResultDir, searchStr, timeout, skuUrl } from './../playwright.config'; const { test, expect } = require('@playwright/test'); const { startFlow } = require('lighthouse/lighthouse-core/fraggle-rock/api.js');
const os = require('os'); const fs = require('fs'); const path = require('path'); const appPrefix = 'pl-lh'; const tmpDir = os.tmpdir(); const tmpDir2 = fs.mkdtempSync(path.join(tmpDir, appPrefix));
test('my test',async () => { // console.log(tmpDir); const context = await playwright['chromium'].launchPersistentContext(tmpDir2, { args: ['--remote-debugging-port=9222'], headless: false });
await context.close();
});