playwright-lighthouse
playwright-lighthouse copied to clipboard
PlayAudit function call is closing the browser automatically after analysis
Hi All, we are trying to perform analysis on a single page application and we want to use Playwright-lighthouse as a utility by calling it in multiple stages within our test script.
Sample:
Before all { browser initiation }
test {
goto(url); await playaudit{} locator().click(); await playaudit{}
};
Problem is once the URL is opened and playaudit is performed the browser is automatically closing leading to which the locator().click() is throwing Error: locator.click: Target page, context or browser has been closed error.
I'm currently using downgraded version of lightHouse & playwright-lighthouse due to existing import issue in latest versions. "@playwright/test": "^1.35.1", "lighthouse": "^9.6.8", "playwright-lighthouse": "^2.2.2",