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
test: gardening and firefighting (#39453)
Dmitry Gozmana181e5ea22db
diff --git a/.github/workflows/tests_primary.yml b/.github/workflows/tests_primary.ymlindex 095e3a6271..2f95772f99 100644--- a/.github/workflows/tests_primary.yml+++ b/.github/workflows/tests_primary.yml@@ -9,8 +9,10 @@ on:paths-ignore:- 'browser_patches/**'- 'docs/**'- - 'packages/playwright-core/src/cli/**'+ - 'packages/playwright-core/src/cli/client/**'+ - 'packages/playwright-core/src/cli/daemon/**'- 'packages/playwright-core/src/mcp/**'+ - 'packages/playwright/src/mcp/**'- 'tests/mcp/**'branches:- maindiff --git a/packages/playwright-core/src/mcp/browser/tab.ts b/packages/playwright-core/src/mcp/browser/tab.tsindex 0db12e5355..1b134438d0 100644--- a/packages/playwright-core/src/mcp/browser/tab.ts+++ b/packages/playwright-core/src/mcp/browser/tab.ts@@ -14,6 +14,8 @@* limitations under the License.*/+import url from 'url';+import { EventEmitter } from 'events';import * as playwright from '../../..';import { asLocator } from '../../utils/isomorphic/locatorGenerators';@@ -153,7 +155,7 @@ export class Tab extends EventEmitter<TabEventsInterface> {this._requests.push(request);for (const initPage of this.context.config.browser.initPage || []) {try {- const { default: func } = await import(initPage);+ const { default: func } = await import(url.pathToFileURL(initPage).href);await func({ page: this.page });} catch (e) {logUnhandledError(e);diff --git a/packages/playwright-core/src/remote/playwrightPipeServer.ts b/packages/playwright-core/src/remote/playwrightPipeServer.tsindex 03c4eae5ec..f525d5b17d 100644--- a/packages/playwright-core/src/remote/playwrightPipeServer.ts+++ b/packages/playwright-core/src/remote/playwrightPipeServer.ts@@ -21,7 +21,7 @@ import { PlaywrightConnection } from './playwrightConnection';import { SocketServerTransport } from './serverTransport';import { debugLogger } from '../server/utils/debugLogger';import { Browser } from '../server/browser';-import { Semaphore } from '../utils';+import { decorateServer, Semaphore } from '../utils';import type { PlaywrightInitializeResult } from './playwrightConnection';@@ -60,6 +60,7 @@ export class PlaywrightPipeServer {this._connections.add(connection);transport.on('close', () => this._connections.delete(connection));});+ decorateServer(this._server);await new Promise<void>((resolve, reject) => {this._server!.listen(pipeName, () => resolve());diff --git a/packages/playwright-core/src/server/browser.ts b/packages/playwright-core/src/server/browser.tsindex d49db1634e..ad757f5dee 100644--- a/packages/playwright-core/src/server/browser.ts+++ b/packages/playwright-core/src/server/browser.ts@@ -278,10 +278,10 @@ export class BrowserServer {}private async _socketPath() {- const socketName = `${this._browser.guid}.sock`;+ const socketName = `${this._browser.guid.slice(0, 14)}.sock`;if (process.platform === 'win32')return `\\\\.\\pipe\\${socketName}`;- const socketsDir = process.env.PLAYWRIGHT_BROWSER_SOCKETS_DIR || path.join(os.tmpdir(), 'playwright-browsers');+ const socketsDir = process.env.PLAYWRIGHT_BROWSER_SOCKETS_DIR || path.join(os.tmpdir(), 'playwright');await fs.promises.mkdir(socketsDir, { recursive: true });return path.join(socketsDir, socketName);}diff --git a/packages/playwright-core/src/server/recorder.ts b/packages/playwright-core/src/server/recorder.tsindex b5cc311ad3..99b3a8a022 100644--- a/packages/playwright-core/src/server/recorder.ts+++ b/packages/playwright-core/src/server/recorder.ts@@ -462,7 +462,7 @@ export class Recorder extends EventEmitter<RecorderEventMap> implements Instrumethis._filePrimaryURLChanged();});frame.on(Frame.Events.InternalNavigation, event => {- if (event.isPublic) {+ if (event.isPublic && !event.error) {this._onFrameNavigated(frame, page);this._filePrimaryURLChanged();}diff --git a/tests/android/androidTest.ts b/tests/android/androidTest.tsindex cb3d16828b..c57957f3d6 100644--- a/tests/android/androidTest.ts+++ b/tests/android/androidTest.ts@@ -62,6 +62,7 @@ export const androidTest = baseTest.extend<PageTestFixtures & AndroidTestFixtureisElectron: [false, { scope: 'worker' }],electronMajorVersion: [0, { scope: 'worker' }],isHeadlessShell: [false, { scope: 'worker' }],+ isFrozenWebkit: [false, { scope: 'worker' }],androidDevice: async ({ androidDeviceWorker }, use) => {await closeAllActivities(androidDeviceWorker);diff --git a/tests/config/browserTest.ts b/tests/config/browserTest.tsindex 8f4c4b20c7..670b583b32 100644--- a/tests/config/browserTest.ts+++ b/tests/config/browserTest.ts@@ -22,6 +22,7 @@ import { RunServer, RemoteServer } from './remoteServer';import { removeFolders } from '../../packages/playwright-core/lib/server/utils/fileUtils';import { isBidiChannel, parseHar } from '../config/utils';import { createSkipTestPredicate } from '../bidi/expectationUtil';+import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';import type { PageTestFixtures, PageWorkerFixtures } from '../page/pageTestApi';import type { RemoteServerOptions, PlaywrightServer } from './remoteServer';@@ -38,6 +39,7 @@ export type BrowserTestWorkerFixtures = PageWorkerFixtures & {isAndroid: boolean;isElectron: boolean;isHeadlessShell: boolean;+ isFrozenWebkit: boolean;nodeVersion: { major: number, minor: number, patch: number };isBidi: boolean;bidiTestSkipPredicate: (info: TestInfo) => boolean;@@ -110,6 +112,10 @@ const test = baseTest.extend<BrowserTestTestFixtures, BrowserTestWorkerFixtures>await use(browserName === 'chromium' && (isShell || isToTShell));}, { scope: 'worker' }],+ isFrozenWebkit: [async ({ browserName, isMac, macVersion }, use) => {+ await use(browserName === 'webkit' && (hostPlatform.startsWith('debian11') || hostPlatform.startsWith('ubuntu20.04') || (isMac && macVersion < 15)));+ }, { scope: 'worker' }],+contextFactory: async ({ _contextFactory }: any, run) => {await run(async options => {const { context } = await _contextFactory(options);diff --git a/tests/electron/electronTest.ts b/tests/electron/electronTest.tsindex e98d47112e..b1aa506fd3 100644--- a/tests/electron/electronTest.ts+++ b/tests/electron/electronTest.ts@@ -40,6 +40,7 @@ export const electronTest = baseTest.extend<TraceViewerFixtures>(traceViewerFixtisAndroid: [false, { scope: 'worker' }],isElectron: [true, { scope: 'worker' }],isHeadlessShell: [false, { scope: 'worker' }],+ isFrozenWebkit: [false, { scope: 'worker' }],createUserDataDir: async ({ mode }, run) => {const dirs: string[] = [];diff --git a/tests/library/browser-server.spec.ts b/tests/library/browser-server.spec.tsindex b460b8f81a..84b2bacc15 100644--- a/tests/library/browser-server.spec.ts+++ b/tests/library/browser-server.spec.ts@@ -36,6 +36,7 @@ it('should start and stop pipe server', async ({ browserType, browser }) => {const page = await browser2.newPage();await page.goto('data:text/html,<h1>Hello via pipe</h1>');expect(await page.locator('h1').textContent()).toBe('Hello via pipe');+ await page.close();await browser2.close();await (browser as any)._stopServer();});@@ -51,6 +52,7 @@ it('should start and stop ws server', async ({ browserType, browser }) => {const page = await browser2.newPage();await page.goto('data:text/html,<h1>Hello</h1>');expect(await page.locator('h1').textContent()).toBe('Hello');+ await page.close();await browser2.close();await (browser as any)._stopServer();});diff --git a/tests/library/browsercontext-viewport-mobile.spec.ts b/tests/library/browsercontext-viewport-mobile.spec.tsindex 44b7598457..2660ec2aa6 100644--- a/tests/library/browsercontext-viewport-mobile.spec.ts+++ b/tests/library/browsercontext-viewport-mobile.spec.ts@@ -16,7 +16,6 @@*/import { browserTest as it, expect } from '../config/browserTest';-import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';it.describe('mobile viewport', () => {it.skip(({ browserName, isBidi }) => browserName === 'firefox' && !isBidi);@@ -95,9 +94,8 @@ it.describe('mobile viewport', () => {await context.close();});- it('should preserve window.orientation override after navigation', async ({ browser, server, browserName }) => {- it.skip(browserName === 'webkit' && hostPlatform.startsWith('ubuntu20.04'), 'Ubuntu 20.04 is frozen');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('debian11'), 'Debian 11 is frozen');+ it('should preserve window.orientation override after navigation', async ({ browser, server, isFrozenWebkit }) => {+ it.skip(isFrozenWebkit);const context = await browser.newContext({ viewport: { width: 400, height: 300 }, isMobile: true });const page = await context.newPage();@@ -108,10 +106,8 @@ it.describe('mobile viewport', () => {await context.close();});- it('should preserve screen.orientation.type override after navigation', async ({ browser, server, browserName, isMac, macVersion }) => {- it.skip(browserName === 'webkit' && hostPlatform.startsWith('ubuntu20.04'), 'Ubuntu 20.04 is frozen');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('debian11'), 'Debian 11 is frozen');- it.skip(browserName === 'webkit' && isMac && macVersion < 15, 'WebKit on macOS < 15 is frozen.');+ it('should preserve screen.orientation.type override after navigation', async ({ browser, server, isFrozenWebkit }) => {+ it.skip(isFrozenWebkit);const context = await browser.newContext({ viewport: { width: 300, height: 400 }, isMobile: true });const page = await context.newPage();diff --git a/tests/library/browsertype-connect.spec.ts b/tests/library/browsertype-connect.spec.tsindex 89c795002b..b3ccee17ab 100644--- a/tests/library/browsertype-connect.spec.ts+++ b/tests/library/browsertype-connect.spec.ts@@ -247,8 +247,8 @@ for (const kind of ['launchServer', 'run-server'] as const) {expect(request.headers['foo']).toBe('bar');});- test('should send default User-Agent and X-Playwright-Browser headers with connect request', async ({ connect, browserName, server, isMac, macVersion }) => {- test.skip(browserName === 'webkit' && isMac && macVersion <= 14, 'WebKit on macOS-14 is frozen');+ test('should send default User-Agent and X-Playwright-Browser headers with connect request', async ({ connect, browserName, server, isFrozenWebkit }) => {+ test.skip(isFrozenWebkit);const [request] = await Promise.all([server.waitForWebSocketConnectionRequest(),diff --git a/tests/library/capabilities.spec.ts b/tests/library/capabilities.spec.tsindex fa7eba2a28..ed1c47e121 100644--- a/tests/library/capabilities.spec.ts+++ b/tests/library/capabilities.spec.ts@@ -16,7 +16,6 @@import url from 'url';import { contextTest as it, expect } from '../config/browserTest';-import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer }) {const context = await contextFactory({ ignoreHTTPSErrors: true });@@ -392,10 +391,9 @@ it('should be able to render avif images', {type: 'issue',description: 'https://github.com/microsoft/playwright/issues/32673',}-}, async ({ page, server, browserName, platform }) => {+}, async ({ page, server, browserName, platform, isFrozenWebkit }) => {it.fixme(browserName === 'webkit' && platform === 'win32');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('ubuntu20.04'), 'Ubuntu 20.04 is frozen');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('debian11'), 'Debian 11 is too old');+ it.skip(isFrozenWebkit);await page.goto(server.EMPTY_PAGE);await page.setContent(`<img src="${server.PREFIX}/rgb.avif" onerror="window.error = true">`);await expect.poll(() => page.locator('img').boundingBox()).toEqual(expect.objectContaining({diff --git a/tests/library/inspector/pause.spec.ts b/tests/library/inspector/pause.spec.tsindex ca20662f6c..3406e90f6a 100644--- a/tests/library/inspector/pause.spec.ts+++ b/tests/library/inspector/pause.spec.ts@@ -92,7 +92,9 @@ it.describe('pause', () => {await scriptPromise;});- it('should resume from console', async ({ page }) => {+ it('should resume from console', async ({ page, mode }) => {+ it.skip(mode !== 'default');+const scriptPromise = (async () => {// @ts-ignoreawait page.pause({ __testHookKeepTestTimeout: true });diff --git a/tests/library/modernizr.spec.ts b/tests/library/modernizr.spec.tsindex 582aa5a651..27a2ba720c 100644--- a/tests/library/modernizr.spec.ts+++ b/tests/library/modernizr.spec.ts@@ -16,7 +16,6 @@import type { BrowserContext } from 'playwright-core';import type { TestServer } from '../config/testserver';-import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';import os from 'os';@@ -33,10 +32,10 @@ async function checkFeatures(name: string, context: BrowserContext, server: Test}}-it('Safari Desktop', async ({ browser, browserName, platform, httpsServer, headless, channel }) => {+it('Safari Desktop', async ({ browser, browserName, platform, httpsServer, headless, channel, isFrozenWebkit }) => {it.skip(browserName !== 'webkit');it.skip(browserName === 'webkit' && platform === 'darwin' && os.arch() === 'x64', 'Modernizr uses WebGL which is not available on Intel macOS - https://bugs.webkit.org/show_bug.cgi?id=278277');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('ubuntu20.04'), 'Ubuntu 20.04 is frozen');+ it.skip(isFrozenWebkit);const context = await browser.newContext({deviceScaleFactor: 2,ignoreHTTPSErrors: true,@@ -91,11 +90,10 @@ it('Safari Desktop', async ({ browser, browserName, platform, httpsServer, headlexpect(actual).toEqual(expected);});-it('Mobile Safari', async ({ playwright, browser, browserName, platform, httpsServer, headless, channel }) => {+it('Mobile Safari', async ({ playwright, browser, browserName, platform, httpsServer, headless, channel, isFrozenWebkit }) => {it.skip(browserName !== 'webkit');it.skip(browserName === 'webkit' && platform === 'darwin' && os.arch() === 'x64', 'Modernizr uses WebGL which is not available on Intel macOS - https://bugs.webkit.org/show_bug.cgi?id=278277');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('ubuntu20.04'), 'Ubuntu 20.04 is frozen');- it.skip(browserName === 'webkit' && hostPlatform.startsWith('debian11'), 'Debian 11 is frozen');+ it.skip(isFrozenWebkit);const iPhone = playwright.devices['iPhone 12'];const context = await browser.newContext({...iPhone,diff --git a/tests/library/permissions.spec.ts b/tests/library/permissions.spec.tsindex 3e849c24be..77ed158b23 100644--- a/tests/library/permissions.spec.ts+++ b/tests/library/permissions.spec.ts@@ -16,7 +16,6 @@*/import { contextTest as it, expect } from '../config/browserTest';-import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';function getPermission(page, name) {return page.evaluate(name => navigator.permissions.query({ name }).then(result => result.state), name);@@ -30,9 +29,8 @@ it.describe('permissions', () => {expect(await getPermission(page, 'geolocation')).toBe('prompt');});- it('should deny permission when not listed', async ({ page, context, server, browserName, isMac, macVersion, isBidi }) => {- it.skip(browserName === 'webkit' && isMac && macVersion === 13, 'WebKit on macOS 13 is frozen.');- it.skip(hostPlatform.startsWith('debian11'), 'WebKit on Debian 11 is frozen.');+ it('should deny permission when not listed', async ({ page, context, server, browserName, isBidi, isFrozenWebkit }) => {+ it.skip(isFrozenWebkit);await page.goto(server.EMPTY_PAGE);await context.grantPermissions([], { origin: server.EMPTY_PAGE });@@ -144,9 +142,8 @@ it.describe('permissions', () => {expect(await page.evaluate(() => window['events'])).toEqual(expectedEvents);});- it('should isolate permissions between browser contexts', async ({ server, browser, browserName, isMac, macVersion, isBidi }) => {- it.skip(browserName === 'webkit' && isMac && macVersion === 13, 'WebKit on macOS 13 is frozen.');- it.skip(hostPlatform.startsWith('debian11'), 'WebKit on Debian 11 is frozen.');+ it('should isolate permissions between browser contexts', async ({ server, browser, browserName, isBidi, isFrozenWebkit }) => {+ it.skip(isFrozenWebkit);const context = await browser.newContext();const page = await context.newPage();diff --git a/tests/library/popup.spec.ts b/tests/library/popup.spec.tsindex 584f4505ab..521dd497ac 100644--- a/tests/library/popup.spec.ts+++ b/tests/library/popup.spec.ts@@ -17,8 +17,8 @@import { browserTest as it, expect } from '../config/browserTest';import type { Page } from 'playwright-core';-it('should inherit user agent from browser context @smoke', async function({ browser, server, browserName, isMac, macVersion }) {- it.skip(browserName === 'webkit' && isMac && macVersion <= 14, 'WebKit on macOS-14 is frozen');+it('should inherit user agent from browser context @smoke', async function({ browser, server, isFrozenWebkit }) {+ it.skip(isFrozenWebkit);const context = await browser.newContext({userAgent: 'hey'diff --git a/tests/page/page-event-console.spec.ts b/tests/page/page-event-console.spec.tsindex f6cf5778d7..e1f3ac4c03 100644--- a/tests/page/page-event-console.spec.ts+++ b/tests/page/page-event-console.spec.ts@@ -223,7 +223,9 @@ it('do not update console count on unhandled rejections', async ({ page }) => {await expect.poll(() => messages).toEqual(['begin', 'end']);});-it('should have timestamp', async ({ page }) => {+it('should have timestamp', async ({ page, isAndroid }) => {+ it.skip(isAndroid, 'there is a time difference between android emulator and host machine');+const before = Date.now() - 1; // Account for the rounding of fractional timestamps.const [message] = await Promise.all([page.waitForEvent('console'),@@ -247,7 +249,9 @@ it('should have increasing timestamps', async ({ page }) => {expect(messages[i].timestamp()).toBeGreaterThanOrEqual(messages[i - 1].timestamp());});-it('should have timestamp in consoleMessages', async ({ page }) => {+it('should have timestamp in consoleMessages', async ({ page, isAndroid }) => {+ it.skip(isAndroid, 'there is a time difference between android emulator and host machine');+const before = Date.now() - 1; // Account for the rounding of fractional timestamps.await page.evaluate(() => console.log('stored message'));const after = Date.now() + 1; // Account for the rounding of fractional timestamps.diff --git a/tests/page/page-focus.spec.ts b/tests/page/page-focus.spec.tsindex 7f239ae5e3..565ee5a4f5 100644--- a/tests/page/page-focus.spec.ts+++ b/tests/page/page-focus.spec.ts@@ -119,8 +119,7 @@ it('clicking checkbox should activate it', async ({ page, browserName, headless,it('tab should cycle between single input and browser', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32339' }-}, async ({ page, browserName, headless, channel }) => {- const isHeadlessShell = channel === 'chromium-headless-shell' || (!channel && headless);+}, async ({ page, browserName, isHeadlessShell }) => {it.fixme(browserName === 'chromium' && !isHeadlessShell, 'Chromium keeps input focused.');it.fixme(browserName !== 'chromium');await page.setContent(`<label for="input1">input1</label>@@ -147,8 +146,7 @@ it('tab should cycle between single input and browser', {it('tab should cycle between document elements and browser', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32339' }-}, async ({ page, browserName, headless, channel }) => {- const isHeadlessShell = channel === 'chromium-headless-shell' || (!channel && headless);+}, async ({ page, browserName, isHeadlessShell }) => {it.fixme(browserName === 'chromium' && !isHeadlessShell, 'Chromium keeps last input focused.');it.fixme(browserName !== 'chromium');await page.setContent(`diff --git a/tests/page/page-keyboard.spec.ts b/tests/page/page-keyboard.spec.tsindex 783448b06d..055e43aebf 100644--- a/tests/page/page-keyboard.spec.ts+++ b/tests/page/page-keyboard.spec.ts@@ -17,7 +17,6 @@import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';-import { hostPlatform } from '../../packages/playwright-core/src/server/utils/hostPlatform';it.skip(({ isAndroid }) => isAndroid);@@ -718,8 +717,9 @@ Keyup: Escape Escape STANDARD []it('should close dialog on Escape key press in contenteditable', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/36727' }-}, async ({ page, browserName }) => {- it.skip(browserName === 'webkit' && hostPlatform.startsWith('debian11'), 'Debian 11 is frozen');+}, async ({ page, isFrozenWebkit }) => {+ it.skip(isFrozenWebkit);+await page.setContent(`<dialog><div contenteditable>Edit Me</div>diff --git a/tests/page/page-set-input-files.spec.ts b/tests/page/page-set-input-files.spec.tsindex 673553cfe5..c443700b81 100644--- a/tests/page/page-set-input-files.spec.ts+++ b/tests/page/page-set-input-files.spec.ts@@ -35,9 +35,9 @@ test('should upload the file', async ({ page, server, asset }) => {}, input)).toBe('contents of the file');});-test('should upload a folder', async ({ page, server, browserName, headless, browserMajorVersion, isAndroid, macVersion, isMac }) => {+test('should upload a folder', async ({ page, server, isFrozenWebkit, isAndroid }) => {test.skip(isAndroid);- test.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS-12 is frozen');+ test.skip(isFrozenWebkit);await page.goto(server.PREFIX + '/input/folderupload.html');const input = await page.$('input');@@ -68,9 +68,9 @@ test('should upload a folder', async ({ page, server, browserName, headless, bro}});-test('should upload a folder and throw for multiple directories', async ({ page, server, isAndroid, browserName, macVersion, isMac }) => {+test('should upload a folder and throw for multiple directories', async ({ page, server, isAndroid, isFrozenWebkit }) => {test.skip(isAndroid);- test.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS-12 is frozen');+ test.skip(isFrozenWebkit);await page.goto(server.PREFIX + '/input/folderupload.html');const input = await page.$('input');@@ -87,9 +87,9 @@ test('should upload a folder and throw for multiple directories', async ({ page,])).rejects.toThrow('Multiple directories are not supported');});-test('should throw if a directory and files are passed', async ({ page, server, isAndroid, browserName, macVersion, isMac }) => {+test('should throw if a directory and files are passed', async ({ page, server, isAndroid, isFrozenWebkit }) => {test.skip(isAndroid);- test.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS-12 is frozen');+ test.skip(isFrozenWebkit);await page.goto(server.PREFIX + '/input/folderupload.html');const input = await page.$('input');@@ -104,9 +104,9 @@ test('should throw if a directory and files are passed', async ({ page, server,])).rejects.toThrow('File paths must be all files or a single directory');});-test('should throw when uploading a folder in a normal file upload input', async ({ page, server, isAndroid, browserName, macVersion, isMac }) => {+test('should throw when uploading a folder in a normal file upload input', async ({ page, server, isAndroid, isFrozenWebkit }) => {test.skip(isAndroid);- test.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS-12 is frozen');+ test.skip(isFrozenWebkit);await page.goto(server.PREFIX + '/input/fileupload.html');const input = await page.$('input');@@ -118,9 +118,9 @@ test('should throw when uploading a folder in a normal file upload input', asyncawait expect(input.setInputFiles(dir)).rejects.toThrow('File input does not support directories, pass individual files instead');});-test('should throw when uploading a file in a directory upload input', async ({ page, server, isAndroid, asset, browserName, macVersion, isMac }) => {+test('should throw when uploading a file in a directory upload input', async ({ page, server, isAndroid, asset, isFrozenWebkit }) => {test.skip(isAndroid);- test.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS-12 is frozen');+ test.skip(isFrozenWebkit);await page.goto(server.PREFIX + '/input/folderupload.html');const input = await page.$('input');diff --git a/tests/page/pageTestApi.ts b/tests/page/pageTestApi.tsindex 367778f364..c6123f9937 100644--- a/tests/page/pageTestApi.ts+++ b/tests/page/pageTestApi.ts@@ -37,4 +37,5 @@ export type PageWorkerFixtures = {isAndroid: boolean;isElectron: boolean;isHeadlessShell: boolean;+ isFrozenWebkit: boolean;};diff --git a/tests/page/workers.spec.ts b/tests/page/workers.spec.tsindex ccef5e28e0..fc5b1b81e1 100644--- a/tests/page/workers.spec.ts+++ b/tests/page/workers.spec.ts@@ -60,7 +60,9 @@ it('should report console logs', async function({ page }) {expect(page.url()).not.toContain('blob');});-it('should have timestamp on worker console messages', async function({ page }) {+it('should have timestamp on worker console messages', async function({ page, isAndroid }) {+ it.skip(isAndroid, 'there is a time difference between android emulator and host machine');+const before = Date.now() - 1; // Account for the rounding of fractional timestamps.const [message] = await Promise.all([page.waitForEvent('console'),