diff --git a/packages/trace-viewer/src/ui/workbench.tsx b/packages/trace-viewer/src/ui/workbench.tsx
index e54b490d0256c..58ee991e8de45 100644
--- a/packages/trace-viewer/src/ui/workbench.tsx
+++ b/packages/trace-viewer/src/ui/workbench.tsx
@@ -95,6 +95,7 @@ const PartitionedWorkbench: React.FunctionComponent
({ lastEdited: 'none' });
const [isInspecting, setIsInspectingState] = React.useState(false);
+ const [highlightedTime, setHighlightedTime] = React.useState(undefined);
const setSelectedAction = React.useCallback((action: ActionTraceEventInContext | undefined) => {
setSelectedCallId(action?.callId);
@@ -264,6 +265,7 @@ const PartitionedWorkbench: React.FunctionComponent setSelectedTime({ minimum: m.timestamp, maximum: m.timestamp })}
/>
};
@@ -271,7 +273,7 @@ const PartitionedWorkbench: React.FunctionComponent
+ render: () =>
};
const attachmentsTab: TabbedPaneTabModel = {
id: 'attachments',
@@ -367,6 +369,7 @@ const PartitionedWorkbench: React.FunctionComponent}
/>}
{
await expect(listViews.filter({ hasText: 'Cheers!' })).toHaveClass('list-view-entry');
});
+test('should highlight console message on timeline on hover', async ({ showTraceViewer }) => {
+ const traceViewer = await showTraceViewer(traceFile);
+ await traceViewer.showConsoleTab();
+ const highlight = traceViewer.page.locator('.timeline-highlight');
+ await expect(highlight).toBeHidden();
+ await traceViewer.consoleLines.filter({ hasText: 'Info' }).hover();
+ await expect(highlight).toBeVisible();
+});
+
test('should open console errors on click', async ({ showTraceViewer }) => {
const traceViewer = await showTraceViewer(traceFile);
await expect(traceViewer.actionIconsText('Evaluate')).toHaveText(['2', '1']);
@@ -468,6 +477,16 @@ test('should have network requests', async ({ showTraceViewer }) => {
await expect(traceViewer.networkRequests.filter({ hasText: '404GET404text' })).toHaveCSS('background-color', 'rgb(242, 222, 222)');
});
+test('should highlight network request on timeline on hover', async ({ showTraceViewer }) => {
+ const traceViewer = await showTraceViewer(traceFile);
+ await traceViewer.selectAction('Navigate');
+ await traceViewer.showNetworkTab();
+ const highlight = traceViewer.page.locator('.timeline-highlight');
+ await expect(highlight).toBeHidden();
+ await traceViewer.networkRequests.filter({ hasText: 'frame.html' }).hover();
+ await expect(highlight).toBeVisible();
+});
+
test('should filter network requests by resource type', async ({ page, runAndTrace, server }) => {
const traceViewer = await runAndTrace(async () => {
server.setRoute('/api/endpoint', (_, res) => res.setHeader('Content-Type', 'application/json').end());
From 4cd7f685f902b2f9783ea8a3af8a78a1b9c5fdb2 Mon Sep 17 00:00:00 2001
From: Dmitry Munda
Date: Fri, 22 May 2026 14:22:14 +0300
Subject: [PATCH 7/7] feat(devices): add iPhone 16 and iPhone 17 device
families (#40917)
---
packages/playwright-client/types/types.d.ts | 20 ++
.../src/server/deviceDescriptorsSource.json | 300 ++++++++++++++++++
packages/playwright-core/types/types.d.ts | 20 ++
3 files changed, 340 insertions(+)
diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts
index 5136b94b64618..7a032da7ad9a6 100644
--- a/packages/playwright-client/types/types.d.ts
+++ b/packages/playwright-client/types/types.d.ts
@@ -24796,6 +24796,26 @@ type Devices = {
"iPhone 15 Pro landscape": DeviceDescriptor;
"iPhone 15 Pro Max": DeviceDescriptor;
"iPhone 15 Pro Max landscape": DeviceDescriptor;
+ "iPhone 16": DeviceDescriptor;
+ "iPhone 16 landscape": DeviceDescriptor;
+ "iPhone 16 Plus": DeviceDescriptor;
+ "iPhone 16 Plus landscape": DeviceDescriptor;
+ "iPhone 16 Pro": DeviceDescriptor;
+ "iPhone 16 Pro landscape": DeviceDescriptor;
+ "iPhone 16 Pro Max": DeviceDescriptor;
+ "iPhone 16 Pro Max landscape": DeviceDescriptor;
+ "iPhone 16e": DeviceDescriptor;
+ "iPhone 16e landscape": DeviceDescriptor;
+ "iPhone 17": DeviceDescriptor;
+ "iPhone 17 landscape": DeviceDescriptor;
+ "iPhone Air": DeviceDescriptor;
+ "iPhone Air landscape": DeviceDescriptor;
+ "iPhone 17 Pro": DeviceDescriptor;
+ "iPhone 17 Pro landscape": DeviceDescriptor;
+ "iPhone 17 Pro Max": DeviceDescriptor;
+ "iPhone 17 Pro Max landscape": DeviceDescriptor;
+ "iPhone 17e": DeviceDescriptor;
+ "iPhone 17e landscape": DeviceDescriptor;
"Kindle Fire HDX": DeviceDescriptor;
"Kindle Fire HDX landscape": DeviceDescriptor;
"LG Optimus L70": DeviceDescriptor;
diff --git a/packages/playwright-core/src/server/deviceDescriptorsSource.json b/packages/playwright-core/src/server/deviceDescriptorsSource.json
index e706ee8d10c01..73b7eaefafda4 100644
--- a/packages/playwright-core/src/server/deviceDescriptorsSource.json
+++ b/packages/playwright-core/src/server/deviceDescriptorsSource.json
@@ -1185,6 +1185,306 @@
"hasTouch": true,
"defaultBrowserType": "webkit"
},
+ "iPhone 16": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 393,
+ "height": 852
+ },
+ "viewport": {
+ "width": 393,
+ "height": 659
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 393,
+ "height": 852
+ },
+ "viewport": {
+ "width": 734,
+ "height": 343
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Plus": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 430,
+ "height": 932
+ },
+ "viewport": {
+ "width": 430,
+ "height": 739
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Plus landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 430,
+ "height": 932
+ },
+ "viewport": {
+ "width": 814,
+ "height": 380
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Pro": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 402,
+ "height": 681
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Pro landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 756,
+ "height": 352
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Pro Max": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 440,
+ "height": 956
+ },
+ "viewport": {
+ "width": 440,
+ "height": 763
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16 Pro Max landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 440,
+ "height": 956
+ },
+ "viewport": {
+ "width": 838,
+ "height": 390
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16e": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 390,
+ "height": 844
+ },
+ "viewport": {
+ "width": 390,
+ "height": 651
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 16e landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 390,
+ "height": 844
+ },
+ "viewport": {
+ "width": 726,
+ "height": 340
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 402,
+ "height": 681
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17 landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 756,
+ "height": 352
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone Air": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 420,
+ "height": 912
+ },
+ "viewport": {
+ "width": 420,
+ "height": 719
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone Air landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 420,
+ "height": 912
+ },
+ "viewport": {
+ "width": 794,
+ "height": 370
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17 Pro": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 402,
+ "height": 681
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17 Pro landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 402,
+ "height": 874
+ },
+ "viewport": {
+ "width": 756,
+ "height": 352
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17 Pro Max": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 440,
+ "height": 956
+ },
+ "viewport": {
+ "width": 440,
+ "height": 763
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17 Pro Max landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 440,
+ "height": 956
+ },
+ "viewport": {
+ "width": 838,
+ "height": 390
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17e": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 390,
+ "height": 844
+ },
+ "viewport": {
+ "width": 390,
+ "height": 651
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
+ "iPhone 17e landscape": {
+ "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Mobile/15E148 Safari/604.1",
+ "screen": {
+ "width": 390,
+ "height": 844
+ },
+ "viewport": {
+ "width": 726,
+ "height": 340
+ },
+ "deviceScaleFactor": 3,
+ "isMobile": true,
+ "hasTouch": true,
+ "defaultBrowserType": "webkit"
+ },
"Kindle Fire HDX": {
"userAgent": "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
"viewport": {
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index 5136b94b64618..7a032da7ad9a6 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -24796,6 +24796,26 @@ type Devices = {
"iPhone 15 Pro landscape": DeviceDescriptor;
"iPhone 15 Pro Max": DeviceDescriptor;
"iPhone 15 Pro Max landscape": DeviceDescriptor;
+ "iPhone 16": DeviceDescriptor;
+ "iPhone 16 landscape": DeviceDescriptor;
+ "iPhone 16 Plus": DeviceDescriptor;
+ "iPhone 16 Plus landscape": DeviceDescriptor;
+ "iPhone 16 Pro": DeviceDescriptor;
+ "iPhone 16 Pro landscape": DeviceDescriptor;
+ "iPhone 16 Pro Max": DeviceDescriptor;
+ "iPhone 16 Pro Max landscape": DeviceDescriptor;
+ "iPhone 16e": DeviceDescriptor;
+ "iPhone 16e landscape": DeviceDescriptor;
+ "iPhone 17": DeviceDescriptor;
+ "iPhone 17 landscape": DeviceDescriptor;
+ "iPhone Air": DeviceDescriptor;
+ "iPhone Air landscape": DeviceDescriptor;
+ "iPhone 17 Pro": DeviceDescriptor;
+ "iPhone 17 Pro landscape": DeviceDescriptor;
+ "iPhone 17 Pro Max": DeviceDescriptor;
+ "iPhone 17 Pro Max landscape": DeviceDescriptor;
+ "iPhone 17e": DeviceDescriptor;
+ "iPhone 17e landscape": DeviceDescriptor;
"Kindle Fire HDX": DeviceDescriptor;
"Kindle Fire HDX landscape": DeviceDescriptor;
"LG Optimus L70": DeviceDescriptor;