Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

feat(webkit): roll to r2108 (#33710)

Max Schmitt5da0b94357ad
diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json
index 1f0d20cb60..884e6dd413 100644
--- a/packages/playwright-core/browsers.json
+++ b/packages/playwright-core/browsers.json
@@ -33,9 +33,11 @@
},
{
"name": "webkit",
- "revision": "2105",
+ "revision": "2108",
"installByDefault": true,
"revisionOverrides": {
+ "debian11-x64": "2105",
+ "debian11-arm64": "2105",
"mac10.14": "1446",
"mac10.15": "1616",
"mac11": "1816",
diff --git a/packages/playwright-core/src/server/registry/nativeDeps.ts b/packages/playwright-core/src/server/registry/nativeDeps.ts
index d569f13258..6e25e3a14f 100644
--- a/packages/playwright-core/src/server/registry/nativeDeps.ts
+++ b/packages/playwright-core/src/server/registry/nativeDeps.ts
@@ -329,7 +329,7 @@ export const deps: any = {
'libgstreamer-gl1.0-0',
'libgstreamer-plugins-base1.0-0',
'libgstreamer1.0-0',
- 'libgtk-3-0',
+ 'libgtk-4-1',
'libgudev-1.0-0',
'libharfbuzz-icu0',
'libharfbuzz0b',
@@ -400,6 +400,7 @@ export const deps: any = {
'libgsttag-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstvideo-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgtk-3.so.0': 'libgtk-3-0',
+ 'libgtk-4.so.1': 'libgtk-4-1',
'libgudev-1.0.so.0': 'libgudev-1.0-0',
'libharfbuzz-icu.so.0': 'libharfbuzz-icu0',
'libharfbuzz.so.0': 'libharfbuzz0b',
@@ -544,7 +545,7 @@ export const deps: any = {
'libgstreamer-plugins-bad1.0-0',
'libgstreamer-plugins-base1.0-0',
'libgstreamer1.0-0',
- 'libgtk-3-0t64',
+ 'libgtk-4-1',
'libharfbuzz-icu0',
'libharfbuzz0b',
'libhyphen0',
@@ -621,6 +622,7 @@ export const deps: any = {
'libgsttag-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstvideo-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgtk-3.so.0': 'libgtk-3-0t64',
+ 'libgtk-4.so.1': 'libgtk-4-1',
'libharfbuzz-icu.so.0': 'libharfbuzz-icu0',
'libharfbuzz.so.0': 'libharfbuzz0b',
'libhyphen.so.0': 'libhyphen0',
@@ -967,7 +969,7 @@ export const deps: any = {
'libgstreamer-gl1.0-0',
'libgstreamer-plugins-base1.0-0',
'libgstreamer1.0-0',
- 'libgtk-3-0',
+ 'libgtk-4-1',
'libgudev-1.0-0',
'libharfbuzz-icu0',
'libharfbuzz0b',
@@ -1028,6 +1030,7 @@ export const deps: any = {
'libXfixes.so.3': 'libxfixes3',
'libxkbcommon.so.0': 'libxkbcommon0',
'libXrandr.so.2': 'libxrandr2',
+ 'libgtk-4.so.1': 'libgtk-4-1',
}
},
};
diff --git a/packages/playwright-core/src/server/webkit/webkit.ts b/packages/playwright-core/src/server/webkit/webkit.ts
index 9a11f6c56d..5159f8cecb 100644
--- a/packages/playwright-core/src/server/webkit/webkit.ts
+++ b/packages/playwright-core/src/server/webkit/webkit.ts
@@ -43,7 +43,7 @@ export class WebKit extends BrowserType {
override doRewriteStartupLog(error: ProtocolError): ProtocolError {
if (!error.logs)
return error;
- if (error.logs.includes('cannot open display'))
+ if (error.logs.includes('Failed to open display') || error.logs.includes('cannot open display'))
error.logs = '\n' + wrapInASCIIBox(kNoXServerRunningError, 1);
return error;
}
diff --git a/tests/library/emulation-focus.spec.ts b/tests/library/emulation-focus.spec.ts
index dc8b541608..90cbdb6016 100644
--- a/tests/library/emulation-focus.spec.ts
+++ b/tests/library/emulation-focus.spec.ts
@@ -101,8 +101,9 @@ it('should change document.activeElement', async ({ page, server }) => {
expect(active).toEqual(['INPUT', 'TEXTAREA']);
});
-it('should not affect screenshots', async ({ page, server, browserName, headless, isWindows, isHeadlessShell }) => {
+it('should not affect screenshots', async ({ page, server, browserName, headless, isWindows, isLinux, isHeadlessShell }) => {
it.skip(browserName === 'webkit' && isWindows && !headless, 'WebKit/Windows/headed has a larger minimal viewport. See https://github.com/microsoft/playwright/issues/22616');
+ it.skip(browserName === 'webkit' && isLinux && !headless, 'WebKit headed has a larger minimal viewport on gtk4.');
it.skip(browserName === 'firefox' && !headless, 'Firefox headed produces a different image');
it.fixme(browserName === 'chromium' && !isHeadlessShell, 'https://github.com/microsoft/playwright/issues/33330');
diff --git a/tests/page/elementhandle-screenshot.spec.ts b/tests/page/elementhandle-screenshot.spec.ts
index 042fb7c565..3d5d7c5709 100644
--- a/tests/page/elementhandle-screenshot.spec.ts
+++ b/tests/page/elementhandle-screenshot.spec.ts
@@ -45,7 +45,7 @@ it.describe('element screenshot', () => {
expect(screenshot).toMatchSnapshot('screenshot-element-bounding-box.png');
});
- it('should take into account padding and border', async ({ page }) => {
+ it('should take into account padding and border', async ({ page, isLinux, headless, browserName }) => {
await page.setViewportSize({ width: 500, height: 500 });
await page.setContent(`
<div style="height: 14px">oooo</div>
diff --git a/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-padding-border-webkit.png b/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-padding-border-webkit.png
index 971006d83d..b7e971b762 100644
Binary files a/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-padding-border-webkit.png and b/tests/page/elementhandle-screenshot.spec.ts-snapshots/screenshot-element-padding-border-webkit.png differ
diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.ts
index 76985e758c..4e9114ad5d 100644
--- a/tests/page/page-screenshot.spec.ts
+++ b/tests/page/page-screenshot.spec.ts
@@ -280,8 +280,9 @@ it.describe('page screenshot', () => {
expect(screenshot).toMatchSnapshot('screenshot-clip-odd-size.png');
});
- it('should work for canvas', async ({ page, server, isElectron, isMac, isLinux, macVersion, browserName, isHeadlessShell }) => {
+ it('should work for canvas', async ({ page, server, isElectron, isMac, isLinux, macVersion, browserName, isHeadlessShell, headless }) => {
it.fixme(isElectron && isMac, 'Fails on the bots');
+ it.fixme(browserName === 'webkit' && isLinux && !headless, 'WebKit has slightly different corners on gtk4.');
await page.setViewportSize({ width: 500, height: 500 });
await page.goto(server.PREFIX + '/screenshots/canvas.html');
const screenshot = await page.screenshot();