Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(electron): ignore internal Node.js contexts (#40355)
Dmitry Gozmandcd350445226
diff --git a/packages/playwright-core/src/server/chromium/chromium.ts b/packages/playwright-core/src/server/chromium/chromium.tsindex 1351ca744d..7e3a609fe4 100644--- a/packages/playwright-core/src/server/chromium/chromium.ts+++ b/packages/playwright-core/src/server/chromium/chromium.ts@@ -166,6 +166,11 @@ export class Chromium extends BrowserType {const session = connection.rootSession;const worker = new Worker(this, '', () => transport.closeAndWait());session.on('Runtime.executionContextCreated', event => {+ const isDefault = event.context.auxData?.isDefault as boolean | undefined;+ if (isDefault === false) {+ // Node.js sometimes creates internal contexts we are not interested in.+ return;+ }worker.workerScriptLoaded();worker.createExecutionContext(new CRExecutionContext(session, event.context));});