You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
level: z.enum(['error','warning','info','debug']).default('info').describe('Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".'),
Copy file name to clipboardExpand all lines: packages/playwright/src/mcp/config.d.ts
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,13 @@ export type Config = {
142
142
*/
143
143
outputDir?: string;
144
144
145
+
console?: {
146
+
/**
147
+
* The level of console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
148
+
*/
149
+
level?: 'error'|'warning'|'info'|'debug';
150
+
},
151
+
145
152
network?: {
146
153
/**
147
154
* List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
.option('--cdp-endpoint <endpoint>','CDP endpoint to connect to.')
44
44
.option('--cdp-header <headers...>','CDP headers to send with the connect request, multiple can be specified.',headerParser)
45
45
.option('--config <path>','path to the configuration file.')
46
+
.option('--console-level <level>','level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.',enumParser.bind(null,'--console-level',['error','warning','info','debug']))
46
47
.option('--device <device>','device to emulate, for example: "iPhone 15"')
47
48
.option('--executable-path <path>','path to the browser executable.')
48
49
.option('--extension','Connect to a running browser instance (Edge/Chrome only). Requires the "Playwright MCP Bridge" browser extension to be installed.')
.option('--init-page <path...>','path to TypeScript file to evaluate on Playwright page object')
54
55
.option('--init-script <path...>','path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page\'s scripts. Can be specified multiple times.')
55
56
.option('--isolated','keep the browser profile in memory, do not save it to disk.')
56
-
.option('--image-responses <mode>','whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".')
57
+
.option('--image-responses <mode>','whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".',enumParser.bind(null,'--image-responses',['allow','omit']))
57
58
.option('--no-sandbox','disable the sandbox for all process types that are normally sandboxed.')
58
59
.option('--output-dir <path>','path to the directory for output files.')
59
60
.option('--port <port>','port to listen on for SSE transport.')
0 commit comments