From 75a139a6b9d4bdaa898d89504d317a90887f6ec5 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 20 May 2026 14:49:52 +0100 Subject: [PATCH] feat(devices): add Pixel 6 through Pixel 10 device descriptors Adds 14 missing Pixel device families (portrait + landscape): Pixel 6, 6 Pro, 6a, 7 Pro, 7a, 8, 8 Pro, 8a, 9, 9 Pro, 9 Pro XL, 10, 10 Pro, 10 Pro XL. Fixes: https://github.com/microsoft/playwright/issues/40910 --- packages/playwright-client/types/types.d.ts | 28 ++ .../src/server/deviceDescriptorsSource.json | 420 ++++++++++++++++++ packages/playwright-core/types/types.d.ts | 28 ++ 3 files changed, 476 insertions(+) diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts index 9697f25c49cd1..05fe4dc968db1 100644 --- a/packages/playwright-client/types/types.d.ts +++ b/packages/playwright-client/types/types.d.ts @@ -24759,8 +24759,36 @@ type Devices = { "Pixel 4a (5G) landscape": DeviceDescriptor; "Pixel 5": DeviceDescriptor; "Pixel 5 landscape": DeviceDescriptor; + "Pixel 6": DeviceDescriptor; + "Pixel 6 landscape": DeviceDescriptor; + "Pixel 6 Pro": DeviceDescriptor; + "Pixel 6 Pro landscape": DeviceDescriptor; + "Pixel 6a": DeviceDescriptor; + "Pixel 6a landscape": DeviceDescriptor; "Pixel 7": DeviceDescriptor; "Pixel 7 landscape": DeviceDescriptor; + "Pixel 7 Pro": DeviceDescriptor; + "Pixel 7 Pro landscape": DeviceDescriptor; + "Pixel 7a": DeviceDescriptor; + "Pixel 7a landscape": DeviceDescriptor; + "Pixel 8": DeviceDescriptor; + "Pixel 8 landscape": DeviceDescriptor; + "Pixel 8 Pro": DeviceDescriptor; + "Pixel 8 Pro landscape": DeviceDescriptor; + "Pixel 8a": DeviceDescriptor; + "Pixel 8a landscape": DeviceDescriptor; + "Pixel 9": DeviceDescriptor; + "Pixel 9 landscape": DeviceDescriptor; + "Pixel 9 Pro": DeviceDescriptor; + "Pixel 9 Pro landscape": DeviceDescriptor; + "Pixel 9 Pro XL": DeviceDescriptor; + "Pixel 9 Pro XL landscape": DeviceDescriptor; + "Pixel 10": DeviceDescriptor; + "Pixel 10 landscape": DeviceDescriptor; + "Pixel 10 Pro": DeviceDescriptor; + "Pixel 10 Pro landscape": DeviceDescriptor; + "Pixel 10 Pro XL": DeviceDescriptor; + "Pixel 10 Pro XL landscape": DeviceDescriptor; "Moto G4": DeviceDescriptor; "Moto G4 landscape": DeviceDescriptor; "Desktop Chrome HiDPI": DeviceDescriptor; diff --git a/packages/playwright-core/src/server/deviceDescriptorsSource.json b/packages/playwright-core/src/server/deviceDescriptorsSource.json index f1ccb01c5bacf..cfe6cd86934e2 100644 --- a/packages/playwright-core/src/server/deviceDescriptorsSource.json +++ b/packages/playwright-core/src/server/deviceDescriptorsSource.json @@ -1619,6 +1619,96 @@ "hasTouch": true, "defaultBrowserType": "chromium" }, + "Pixel 6": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 915 + }, + "viewport": { + "width": 412, + "height": 839 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 6 landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 915, + "height": 412 + }, + "viewport": { + "width": 863, + "height": 360 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 6 Pro": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 892 + }, + "viewport": { + "width": 412, + "height": 816 + }, + "deviceScaleFactor": 3.5, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 6 Pro landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 892, + "height": 412 + }, + "viewport": { + "width": 840, + "height": 360 + }, + "deviceScaleFactor": 3.5, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 6a": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 915 + }, + "viewport": { + "width": 412, + "height": 839 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 6a landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 12; Pixel 6a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 915, + "height": 412 + }, + "viewport": { + "width": 863, + "height": 360 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, "Pixel 7": { "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", "screen": { @@ -1649,6 +1739,336 @@ "hasTouch": true, "defaultBrowserType": "chromium" }, + "Pixel 7 Pro": { + "userAgent": "Mozilla/5.0 (Linux; Android 13; Pixel 7 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 892 + }, + "viewport": { + "width": 412, + "height": 816 + }, + "deviceScaleFactor": 3.5, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 7 Pro landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 13; Pixel 7 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 892, + "height": 412 + }, + "viewport": { + "width": 840, + "height": 360 + }, + "deviceScaleFactor": 3.5, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 7a": { + "userAgent": "Mozilla/5.0 (Linux; Android 13; Pixel 7a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 915 + }, + "viewport": { + "width": 412, + "height": 839 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 7a landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 13; Pixel 7a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 915, + "height": 412 + }, + "viewport": { + "width": 863, + "height": 360 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 915 + }, + "viewport": { + "width": 412, + "height": 839 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8 landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 915, + "height": 412 + }, + "viewport": { + "width": 863, + "height": 360 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8 Pro": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 448, + "height": 997 + }, + "viewport": { + "width": 448, + "height": 921 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8 Pro landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 997, + "height": 448 + }, + "viewport": { + "width": 945, + "height": 396 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8a": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 412, + "height": 915 + }, + "viewport": { + "width": 412, + "height": 839 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 8a landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 8a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 915, + "height": 412 + }, + "viewport": { + "width": 863, + "height": 360 + }, + "deviceScaleFactor": 2.625, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 360, + "height": 808 + }, + "viewport": { + "width": 360, + "height": 732 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9 landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 808, + "height": 360 + }, + "viewport": { + "width": 756, + "height": 308 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9 Pro": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 427, + "height": 952 + }, + "viewport": { + "width": 427, + "height": 876 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9 Pro landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 952, + "height": 427 + }, + "viewport": { + "width": 900, + "height": 375 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9 Pro XL": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 448, + "height": 997 + }, + "viewport": { + "width": 448, + "height": 921 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 9 Pro XL landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 997, + "height": 448 + }, + "viewport": { + "width": 945, + "height": 396 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 360, + "height": 808 + }, + "viewport": { + "width": 360, + "height": 732 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10 landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 808, + "height": 360 + }, + "viewport": { + "width": 756, + "height": 308 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10 Pro": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 427, + "height": 952 + }, + "viewport": { + "width": 427, + "height": 876 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10 Pro landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 952, + "height": 427 + }, + "viewport": { + "width": 900, + "height": 375 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10 Pro XL": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 448, + "height": 997 + }, + "viewport": { + "width": 448, + "height": 921 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, + "Pixel 10 Pro XL landscape": { + "userAgent": "Mozilla/5.0 (Linux; Android 16; Pixel 10 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", + "screen": { + "width": 997, + "height": 448 + }, + "viewport": { + "width": 945, + "height": 396 + }, + "deviceScaleFactor": 3, + "isMobile": true, + "hasTouch": true, + "defaultBrowserType": "chromium" + }, "Moto G4": { "userAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.7827.3 Mobile Safari/537.36", "viewport": { diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 9697f25c49cd1..05fe4dc968db1 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -24759,8 +24759,36 @@ type Devices = { "Pixel 4a (5G) landscape": DeviceDescriptor; "Pixel 5": DeviceDescriptor; "Pixel 5 landscape": DeviceDescriptor; + "Pixel 6": DeviceDescriptor; + "Pixel 6 landscape": DeviceDescriptor; + "Pixel 6 Pro": DeviceDescriptor; + "Pixel 6 Pro landscape": DeviceDescriptor; + "Pixel 6a": DeviceDescriptor; + "Pixel 6a landscape": DeviceDescriptor; "Pixel 7": DeviceDescriptor; "Pixel 7 landscape": DeviceDescriptor; + "Pixel 7 Pro": DeviceDescriptor; + "Pixel 7 Pro landscape": DeviceDescriptor; + "Pixel 7a": DeviceDescriptor; + "Pixel 7a landscape": DeviceDescriptor; + "Pixel 8": DeviceDescriptor; + "Pixel 8 landscape": DeviceDescriptor; + "Pixel 8 Pro": DeviceDescriptor; + "Pixel 8 Pro landscape": DeviceDescriptor; + "Pixel 8a": DeviceDescriptor; + "Pixel 8a landscape": DeviceDescriptor; + "Pixel 9": DeviceDescriptor; + "Pixel 9 landscape": DeviceDescriptor; + "Pixel 9 Pro": DeviceDescriptor; + "Pixel 9 Pro landscape": DeviceDescriptor; + "Pixel 9 Pro XL": DeviceDescriptor; + "Pixel 9 Pro XL landscape": DeviceDescriptor; + "Pixel 10": DeviceDescriptor; + "Pixel 10 landscape": DeviceDescriptor; + "Pixel 10 Pro": DeviceDescriptor; + "Pixel 10 Pro landscape": DeviceDescriptor; + "Pixel 10 Pro XL": DeviceDescriptor; + "Pixel 10 Pro XL landscape": DeviceDescriptor; "Moto G4": DeviceDescriptor; "Moto G4 landscape": DeviceDescriptor; "Desktop Chrome HiDPI": DeviceDescriptor;