n8n-nodes-playwright-chromium-cdp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +25 -0
- package/README.md +186 -0
- package/dist/credentials/PlaywrightCdpApi.credentials.d.ts +9 -0
- package/dist/credentials/PlaywrightCdpApi.credentials.d.ts.map +1 -0
- package/dist/credentials/PlaywrightCdpApi.credentials.js +30 -0
- package/dist/credentials/PlaywrightCdpApi.credentials.js.map +1 -0
- package/dist/credentials/playwright.svg +14 -0
- package/dist/nodes/Playwright/Playwright.node.d.ts +12 -0
- package/dist/nodes/Playwright/Playwright.node.d.ts.map +1 -0
- package/dist/nodes/Playwright/Playwright.node.js +426 -0
- package/dist/nodes/Playwright/Playwright.node.js.map +1 -0
- package/dist/nodes/Playwright/Playwright.node.options.d.ts +3 -0
- package/dist/nodes/Playwright/Playwright.node.options.d.ts.map +1 -0
- package/dist/nodes/Playwright/Playwright.node.options.js +681 -0
- package/dist/nodes/Playwright/Playwright.node.options.js.map +1 -0
- package/dist/nodes/Playwright/playwright.svg +14 -0
- package/dist/package.json +93 -0
- package/index.js +0 -0
- package/package.json +93 -0
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nodeDescription = void 0;
|
|
4
|
+
exports.nodeDescription = {
|
|
5
|
+
displayName: 'Playwright CDP',
|
|
6
|
+
name: 'playwrightCdp',
|
|
7
|
+
group: ['transform'],
|
|
8
|
+
version: 1,
|
|
9
|
+
description: 'Automate browser interactions using Playwright with remote browser via CDP',
|
|
10
|
+
defaults: {
|
|
11
|
+
name: 'Playwright CDP',
|
|
12
|
+
color: '#2EAD33',
|
|
13
|
+
},
|
|
14
|
+
icon: 'file:playwright.svg',
|
|
15
|
+
inputs: ['main'],
|
|
16
|
+
outputs: ['main'],
|
|
17
|
+
usableAsTool: true,
|
|
18
|
+
credentials: [
|
|
19
|
+
{
|
|
20
|
+
name: 'playwrightCdpApi',
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
properties: [
|
|
25
|
+
{
|
|
26
|
+
displayName: 'URL',
|
|
27
|
+
name: 'url',
|
|
28
|
+
type: 'string',
|
|
29
|
+
required: true,
|
|
30
|
+
default: '',
|
|
31
|
+
displayOptions: {
|
|
32
|
+
show: {
|
|
33
|
+
operation: ['getPageContent', 'getScreenshot', 'getPDF'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Operation',
|
|
39
|
+
name: 'operation',
|
|
40
|
+
type: 'options',
|
|
41
|
+
options: [
|
|
42
|
+
{
|
|
43
|
+
name: 'Get Page Content',
|
|
44
|
+
value: 'getPageContent',
|
|
45
|
+
description: 'Gets the full HTML contents of the page',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Get PDF',
|
|
49
|
+
value: 'getPDF',
|
|
50
|
+
description: 'Captures all or part of the page as a PDF',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Get Screenshot',
|
|
54
|
+
value: 'getScreenshot',
|
|
55
|
+
description: 'Captures all or part of the page as an image',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'Run Custom Script',
|
|
59
|
+
value: 'runCustomScript',
|
|
60
|
+
description: 'Runs custom code to perform specific actions on the page',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
default: 'getPageContent',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Script Code',
|
|
67
|
+
name: 'scriptCode',
|
|
68
|
+
type: 'string',
|
|
69
|
+
typeOptions: {
|
|
70
|
+
editor: 'codeNodeEditor',
|
|
71
|
+
editorLanguage: 'javaScript',
|
|
72
|
+
},
|
|
73
|
+
required: true,
|
|
74
|
+
default: '// Navigate to an IP lookup service\nawait $page.goto(\'https://httpbin.org/ip\');\n\n// Extract the IP address from the page content\nconst ipData = await $page.evaluate(() => {\n const response = document.body.innerText;\n const parsed = JSON.parse(response);\n return parsed.origin; // Extract the \'origin\' field, which typically contains the IP address\n});\n\nconsole.log("Hello, world!");\n\nconsole.log("IP Address", ipData);\n\n// Return the result in the required format\nreturn [{ ip: ipData, ...$json }];',
|
|
75
|
+
description: 'JavaScript code to execute with Playwright. You have access to the $browser, $context and $page objects.',
|
|
76
|
+
noDataExpression: false,
|
|
77
|
+
displayOptions: {
|
|
78
|
+
show: {
|
|
79
|
+
operation: ['runCustomScript'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Use <code>$page</code>, <code>$context</code>, <code>$browser</code>, or <code>$playwright</code> vars to access Playwright. <a target="_blank" href="https://docs.n8n.io/code-examples/methods-variables-reference/">Special vars/methods</a> are available. <br><br>Debug by using <code>console.log()</code> statements and viewing their output in the browser console.',
|
|
85
|
+
name: 'notice',
|
|
86
|
+
type: 'notice',
|
|
87
|
+
displayOptions: {
|
|
88
|
+
show: {
|
|
89
|
+
operation: ['runCustomScript'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
default: '',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Property Name',
|
|
96
|
+
name: 'dataPropertyName',
|
|
97
|
+
type: 'string',
|
|
98
|
+
required: true,
|
|
99
|
+
default: 'data',
|
|
100
|
+
description: 'Name of the binary property in which to store the image or PDF data.',
|
|
101
|
+
displayOptions: {
|
|
102
|
+
show: {
|
|
103
|
+
operation: ['getScreenshot', 'getPDF'],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Page Ranges',
|
|
109
|
+
name: 'pageRanges',
|
|
110
|
+
type: 'string',
|
|
111
|
+
required: false,
|
|
112
|
+
default: '',
|
|
113
|
+
description: 'Paper ranges to print, e.g. 1-5, 8, 11-13.',
|
|
114
|
+
displayOptions: {
|
|
115
|
+
show: {
|
|
116
|
+
operation: ['getPDF'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Scale',
|
|
122
|
+
name: 'scale',
|
|
123
|
+
type: 'number',
|
|
124
|
+
typeOptions: {
|
|
125
|
+
minValue: 0.1,
|
|
126
|
+
maxValue: 2,
|
|
127
|
+
},
|
|
128
|
+
default: 1.0,
|
|
129
|
+
required: true,
|
|
130
|
+
description: 'Scales the rendering of the web page. Amount must be between 0.1 and 2.',
|
|
131
|
+
displayOptions: {
|
|
132
|
+
show: {
|
|
133
|
+
operation: ['getPDF'],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
displayName: 'Prefer CSS Page Size',
|
|
139
|
+
name: 'preferCSSPageSize',
|
|
140
|
+
type: 'boolean',
|
|
141
|
+
required: true,
|
|
142
|
+
default: true,
|
|
143
|
+
displayOptions: {
|
|
144
|
+
show: {
|
|
145
|
+
operation: ['getPDF'],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
description: 'Give any CSS @page size declared in the page priority over what is declared in the width or height or format option.',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
displayName: 'Format',
|
|
152
|
+
name: 'format',
|
|
153
|
+
type: 'options',
|
|
154
|
+
options: [
|
|
155
|
+
{
|
|
156
|
+
name: 'Letter',
|
|
157
|
+
value: 'Letter',
|
|
158
|
+
description: '8.5in x 11in',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'Legal',
|
|
162
|
+
value: 'Legal',
|
|
163
|
+
description: '8.5in x 14in',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'Tabloid',
|
|
167
|
+
value: 'Tabloid',
|
|
168
|
+
description: '11in x 17in',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'Ledger',
|
|
172
|
+
value: 'Ledger',
|
|
173
|
+
description: '17in x 11in',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'A0',
|
|
177
|
+
value: 'A0',
|
|
178
|
+
description: '33.1in x 46.8in',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'A1',
|
|
182
|
+
value: 'A1',
|
|
183
|
+
description: '23.4in x 33.1in',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'A2',
|
|
187
|
+
value: 'A2',
|
|
188
|
+
description: '16.54in x 23.4in',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'A3',
|
|
192
|
+
value: 'A3',
|
|
193
|
+
description: '11.7in x 16.54in',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: 'A4',
|
|
197
|
+
value: 'A4',
|
|
198
|
+
description: '8.27in x 11.7in',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'A5',
|
|
202
|
+
value: 'A5',
|
|
203
|
+
description: '5.83in x 8.27in',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'A6',
|
|
207
|
+
value: 'A6',
|
|
208
|
+
description: '4.13in x 5.83in',
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
default: 'Letter',
|
|
212
|
+
description: 'Valid paper format types when printing a PDF. eg: Letter, A4',
|
|
213
|
+
displayOptions: {
|
|
214
|
+
show: {
|
|
215
|
+
operation: ['getPDF'],
|
|
216
|
+
preferCSSPageSize: [false],
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
displayName: 'Height',
|
|
222
|
+
name: 'height',
|
|
223
|
+
type: 'string',
|
|
224
|
+
default: '',
|
|
225
|
+
required: false,
|
|
226
|
+
description: 'Sets the height of paper. You can pass in a number or a string with a unit.',
|
|
227
|
+
displayOptions: {
|
|
228
|
+
show: {
|
|
229
|
+
operation: ['getPDF'],
|
|
230
|
+
preferCSSPageSize: [false],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
displayName: 'Width',
|
|
236
|
+
name: 'width',
|
|
237
|
+
type: 'string',
|
|
238
|
+
default: '',
|
|
239
|
+
required: false,
|
|
240
|
+
description: 'Sets the width of paper. You can pass in a number or a string with a unit.',
|
|
241
|
+
displayOptions: {
|
|
242
|
+
show: {
|
|
243
|
+
operation: ['getPDF'],
|
|
244
|
+
preferCSSPageSize: [false],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
displayName: 'Landscape',
|
|
250
|
+
name: 'landscape',
|
|
251
|
+
type: 'boolean',
|
|
252
|
+
required: true,
|
|
253
|
+
default: true,
|
|
254
|
+
displayOptions: {
|
|
255
|
+
show: {
|
|
256
|
+
operation: ['getPDF'],
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
description: 'Whether to print in landscape orientation.',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
displayName: 'Margin',
|
|
263
|
+
name: 'margin',
|
|
264
|
+
type: 'collection',
|
|
265
|
+
placeholder: 'Add Margin',
|
|
266
|
+
default: {},
|
|
267
|
+
description: 'Set the PDF margins.',
|
|
268
|
+
displayOptions: {
|
|
269
|
+
show: {
|
|
270
|
+
operation: ['getPDF'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
options: [
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Top',
|
|
276
|
+
name: 'top',
|
|
277
|
+
type: 'string',
|
|
278
|
+
default: '',
|
|
279
|
+
required: false,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
displayName: 'Bottom',
|
|
283
|
+
name: 'bottom',
|
|
284
|
+
type: 'string',
|
|
285
|
+
default: '',
|
|
286
|
+
required: false,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
displayName: 'Left',
|
|
290
|
+
name: 'left',
|
|
291
|
+
type: 'string',
|
|
292
|
+
default: '',
|
|
293
|
+
required: false,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
displayName: 'Right',
|
|
297
|
+
name: 'right',
|
|
298
|
+
type: 'string',
|
|
299
|
+
default: '',
|
|
300
|
+
required: false,
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
displayName: 'Display Header/Footer',
|
|
306
|
+
name: 'displayHeaderFooter',
|
|
307
|
+
type: 'boolean',
|
|
308
|
+
required: true,
|
|
309
|
+
default: false,
|
|
310
|
+
displayOptions: {
|
|
311
|
+
show: {
|
|
312
|
+
operation: ['getPDF'],
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
description: 'Whether to show the header and footer.',
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
displayName: 'Header Template',
|
|
319
|
+
name: 'headerTemplate',
|
|
320
|
+
typeOptions: {
|
|
321
|
+
rows: 5,
|
|
322
|
+
},
|
|
323
|
+
type: 'string',
|
|
324
|
+
default: "",
|
|
325
|
+
description: `HTML template for the print header. Should be valid HTML with the following classes used to inject values into them: - date formatted print date
|
|
326
|
+
|
|
327
|
+
- title document title
|
|
328
|
+
|
|
329
|
+
- url document location
|
|
330
|
+
|
|
331
|
+
- pageNumber current page number
|
|
332
|
+
|
|
333
|
+
- totalPages total pages in the document`,
|
|
334
|
+
noDataExpression: true,
|
|
335
|
+
displayOptions: {
|
|
336
|
+
show: {
|
|
337
|
+
operation: ['getPDF'],
|
|
338
|
+
displayHeaderFooter: [true],
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
displayName: 'Footer Template',
|
|
344
|
+
name: 'footerTemplate',
|
|
345
|
+
typeOptions: {
|
|
346
|
+
rows: 5,
|
|
347
|
+
},
|
|
348
|
+
type: 'string',
|
|
349
|
+
default: "",
|
|
350
|
+
description: "HTML template for the print footer. Should be valid HTML with the following classes used to inject values into them: - date formatted print date",
|
|
351
|
+
noDataExpression: true,
|
|
352
|
+
displayOptions: {
|
|
353
|
+
show: {
|
|
354
|
+
operation: ['getPDF'],
|
|
355
|
+
displayHeaderFooter: [true],
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
displayName: 'Transparent Background',
|
|
361
|
+
name: 'omitBackground',
|
|
362
|
+
type: 'boolean',
|
|
363
|
+
required: true,
|
|
364
|
+
default: false,
|
|
365
|
+
displayOptions: {
|
|
366
|
+
show: {
|
|
367
|
+
operation: ['getPDF'],
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
description: 'Hides default white background and allows generating pdfs with transparency.',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Background Graphics',
|
|
374
|
+
name: 'printBackground',
|
|
375
|
+
type: 'boolean',
|
|
376
|
+
required: true,
|
|
377
|
+
default: false,
|
|
378
|
+
displayOptions: {
|
|
379
|
+
show: {
|
|
380
|
+
operation: ['getPDF'],
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
description: 'Set to true to include background graphics.',
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
displayName: 'Type',
|
|
387
|
+
name: 'imageType',
|
|
388
|
+
type: 'options',
|
|
389
|
+
options: [
|
|
390
|
+
{
|
|
391
|
+
name: 'JPEG',
|
|
392
|
+
value: 'jpeg',
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: 'PNG',
|
|
396
|
+
value: 'png',
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
displayOptions: {
|
|
400
|
+
show: {
|
|
401
|
+
operation: ['getScreenshot'],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
default: 'png',
|
|
405
|
+
description: 'The image type to use. PNG and JPEG are supported.',
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
displayName: 'Quality',
|
|
409
|
+
name: 'quality',
|
|
410
|
+
type: 'number',
|
|
411
|
+
typeOptions: {
|
|
412
|
+
minValue: 0,
|
|
413
|
+
maxValue: 100,
|
|
414
|
+
},
|
|
415
|
+
default: 100,
|
|
416
|
+
displayOptions: {
|
|
417
|
+
show: {
|
|
418
|
+
operation: ['getScreenshot'],
|
|
419
|
+
imageType: ['jpeg'],
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
description: 'The quality of the image, between 0-100. Not applicable to png images.',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
displayName: 'Full Page',
|
|
426
|
+
name: 'fullPage',
|
|
427
|
+
type: 'boolean',
|
|
428
|
+
required: true,
|
|
429
|
+
default: false,
|
|
430
|
+
displayOptions: {
|
|
431
|
+
show: {
|
|
432
|
+
operation: ['getScreenshot'],
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
description: 'When true, takes a screenshot of the full scrollable page.',
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
displayName: 'Query Parameters',
|
|
439
|
+
name: 'queryParameters',
|
|
440
|
+
placeholder: 'Add Parameter',
|
|
441
|
+
type: 'fixedCollection',
|
|
442
|
+
typeOptions: {
|
|
443
|
+
multipleValues: true,
|
|
444
|
+
},
|
|
445
|
+
displayOptions: {
|
|
446
|
+
show: {
|
|
447
|
+
operation: ['getPageContent', 'getScreenshot', 'getPDF'],
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
description: 'The query parameter to send.',
|
|
451
|
+
default: {},
|
|
452
|
+
options: [
|
|
453
|
+
{
|
|
454
|
+
name: 'parameters',
|
|
455
|
+
displayName: 'Parameters',
|
|
456
|
+
values: [
|
|
457
|
+
{
|
|
458
|
+
displayName: 'Name',
|
|
459
|
+
name: 'name',
|
|
460
|
+
type: 'string',
|
|
461
|
+
default: '',
|
|
462
|
+
description: 'Name of the parameter.',
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
displayName: 'Value',
|
|
466
|
+
name: 'value',
|
|
467
|
+
type: 'string',
|
|
468
|
+
default: '',
|
|
469
|
+
description: 'Value of the parameter.',
|
|
470
|
+
},
|
|
471
|
+
],
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
displayName: 'Options',
|
|
477
|
+
name: 'options',
|
|
478
|
+
type: 'collection',
|
|
479
|
+
placeholder: 'Add Option',
|
|
480
|
+
default: {},
|
|
481
|
+
options: [
|
|
482
|
+
{
|
|
483
|
+
displayName: 'Batch Size',
|
|
484
|
+
name: 'batchSize',
|
|
485
|
+
type: 'number',
|
|
486
|
+
typeOptions: {
|
|
487
|
+
minValue: 1,
|
|
488
|
+
},
|
|
489
|
+
default: 1,
|
|
490
|
+
description: 'Maximum number of pages to open simultaneously. More pages will consume more memory and CPU.',
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
displayName: 'Emulate Device',
|
|
494
|
+
name: 'device',
|
|
495
|
+
type: 'options',
|
|
496
|
+
description: 'Emulate a specific device.',
|
|
497
|
+
default: '',
|
|
498
|
+
typeOptions: {
|
|
499
|
+
loadOptionsMethod: 'getDevices',
|
|
500
|
+
},
|
|
501
|
+
required: false,
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
displayName: 'Extra Headers',
|
|
505
|
+
name: 'headers',
|
|
506
|
+
placeholder: 'Add Header',
|
|
507
|
+
type: 'fixedCollection',
|
|
508
|
+
typeOptions: {
|
|
509
|
+
multipleValues: true,
|
|
510
|
+
},
|
|
511
|
+
description: 'The headers to send.',
|
|
512
|
+
default: {},
|
|
513
|
+
options: [
|
|
514
|
+
{
|
|
515
|
+
name: 'parameter',
|
|
516
|
+
displayName: 'Header',
|
|
517
|
+
values: [
|
|
518
|
+
{
|
|
519
|
+
displayName: 'Name',
|
|
520
|
+
name: 'name',
|
|
521
|
+
type: 'string',
|
|
522
|
+
default: '',
|
|
523
|
+
description: 'Name of the header.',
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
displayName: 'Value',
|
|
527
|
+
name: 'value',
|
|
528
|
+
type: 'string',
|
|
529
|
+
default: '',
|
|
530
|
+
description: 'Value to set for the header.',
|
|
531
|
+
},
|
|
532
|
+
],
|
|
533
|
+
},
|
|
534
|
+
],
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
displayName: 'File Name',
|
|
538
|
+
name: 'fileName',
|
|
539
|
+
type: 'string',
|
|
540
|
+
default: '',
|
|
541
|
+
description: 'File name to set in binary data. Only applies to \'Get PDF\' and \'Get Screenshot\' operations.',
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
displayName: 'Timeout',
|
|
545
|
+
name: 'timeout',
|
|
546
|
+
type: 'number',
|
|
547
|
+
typeOptions: {
|
|
548
|
+
minValue: 0,
|
|
549
|
+
},
|
|
550
|
+
default: 30000,
|
|
551
|
+
description: 'Maximum navigation time in milliseconds. Pass 0 to disable timeout. Has no effect on the \'Run Custom Script\' operation.',
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
displayName: 'Wait Until',
|
|
555
|
+
name: 'waitUntil',
|
|
556
|
+
type: 'options',
|
|
557
|
+
options: [
|
|
558
|
+
{
|
|
559
|
+
name: 'load',
|
|
560
|
+
value: 'load',
|
|
561
|
+
description: 'The load event is fired',
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
name: 'domcontentloaded',
|
|
565
|
+
value: 'domcontentloaded',
|
|
566
|
+
description: 'The domcontentloaded event is fired',
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
name: 'networkidle',
|
|
570
|
+
value: 'networkidle',
|
|
571
|
+
description: 'No network connections for at least 500 ms',
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: 'commit',
|
|
575
|
+
value: 'commit',
|
|
576
|
+
description: 'When network response is received and the document started loading',
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
default: 'load',
|
|
580
|
+
description: 'When to consider navigation succeeded. Has no effect on the \'Run Custom Script\' operation.',
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
displayName: 'Viewport Width',
|
|
584
|
+
name: 'viewportWidth',
|
|
585
|
+
type: 'number',
|
|
586
|
+
typeOptions: {
|
|
587
|
+
minValue: 1,
|
|
588
|
+
},
|
|
589
|
+
default: 1280,
|
|
590
|
+
description: 'Page viewport width in pixels.',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
displayName: 'Viewport Height',
|
|
594
|
+
name: 'viewportHeight',
|
|
595
|
+
type: 'number',
|
|
596
|
+
typeOptions: {
|
|
597
|
+
minValue: 1,
|
|
598
|
+
},
|
|
599
|
+
default: 720,
|
|
600
|
+
description: 'Page viewport height in pixels.',
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
displayName: 'User Agent',
|
|
604
|
+
name: 'userAgent',
|
|
605
|
+
type: 'string',
|
|
606
|
+
default: '',
|
|
607
|
+
description: 'Custom user agent to use.',
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
displayName: 'Locale',
|
|
611
|
+
name: 'locale',
|
|
612
|
+
type: 'string',
|
|
613
|
+
default: '',
|
|
614
|
+
placeholder: 'en-US',
|
|
615
|
+
description: 'Specify user locale, for example en-GB, de-DE, etc.',
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
displayName: 'Timezone',
|
|
619
|
+
name: 'timezone',
|
|
620
|
+
type: 'string',
|
|
621
|
+
default: '',
|
|
622
|
+
placeholder: 'America/New_York',
|
|
623
|
+
description: 'Changes the timezone of the context. See ICU\'s metaZones.txt for a list of supported timezone IDs.',
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
displayName: 'Geolocation',
|
|
627
|
+
name: 'geolocation',
|
|
628
|
+
type: 'collection',
|
|
629
|
+
placeholder: 'Add Geolocation',
|
|
630
|
+
default: {},
|
|
631
|
+
description: 'Set geolocation.',
|
|
632
|
+
options: [
|
|
633
|
+
{
|
|
634
|
+
displayName: 'Latitude',
|
|
635
|
+
name: 'latitude',
|
|
636
|
+
type: 'number',
|
|
637
|
+
default: 0,
|
|
638
|
+
description: 'Latitude between -90 and 90.',
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
displayName: 'Longitude',
|
|
642
|
+
name: 'longitude',
|
|
643
|
+
type: 'number',
|
|
644
|
+
default: 0,
|
|
645
|
+
description: 'Longitude between -180 and 180.',
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
displayName: 'Accuracy',
|
|
649
|
+
name: 'accuracy',
|
|
650
|
+
type: 'number',
|
|
651
|
+
default: 0,
|
|
652
|
+
description: 'Non-negative accuracy value.',
|
|
653
|
+
},
|
|
654
|
+
],
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
displayName: 'Ignore HTTPS Errors',
|
|
658
|
+
name: 'ignoreHTTPSErrors',
|
|
659
|
+
type: 'boolean',
|
|
660
|
+
default: false,
|
|
661
|
+
description: 'Whether to ignore HTTPS errors when sending network requests.',
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
displayName: 'JavaScript Enabled',
|
|
665
|
+
name: 'javaScriptEnabled',
|
|
666
|
+
type: 'boolean',
|
|
667
|
+
default: true,
|
|
668
|
+
description: 'Whether to enable JavaScript in the context.',
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
displayName: 'Bypass CSP',
|
|
672
|
+
name: 'bypassCSP',
|
|
673
|
+
type: 'boolean',
|
|
674
|
+
default: false,
|
|
675
|
+
description: 'Toggles bypassing page\'s Content-Security-Policy.',
|
|
676
|
+
},
|
|
677
|
+
],
|
|
678
|
+
},
|
|
679
|
+
],
|
|
680
|
+
};
|
|
681
|
+
//# sourceMappingURL=Playwright.node.options.js.map
|