diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json index dcb653a1c4869..f936b9c657186 100644 --- a/packages/playwright-core/browsers.json +++ b/packages/playwright-core/browsers.json @@ -21,19 +21,19 @@ }, { "name": "firefox", - "revision": "1440", + "revision": "1442", "installByDefault": true, "browserVersion": "123.0" }, { "name": "firefox-asan", - "revision": "1440", + "revision": "1442", "installByDefault": false, "browserVersion": "123.0" }, { "name": "firefox-beta", - "revision": "1440", + "revision": "1442", "installByDefault": false, "browserVersion": "124.0b3" }, diff --git a/packages/playwright-core/src/server/chromium/crPage.ts b/packages/playwright-core/src/server/chromium/crPage.ts index 6de00fd80d678..2828991e1184b 100644 --- a/packages/playwright-core/src/server/chromium/crPage.ts +++ b/packages/playwright-core/src/server/chromium/crPage.ts @@ -345,7 +345,7 @@ export class CRPage implements PageDelegate { injected.setInputFiles(node, files), files); } - async setInputFilePaths(progress: Progress, handle: dom.ElementHandle, files: string[]): Promise { + async setInputFilePaths(handle: dom.ElementHandle, files: string[]): Promise { const frame = await handle.ownerFrame(); if (!frame) throw new Error('Cannot set input files to detached input element'); diff --git a/packages/playwright-core/src/server/dom.ts b/packages/playwright-core/src/server/dom.ts index ef7b152b8847c..f2be757de4c58 100644 --- a/packages/playwright-core/src/server/dom.ts +++ b/packages/playwright-core/src/server/dom.ts @@ -643,7 +643,7 @@ export class ElementHandle extends js.JSHandle { await this._page._frameManager.waitForSignalsCreatedBy(progress, options.noWaitAfter, async () => { progress.throwIfAborted(); // Avoid action that has side-effects. if (localPaths) - await this._page._delegate.setInputFilePaths(progress, retargeted, localPaths); + await this._page._delegate.setInputFilePaths(retargeted, localPaths); else await this._page._delegate.setInputFiles(retargeted, filePayloads!); }); diff --git a/packages/playwright-core/src/server/firefox/ffPage.ts b/packages/playwright-core/src/server/firefox/ffPage.ts index a93551b8cd144..63be31ba29f38 100644 --- a/packages/playwright-core/src/server/firefox/ffPage.ts +++ b/packages/playwright-core/src/server/firefox/ffPage.ts @@ -543,14 +543,12 @@ export class FFPage implements PageDelegate { injected.setInputFiles(node, files), files); } - async setInputFilePaths(progress: Progress, handle: dom.ElementHandle, files: string[]): Promise { + async setInputFilePaths(handle: dom.ElementHandle, files: string[]): Promise { await this._session.send('Page.setFileInputFiles', { frameId: handle._context.frame._id, objectId: handle._objectId, files }); - await handle.dispatchEvent(progress.metadata, 'input'); - await handle.dispatchEvent(progress.metadata, 'change'); } async adoptElementHandle(handle: dom.ElementHandle, to: dom.FrameExecutionContext): Promise> { diff --git a/packages/playwright-core/src/server/page.ts b/packages/playwright-core/src/server/page.ts index 359fed8360df6..3a666fa6a669b 100644 --- a/packages/playwright-core/src/server/page.ts +++ b/packages/playwright-core/src/server/page.ts @@ -80,7 +80,7 @@ export interface PageDelegate { getOwnerFrame(handle: dom.ElementHandle): Promise; // Returns frameId. getContentQuads(handle: dom.ElementHandle): Promise; setInputFiles(handle: dom.ElementHandle, files: types.FilePayload[]): Promise; - setInputFilePaths(progress: Progress, handle: dom.ElementHandle, files: string[]): Promise; + setInputFilePaths(handle: dom.ElementHandle, files: string[]): Promise; getBoundingBox(handle: dom.ElementHandle): Promise; getFrameElement(frame: frames.Frame): Promise; scrollRectIntoViewIfNeeded(handle: dom.ElementHandle, rect?: types.Rect): Promise<'error:notvisible' | 'error:notconnected' | 'done'>; diff --git a/packages/playwright-core/src/server/webkit/wkPage.ts b/packages/playwright-core/src/server/webkit/wkPage.ts index 038010f45658e..e0326072f7b9e 100644 --- a/packages/playwright-core/src/server/webkit/wkPage.ts +++ b/packages/playwright-core/src/server/webkit/wkPage.ts @@ -966,7 +966,7 @@ export class WKPage implements PageDelegate { await this._session.send('DOM.setInputFiles', { objectId, files: protocolFiles }); } - async setInputFilePaths(progress: Progress, handle: dom.ElementHandle, paths: string[]): Promise { + async setInputFilePaths(handle: dom.ElementHandle, paths: string[]): Promise { const pageProxyId = this._pageProxySession.sessionId; const objectId = handle._objectId; await Promise.all([ diff --git a/tests/library/browsercontext-basic.spec.ts b/tests/library/browsercontext-basic.spec.ts index 266eb80e1cc50..f075184cf95ed 100644 --- a/tests/library/browsercontext-basic.spec.ts +++ b/tests/library/browsercontext-basic.spec.ts @@ -62,6 +62,9 @@ it('should be able to click across browser contexts', async function({ browser } ]); expect(await getClicks(page1)).toBe(CLICK_COUNT); expect(await getClicks(page2)).toBe(CLICK_COUNT); + + await page1.close(); + await page2.close(); }); it('window.open should use parent tab context', async function({ browser, server }) {