Skip to content

Commit 5eb8ddd

Browse files
committed
feat: add browser type to device descriptors
1 parent fc29623 commit 5eb8ddd

File tree

7 files changed

+165
-78
lines changed

7 files changed

+165
-78
lines changed

src/client/playwright.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ type DeviceDescriptor = {
2727
viewport: Size,
2828
deviceScaleFactor: number,
2929
isMobile: boolean,
30-
hasTouch: boolean
30+
hasTouch: boolean,
31+
defaultBrowserType: 'chromium' | 'firefox' | 'webkit'
3132
};
3233
type Devices = { [name: string]: DeviceDescriptor };
3334

src/protocol/channels.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export type PlaywrightInitializer = {
102102
deviceScaleFactor: number,
103103
isMobile: boolean,
104104
hasTouch: boolean,
105+
defaultBrowserType: 'chromium' | 'firefox' | 'webkit',
105106
},
106107
}[],
107108
selectors: SelectorsChannel,

src/protocol/protocol.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ Playwright:
143143
deviceScaleFactor: number
144144
isMobile: boolean
145145
hasTouch: boolean
146+
defaultBrowserType:
147+
type: enum
148+
literals:
149+
- chromium
150+
- firefox
151+
- webkit
146152
selectors: Selectors
147153

148154

0 commit comments

Comments
 (0)