fix server with multiple playwrights
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import playwright from 'playwright-core';
|
import playwright from 'playwright-core';
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const cdpEndpoint = `ws://localhost:9988/cdp`
|
const cdpEndpoint = `ws://localhost:9988/cdp/${Date.now()}`
|
||||||
const browser = await playwright.chromium.connectOverCDP(cdpEndpoint);
|
const browser = await playwright.chromium.connectOverCDP(cdpEndpoint);
|
||||||
|
|
||||||
const contexts = browser.contexts();
|
const contexts = browser.contexts();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { startRelayServer } from '../src/extension/extension-context-factory.js'
|
import { startRelayServer } from '../src/extension/cdp-relay.js'
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const server = await startRelayServer({ port: 9988 })
|
const server = await startRelayServer({ port: 9988 })
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export { startRelayServer } from './cdp-relay.js'
|
|
||||||
Reference in New Issue
Block a user