We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to #1215.
Lighthouse has started testing its chrome extension using pptr. They currently usecreateCDPSession to inject code into the extension and run methods:
createCDPSession
const targets = await browser.targets(); const extensionTarget = targets.find(({_targetInfo}) => { return _targetInfo.title === 'Lighthouse' && _targetInfo.type === 'background_page'; }); if (!extensionTarget) { return await browser.close(); } const client = await extensionTarget.createCDPSession(); const lighthouseResult = await client.send('Runtime.evaluate', { expression: `runLighthouseInExtension({ restoreCleanState: true, }, ${JSON.stringify(lighthouseCategories)})`, awaitPromise: true, returnByValue: true, });
It would be nice to make this use case easier:
const lighthouseResult = target.evaluate(cats => { return runLighthouseInExtension({restoreCleanState: true}, cats); }, lighthouseCategories);
The text was updated successfully, but these errors were encountered:
It should be possible to create a Page out of extension's background page. So we should simply teach target.page() to work with background_page.
Page
target.page()
background_page
Sorry, something went wrong.
feat(target): add support for target.page for 'backgroud_page' (#2600)
38f112f
This patch teaches `target.page()` method to attach to extension background pages. Fixes #2438
No branches or pull requests
Related to #1215.
Lighthouse has started testing its chrome extension using pptr. They currently use
createCDPSession
to inject code into the extension and run methods:It would be nice to make this use case easier:
The text was updated successfully, but these errors were encountered: