-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpdf_request_body.json
786 lines (786 loc) · 35 KB
/
pdf_request_body.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"ArrayBuffer": {
"additionalProperties": false,
"properties": {
"__@toStringTag@25": {
"type": "string"
},
"byteLength": {
"type": "number"
}
},
"required": ["__@toStringTag@25", "byteLength"],
"type": "object"
},
"ArrayBufferLike": {
"anyOf": [
{
"$ref": "#/definitions/ArrayBuffer"
},
{
"$ref": "#/definitions/SharedArrayBuffer"
}
]
},
"BrowserContextOptions": {
"additionalProperties": false,
"properties": {
"acceptDownloads": {
"description": "Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.",
"type": "boolean"
},
"baseURL": {
"description": "When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),\n[page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),\n[page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),\n[page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),\nor\n[page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)\nit takes the base URL in consideration by using the\n[`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.\nUnset by default. Examples:\n- baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`\n- baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in\n `http://localhost:3000/foo/bar.html`\n- baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in\n `http://localhost:3000/bar.html`",
"type": "string"
},
"bypassCSP": {
"description": "Toggles bypassing page's Content-Security-Policy. Defaults to `false`.",
"type": "boolean"
},
"clientCertificates": {
"description": "TLS Client Authentication allows the server to request a client certificate and verify it.\n\n**Details**\n\nAn array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,\na single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,\n`passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided\nwith an exact match to the request origin that the certificate is valid for.\n\n**NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it\nwork by replacing `localhost` with `local.playwright`.",
"items": {
"additionalProperties": false,
"properties": {
"cert": {
"additionalProperties": false,
"description": "Direct value of the certificate in PEM format.",
"patternProperties": {
"^[0-9]+$": {
"type": "number"
}
},
"properties": {
"BYTES_PER_ELEMENT": {
"type": "number"
},
"__@toStringTag@25": {
"const": "Uint8Array",
"type": "string"
},
"buffer": {
"$ref": "#/definitions/ArrayBufferLike"
},
"byteLength": {
"type": "number"
},
"byteOffset": {
"type": "number"
},
"length": {
"type": "number"
}
},
"required": [
"BYTES_PER_ELEMENT",
"__@toStringTag@25",
"buffer",
"byteLength",
"byteOffset",
"length"
],
"type": "object"
},
"certPath": {
"description": "Path to the file with the certificate in PEM format.",
"type": "string"
},
"key": {
"additionalProperties": false,
"description": "Direct value of the private key in PEM format.",
"patternProperties": {
"^[0-9]+$": {
"type": "number"
}
},
"properties": {
"BYTES_PER_ELEMENT": {
"type": "number"
},
"__@toStringTag@25": {
"const": "Uint8Array",
"type": "string"
},
"buffer": {
"$ref": "#/definitions/ArrayBufferLike"
},
"byteLength": {
"type": "number"
},
"byteOffset": {
"type": "number"
},
"length": {
"type": "number"
}
},
"required": [
"BYTES_PER_ELEMENT",
"__@toStringTag@25",
"buffer",
"byteLength",
"byteOffset",
"length"
],
"type": "object"
},
"keyPath": {
"description": "Path to the file with the private key in PEM format.",
"type": "string"
},
"origin": {
"description": "Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.",
"type": "string"
},
"passphrase": {
"description": "Passphrase for the private key (PEM or PFX).",
"type": "string"
},
"pfx": {
"additionalProperties": false,
"description": "Direct value of the PFX or PKCS12 encoded private key and certificate chain.",
"patternProperties": {
"^[0-9]+$": {
"type": "number"
}
},
"properties": {
"BYTES_PER_ELEMENT": {
"type": "number"
},
"__@toStringTag@25": {
"const": "Uint8Array",
"type": "string"
},
"buffer": {
"$ref": "#/definitions/ArrayBufferLike"
},
"byteLength": {
"type": "number"
},
"byteOffset": {
"type": "number"
},
"length": {
"type": "number"
}
},
"required": [
"BYTES_PER_ELEMENT",
"__@toStringTag@25",
"buffer",
"byteLength",
"byteOffset",
"length"
],
"type": "object"
},
"pfxPath": {
"description": "Path to the PFX or PKCS12 encoded private key and certificate chain.",
"type": "string"
}
},
"required": ["origin"],
"type": "object"
},
"type": "array"
},
"colorScheme": {
"anyOf": [
{
"enum": ["dark", "light", "no-preference"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)\nmedia feature, supported values are `'light'` and `'dark'`. See\n[page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.\nPassing `null` resets emulation to system defaults. Defaults to `'light'`."
},
"deviceScaleFactor": {
"description": "Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about\n[emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).",
"type": "number"
},
"extraHTTPHeaders": {
"additionalProperties": {
"type": "string"
},
"description": "An object containing additional HTTP headers to be sent with every request. Defaults to none.",
"type": "object"
},
"forcedColors": {
"anyOf": [
{
"enum": ["active", "none"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See\n[page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.\nPassing `null` resets emulation to system defaults. Defaults to `'none'`."
},
"geolocation": {
"$ref": "#/definitions/Geolocation"
},
"hasTouch": {
"description": "Specifies if viewport supports touch events. Defaults to false. Learn more about\n[mobile emulation](https://playwright.dev/docs/emulation#devices).",
"type": "boolean"
},
"httpCredentials": {
"$ref": "#/definitions/HTTPCredentials",
"description": "Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no\norigin is specified, the username and password are sent to any servers upon unauthorized responses."
},
"ignoreHTTPSErrors": {
"description": "Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.",
"type": "boolean"
},
"isMobile": {
"description": "Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,\nso you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more\nabout [mobile emulation](https://playwright.dev/docs/emulation#ismobile).",
"type": "boolean"
},
"javaScriptEnabled": {
"description": "Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about\n[disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).",
"type": "boolean"
},
"locale": {
"description": "Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,\n`Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default\nlocale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).",
"type": "string"
},
"logger": {
"$ref": "#/definitions/Logger",
"description": "Logger sink for Playwright logging."
},
"offline": {
"description": "Whether to emulate network being offline. Defaults to `false`. Learn more about\n[network emulation](https://playwright.dev/docs/emulation#offline).",
"type": "boolean"
},
"permissions": {
"description": "A list of permissions to grant to all pages in this context. See\n[browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)\nfor more details. Defaults to none.",
"items": {
"type": "string"
},
"type": "array"
},
"proxy": {
"additionalProperties": false,
"description": "Network proxy settings to use with this context. Defaults to none.",
"properties": {
"bypass": {
"description": "Optional comma-separated domains to bypass proxy, for example `\".com, chromium.org, .domain.com\"`.",
"type": "string"
},
"password": {
"description": "Optional password to use if HTTP proxy requires authentication.",
"type": "string"
},
"server": {
"description": "Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or\n`socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.",
"type": "string"
},
"username": {
"description": "Optional username to use if HTTP proxy requires authentication.",
"type": "string"
}
},
"required": ["server"],
"type": "object"
},
"recordHar": {
"additionalProperties": false,
"description": "Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.\nIf not specified, the HAR is not recorded. Make sure to await\n[browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for\nthe HAR to be saved.",
"properties": {
"content": {
"description": "Optional setting to control resource content management. If `omit` is specified, content is not persisted. If\n`attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is\nspecified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output\nfiles and to `embed` for all other file extensions.",
"enum": ["attach", "embed", "omit"],
"type": "string"
},
"mode": {
"description": "When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,\ncookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.",
"enum": ["full", "minimal"],
"type": "string"
},
"omitContent": {
"description": "Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use\n`content` policy instead.",
"type": "boolean"
},
"path": {
"description": "Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by\ndefault.",
"type": "string"
},
"urlFilter": {
"anyOf": [
{
"$ref": "#/definitions/RegExp"
},
{
"type": "string"
}
],
"description": "A glob or regex pattern to filter requests that are stored in the HAR. When a\n[`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context\noptions was provided and the passed URL is a path, it gets merged via the\n[`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none."
}
},
"required": ["path"],
"type": "object"
},
"recordVideo": {
"additionalProperties": false,
"description": "Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.\nMake sure to await\n[browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for\nvideos to be saved.",
"properties": {
"dir": {
"description": "Path to the directory to put videos into.",
"type": "string"
},
"size": {
"additionalProperties": false,
"description": "Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to\nfit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of\neach page will be scaled down if necessary to fit the specified size.",
"properties": {
"height": {
"description": "Video frame height.",
"type": "number"
},
"width": {
"description": "Video frame width.",
"type": "number"
}
},
"required": ["height", "width"],
"type": "object"
}
},
"required": ["dir"],
"type": "object"
},
"reducedMotion": {
"anyOf": [
{
"enum": ["no-preference", "reduce"],
"type": "string"
},
{
"type": "null"
}
],
"description": "Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See\n[page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.\nPassing `null` resets emulation to system defaults. Defaults to `'no-preference'`."
},
"screen": {
"additionalProperties": false,
"description": "Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the\n[`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-viewport) is set.",
"properties": {
"height": {
"description": "page height in pixels.",
"type": "number"
},
"width": {
"description": "page width in pixels.",
"type": "number"
}
},
"required": ["height", "width"],
"type": "object"
},
"serviceWorkers": {
"description": "Whether to allow sites to register Service workers. Defaults to `'allow'`.\n- `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be\n registered.\n- `'block'`: Playwright will block all registration of Service Workers.",
"enum": ["allow", "block"],
"type": "string"
},
"storageState": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"cookies": {
"description": "Cookies to set for context",
"items": {
"additionalProperties": false,
"properties": {
"domain": {
"description": "Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like\nthis: \".example.com\"",
"type": "string"
},
"expires": {
"description": "Unix time in seconds.",
"type": "number"
},
"httpOnly": {
"type": "boolean"
},
"name": {
"type": "string"
},
"path": {
"description": "Domain and path are required",
"type": "string"
},
"sameSite": {
"description": "sameSite flag",
"enum": ["Lax", "None", "Strict"],
"type": "string"
},
"secure": {
"type": "boolean"
},
"value": {
"type": "string"
}
},
"required": [
"domain",
"expires",
"httpOnly",
"name",
"path",
"sameSite",
"secure",
"value"
],
"type": "object"
},
"type": "array"
},
"origins": {
"description": "localStorage to set for context",
"items": {
"additionalProperties": false,
"properties": {
"localStorage": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["name", "value"],
"type": "object"
},
"type": "array"
},
"origin": {
"type": "string"
}
},
"required": ["localStorage", "origin"],
"type": "object"
},
"type": "array"
}
},
"required": ["cookies", "origins"],
"type": "object"
},
{
"type": "string"
}
],
"description": "Learn more about [storage state and auth](https://playwright.dev/docs/auth).\n\nPopulates context with given storage state. This option can be used to initialize context with logged-in\ninformation obtained via\n[browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)."
},
"strictSelectors": {
"description": "If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on\nselectors that imply single target DOM element will throw when more than one element matches the selector. This\noption does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See\n[Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.",
"type": "boolean"
},
"timezoneId": {
"description": "Changes the timezone of the context. See\n[ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)\nfor a list of supported timezone IDs. Defaults to the system timezone.",
"type": "string"
},
"userAgent": {
"description": "Specific user agent to use in this context.",
"type": "string"
},
"videoSize": {
"additionalProperties": false,
"properties": {
"height": {
"description": "Video frame height.",
"type": "number"
},
"width": {
"description": "Video frame width.",
"type": "number"
}
},
"required": ["height", "width"],
"type": "object"
},
"videosPath": {
"type": "string"
},
"viewport": {
"anyOf": [
{
"$ref": "#/definitions/ViewportSize"
},
{
"type": "null"
}
],
"description": "Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent\nviewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).\n\n**NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined\nby the operating system. It makes the execution of the tests non-deterministic."
}
},
"type": "object"
},
"Geolocation": {
"additionalProperties": false,
"properties": {
"accuracy": {
"description": "Non-negative accuracy value. Defaults to `0`.",
"type": "number"
},
"latitude": {
"description": "Latitude between -90 and 90.",
"type": "number"
},
"longitude": {
"description": "Longitude between -180 and 180.",
"type": "number"
}
},
"required": ["latitude", "longitude"],
"type": "object"
},
"HTTPCredentials": {
"additionalProperties": false,
"properties": {
"origin": {
"description": "Restrain sending http credentials on specific origin (scheme://host:port).",
"type": "string"
},
"password": {
"type": "string"
},
"send": {
"description": "This option only applies to the requests sent from corresponding\n[APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from\nthe browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each\nAPI request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with\n`WWW-Authenticate` header is received. Defaults to `'unauthorized'`.",
"enum": ["always", "unauthorized"],
"type": "string"
},
"username": {
"type": "string"
}
},
"required": ["password", "username"],
"type": "object"
},
"Logger": {
"additionalProperties": false,
"description": "Playwright generates a lot of logs and they are accessible via the pluggable logger sink.\n\n```js\nconst { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.\n\n(async () => {\n const browser = await chromium.launch({\n logger: {\n isEnabled: (name, severity) => name === 'api',\n log: (name, severity, message, args) => console.log(`${name} ${message}`)\n }\n });\n // ...\n})();\n```",
"type": "object"
},
"RegExp": {
"additionalProperties": false,
"properties": {
"dotAll": {
"type": "boolean"
},
"flags": {
"type": "string"
},
"global": {
"type": "boolean"
},
"ignoreCase": {
"type": "boolean"
},
"lastIndex": {
"type": "number"
},
"multiline": {
"type": "boolean"
},
"source": {
"type": "string"
},
"sticky": {
"type": "boolean"
},
"unicode": {
"type": "boolean"
}
},
"required": [
"dotAll",
"flags",
"global",
"ignoreCase",
"lastIndex",
"multiline",
"source",
"sticky",
"unicode"
],
"type": "object"
},
"SharedArrayBuffer": {
"additionalProperties": false,
"properties": {
"__@species@472": {
"$ref": "#/definitions/SharedArrayBuffer"
},
"__@toStringTag@25": {
"const": "SharedArrayBuffer",
"type": "string"
},
"byteLength": {
"type": "number"
}
},
"required": ["__@species@472", "__@toStringTag@25", "byteLength"],
"type": "object"
},
"ViewportSize": {
"additionalProperties": false,
"properties": {
"height": {
"description": "page height in pixels.",
"type": "number"
},
"width": {
"description": "page width in pixels.",
"type": "number"
}
},
"required": ["height", "width"],
"type": "object"
}
},
"properties": {
"browserContextOptions": {
"anyOf": [
{
"$ref": "#/definitions/BrowserContextOptions"
},
{
"type": "null"
}
]
},
"gotoOptions": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"referer": {
"description": "Referer header value. If provided it will take preference over the referer header value set by\n[page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).",
"type": "string"
},
"timeout": {
"description": "Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via\n`navigationTimeout` option in the config, or by using the\n[browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),\n[browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),\n[page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)\nor [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.",
"type": "number"
},
"waitUntil": {
"description": "When to consider operation succeeded, defaults to `load`. Events can be either:\n- `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.\n- `'load'` - consider operation to be finished when the `load` event is fired.\n- `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for\n at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.\n- `'commit'` - consider operation to be finished when network response is received and the document started\n loading.",
"enum": ["commit", "domcontentloaded", "load", "networkidle"],
"type": "string"
}
},
"type": "object"
},
{
"type": "null"
}
]
},
"pdfOptions": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"displayHeaderFooter": {
"description": "Display header and footer. Defaults to `false`.",
"type": "boolean"
},
"footerTemplate": {
"description": "HTML template for the print footer. Should use the same format as the\n[`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template).",
"type": "string"
},
"format": {
"description": "Paper format. If set, takes priority over\n[`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) or\n[`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) options. Defaults to 'Letter'.",
"type": "string"
},
"headerTemplate": {
"description": "HTML template for the print header. Should be valid HTML markup with following classes used to inject printing\nvalues into them:\n- `'date'` formatted print date\n- `'title'` document title\n- `'url'` document location\n- `'pageNumber'` current page number\n- `'totalPages'` total pages in the document",
"type": "string"
},
"height": {
"description": "Paper height, accepts values labeled with units.",
"type": ["string", "number"]
},
"landscape": {
"description": "Paper orientation. Defaults to `false`.",
"type": "boolean"
},
"margin": {
"additionalProperties": false,
"description": "Paper margins, defaults to none.",
"properties": {
"bottom": {
"description": "Bottom margin, accepts values labeled with units. Defaults to `0`.",
"type": ["string", "number"]
},
"left": {
"description": "Left margin, accepts values labeled with units. Defaults to `0`.",
"type": ["string", "number"]
},
"right": {
"description": "Right margin, accepts values labeled with units. Defaults to `0`.",
"type": ["string", "number"]
},
"top": {
"description": "Top margin, accepts values labeled with units. Defaults to `0`.",
"type": ["string", "number"]
}
},
"type": "object"
},
"outline": {
"description": "Whether or not to embed the document outline into the PDF. Defaults to `false`.",
"type": "boolean"
},
"pageRanges": {
"description": "Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.",
"type": "string"
},
"path": {
"description": "The file path to save the PDF to. If [`path`](https://playwright.dev/docs/api/class-page#page-pdf-option-path) is a\nrelative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't\nbe saved to the disk.",
"type": "string"
},
"preferCSSPageSize": {
"description": "Give any CSS `@page` size declared in the page priority over what is declared in\n[`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) and\n[`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) or\n[`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options. Defaults to `false`, which\nwill scale the content to fit the paper size.",
"type": "boolean"
},
"printBackground": {
"description": "Print background graphics. Defaults to `false`.",
"type": "boolean"
},
"scale": {
"description": "Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.",
"type": "number"
},
"tagged": {
"description": "Whether or not to generate tagged (accessible) PDF. Defaults to `false`.",
"type": "boolean"
},
"width": {
"description": "Paper width, accepts values labeled with units.",
"type": ["string", "number"]
}
},
"type": "object"
},
{
"type": "null"
}
]
},
"url": {
"type": "string"
}
},
"required": ["url"],
"type": "object"
}