Skip to content

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

feat(devices): add Pixel 6 through Pixel 10 device descriptors (#40928)

Dmitry Gozmanc3deeffed9fd
diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.ts
index 9697f25c49..05fe4dc968 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 e2aa334fca..3b042192fc 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.14 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.14 Mobile Safari/537.36",
"viewport": {
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index 9697f25c49..05fe4dc968 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;