diff --git a/packages/puppeteer-core/src/common/bidi/Connection.ts b/packages/puppeteer-core/src/common/bidi/Connection.ts index 9ec2bde5..03a76469 100644 --- a/packages/puppeteer-core/src/common/bidi/Connection.ts +++ b/packages/puppeteer-core/src/common/bidi/Connection.ts @@ -57,7 +57,7 @@ interface Commands { returnType: {sessionId: string}; }; 'session.status': { - params: {context: string}; // TODO: Update Types in chromium bidi + params: object; returnType: Bidi.Session.StatusResult; }; 'session.subscribe': { diff --git a/test/src/bidi/Connection.spec.ts b/test/src/bidi/Connection.spec.ts index 25f8702b..e5cd9de0 100644 --- a/test/src/bidi/Connection.spec.ts +++ b/test/src/bidi/Connection.spec.ts @@ -36,11 +36,13 @@ describe('WebDriver BiDi', () => { it('should work', async () => { const transport = new TestConnectionTransport(); const connection = new Connection(transport); - const responsePromise = connection.send('session.status', { - context: 'context', + const responsePromise = connection.send('session.new', { + capabilities: { + proxy: {}, + }, }); expect(transport.sent).toEqual([ - `{"id":1,"method":"session.status","params":{"context":"context"}}`, + `{"id":1,"method":"session.new","params":{"capabilities":{"proxy":{}}}}`, ]); const id = JSON.parse(transport.sent[0]!).id; const rawResponse = {