============================================================
ملفات المشروع المختارة (Style JSON + Source Code)
============================================================

------------------------------------------------------------
[1] اسم الملف: setup_map2.sh
المسار: ./setup_map2.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | 
0003 | # setup_map2.sh - Automated setup for the isolated Map-2 environment
0004 | # إعداد بيئة الخرائط الثانية المعزولة بالكامل
0005 | 
0006 | echo "🚀 Starting Map-2 Environment Setup..."
0007 | 
0008 | # 1. Create Data Directory on Server
0009 | echo "📂 Preparing data directory: infrastructure/osm-data-v2"
0010 | mkdir -p infrastructure/osm-data-v2
0011 | 
0012 | # 2. Check for PBF file
0013 | if [ ! -f "infrastructure/osm-data-v2/map2_enriched.osm.pbf" ]; then
0014 |     echo "⚠️  No map2_enriched.osm.pbf found."
0015 |     echo "💡 Copying existing master_map as a starting point..."
0016 |     cp infrastructure/osm-data/master_map.osm.pbf infrastructure/osm-data-v2/map2_enriched.osm.pbf
0017 | fi
0018 | 
0019 | # 3. Spin up the containers
0020 | echo "🏗️  Starting Map-2 Stack (DB, Redis, Tiles, Routing)..."
0021 | docker compose -f docker-compose.map2.yml up -d
0022 | 
0023 | echo "✅ Map-2 is being provisioned."
0024 | echo "------------------------------------------------"
0025 | echo "Ports used:"
0026 | echo " - Martin (Tiles): 3203"
0027 | echo " - Database: 5433"
0028 | echo " - Routing: 8990"
0029 | echo " - Redis: 6382"
0030 | echo "------------------------------------------------"
0031 | echo "Intelligence Roadmap:"
0032 | echo "1. Run Overture downloader (Next step)"
0033 | echo "2. Inject Arabic names via Overpass API"
0034 | echo "3. Connect Martin to the new DB"


------------------------------------------------------------
[2] اسم الملف: style.json
المسار: ./style.json
------------------------------------------------------------
0001 | {
0002 |   "version": 8,
0003 |   "name": "Intaleq Premium Map Style",
0004 |   "metadata": {
0005 |     "brand": "Intaleq",
0006 |     "version": "2.0.0",
0007 |     "description": "Google + OSM hybrid style with 3D buildings, railways, subway, waterways, and Intaleq brand palette"
0008 |   },
0009 |   "center": [
0010 |     36.276008,
0011 |     33.513685
0012 |   ],
0013 |   "zoom": 15,
0014 |   "glyphs": "https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf",
0015 |   "sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite",
0016 |   "sources": {
0017 |     "local-osm-polygons": {
0018 |       "type": "vector",
0019 |       "tiles": [
0020 |         "https://tiles.intaleqapp.com/planet_osm_polygon/{z}/{x}/{y}"
0021 |       ],
0022 |       "maxzoom": 14,
0023 |       "attribution": "© Intaleq | © OpenStreetMap contributors"
0024 |     },
0025 |     "local-osm-lines": {
0026 |       "type": "vector",
0027 |       "tiles": [
0028 |         "https://tiles.intaleqapp.com/planet_osm_line/{z}/{x}/{y}"
0029 |       ],
0030 |       "maxzoom": 14
0031 |     },
0032 |     "local-osm-points": {
0033 |       "type": "vector",
0034 |       "tiles": [
0035 |         "https://tiles.intaleqapp.com/planet_osm_point/{z}/{x}/{y}"
0036 |       ],
0037 |       "maxzoom": 14
0038 |     },
0039 |     "places_egypt": {
0040 |       "type": "vector",
0041 |       "tiles": [
0042 |         "https://tiles.intaleqapp.com/places_egypt/{z}/{x}/{y}"
0043 |       ],
0044 |       "maxzoom": 14
0045 |     }
0046 |   },
0047 |   "layers": [
0048 |     {
0049 |       "id": "background",
0050 |       "type": "background",
0051 |       "paint": {
0052 |         "background-color": "#EEF2F7"
0053 |       }
0054 |     },
0055 |     {
0056 |       "id": "landuse-residential",
0057 |       "type": "fill",
0058 |       "source": "local-osm-polygons",
0059 |       "source-layer": "planet_osm_polygon",
0060 |       "filter": [
0061 |         "==",
0062 |         "landuse",
0063 |         "residential"
0064 |       ],
0065 |       "paint": {
0066 |         "fill-color": "#F0F4F8",
0067 |         "fill-opacity": 1
0068 |       }
0069 |     },
0070 |     {
0071 |       "id": "landuse-commercial",
0072 |       "type": "fill",
0073 |       "source": "local-osm-polygons",
0074 |       "source-layer": "planet_osm_polygon",
0075 |       "filter": [
0076 |         "==",
0077 |         "landuse",
0078 |         "commercial"
0079 |       ],
0080 |       "paint": {
0081 |         "fill-color": "#FAF5EE",
0082 |         "fill-opacity": 1
0083 |       }
0084 |     },
0085 |     {
0086 |       "id": "landuse-industrial",
0087 |       "type": "fill",
0088 |       "source": "local-osm-polygons",
0089 |       "source-layer": "planet_osm_polygon",
0090 |       "filter": [
0091 |         "in",
0092 |         "landuse",
0093 |         "industrial",
0094 |         "railway"
0095 |       ],
0096 |       "paint": {
0097 |         "fill-color": "#E4E8EE",
0098 |         "fill-opacity": 1
0099 |       }
0100 |     },
0101 |     {
0102 |       "id": "landuse-cemetery",
0103 |       "type": "fill",
0104 |       "source": "local-osm-polygons",
0105 |       "source-layer": "planet_osm_polygon",
0106 |       "filter": [
0107 |         "==",
0108 |         "landuse",
0109 |         "cemetery"
0110 |       ],
0111 |       "paint": {
0112 |         "fill-color": "#B8D4BA",
0113 |         "fill-opacity": 0.9
0114 |       }
0115 |     },
0116 |     {
0117 |       "id": "landuse-military",
0118 |       "type": "fill",
0119 |       "source": "local-osm-polygons",
0120 |       "source-layer": "planet_osm_polygon",
0121 |       "filter": [
0122 |         "==",
0123 |         "landuse",
0124 |         "military"
0125 |       ],
0126 |       "paint": {
0127 |         "fill-color": "#E2D9CC",
0128 |         "fill-opacity": 0.8
0129 |       }
0130 |     },
0131 |     {
0132 |       "id": "park-layer",
0133 |       "type": "fill",
0134 |       "source": "local-osm-polygons",
0135 |       "source-layer": "planet_osm_polygon",
0136 |       "filter": [
0137 |         "any",
0138 |         [
0139 |           "in",
0140 |           "leisure",
0141 |           "park",
0142 |           "garden",
0143 |           "nature_reserve",
0144 |           "pitch",
0145 |           "playground"
0146 |         ],
0147 |         [
0148 |           "in",
0149 |           "landuse",
0150 |           "grass",
0151 |           "meadow",
0152 |           "forest"
0153 |         ],
0154 |         [
0155 |           "in",
0156 |           "natural",
0157 |           "wood",
0158 |           "scrub",
0159 |           "heath"
0160 |         ]
0161 |       ],
0162 |       "paint": {
0163 |         "fill-color": [
0164 |           "match",
0165 |           [
0166 |             "get",
0167 |             "leisure"
0168 |           ],
0169 |           "pitch",
0170 |           "#9ED4A0",
0171 |           "playground",
0172 |           "#B8E6B8",
0173 |           "#C5E8C5"
0174 |         ],
0175 |         "fill-opacity": 0.85
0176 |       }
0177 |     },
0178 |     {
0179 |       "id": "park-outline",
0180 |       "type": "line",
0181 |       "source": "local-osm-polygons",
0182 |       "source-layer": "planet_osm_polygon",
0183 |       "filter": [
0184 |         "in",
0185 |         "leisure",
0186 |         "park",
0187 |         "garden",
0188 |         "nature_reserve"
0189 |       ],
0190 |       "paint": {
0191 |         "line-color": "#94D4A0",
0192 |         "line-width": 0.8,
0193 |         "line-opacity": 0.7
0194 |       }
0195 |     },
0196 |     {
0197 |       "id": "water-polygon",
0198 |       "type": "fill",
0199 |       "source": "local-osm-polygons",
0200 |       "source-layer": "planet_osm_polygon",
0201 |       "filter": [
0202 |         "any",
0203 |         [
0204 |           "in",
0205 |           "natural",
0206 |           "water",
0207 |           "lake",
0208 |           "bay"
0209 |         ],
0210 |         [
0211 |           "==",
0212 |           "waterway",
0213 |           "riverbank"
0214 |         ],
0215 |         [
0216 |           "in",
0217 |           "landuse",
0218 |           "basin",
0219 |           "reservoir"
0220 |         ],
0221 |         [
0222 |           "==",
0223 |           "amenity",
0224 |           "fountain"
0225 |         ]
0226 |       ],
0227 |       "paint": {
0228 |         "fill-color": "#9ECFE8",
0229 |         "fill-opacity": 0.95
0230 |       }
0231 |     },
0232 |     {
0233 |       "id": "water-polygon-outline",
0234 |       "type": "line",
0235 |       "source": "local-osm-polygons",
0236 |       "source-layer": "planet_osm_polygon",
0237 |       "filter": [
0238 |         "any",
0239 |         [
0240 |           "in",
0241 |           "natural",
0242 |           "water",
0243 |           "lake",
0244 |           "bay"
0245 |         ],
0246 |         [
0247 |           "==",
0248 |           "waterway",
0249 |           "riverbank"
0250 |         ],
0251 |         [
0252 |           "in",
0253 |           "landuse",
0254 |           "basin",
0255 |           "reservoir"
0256 |         ]
0257 |       ],
0258 |       "paint": {
0259 |         "line-color": "#6BB8D8",
0260 |         "line-width": 0.8,
0261 |         "line-opacity": 0.8
0262 |       }
0263 |     },
0264 |     {
0265 |       "id": "waterway-river",
0266 |       "type": "line",
0267 |       "source": "local-osm-lines",
0268 |       "source-layer": "planet_osm_line",
0269 |       "filter": [
0270 |         "all",
0271 |         [
0272 |           "in",
0273 |           "waterway",
0274 |           "river",
0275 |           "canal"
0276 |         ],
0277 |         [
0278 |           "!=",
0279 |           "intermittent",
0280 |           "yes"
0281 |         ],
0282 |         [
0283 |           "!=",
0284 |           "seasonal",
0285 |           "yes"
0286 |         ],
0287 |         [
0288 |           "!=",
0289 |           "tunnel",
0290 |           "yes"
0291 |         ]
0292 |       ],
0293 |       "paint": {
0294 |         "line-color": "#6BB8D8",
0295 |         "line-width": [
0296 |           "interpolate",
0297 |           [
0298 |             "linear"
0299 |           ],
0300 |           [
0301 |             "zoom"
0302 |           ],
0303 |           10,
0304 |           1.5,
0305 |           14,
0306 |           4,
0307 |           16,
0308 |           7
0309 |         ],
0310 |         "line-opacity": 0.95
0311 |       }
0312 |     },
0313 |     {
0314 |       "id": "waterway-stream-drain",
0315 |       "type": "line",
0316 |       "source": "local-osm-lines",
0317 |       "source-layer": "planet_osm_line",
0318 |       "filter": [
0319 |         "all",
0320 |         [
0321 |           "in",
0322 |           "waterway",
0323 |           "stream",
0324 |           "drain",
0325 |           "ditch"
0326 |         ],
0327 |         [
0328 |           "!=",
0329 |           "intermittent",
0330 |           "yes"
0331 |         ],
0332 |         [
0333 |           "!=",
0334 |           "seasonal",
0335 |           "yes"
0336 |         ],
0337 |         [
0338 |           "!=",
0339 |           "tunnel",
0340 |           "yes"
0341 |         ]
0342 |       ],
0343 |       "minzoom": 13,
0344 |       "paint": {
0345 |         "line-color": "#7FBFD8",
0346 |         "line-width": [
0347 |           "interpolate",
0348 |           [
0349 |             "linear"
0350 |           ],
0351 |           [
0352 |             "zoom"
0353 |           ],
0354 |           13,
0355 |           0.8,
0356 |           16,
0357 |           2.5
0358 |         ],
0359 |         "line-opacity": 0.85
0360 |       }
0361 |     },
0362 |     {
0363 |       "id": "railway-area",
0364 |       "type": "fill",
0365 |       "source": "local-osm-polygons",
0366 |       "source-layer": "planet_osm_polygon",
0367 |       "filter": [
0368 |         "==",
0369 |         "landuse",
0370 |         "railway"
0371 |       ],
0372 |       "paint": {
0373 |         "fill-color": "#DDE2EA",
0374 |         "fill-opacity": 0.9
0375 |       }
0376 |     },
0377 |     {
0378 |       "id": "railway-rail-casing",
0379 |       "type": "line",
0380 |       "source": "local-osm-lines",
0381 |       "source-layer": "planet_osm_line",
0382 |       "filter": [
0383 |         "all",
0384 |         [
0385 |           "in",
0386 |           "railway",
0387 |           "rail",
0388 |           "narrow_gauge",
0389 |           "preserved"
0390 |         ],
0391 |         [
0392 |           "!=",
0393 |           "service",
0394 |           "yard"
0395 |         ],
0396 |         [
0397 |           "!=",
0398 |           "service",
0399 |           "siding"
0400 |         ]
0401 |       ],
0402 |       "minzoom": 8,
0403 |       "paint": {
0404 |         "line-color": "#B0B8C5",
0405 |         "line-width": [
0406 |           "interpolate",
0407 |           [
0408 |             "linear"
0409 |           ],
0410 |           [
0411 |             "zoom"
0412 |           ],
0413 |           8,
0414 |           2,
0415 |           12,
0416 |           4,
0417 |           16,
0418 |           8
0419 |         ]
0420 |       }
0421 |     },
0422 |     {
0423 |       "id": "railway-rail-core",
0424 |       "type": "line",
0425 |       "source": "local-osm-lines",
0426 |       "source-layer": "planet_osm_line",
0427 |       "filter": [
0428 |         "all",
0429 |         [
0430 |           "in",
0431 |           "railway",
0432 |           "rail",
0433 |           "narrow_gauge",
0434 |           "preserved"
0435 |         ],
0436 |         [
0437 |           "!=",
0438 |           "service",
0439 |           "yard"
0440 |         ],
0441 |         [
0442 |           "!=",
0443 |           "service",
0444 |           "siding"
0445 |         ]
0446 |       ],
0447 |       "minzoom": 8,
0448 |       "paint": {
0449 |         "line-color": "#6B7A8E",
0450 |         "line-width": [
0451 |           "interpolate",
0452 |           [
0453 |             "linear"
0454 |           ],
0455 |           [
0456 |             "zoom"
0457 |           ],
0458 |           8,
0459 |           1,
0460 |           12,
0461 |           2.5,
0462 |           16,
0463 |           5
0464 |         ],
0465 |         "line-dasharray": [
0466 |           6,
0467 |           4
0468 |         ]
0469 |       }
0470 |     },
0471 |     {
0472 |       "id": "railway-subway-casing",
0473 |       "type": "line",
0474 |       "source": "local-osm-lines",
0475 |       "source-layer": "planet_osm_line",
0476 |       "filter": [
0477 |         "in",
0478 |         "railway",
0479 |         "subway",
0480 |         "light_rail",
0481 |         "tram",
0482 |         "monorail"
0483 |       ],
0484 |       "minzoom": 10,
0485 |       "paint": {
0486 |         "line-color": [
0487 |           "match",
0488 |           [
0489 |             "get",
0490 |             "railway"
0491 |           ],
0492 |           "subway",
0493 |           "#CC2233",
0494 |           "light_rail",
0495 |           "#0066CC",
0496 |           "tram",
0497 |           "#8833BB",
0498 |           "monorail",
0499 |           "#008855",
0500 |           "#BB3344"
0501 |         ],
0502 |         "line-width": [
0503 |           "interpolate",
0504 |           [
0505 |             "linear"
0506 |           ],
0507 |           [
0508 |             "zoom"
0509 |           ],
0510 |           10,
0511 |           3,
0512 |           14,
0513 |           6,
0514 |           16,
0515 |           10
0516 |         ]
0517 |       }
0518 |     },
0519 |     {
0520 |       "id": "railway-subway-core",
0521 |       "type": "line",
0522 |       "source": "local-osm-lines",
0523 |       "source-layer": "planet_osm_line",
0524 |       "filter": [
0525 |         "in",
0526 |         "railway",
0527 |         "subway",
0528 |         "light_rail",
0529 |         "tram",
0530 |         "monorail"
0531 |       ],
0532 |       "minzoom": 10,
0533 |       "paint": {
0534 |         "line-color": [
0535 |           "match",
0536 |           [
0537 |             "get",
0538 |             "railway"
0539 |           ],
0540 |           "subway",
0541 |           "#FF3347",
0542 |           "light_rail",
0543 |           "#2288FF",
0544 |           "tram",
0545 |           "#AA44EE",
0546 |           "monorail",
0547 |           "#00BB66",
0548 |           "#FF4455"
0549 |         ],
0550 |         "line-width": [
0551 |           "interpolate",
0552 |           [
0553 |             "linear"
0554 |           ],
0555 |           [
0556 |             "zoom"
0557 |           ],
0558 |           10,
0559 |           1.5,
0560 |           14,
0561 |           3.5,
0562 |           16,
0563 |           6
0564 |         ]
0565 |       }
0566 |     },
0567 |     {
0568 |       "id": "road-casing-track-path",
0569 |       "type": "line",
0570 |       "source": "local-osm-lines",
0571 |       "source-layer": "planet_osm_line",
0572 |       "filter": [
0573 |         "in",
0574 |         "highway",
0575 |         "track",
0576 |         "path",
0577 |         "footway",
0578 |         "cycleway",
0579 |         "steps"
0580 |       ],
0581 |       "minzoom": 14,
0582 |       "paint": {
0583 |         "line-color": "#C8CDD6",
0584 |         "line-width": [
0585 |           "interpolate",
0586 |           [
0587 |             "linear"
0588 |           ],
0589 |           [
0590 |             "zoom"
0591 |           ],
0592 |           14,
0593 |           1,
0594 |           16,
0595 |           4
0596 |         ],
0597 |         "line-dasharray": [
0598 |           4,
0599 |           3
0600 |         ]
0601 |       }
0602 |     },
0603 |     {
0604 |       "id": "road-casing-minor",
0605 |       "type": "line",
0606 |       "source": "local-osm-lines",
0607 |       "source-layer": "planet_osm_line",
0608 |       "filter": [
0609 |         "in",
0610 |         "highway",
0611 |         "residential",
0612 |         "service",
0613 |         "unclassified",
0614 |         "living_street",
0615 |         "pedestrian"
0616 |       ],
0617 |       "paint": {
0618 |         "line-color": "#D4D8DF",
0619 |         "line-width": [
0620 |           "interpolate",
0621 |           [
0622 |             "linear"
0623 |           ],
0624 |           [
0625 |             "zoom"
0626 |           ],
0627 |           12,
0628 |           1.5,
0629 |           16,
0630 |           10
0631 |         ],
0632 |         "line-opacity": 0.7
0633 |       }
0634 |     },
0635 |     {
0636 |       "id": "road-core-minor",
0637 |       "type": "line",
0638 |       "source": "local-osm-lines",
0639 |       "source-layer": "planet_osm_line",
0640 |       "filter": [
0641 |         "in",
0642 |         "highway",
0643 |         "residential",
0644 |         "service",
0645 |         "unclassified",
0646 |         "living_street",
0647 |         "pedestrian"
0648 |       ],
0649 |       "paint": {
0650 |         "line-color": "#FFFFFF",
0651 |         "line-width": [
0652 |           "interpolate",
0653 |           [
0654 |             "linear"
0655 |           ],
0656 |           [
0657 |             "zoom"
0658 |           ],
0659 |           12,
0660 |           0.8,
0661 |           16,
0662 |           8
0663 |         ]
0664 |       }
0665 |     },
0666 |     {
0667 |       "id": "road-casing-tertiary",
0668 |       "type": "line",
0669 |       "source": "local-osm-lines",
0670 |       "source-layer": "planet_osm_line",
0671 |       "filter": [
0672 |         "in",
0673 |         "highway",
0674 |         "tertiary",
0675 |         "tertiary_link"
0676 |       ],
0677 |       "paint": {
0678 |         "line-color": "#C9CED8",
0679 |         "line-width": [
0680 |           "interpolate",
0681 |           [
0682 |             "linear"
0683 |           ],
0684 |           [
0685 |             "zoom"
0686 |           ],
0687 |           11,
0688 |           2,
0689 |           16,
0690 |           14
0691 |         ],
0692 |         "line-opacity": 0.75
0693 |       }
0694 |     },
0695 |     {
0696 |       "id": "road-core-tertiary",
0697 |       "type": "line",
0698 |       "source": "local-osm-lines",
0699 |       "source-layer": "planet_osm_line",
0700 |       "filter": [
0701 |         "in",
0702 |         "highway",
0703 |         "tertiary",
0704 |         "tertiary_link"
0705 |       ],
0706 |       "paint": {
0707 |         "line-color": "#FFFFFF",
0708 |         "line-width": [
0709 |           "interpolate",
0710 |           [
0711 |             "linear"
0712 |           ],
0713 |           [
0714 |             "zoom"
0715 |           ],
0716 |           11,
0717 |           1.2,
0718 |           16,
0719 |           11
0720 |         ]
0721 |       }
0722 |     },
0723 |     {
0724 |       "id": "road-casing-secondary",
0725 |       "type": "line",
0726 |       "source": "local-osm-lines",
0727 |       "source-layer": "planet_osm_line",
0728 |       "filter": [
0729 |         "in",
0730 |         "highway",
0731 |         "secondary",
0732 |         "secondary_link"
0733 |       ],
0734 |       "paint": {
0735 |         "line-color": "#C4CFDE",
0736 |         "line-width": [
0737 |           "interpolate",
0738 |           [
0739 |             "linear"
0740 |           ],
0741 |           [
0742 |             "zoom"
0743 |           ],
0744 |           11,
0745 |           2.5,
0746 |           16,
0747 |           16
0748 |         ],
0749 |         "line-opacity": 0.8
0750 |       }
0751 |     },
0752 |     {
0753 |       "id": "road-core-secondary",
0754 |       "type": "line",
0755 |       "source": "local-osm-lines",
0756 |       "source-layer": "planet_osm_line",
0757 |       "filter": [
0758 |         "in",
0759 |         "highway",
0760 |         "secondary",
0761 |         "secondary_link"
0762 |       ],
0763 |       "paint": {
0764 |         "line-color": "#F8FBFF",
0765 |         "line-width": [
0766 |           "interpolate",
0767 |           [
0768 |             "linear"
0769 |           ],
0770 |           [
0771 |             "zoom"
0772 |           ],
0773 |           11,
0774 |           1.8,
0775 |           16,
0776 |           13
0777 |         ]
0778 |       }
0779 |     },
0780 |     {
0781 |       "id": "road-casing-primary",
0782 |       "type": "line",
0783 |       "source": "local-osm-lines",
0784 |       "source-layer": "planet_osm_line",
0785 |       "filter": [
0786 |         "in",
0787 |         "highway",
0788 |         "primary",
0789 |         "primary_link"
0790 |       ],
0791 |       "paint": {
0792 |         "line-color": "#C8B868",
0793 |         "line-width": [
0794 |           "interpolate",
0795 |           [
0796 |             "linear"
0797 |           ],
0798 |           [
0799 |             "zoom"
0800 |           ],
0801 |           10,
0802 |           3,
0803 |           16,
0804 |           18
0805 |         ],
0806 |         "line-opacity": 0.7
0807 |       }
0808 |     },
0809 |     {
0810 |       "id": "road-core-primary",
0811 |       "type": "line",
0812 |       "source": "local-osm-lines",
0813 |       "source-layer": "planet_osm_line",
0814 |       "filter": [
0815 |         "in",
0816 |         "highway",
0817 |         "primary",
0818 |         "primary_link"
0819 |       ],
0820 |       "paint": {
0821 |         "line-color": "#EDD870",
0822 |         "line-width": [
0823 |           "interpolate",
0824 |           [
0825 |             "linear"
0826 |           ],
0827 |           [
0828 |             "zoom"
0829 |           ],
0830 |           10,
0831 |           2,
0832 |           16,
0833 |           14
0834 |         ]
0835 |       }
0836 |     },
0837 |     {
0838 |       "id": "road-casing-motorway-trunk",
0839 |       "type": "line",
0840 |       "source": "local-osm-lines",
0841 |       "source-layer": "planet_osm_line",
0842 |       "filter": [
0843 |         "in",
0844 |         "highway",
0845 |         "motorway",
0846 |         "motorway_link",
0847 |         "trunk",
0848 |         "trunk_link"
0849 |       ],
0850 |       "paint": {
0851 |         "line-color": "#C8A84B",
0852 |         "line-width": [
0853 |           "interpolate",
0854 |           [
0855 |             "linear"
0856 |           ],
0857 |           [
0858 |             "zoom"
0859 |           ],
0860 |           9,
0861 |           4,
0862 |           16,
0863 |           20
0864 |         ],
0865 |         "line-opacity": 0.75
0866 |       }
0867 |     },
0868 |     {
0869 |       "id": "road-core-motorway-trunk",
0870 |       "type": "line",
0871 |       "source": "local-osm-lines",
0872 |       "source-layer": "planet_osm_line",
0873 |       "filter": [
0874 |         "in",
0875 |         "highway",
0876 |         "motorway",
0877 |         "motorway_link",
0878 |         "trunk",
0879 |         "trunk_link"
0880 |       ],
0881 |       "paint": {
0882 |         "line-color": "#F0C040",
0883 |         "line-width": [
0884 |           "interpolate",
0885 |           [
0886 |             "linear"
0887 |           ],
0888 |           [
0889 |             "zoom"
0890 |           ],
0891 |           9,
0892 |           2.5,
0893 |           16,
0894 |           16
0895 |         ]
0896 |       }
0897 |     },
0898 |     {
0899 |       "id": "building-fill-flat",
0900 |       "type": "fill",
0901 |       "source": "local-osm-polygons",
0902 |       "source-layer": "planet_osm_polygon",
0903 |       "filter": [
0904 |         "has",
0905 |         "building"
0906 |       ],
0907 |       "maxzoom": 14,
0908 |       "paint": {
0909 |         "fill-color": "#DDD8D0",
0910 |         "fill-opacity": 0.85,
0911 |         "fill-outline-color": "#C4BEB4"
0912 |       }
0913 |     },
0914 |     {
0915 |       "id": "building-3d",
0916 |       "type": "fill-extrusion",
0917 |       "source": "local-osm-polygons",
0918 |       "source-layer": "planet_osm_polygon",
0919 |       "minzoom": 14,
0920 |       "filter": [
0921 |         "has",
0922 |         "building"
0923 |       ],
0924 |       "paint": {
0925 |         "fill-extrusion-color": [
0926 |           "match",
0927 |           [
0928 |             "get",
0929 |             "building"
0930 |           ],
0931 |           "commercial",
0932 |           "#DDD5C5",
0933 |           "retail",
0934 |           "#E5D8C8",
0935 |           "industrial",
0936 |           "#D2D8E0",
0937 |           "church",
0938 |           "#DDD4EE",
0939 |           "mosque",
0940 |           "#CCE4D0",
0941 |           "hospital",
0942 |           "#EDD8D8",
0943 |           "school",
0944 |           "#E0E6CC",
0945 |           "university",
0946 |           "#D8E0C8",
0947 |           "hotel",
0948 |           "#D8DCF0",
0949 |           "apartments",
0950 |           "#E0DCD4",
0951 |           "#DDD8D2"
0952 |         ],
0953 |         "fill-extrusion-height": [
0954 |           "interpolate",
0955 |           [
0956 |             "linear"
0957 |           ],
0958 |           [
0959 |             "zoom"
0960 |           ],
0961 |           14,
0962 |           [
0963 |             "*",
0964 |             [
0965 |               "coalesce",
0966 |               [
0967 |                 "to-number",
0968 |                 [
0969 |                   "get",
0970 |                   "building:levels"
0971 |                 ],
0972 |                 null
0973 |               ],
0974 |               3
0975 |             ],
0976 |             2.5
0977 |           ],
0978 |           17,
0979 |           [
0980 |             "coalesce",
0981 |             [
0982 |               "to-number",
0983 |               [
0984 |                 "get",
0985 |                 "height"
0986 |               ],
0987 |               null
0988 |             ],
0989 |             [
0990 |               "*",
0991 |               [
0992 |                 "to-number",
0993 |                 [
0994 |                   "get",
0995 |                   "building:levels"
0996 |                 ],
0997 |                 3
0998 |               ],
0999 |               3.5
1000 |             ],
1001 |             12
1002 |           ]
1003 |         ],
1004 |         "fill-extrusion-base": [
1005 |           "coalesce",
1006 |           [
1007 |             "to-number",
1008 |             [
1009 |               "get",
1010 |               "min_height"
1011 |             ],
1012 |             null
1013 |           ],
1014 |           0
1015 |         ],
1016 |         "fill-extrusion-opacity": [
1017 |           "interpolate",
1018 |           [
1019 |             "linear"
1020 |           ],
1021 |           [
1022 |             "zoom"
1023 |           ],
1024 |           14,
1025 |           0.6,
1026 |           16,
1027 |           0.88
1028 |         ],
1029 |         "fill-extrusion-vertical-gradient": true
1030 |       }
1031 |     },
1032 |     {
1033 |       "id": "railway-label",
1034 |       "type": "symbol",
1035 |       "source": "local-osm-lines",
1036 |       "source-layer": "planet_osm_line",
1037 |       "filter": [
1038 |         "in",
1039 |         "railway",
1040 |         "rail",
1041 |         "subway",
1042 |         "light_rail",
1043 |         "tram"
1044 |       ],
1045 |       "minzoom": 13,
1046 |       "layout": {
1047 |         "text-field": [
1048 |           "coalesce",
1049 |           [
1050 |             "get",
1051 |             "name:ar"
1052 |           ],
1053 |           [
1054 |             "get",
1055 |             "name"
1056 |           ],
1057 |           ""
1058 |         ],
1059 |         "text-font": [
1060 |           "Noto Sans Regular"
1061 |         ],
1062 |         "text-size": 10,
1063 |         "symbol-placement": "line",
1064 |         "text-padding": 6,
1065 |         "text-allow-overlap": false
1066 |       },
1067 |       "paint": {
1068 |         "text-color": [
1069 |           "match",
1070 |           [
1071 |             "get",
1072 |             "railway"
1073 |           ],
1074 |           "subway",
1075 |           "#CC2233",
1076 |           "light_rail",
1077 |           "#0055BB",
1078 |           "tram",
1079 |           "#7722AA",
1080 |           "#4A5568"
1081 |         ],
1082 |         "text-halo-color": "rgba(255,255,255,0.9)",
1083 |         "text-halo-width": 2
1084 |       }
1085 |     },
1086 |     {
1087 |       "id": "waterway-label",
1088 |       "type": "symbol",
1089 |       "source": "local-osm-lines",
1090 |       "source-layer": "planet_osm_line",
1091 |       "filter": [
1092 |         "all",
1093 |         [
1094 |           "in",
1095 |           "waterway",
1096 |           "river",
1097 |           "canal"
1098 |         ],
1099 |         [
1100 |           "!=",
1101 |           "intermittent",
1102 |           "yes"
1103 |         ],
1104 |         [
1105 |           "has",
1106 |           "name"
1107 |         ]
1108 |       ],
1109 |       "minzoom": 12,
1110 |       "layout": {
1111 |         "text-field": [
1112 |           "coalesce",
1113 |           [
1114 |             "get",
1115 |             "name:ar"
1116 |           ],
1117 |           [
1118 |             "get",
1119 |             "name"
1120 |           ],
1121 |           ""
1122 |         ],
1123 |         "text-font": [
1124 |           "Noto Sans Regular"
1125 |         ],
1126 |         "text-size": 11,
1127 |         "symbol-placement": "line",
1128 |         "text-letter-spacing": 0.1
1129 |       },
1130 |       "paint": {
1131 |         "text-color": "#2E86AB",
1132 |         "text-halo-color": "rgba(255,255,255,0.85)",
1133 |         "text-halo-width": 2
1134 |       }
1135 |     },
1136 |     {
1137 |       "id": "building-number-polygon",
1138 |       "type": "symbol",
1139 |       "source": "local-osm-polygons",
1140 |       "source-layer": "planet_osm_polygon",
1141 |       "minzoom": 17,
1142 |       "filter": [
1143 |         "has",
1144 |         "addr:housenumber"
1145 |       ],
1146 |       "layout": {
1147 |         "text-field": "{addr:housenumber}",
1148 |         "text-font": [
1149 |           "Noto Sans Regular"
1150 |         ],
1151 |         "text-size": 10,
1152 |         "text-allow-overlap": false,
1153 |         "text-ignore-placement": false
1154 |       },
1155 |       "paint": {
1156 |         "text-color": "#5A5048",
1157 |         "text-halo-color": "rgba(255,255,255,0.95)",
1158 |         "text-halo-width": 1.5
1159 |       }
1160 |     },
1161 |     {
1162 |       "id": "building-number-point",
1163 |       "type": "symbol",
1164 |       "source": "local-osm-points",
1165 |       "source-layer": "planet_osm_point",
1166 |       "minzoom": 17,
1167 |       "filter": [
1168 |         "has",
1169 |         "addr:housenumber"
1170 |       ],
1171 |       "layout": {
1172 |         "text-field": "{addr:housenumber}",
1173 |         "text-font": [
1174 |           "Noto Sans Regular"
1175 |         ],
1176 |         "text-size": 10,
1177 |         "text-allow-overlap": false
1178 |       },
1179 |       "paint": {
1180 |         "text-color": "#5A5048",
1181 |         "text-halo-color": "rgba(255,255,255,0.95)",
1182 |         "text-halo-width": 1.5
1183 |       }
1184 |     },
1185 |     {
1186 |       "id": "road-labels-minor",
1187 |       "type": "symbol",
1188 |       "source": "local-osm-lines",
1189 |       "source-layer": "planet_osm_line",
1190 |       "filter": [
1191 |         "in",
1192 |         "highway",
1193 |         "residential",
1194 |         "service",
1195 |         "unclassified",
1196 |         "living_street"
1197 |       ],
1198 |       "minzoom": 16,
1199 |       "layout": {
1200 |         "text-field": [
1201 |           "coalesce",
1202 |           [
1203 |             "get",
1204 |             "name:ar"
1205 |           ],
1206 |           [
1207 |             "get",
1208 |             "name"
1209 |           ],
1210 |           ""
1211 |         ],
1212 |         "text-font": [
1213 |           "Noto Sans Regular"
1214 |         ],
1215 |         "text-size": 11,
1216 |         "symbol-placement": "line",
1217 |         "text-letter-spacing": 0.04,
1218 |         "text-padding": 4,
1219 |         "text-allow-overlap": false
1220 |       },
1221 |       "paint": {
1222 |         "text-color": "#4A5568",
1223 |         "text-halo-color": "rgba(255,255,255,0.85)",
1224 |         "text-halo-width": 1.5
1225 |       }
1226 |     },
1227 |     {
1228 |       "id": "road-labels-major",
1229 |       "type": "symbol",
1230 |       "source": "local-osm-lines",
1231 |       "source-layer": "planet_osm_line",
1232 |       "filter": [
1233 |         "in",
1234 |         "highway",
1235 |         "primary",
1236 |         "secondary",
1237 |         "tertiary",
1238 |         "motorway",
1239 |         "trunk"
1240 |       ],
1241 |       "minzoom": 13,
1242 |       "layout": {
1243 |         "text-field": [
1244 |           "coalesce",
1245 |           [
1246 |             "get",
1247 |             "name:ar"
1248 |           ],
1249 |           [
1250 |             "get",
1251 |             "name"
1252 |           ],
1253 |           ""
1254 |         ],
1255 |         "text-font": [
1256 |           "Noto Sans Regular"
1257 |         ],
1258 |         "text-size": [
1259 |           "interpolate",
1260 |           [
1261 |             "linear"
1262 |           ],
1263 |           [
1264 |             "zoom"
1265 |           ],
1266 |           13,
1267 |           11,
1268 |           16,
1269 |           14
1270 |         ],
1271 |         "symbol-placement": "line",
1272 |         "text-letter-spacing": 0.05,
1273 |         "text-padding": 5,
1274 |         "text-allow-overlap": false
1275 |       },
1276 |       "paint": {
1277 |         "text-color": "#2D3748",
1278 |         "text-halo-color": "rgba(255,255,255,0.9)",
1279 |         "text-halo-width": 2
1280 |       }
1281 |     },
1282 |     {
1283 |       "id": "poi-hospital",
1284 |       "type": "symbol",
1285 |       "source": "local-osm-points",
1286 |       "source-layer": "planet_osm_point",
1287 |       "minzoom": 13,
1288 |       "filter": [
1289 |         "==",
1290 |         "amenity",
1291 |         "hospital"
1292 |       ],
1293 |       "layout": {
1294 |         "icon-image": "hospital",
1295 |         "icon-size": 1,
1296 |         "text-field": [
1297 |           "coalesce",
1298 |           [
1299 |             "get",
1300 |             "name:ar"
1301 |           ],
1302 |           [
1303 |             "get",
1304 |             "name"
1305 |           ],
1306 |           ""
1307 |         ],
1308 |         "text-font": [
1309 |           "Noto Sans Regular"
1310 |         ],
1311 |         "text-size": 11,
1312 |         "text-offset": [
1313 |           0,
1314 |           1.2
1315 |         ],
1316 |         "text-anchor": "top",
1317 |         "text-allow-overlap": false
1318 |       },
1319 |       "paint": {
1320 |         "text-color": "#C0392B",
1321 |         "text-halo-color": "white",
1322 |         "text-halo-width": 2
1323 |       }
1324 |     },
1325 |     {
1326 |       "id": "poi-pharmacy",
1327 |       "type": "symbol",
1328 |       "source": "local-osm-points",
1329 |       "source-layer": "planet_osm_point",
1330 |       "minzoom": 15,
1331 |       "filter": [
1332 |         "==",
1333 |         "amenity",
1334 |         "pharmacy"
1335 |       ],
1336 |       "layout": {
1337 |         "icon-image": "pharmacy",
1338 |         "icon-size": 0.8,
1339 |         "text-field": [
1340 |           "coalesce",
1341 |           [
1342 |             "get",
1343 |             "name:ar"
1344 |           ],
1345 |           [
1346 |             "get",
1347 |             "name"
1348 |           ],
1349 |           ""
1350 |         ],
1351 |         "text-font": [
1352 |           "Noto Sans Regular"
1353 |         ],
1354 |         "text-size": 10,
1355 |         "text-offset": [
1356 |           0,
1357 |           1.2
1358 |         ],
1359 |         "text-anchor": "top"
1360 |       },
1361 |       "paint": {
1362 |         "text-color": "#1A7A3C",
1363 |         "text-halo-color": "white",
1364 |         "text-halo-width": 1.5
1365 |       }
1366 |     },
1367 |     {
1368 |       "id": "poi-place-of-worship",
1369 |       "type": "symbol",
1370 |       "source": "local-osm-points",
1371 |       "source-layer": "planet_osm_point",
1372 |       "minzoom": 14,
1373 |       "filter": [
1374 |         "==",
1375 |         "amenity",
1376 |         "place_of_worship"
1377 |       ],
1378 |       "layout": {
1379 |         "icon-image": "tourist",
1380 |         "icon-size": 0.8,
1381 |         "text-field": [
1382 |           "coalesce",
1383 |           [
1384 |             "get",
1385 |             "name:ar"
1386 |           ],
1387 |           [
1388 |             "get",
1389 |             "name"
1390 |           ],
1391 |           ""
1392 |         ],
1393 |         "text-font": [
1394 |           "Noto Sans Regular"
1395 |         ],
1396 |         "text-size": 11,
1397 |         "text-offset": [
1398 |           0,
1399 |           1.2
1400 |         ],
1401 |         "text-anchor": "top"
1402 |       },
1403 |       "paint": {
1404 |         "text-color": "#1A6B3A",
1405 |         "text-halo-color": "white",
1406 |         "text-halo-width": 2
1407 |       }
1408 |     },
1409 |     {
1410 |       "id": "poi-restaurant-cafe",
1411 |       "type": "symbol",
1412 |       "source": "local-osm-points",
1413 |       "source-layer": "planet_osm_point",
1414 |       "minzoom": 16,
1415 |       "filter": [
1416 |         "in",
1417 |         "amenity",
1418 |         "restaurant",
1419 |         "cafe",
1420 |         "fast_food"
1421 |       ],
1422 |       "layout": {
1423 |         "icon-image": [
1424 |           "match",
1425 |           [
1426 |             "get",
1427 |             "amenity"
1428 |           ],
1429 |           "cafe",
1430 |           "cafe",
1431 |           "restaurant"
1432 |         ],
1433 |         "icon-size": 0.8,
1434 |         "text-field": [
1435 |           "coalesce",
1436 |           [
1437 |             "get",
1438 |             "name:ar"
1439 |           ],
1440 |           [
1441 |             "get",
1442 |             "name"
1443 |           ],
1444 |           ""
1445 |         ],
1446 |         "text-font": [
1447 |           "Noto Sans Regular"
1448 |         ],
1449 |         "text-size": 10,
1450 |         "text-offset": [
1451 |           0,
1452 |           1.2
1453 |         ],
1454 |         "text-anchor": "top"
1455 |       },
1456 |       "paint": {
1457 |         "text-color": "#3D4A5C",
1458 |         "text-halo-color": "white",
1459 |         "text-halo-width": 1.5
1460 |       }
1461 |     },
1462 |     {
1463 |       "id": "poi-school",
1464 |       "type": "symbol",
1465 |       "source": "local-osm-points",
1466 |       "source-layer": "planet_osm_point",
1467 |       "minzoom": 14,
1468 |       "filter": [
1469 |         "in",
1470 |         "amenity",
1471 |         "school",
1472 |         "university",
1473 |         "college"
1474 |       ],
1475 |       "layout": {
1476 |         "icon-image": "college",
1477 |         "icon-size": 0.8,
1478 |         "text-field": [
1479 |           "coalesce",
1480 |           [
1481 |             "get",
1482 |             "name:ar"
1483 |           ],
1484 |           [
1485 |             "get",
1486 |             "name"
1487 |           ],
1488 |           ""
1489 |         ],
1490 |         "text-font": [
1491 |           "Noto Sans Regular"
1492 |         ],
1493 |         "text-size": 11,
1494 |         "text-offset": [
1495 |           0,
1496 |           1.2
1497 |         ],
1498 |         "text-anchor": "top"
1499 |       },
1500 |       "paint": {
1501 |         "text-color": "#5A4A8A",
1502 |         "text-halo-color": "white",
1503 |         "text-halo-width": 2
1504 |       }
1505 |     },
1506 |     {
1507 |       "id": "poi-transit-station",
1508 |       "type": "symbol",
1509 |       "source": "local-osm-points",
1510 |       "source-layer": "planet_osm_point",
1511 |       "minzoom": 12,
1512 |       "filter": [
1513 |         "any",
1514 |         [
1515 |           "==",
1516 |           "railway",
1517 |           "station"
1518 |         ],
1519 |         [
1520 |           "==",
1521 |           "railway",
1522 |           "halt"
1523 |         ],
1524 |         [
1525 |           "==",
1526 |           "railway",
1527 |           "tram_stop"
1528 |         ],
1529 |         [
1530 |           "==",
1531 |           "station",
1532 |           "subway"
1533 |         ],
1534 |         [
1535 |           "==",
1536 |           "amenity",
1537 |           "bus_station"
1538 |         ]
1539 |       ],
1540 |       "layout": {
1541 |         "icon-image": "rail",
1542 |         "icon-size": 1,
1543 |         "text-field": [
1544 |           "coalesce",
1545 |           [
1546 |             "get",
1547 |             "name:ar"
1548 |           ],
1549 |           [
1550 |             "get",
1551 |             "name"
1552 |           ],
1553 |           ""
1554 |         ],
1555 |         "text-font": [
1556 |           "Noto Sans Regular"
1557 |         ],
1558 |         "text-size": 11,
1559 |         "text-offset": [
1560 |           0,
1561 |           1.4
1562 |         ],
1563 |         "text-anchor": "top",
1564 |         "text-allow-overlap": false
1565 |       },
1566 |       "paint": {
1567 |         "text-color": "#CC2233",
1568 |         "text-halo-color": "rgba(255,255,255,0.95)",
1569 |         "text-halo-width": 2
1570 |       }
1571 |     },
1572 |     {
1573 |       "id": "place-labels-area",
1574 |       "type": "symbol",
1575 |       "source": "local-osm-polygons",
1576 |       "source-layer": "planet_osm_polygon",
1577 |       "minzoom": 10,
1578 |       "filter": [
1579 |         "has",
1580 |         "name"
1581 |       ],
1582 |       "layout": {
1583 |         "text-field": [
1584 |           "coalesce",
1585 |           [
1586 |             "get",
1587 |             "name:ar"
1588 |           ],
1589 |           [
1590 |             "get",
1591 |             "name"
1592 |           ],
1593 |           ""
1594 |         ],
1595 |         "text-font": [
1596 |           "Noto Sans Regular"
1597 |         ],
1598 |         "text-size": [
1599 |           "interpolate",
1600 |           [
1601 |             "linear"
1602 |           ],
1603 |           [
1604 |             "zoom"
1605 |           ],
1606 |           10,
1607 |           10,
1608 |           14,
1609 |           13
1610 |         ],
1611 |         "text-padding": 8,
1612 |         "text-allow-overlap": false,
1613 |         "text-ignore-placement": false
1614 |       },
1615 |       "paint": {
1616 |         "text-color": "#34495E",
1617 |         "text-halo-color": "rgba(255,255,255,0.85)",
1618 |         "text-halo-width": 2
1619 |       }
1620 |     },
1621 |     {
1622 |       "id": "place-labels-point",
1623 |       "type": "symbol",
1624 |       "source": "local-osm-points",
1625 |       "source-layer": "planet_osm_point",
1626 |       "minzoom": 10,
1627 |       "filter": [
1628 |         "any",
1629 |         [
1630 |           "in",
1631 |           "place",
1632 |           "city",
1633 |           "town",
1634 |           "village",
1635 |           "suburb",
1636 |           "neighbourhood",
1637 |           "hamlet",
1638 |           "locality",
1639 |           "quarter"
1640 |         ],
1641 |         [
1642 |           "in",
1643 |           "natural",
1644 |           "peak",
1645 |           "spring"
1646 |         ]
1647 |       ],
1648 |       "layout": {
1649 |         "text-field": [
1650 |           "coalesce",
1651 |           [
1652 |             "get",
1653 |             "name:ar"
1654 |           ],
1655 |           [
1656 |             "get",
1657 |             "name"
1658 |           ],
1659 |           ""
1660 |         ],
1661 |         "text-font": [
1662 |           "Noto Sans Regular"
1663 |         ],
1664 |         "text-size": [
1665 |           "interpolate",
1666 |           [
1667 |             "linear"
1668 |           ],
1669 |           [
1670 |             "zoom"
1671 |           ],
1672 |           10,
1673 |           [
1674 |             "match",
1675 |             [
1676 |               "get",
1677 |               "place"
1678 |             ],
1679 |             "city",
1680 |             16,
1681 |             "town",
1682 |             14,
1683 |             11
1684 |           ],
1685 |           14,
1686 |           [
1687 |             "match",
1688 |             [
1689 |               "get",
1690 |               "place"
1691 |             ],
1692 |             "city",
1693 |             20,
1694 |             "town",
1695 |             16,
1696 |             13
1697 |           ],
1698 |           17,
1699 |           14
1700 |         ],
1701 |         "text-letter-spacing": [
1702 |           "match",
1703 |           [
1704 |             "get",
1705 |             "place"
1706 |           ],
1707 |           "city",
1708 |           0.08,
1709 |           "town",
1710 |           0.05,
1711 |           0.02
1712 |         ],
1713 |         "text-anchor": "center",
1714 |         "text-padding": 10,
1715 |         "text-allow-overlap": false
1716 |       },
1717 |       "paint": {
1718 |         "text-color": [
1719 |           "match",
1720 |           [
1721 |             "get",
1722 |             "place"
1723 |           ],
1724 |           "city",
1725 |           "#1A2740",
1726 |           "town",
1727 |           "#2C3E50",
1728 |           "village",
1729 |           "#3D4F62",
1730 |           "suburb",
1731 |           "#4A5568",
1732 |           "neighbourhood",
1733 |           "#556677",
1734 |           "#607080"
1735 |         ],
1736 |         "text-halo-color": "rgba(255,255,255,0.92)",
1737 |         "text-halo-width": [
1738 |           "match",
1739 |           [
1740 |             "get",
1741 |             "place"
1742 |           ],
1743 |           "city",
1744 |           3,
1745 |           "town",
1746 |           2.5,
1747 |           2
1748 |         ]
1749 |       }
1750 |     },
1751 |     {
1752 |       "id": "places-egypt-labels",
1753 |       "type": "symbol",
1754 |       "source": "places_egypt",
1755 |       "source-layer": "places_egypt",
1756 |       "minzoom": 12,
1757 |       "layout": {
1758 |         "text-field": [
1759 |           "coalesce",
1760 |           [
1761 |             "get",
1762 |             "name_ar"
1763 |           ],
1764 |           [
1765 |             "get",
1766 |             "name"
1767 |           ],
1768 |           ""
1769 |         ],
1770 |         "text-font": [
1771 |           "Noto Sans Bold"
1772 |         ],
1773 |         "text-size": [
1774 |           "interpolate",
1775 |           [
1776 |             "linear"
1777 |           ],
1778 |           [
1779 |             "zoom"
1780 |           ],
1781 |           12,
1782 |           9,
1783 |           16,
1784 |           13
1785 |         ],
1786 |         "text-offset": [
1787 |           0,
1788 |           1.5
1789 |         ],
1790 |         "text-anchor": "top",
1791 |         "text-padding": 8,
1792 |         "text-allow-overlap": false
1793 |       },
1794 |       "paint": {
1795 |         "text-color": "#2D3748",
1796 |         "text-halo-color": "rgba(255, 255, 255, 0.9)",
1797 |         "text-halo-width": 2
1798 |       }
1799 |     }
1800 |   ]
1801 | }


------------------------------------------------------------
[3] اسم الملف: add-syria.sh
المسار: ./add-syria.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | set -e
0003 | 
0004 | DATA_DIR="/home/hamzadoctor/app/infrastructure/osm-data"
0005 | 
0006 | echo "Downloading Syria map data..."
0007 | curl -L -o "$DATA_DIR/syria-latest.osm.pbf" https://download.geofabrik.de/asia/syria-latest.osm.pbf
0008 | 
0009 | echo "Merging Syria and Jordan..."
0010 | # Backup original Jordan if not already backed up
0011 | if [ ! -f "$DATA_DIR/jordan-latest.orig.osm.pbf" ]; then
0012 |     cp "$DATA_DIR/jordan-latest.osm.pbf" "$DATA_DIR/jordan-latest.orig.osm.pbf"
0013 | fi
0014 | 
0015 | # Use --overwrite flag and ensure .pbf extension is at the end
0016 | osmium merge "$DATA_DIR/jordan-latest.orig.osm.pbf" "$DATA_DIR/syria-latest.osm.pbf" -o "$DATA_DIR/levant-latest.osm.pbf" --overwrite
0017 | 
0018 | echo "Replacing data file for import..."
0019 | mv "$DATA_DIR/levant-latest.osm.pbf" "$DATA_DIR/jordan-latest.osm.pbf"
0020 | 
0021 | echo "Re-importing to database (this may take a few minutes)..."
0022 | cd /home/hamzadoctor/app
0023 | docker compose run --rm osm-import
0024 | 
0025 | echo "Restarting services..."
0026 | docker compose restart martin api
0027 | 
0028 | echo "✅ Success! Jordan and Syria are now merged and imported."


------------------------------------------------------------
[4] اسم الملف: .env
المسار: ./.env
------------------------------------------------------------
0001 | # Jordan Map Platform - Environment Variables
0002 | # المتغيرات البيئية لمنصة خرائط الأردن
0003 | 
0004 | # Database
0005 | POSTGRES_USER=mapuser
0006 | POSTGRES_PASSWORD=mappass
0007 | POSTGRES_DB=mapdb
0008 | DB_HOST=db
0009 | DB_PORT=5432
0010 | 
0011 | # Redis
0012 | REDIS_HOST=redis
0013 | REDIS_PORT=6379
0014 | 
0015 | # GraphHopper (Routing)
0016 | GRAPH_HOPPER_URL=http://routing:8080
0017 | 
0018 | # Map Server
0019 | TILE_SERVER_URL=http://tileserver:8080
0020 | 
0021 | # API
0022 | API_PORT=3200
0023 | WEB_PORT=3201
0024 | NODE_ENV=development
0025 | 
0026 | # External Location Server Integration (Every 10 days)
0027 | # إعدادات الاتصال بسيرفر المواقع الخارجي
0028 | LOCATION_SERVER_URL=https://location.intaleq.xyz
0029 | LOCATION_SERVER_API_KEY=intaleq_secure_key_2026_jy@kjhk
0030 | MAP_API_KEY=zP9vL5mK2nQ8xR7jT4wS1yB6hG3fV0cX
0031 | 
0032 | # Telegram Notifications
0033 | TELEGRAM_BOT_TOKEN=7618792580:AAE6YAdrgUdcuUu9g8kXveCb-hiO3ECOd1g
0034 | TELEGRAM_CHAT_ID=1766663126


------------------------------------------------------------
[5] اسم الملف: sync_to_server.sh
المسار: ./sync_to_server.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | 
0003 | # Configuration
0004 | SERVER_IP="188.68.36.205"
0005 | SERVER_USER="hamzadoctor"
0006 | REMOTE_PATH="/home/hamzadoctor/app"
0007 | KEY_PATH="/Users/hamzaaleghwairyeen/.ssh/doctory-key"
0008 | 
0009 | echo "🚀 Starting sync to server: $SERVER_IP..."
0010 | 
0011 | # Verify if the key exists
0012 | if [ ! -f "$KEY_PATH" ]; then
0013 |     echo "⚠️ Warning: Identity file $KEY_PATH not found locally."
0014 |     echo "Attempting sync using default SSH configuration..."
0015 |     KEY_FLAG=""
0016 | else
0017 |     KEY_FLAG="-i $KEY_PATH"
0018 | fi
0019 | 
0020 | # Sync files using rsync (surgical sync)
0021 | rsync -avz --progress -e "ssh -o StrictHostKeyChecking=no" $KEY_FLAG \
0022 |     --exclude 'infrastructure/osm-data' \
0023 |     --exclude 'osm-data' \
0024 |     --exclude 'venv' \
0025 |     --exclude '.git' \
0026 |     --exclude 'node_modules' \
0027 |     --exclude '.DS_Store' \
0028 |     .env \
0029 |     docker-compose.yml \
0030 |     docker-compose.map2.yml \
0031 |     setup_map2.sh \
0032 |     apps \
0033 |     packages \
0034 |     infrastructure \
0035 |     $SERVER_USER@$SERVER_IP:$REMOTE_PATH/
0036 | 
0037 | if [ $? -eq 0 ]; then
0038 |     echo "✅ Sync successful!"
0039 |     echo "------------------------------------------------"
0040 |     echo "Now run the following on your SERVER terminal:"
0041 |     echo "cd $REMOTE_PATH"
0042 |     echo "docker-compose up -d --build api"
0043 |     echo "------------------------------------------------"
0044 | else
0045 |     echo "❌ Sync failed. Please check your SSH connection or manually update the files."
0046 | fi


------------------------------------------------------------
[6] اسم الملف: import_syria_csv.sh
المسار: ./import_syria_csv.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | set -e
0003 | 
0004 | # Configuration
0005 | CONTAINER_NAME="map-db"
0006 | DB_USER="postgres"
0007 | DB_NAME="map_saas"
0008 | CSV_FILE="infrastructure/docker/postgis/data_clean_syria.csv"
0009 | SQL_SCHEMA="infrastructure/docker/postgis/create_syria_table.sql"
0010 | 
0011 | # 1. Ensure the table exists
0012 | echo "Setting up Syria table..."
0013 | docker exec -i $CONTAINER_NAME psql -U $DB_USER -d $DB_NAME < $SQL_SCHEMA
0014 | 
0015 | # 2. Upload CSV to container for fast bulk loading
0016 | echo "Copying CSV to database container..."
0017 | docker cp $CSV_FILE $CONTAINER_NAME:/tmp/data_clean_syria.csv
0018 | 
0019 | # 3. Import data using a temporary table to map columns correctly
0020 | echo "Importing data into PostGIS..."
0021 | docker exec -i $CONTAINER_NAME psql -U $DB_USER -d $DB_NAME <<EOF
0022 | -- Create temporary table for CSV import
0023 | CREATE TEMP TABLE temp_syria_import (
0024 |     search_query TEXT,
0025 |     name TEXT,
0026 |     rating TEXT,
0027 |     reviews TEXT,
0028 |     latitude DECIMAL,
0029 |     longitude DECIMAL,
0030 |     maps_url TEXT,
0031 |     scraped_at TEXT
0032 | );
0033 | 
0034 | -- Copy from CSV (header row exists)
0035 | COPY temp_syria_import FROM '/tmp/data_clean_syria.csv' WITH (FORMAT csv, HEADER true, ENCODING 'UTF8');
0036 | 
0037 | -- Insert into main table
0038 | -- Mapping search_query -> neighbourhood
0039 | INSERT INTO places_syria (name, neighbourhood, latitude, longitude, created_at)
0040 | SELECT name, search_query, latitude, longitude,
0041 |        CASE WHEN scraped_at IS NOT NULL AND scraped_at <> '' THEN scraped_at::timestamp ELSE CURRENT_TIMESTAMP END
0042 | FROM temp_syria_import;
0043 | 
0044 | -- Update PostGIS geometry column
0045 | UPDATE places_syria
0046 | SET location = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326)
0047 | WHERE location IS NULL AND latitude IS NOT NULL AND longitude IS NOT NULL;
0048 | 
0049 | -- Clean up
0050 | DROP TABLE temp_syria_import;
0051 | EOF
0052 | 
0053 | echo "✅ Import completed successfully!"
0054 | echo "Data sample from places_syria:"
0055 | docker exec -i $CONTAINER_NAME psql -U $DB_USER -d $DB_NAME -c "SELECT name, neighbourhood, latitude, longitude FROM places_syria LIMIT 5;"


------------------------------------------------------------
[7] اسم الملف: index.d.ts
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/index.d.ts
------------------------------------------------------------
0001 | /**
0002 |  * Copyright (c) Microsoft Corporation.
0003 |  *
0004 |  * Licensed under the Apache License, Version 2.0 (the "License");
0005 |  * you may not use this file except in compliance with the License.
0006 |  * You may obtain a copy of the License at
0007 |  *
0008 |  * http://www.apache.org/licenses/LICENSE-2.0
0009 |  *
0010 |  * Unless required by applicable law or agreed to in writing, software
0011 |  * distributed under the License is distributed on an "AS IS" BASIS,
0012 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 |  * See the License for the specific language governing permissions and
0014 |  * limitations under the License.
0015 |  */
0016 | 
0017 | export * from './types/types';


------------------------------------------------------------
[8] اسم الملف: types.d.ts
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/types/types.d.ts
------------------------------------------------------------
0001 | // This file is generated by /utils/generate_types/index.js
0002 | /**
0003 |  * Copyright (c) Microsoft Corporation.
0004 |  *
0005 |  * Licensed under the Apache License, Version 2.0 (the "License");
0006 |  * you may not use this file except in compliance with the License.
0007 |  * You may obtain a copy of the License at
0008 |  *
0009 |  * http://www.apache.org/licenses/LICENSE-2.0
0010 |  *
0011 |  * Unless required by applicable law or agreed to in writing, software
0012 |  * distributed under the License is distributed on an "AS IS" BASIS,
0013 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014 |  * See the License for the specific language governing permissions and
0015 |  * limitations under the License.
0016 |  */
0017 | import { ChildProcess } from 'child_process';
0018 | import { EventEmitter } from 'events';
0019 | import { Readable } from 'stream';
0020 | import { ReadStream } from 'fs';
0021 | import { Protocol } from './protocol';
0022 | import { Serializable, EvaluationArgument, PageFunction, PageFunctionOn, SmartHandle, ElementHandleForTag, BindingSource } from './structs';
0023 | 
0024 | type PageWaitForSelectorOptionsNotHidden = PageWaitForSelectorOptions & {
0025 |   state?: 'visible'|'attached';
0026 | };
0027 | type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelectorOptions & {
0028 |   state?: 'visible'|'attached';
0029 | };
0030 | 
0031 | /**
0032 |  * Page provides methods to interact with a single tab in a [Browser](https://playwright.dev/docs/api/class-browser),
0033 |  * or an [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One
0034 |  * [Browser](https://playwright.dev/docs/api/class-browser) instance might have multiple
0035 |  * [Page](https://playwright.dev/docs/api/class-page) instances.
0036 |  *
0037 |  * This example creates a page, navigates it to a URL, and then saves a screenshot:
0038 |  *
0039 |  * ```js
0040 |  * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0041 |  *
0042 |  * (async () => {
0043 |  *   const browser = await webkit.launch();
0044 |  *   const context = await browser.newContext();
0045 |  *   const page = await context.newPage();
0046 |  *   await page.goto('https://example.com');
0047 |  *   await page.screenshot({ path: 'screenshot.png' });
0048 |  *   await browser.close();
0049 |  * })();
0050 |  * ```
0051 |  *
0052 |  * The Page class emits various events (described below) which can be handled using any of Node's native
0053 |  * [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) methods, such as `on`, `once` or
0054 |  * `removeListener`.
0055 |  *
0056 |  * This example logs a message for a single page `load` event:
0057 |  *
0058 |  * ```js
0059 |  * page.once('load', () => console.log('Page loaded!'));
0060 |  * ```
0061 |  *
0062 |  * To unsubscribe from events use the `removeListener` method:
0063 |  *
0064 |  * ```js
0065 |  * function logRequest(interceptedRequest) {
0066 |  *   console.log('A request was made:', interceptedRequest.url());
0067 |  * }
0068 |  * page.on('request', logRequest);
0069 |  * // Sometime later...
0070 |  * page.removeListener('request', logRequest);
0071 |  * ```
0072 |  *
0073 |  */
0074 | export interface Page {
0075 |   /**
0076 |    * Returns the value of the
0077 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
0078 |    *
0079 |    * If the function passed to the
0080 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
0081 |    * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
0082 |    * the promise to resolve and return its value.
0083 |    *
0084 |    * If the function passed to the
0085 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
0086 |    * non-[Serializable] value, then
0087 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
0088 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
0089 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
0090 |    *
0091 |    * **Usage**
0092 |    *
0093 |    * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
0094 |    *
0095 |    * ```js
0096 |    * const result = await page.evaluate(([x, y]) => {
0097 |    *   return Promise.resolve(x * y);
0098 |    * }, [7, 8]);
0099 |    * console.log(result); // prints "56"
0100 |    * ```
0101 |    *
0102 |    * A string can also be passed in instead of a function:
0103 |    *
0104 |    * ```js
0105 |    * console.log(await page.evaluate('1 + 2')); // prints "3"
0106 |    * const x = 10;
0107 |    * console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
0108 |    * ```
0109 |    *
0110 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
0111 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
0112 |    *
0113 |    * ```js
0114 |    * const bodyHandle = await page.evaluate('document.body');
0115 |    * const html = await page.evaluate<string, HTMLElement>(([body, suffix]) =>
0116 |    *   body.innerHTML + suffix, [bodyHandle, 'hello']
0117 |    * );
0118 |    * await bodyHandle.dispose();
0119 |    * ```
0120 |    *
0121 |    * @param pageFunction Function to be evaluated in the page context.
0122 |    * @param arg Optional argument to pass to
0123 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
0124 |    */
0125 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
0126 |   /**
0127 |    * Returns the value of the
0128 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
0129 |    *
0130 |    * If the function passed to the
0131 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
0132 |    * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
0133 |    * the promise to resolve and return its value.
0134 |    *
0135 |    * If the function passed to the
0136 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
0137 |    * non-[Serializable] value, then
0138 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
0139 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
0140 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
0141 |    *
0142 |    * **Usage**
0143 |    *
0144 |    * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
0145 |    *
0146 |    * ```js
0147 |    * const result = await page.evaluate(([x, y]) => {
0148 |    *   return Promise.resolve(x * y);
0149 |    * }, [7, 8]);
0150 |    * console.log(result); // prints "56"
0151 |    * ```
0152 |    *
0153 |    * A string can also be passed in instead of a function:
0154 |    *
0155 |    * ```js
0156 |    * console.log(await page.evaluate('1 + 2')); // prints "3"
0157 |    * const x = 10;
0158 |    * console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
0159 |    * ```
0160 |    *
0161 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
0162 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
0163 |    *
0164 |    * ```js
0165 |    * const bodyHandle = await page.evaluate('document.body');
0166 |    * const html = await page.evaluate<string, HTMLElement>(([body, suffix]) =>
0167 |    *   body.innerHTML + suffix, [bodyHandle, 'hello']
0168 |    * );
0169 |    * await bodyHandle.dispose();
0170 |    * ```
0171 |    *
0172 |    * @param pageFunction Function to be evaluated in the page context.
0173 |    * @param arg Optional argument to pass to
0174 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
0175 |    */
0176 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
0177 | 
0178 |   /**
0179 |    * Returns the value of the
0180 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
0181 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0182 |    *
0183 |    * The only difference between
0184 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
0185 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
0186 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0187 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0188 |    *
0189 |    * If the function passed to the
0190 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0191 |    * a [Promise], then
0192 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
0193 |    * wait for the promise to resolve and return its value.
0194 |    *
0195 |    * **Usage**
0196 |    *
0197 |    * ```js
0198 |    * // Handle for the window object.
0199 |    * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window));
0200 |    * ```
0201 |    *
0202 |    * A string can also be passed in instead of a function:
0203 |    *
0204 |    * ```js
0205 |    * const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
0206 |    * ```
0207 |    *
0208 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
0209 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
0210 |    *
0211 |    * ```js
0212 |    * const aHandle = await page.evaluateHandle(() => document.body);
0213 |    * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
0214 |    * console.log(await resultHandle.jsonValue());
0215 |    * await resultHandle.dispose();
0216 |    * ```
0217 |    *
0218 |    * @param pageFunction Function to be evaluated in the page context.
0219 |    * @param arg Optional argument to pass to
0220 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
0221 |    */
0222 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
0223 |   /**
0224 |    * Returns the value of the
0225 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
0226 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0227 |    *
0228 |    * The only difference between
0229 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
0230 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
0231 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0232 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0233 |    *
0234 |    * If the function passed to the
0235 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0236 |    * a [Promise], then
0237 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
0238 |    * wait for the promise to resolve and return its value.
0239 |    *
0240 |    * **Usage**
0241 |    *
0242 |    * ```js
0243 |    * // Handle for the window object.
0244 |    * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window));
0245 |    * ```
0246 |    *
0247 |    * A string can also be passed in instead of a function:
0248 |    *
0249 |    * ```js
0250 |    * const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
0251 |    * ```
0252 |    *
0253 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
0254 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
0255 |    *
0256 |    * ```js
0257 |    * const aHandle = await page.evaluateHandle(() => document.body);
0258 |    * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
0259 |    * console.log(await resultHandle.jsonValue());
0260 |    * await resultHandle.dispose();
0261 |    * ```
0262 |    *
0263 |    * @param pageFunction Function to be evaluated in the page context.
0264 |    * @param arg Optional argument to pass to
0265 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
0266 |    */
0267 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
0268 | 
0269 |   /**
0270 |    * Adds a script which would be evaluated in one of the following scenarios:
0271 |    * - Whenever the page is navigated.
0272 |    * - Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the
0273 |    *   newly attached frame.
0274 |    *
0275 |    * The script is evaluated after the document was created but before any of its scripts were run. This is useful to
0276 |    * amend the JavaScript environment, e.g. to seed `Math.random`.
0277 |    *
0278 |    * **Usage**
0279 |    *
0280 |    * An example of overriding `Math.random` before the page loads:
0281 |    *
0282 |    * ```js
0283 |    * // preload.js
0284 |    * Math.random = () => 42;
0285 |    * ```
0286 |    *
0287 |    * ```js
0288 |    * // In your playwright script, assuming the preload.js file is in same directory
0289 |    * await page.addInitScript({ path: './preload.js' });
0290 |    * ```
0291 |    *
0292 |    * ```js
0293 |    * await page.addInitScript(mock => {
0294 |    *   window.mock = mock;
0295 |    * }, mock);
0296 |    * ```
0297 |    *
0298 |    * **NOTE** The order of evaluation of multiple scripts installed via
0299 |    * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
0300 |    * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
0301 |    * defined.
0302 |    *
0303 |    * @param script Script to be evaluated in the page.
0304 |    * @param arg Optional argument to pass to
0305 |    * [`script`](https://playwright.dev/docs/api/class-page#page-add-init-script-option-script) (only supported when
0306 |    * passing a function).
0307 |    */
0308 |   addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
0309 | 
0310 |   /**
0311 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0312 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0313 |    *
0314 |    * The method finds an element matching the specified selector within the page. If no elements match the selector, the
0315 |    * return value resolves to `null`. To wait for an element on the page, use
0316 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for).
0317 |    * @param selector A selector to query for.
0318 |    * @param options
0319 |    */
0320 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
0321 |   /**
0322 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0323 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0324 |    *
0325 |    * The method finds an element matching the specified selector within the page. If no elements match the selector, the
0326 |    * return value resolves to `null`. To wait for an element on the page, use
0327 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for).
0328 |    * @param selector A selector to query for.
0329 |    * @param options
0330 |    */
0331 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
0332 | 
0333 |   /**
0334 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0335 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0336 |    *
0337 |    * The method finds all elements matching the specified selector within the page. If no elements match the selector,
0338 |    * the return value resolves to `[]`.
0339 |    * @param selector A selector to query for.
0340 |    */
0341 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
0342 |   /**
0343 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0344 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0345 |    *
0346 |    * The method finds all elements matching the specified selector within the page. If no elements match the selector,
0347 |    * the return value resolves to `[]`.
0348 |    * @param selector A selector to query for.
0349 |    */
0350 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
0351 | 
0352 |   /**
0353 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0354 |    * Use
0355 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0356 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0357 |    *
0358 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0359 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0360 |    * elements match the selector, the method throws an error. Returns the value of
0361 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0362 |    *
0363 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0364 |    * [Promise], then
0365 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0366 |    * would wait for the promise to resolve and return its value.
0367 |    *
0368 |    * **Usage**
0369 |    *
0370 |    * ```js
0371 |    * const searchValue = await page.$eval('#search', el => el.value);
0372 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0373 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0374 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0375 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0376 |    * ```
0377 |    *
0378 |    * @param selector A selector to query for.
0379 |    * @param pageFunction Function to be evaluated in the page context.
0380 |    * @param arg Optional argument to pass to
0381 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0382 |    * @param options
0383 |    */
0384 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
0385 |   /**
0386 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0387 |    * Use
0388 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0389 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0390 |    *
0391 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0392 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0393 |    * elements match the selector, the method throws an error. Returns the value of
0394 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0395 |    *
0396 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0397 |    * [Promise], then
0398 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0399 |    * would wait for the promise to resolve and return its value.
0400 |    *
0401 |    * **Usage**
0402 |    *
0403 |    * ```js
0404 |    * const searchValue = await page.$eval('#search', el => el.value);
0405 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0406 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0407 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0408 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0409 |    * ```
0410 |    *
0411 |    * @param selector A selector to query for.
0412 |    * @param pageFunction Function to be evaluated in the page context.
0413 |    * @param arg Optional argument to pass to
0414 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0415 |    * @param options
0416 |    */
0417 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
0418 |   /**
0419 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0420 |    * Use
0421 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0422 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0423 |    *
0424 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0425 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0426 |    * elements match the selector, the method throws an error. Returns the value of
0427 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0428 |    *
0429 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0430 |    * [Promise], then
0431 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0432 |    * would wait for the promise to resolve and return its value.
0433 |    *
0434 |    * **Usage**
0435 |    *
0436 |    * ```js
0437 |    * const searchValue = await page.$eval('#search', el => el.value);
0438 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0439 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0440 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0441 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0442 |    * ```
0443 |    *
0444 |    * @param selector A selector to query for.
0445 |    * @param pageFunction Function to be evaluated in the page context.
0446 |    * @param arg Optional argument to pass to
0447 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0448 |    * @param options
0449 |    */
0450 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
0451 |   /**
0452 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0453 |    * Use
0454 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0455 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0456 |    *
0457 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0458 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0459 |    * elements match the selector, the method throws an error. Returns the value of
0460 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0461 |    *
0462 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0463 |    * [Promise], then
0464 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0465 |    * would wait for the promise to resolve and return its value.
0466 |    *
0467 |    * **Usage**
0468 |    *
0469 |    * ```js
0470 |    * const searchValue = await page.$eval('#search', el => el.value);
0471 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0472 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0473 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0474 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0475 |    * ```
0476 |    *
0477 |    * @param selector A selector to query for.
0478 |    * @param pageFunction Function to be evaluated in the page context.
0479 |    * @param arg Optional argument to pass to
0480 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0481 |    * @param options
0482 |    */
0483 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
0484 | 
0485 |   /**
0486 |    * **NOTE** In most cases,
0487 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0488 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0489 |    * job.
0490 |    *
0491 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0492 |    * elements as a first argument to
0493 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0494 |    * the result of
0495 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0496 |    * invocation.
0497 |    *
0498 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0499 |    * a [Promise], then
0500 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0501 |    * would wait for the promise to resolve and return its value.
0502 |    *
0503 |    * **Usage**
0504 |    *
0505 |    * ```js
0506 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0507 |    * ```
0508 |    *
0509 |    * @param selector A selector to query for.
0510 |    * @param pageFunction Function to be evaluated in the page context.
0511 |    * @param arg Optional argument to pass to
0512 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0513 |    */
0514 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
0515 |   /**
0516 |    * **NOTE** In most cases,
0517 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0518 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0519 |    * job.
0520 |    *
0521 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0522 |    * elements as a first argument to
0523 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0524 |    * the result of
0525 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0526 |    * invocation.
0527 |    *
0528 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0529 |    * a [Promise], then
0530 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0531 |    * would wait for the promise to resolve and return its value.
0532 |    *
0533 |    * **Usage**
0534 |    *
0535 |    * ```js
0536 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0537 |    * ```
0538 |    *
0539 |    * @param selector A selector to query for.
0540 |    * @param pageFunction Function to be evaluated in the page context.
0541 |    * @param arg Optional argument to pass to
0542 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0543 |    */
0544 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
0545 |   /**
0546 |    * **NOTE** In most cases,
0547 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0548 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0549 |    * job.
0550 |    *
0551 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0552 |    * elements as a first argument to
0553 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0554 |    * the result of
0555 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0556 |    * invocation.
0557 |    *
0558 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0559 |    * a [Promise], then
0560 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0561 |    * would wait for the promise to resolve and return its value.
0562 |    *
0563 |    * **Usage**
0564 |    *
0565 |    * ```js
0566 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0567 |    * ```
0568 |    *
0569 |    * @param selector A selector to query for.
0570 |    * @param pageFunction Function to be evaluated in the page context.
0571 |    * @param arg Optional argument to pass to
0572 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0573 |    */
0574 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
0575 |   /**
0576 |    * **NOTE** In most cases,
0577 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0578 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0579 |    * job.
0580 |    *
0581 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0582 |    * elements as a first argument to
0583 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0584 |    * the result of
0585 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0586 |    * invocation.
0587 |    *
0588 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0589 |    * a [Promise], then
0590 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0591 |    * would wait for the promise to resolve and return its value.
0592 |    *
0593 |    * **Usage**
0594 |    *
0595 |    * ```js
0596 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0597 |    * ```
0598 |    *
0599 |    * @param selector A selector to query for.
0600 |    * @param pageFunction Function to be evaluated in the page context.
0601 |    * @param arg Optional argument to pass to
0602 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0603 |    */
0604 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
0605 | 
0606 |   /**
0607 |    * Returns when the
0608 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
0609 |    * truthy value. It resolves to a JSHandle of the truthy value.
0610 |    *
0611 |    * **Usage**
0612 |    *
0613 |    * The
0614 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0615 |    * can be used to observe viewport size change:
0616 |    *
0617 |    * ```js
0618 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0619 |    *
0620 |    * (async () => {
0621 |    *   const browser = await webkit.launch();
0622 |    *   const page = await browser.newPage();
0623 |    *   const watchDog = page.waitForFunction(() => window.innerWidth < 100);
0624 |    *   await page.setViewportSize({ width: 50, height: 50 });
0625 |    *   await watchDog;
0626 |    *   await browser.close();
0627 |    * })();
0628 |    * ```
0629 |    *
0630 |    * To pass an argument to the predicate of
0631 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0632 |    * function:
0633 |    *
0634 |    * ```js
0635 |    * const selector = '.foo';
0636 |    * await page.waitForFunction(selector => !!document.querySelector(selector), selector);
0637 |    * ```
0638 |    *
0639 |    * @param pageFunction Function to be evaluated in the page context.
0640 |    * @param arg Optional argument to pass to
0641 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
0642 |    * @param options
0643 |    */
0644 |   waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
0645 |   /**
0646 |    * Returns when the
0647 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
0648 |    * truthy value. It resolves to a JSHandle of the truthy value.
0649 |    *
0650 |    * **Usage**
0651 |    *
0652 |    * The
0653 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0654 |    * can be used to observe viewport size change:
0655 |    *
0656 |    * ```js
0657 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0658 |    *
0659 |    * (async () => {
0660 |    *   const browser = await webkit.launch();
0661 |    *   const page = await browser.newPage();
0662 |    *   const watchDog = page.waitForFunction(() => window.innerWidth < 100);
0663 |    *   await page.setViewportSize({ width: 50, height: 50 });
0664 |    *   await watchDog;
0665 |    *   await browser.close();
0666 |    * })();
0667 |    * ```
0668 |    *
0669 |    * To pass an argument to the predicate of
0670 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0671 |    * function:
0672 |    *
0673 |    * ```js
0674 |    * const selector = '.foo';
0675 |    * await page.waitForFunction(selector => !!document.querySelector(selector), selector);
0676 |    * ```
0677 |    *
0678 |    * @param pageFunction Function to be evaluated in the page context.
0679 |    * @param arg Optional argument to pass to
0680 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
0681 |    * @param options
0682 |    */
0683 |   waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
0684 | 
0685 |   /**
0686 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0687 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0688 |    * about [locators](https://playwright.dev/docs/locators).
0689 |    *
0690 |    * Returns when element specified by selector satisfies
0691 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0692 |    * waiting for `hidden` or `detached`.
0693 |    *
0694 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0695 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0696 |    * wait-for-selector-free.
0697 |    *
0698 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0699 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0700 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0701 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0702 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0703 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0704 |    * function will throw.
0705 |    *
0706 |    * **Usage**
0707 |    *
0708 |    * This method works across navigations:
0709 |    *
0710 |    * ```js
0711 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0712 |    *
0713 |    * (async () => {
0714 |    *   const browser = await chromium.launch();
0715 |    *   const page = await browser.newPage();
0716 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0717 |    *     await page.goto(currentURL);
0718 |    *     const element = await page.waitForSelector('img');
0719 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0720 |    *   }
0721 |    *   await browser.close();
0722 |    * })();
0723 |    * ```
0724 |    *
0725 |    * @param selector A selector to query for.
0726 |    * @param options
0727 |    */
0728 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
0729 |   /**
0730 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0731 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0732 |    * about [locators](https://playwright.dev/docs/locators).
0733 |    *
0734 |    * Returns when element specified by selector satisfies
0735 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0736 |    * waiting for `hidden` or `detached`.
0737 |    *
0738 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0739 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0740 |    * wait-for-selector-free.
0741 |    *
0742 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0743 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0744 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0745 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0746 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0747 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0748 |    * function will throw.
0749 |    *
0750 |    * **Usage**
0751 |    *
0752 |    * This method works across navigations:
0753 |    *
0754 |    * ```js
0755 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0756 |    *
0757 |    * (async () => {
0758 |    *   const browser = await chromium.launch();
0759 |    *   const page = await browser.newPage();
0760 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0761 |    *     await page.goto(currentURL);
0762 |    *     const element = await page.waitForSelector('img');
0763 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0764 |    *   }
0765 |    *   await browser.close();
0766 |    * })();
0767 |    * ```
0768 |    *
0769 |    * @param selector A selector to query for.
0770 |    * @param options
0771 |    */
0772 |   waitForSelector(selector: string, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
0773 |   /**
0774 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0775 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0776 |    * about [locators](https://playwright.dev/docs/locators).
0777 |    *
0778 |    * Returns when element specified by selector satisfies
0779 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0780 |    * waiting for `hidden` or `detached`.
0781 |    *
0782 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0783 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0784 |    * wait-for-selector-free.
0785 |    *
0786 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0787 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0788 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0789 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0790 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0791 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0792 |    * function will throw.
0793 |    *
0794 |    * **Usage**
0795 |    *
0796 |    * This method works across navigations:
0797 |    *
0798 |    * ```js
0799 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0800 |    *
0801 |    * (async () => {
0802 |    *   const browser = await chromium.launch();
0803 |    *   const page = await browser.newPage();
0804 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0805 |    *     await page.goto(currentURL);
0806 |    *     const element = await page.waitForSelector('img');
0807 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0808 |    *   }
0809 |    *   await browser.close();
0810 |    * })();
0811 |    * ```
0812 |    *
0813 |    * @param selector A selector to query for.
0814 |    * @param options
0815 |    */
0816 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: PageWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
0817 |   /**
0818 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0819 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0820 |    * about [locators](https://playwright.dev/docs/locators).
0821 |    *
0822 |    * Returns when element specified by selector satisfies
0823 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0824 |    * waiting for `hidden` or `detached`.
0825 |    *
0826 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0827 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0828 |    * wait-for-selector-free.
0829 |    *
0830 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0831 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0832 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0833 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0834 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0835 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0836 |    * function will throw.
0837 |    *
0838 |    * **Usage**
0839 |    *
0840 |    * This method works across navigations:
0841 |    *
0842 |    * ```js
0843 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0844 |    *
0845 |    * (async () => {
0846 |    *   const browser = await chromium.launch();
0847 |    *   const page = await browser.newPage();
0848 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0849 |    *     await page.goto(currentURL);
0850 |    *     const element = await page.waitForSelector('img');
0851 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0852 |    *   }
0853 |    *   await browser.close();
0854 |    * })();
0855 |    * ```
0856 |    *
0857 |    * @param selector A selector to query for.
0858 |    * @param options
0859 |    */
0860 |   waitForSelector(selector: string, options: PageWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
0861 | 
0862 |   /**
0863 |    * The method adds a function called
0864 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
0865 |    * every frame in this page. When called, the function executes
0866 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
0867 |    * [Promise] which resolves to the return value of
0868 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
0869 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
0870 |    * it will be awaited.
0871 |    *
0872 |    * The first argument of the
0873 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
0874 |    * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
0875 |    *
0876 |    * See
0877 |    * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
0878 |    * for the context-wide version.
0879 |    *
0880 |    * **NOTE** Functions installed via
0881 |    * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
0882 |    * survive navigations.
0883 |    *
0884 |    * **Usage**
0885 |    *
0886 |    * An example of exposing page URL to all frames in a page:
0887 |    *
0888 |    * ```js
0889 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0890 |    *
0891 |    * (async () => {
0892 |    *   const browser = await webkit.launch({ headless: false });
0893 |    *   const context = await browser.newContext();
0894 |    *   const page = await context.newPage();
0895 |    *   await page.exposeBinding('pageURL', ({ page }) => page.url());
0896 |    *   await page.setContent(`
0897 |    *     <script>
0898 |    *       async function onClick() {
0899 |    *         document.querySelector('div').textContent = await window.pageURL();
0900 |    *       }
0901 |    *     </script>
0902 |    *     <button onclick="onClick()">Click me</button>
0903 |    *     <div></div>
0904 |    *   `);
0905 |    *   await page.click('button');
0906 |    * })();
0907 |    * ```
0908 |    *
0909 |    * @param name Name of the function on the window object.
0910 |    * @param callback Callback function that will be called in the Playwright's context.
0911 |    * @param options
0912 |    */
0913 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
0914 |   /**
0915 |    * The method adds a function called
0916 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
0917 |    * every frame in this page. When called, the function executes
0918 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
0919 |    * [Promise] which resolves to the return value of
0920 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
0921 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
0922 |    * it will be awaited.
0923 |    *
0924 |    * The first argument of the
0925 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
0926 |    * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
0927 |    *
0928 |    * See
0929 |    * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
0930 |    * for the context-wide version.
0931 |    *
0932 |    * **NOTE** Functions installed via
0933 |    * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
0934 |    * survive navigations.
0935 |    *
0936 |    * **Usage**
0937 |    *
0938 |    * An example of exposing page URL to all frames in a page:
0939 |    *
0940 |    * ```js
0941 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0942 |    *
0943 |    * (async () => {
0944 |    *   const browser = await webkit.launch({ headless: false });
0945 |    *   const context = await browser.newContext();
0946 |    *   const page = await context.newPage();
0947 |    *   await page.exposeBinding('pageURL', ({ page }) => page.url());
0948 |    *   await page.setContent(`
0949 |    *     <script>
0950 |    *       async function onClick() {
0951 |    *         document.querySelector('div').textContent = await window.pageURL();
0952 |    *       }
0953 |    *     </script>
0954 |    *     <button onclick="onClick()">Click me</button>
0955 |    *     <div></div>
0956 |    *   `);
0957 |    *   await page.click('button');
0958 |    * })();
0959 |    * ```
0960 |    *
0961 |    * @param name Name of the function on the window object.
0962 |    * @param callback Callback function that will be called in the Playwright's context.
0963 |    * @param options
0964 |    */
0965 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, ...args: any[]) => any, options?: { handle?: boolean }): Promise<void>;
0966 | 
0967 |   /**
0968 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
0969 |    * async listeners to complete or to ignore subsequent errors from these listeners.
0970 |    *
0971 |    * **Usage**
0972 |    *
0973 |    * ```js
0974 |    * page.on('request', async request => {
0975 |    *   const response = await request.response();
0976 |    *   const body = await response.body();
0977 |    *   console.log(body.byteLength);
0978 |    * });
0979 |    * await page.goto('https://playwright.dev', { waitUntil: 'domcontentloaded' });
0980 |    * // Waits for all the reported 'request' events to resolve.
0981 |    * await page.removeAllListeners('request', { behavior: 'wait' });
0982 |    * ```
0983 |    *
0984 |    * @param type
0985 |    * @param options
0986 |    */
0987 |   removeAllListeners(type?: string): this;
0988 |   /**
0989 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
0990 |    * async listeners to complete or to ignore subsequent errors from these listeners.
0991 |    *
0992 |    * **Usage**
0993 |    *
0994 |    * ```js
0995 |    * page.on('request', async request => {
0996 |    *   const response = await request.response();
0997 |    *   const body = await response.body();
0998 |    *   console.log(body.byteLength);
0999 |    * });
1000 |    * await page.goto('https://playwright.dev', { waitUntil: 'domcontentloaded' });
1001 |    * // Waits for all the reported 'request' events to resolve.
1002 |    * await page.removeAllListeners('request', { behavior: 'wait' });
1003 |    * ```
1004 |    *
1005 |    * @param type
1006 |    * @param options
1007 |    */
1008 |   removeAllListeners(type: string | undefined, options: {
1009 |     /**
1010 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
1011 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
1012 |      * - `'wait'` - wait for current listener calls (if any) to finish
1013 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
1014 |      */
1015 |     behavior?: 'wait'|'ignoreErrors'|'default'
1016 |   }): Promise<void>;
1017 |   /**
1018 |    * Emitted when the page closes.
1019 |    */
1020 |   on(event: 'close', listener: (page: Page) => any): this;
1021 | 
1022 |   /**
1023 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1024 |    *
1025 |    * The arguments passed into `console.log` are available on the
1026 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1027 |    *
1028 |    * **Usage**
1029 |    *
1030 |    * ```js
1031 |    * page.on('console', async msg => {
1032 |    *   const values = [];
1033 |    *   for (const arg of msg.args())
1034 |    *     values.push(await arg.jsonValue());
1035 |    *   console.log(...values);
1036 |    * });
1037 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1038 |    * ```
1039 |    *
1040 |    */
1041 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1042 | 
1043 |   /**
1044 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1045 |    * crashes, ongoing and subsequent operations will throw.
1046 |    *
1047 |    * The most common way to deal with crashes is to catch an exception:
1048 |    *
1049 |    * ```js
1050 |    * try {
1051 |    *   // Crash might happen during a click.
1052 |    *   await page.click('button');
1053 |    *   // Or while waiting for an event.
1054 |    *   await page.waitForEvent('popup');
1055 |    * } catch (e) {
1056 |    *   // When the page crashes, exception message contains 'crash'.
1057 |    * }
1058 |    * ```
1059 |    *
1060 |    */
1061 |   on(event: 'crash', listener: (page: Page) => any): this;
1062 | 
1063 |   /**
1064 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1065 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1066 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1067 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1068 |    * dialog, and actions like click will never finish.
1069 |    *
1070 |    * **Usage**
1071 |    *
1072 |    * ```js
1073 |    * page.on('dialog', dialog => dialog.accept());
1074 |    * ```
1075 |    *
1076 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1077 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1078 |    * listeners are present, all dialogs are automatically dismissed.
1079 |    *
1080 |    */
1081 |   on(event: 'dialog', listener: (dialog: Dialog) => any): this;
1082 | 
1083 |   /**
1084 |    * Emitted when the JavaScript
1085 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1086 |    */
1087 |   on(event: 'domcontentloaded', listener: (page: Page) => any): this;
1088 | 
1089 |   /**
1090 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1091 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1092 |    */
1093 |   on(event: 'download', listener: (download: Download) => any): this;
1094 | 
1095 |   /**
1096 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1097 |    * respond to it via setting the input files using
1098 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1099 |    * that can be uploaded after that.
1100 |    *
1101 |    * ```js
1102 |    * page.on('filechooser', async fileChooser => {
1103 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1104 |    * });
1105 |    * ```
1106 |    *
1107 |    */
1108 |   on(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1109 | 
1110 |   /**
1111 |    * Emitted when a frame is attached.
1112 |    */
1113 |   on(event: 'frameattached', listener: (frame: Frame) => any): this;
1114 | 
1115 |   /**
1116 |    * Emitted when a frame is detached.
1117 |    */
1118 |   on(event: 'framedetached', listener: (frame: Frame) => any): this;
1119 | 
1120 |   /**
1121 |    * Emitted when a frame is navigated to a new url.
1122 |    */
1123 |   on(event: 'framenavigated', listener: (frame: Frame) => any): this;
1124 | 
1125 |   /**
1126 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1127 |    */
1128 |   on(event: 'load', listener: (page: Page) => any): this;
1129 | 
1130 |   /**
1131 |    * Emitted when an uncaught exception happens within the page.
1132 |    *
1133 |    * ```js
1134 |    * // Log all uncaught errors to the terminal
1135 |    * page.on('pageerror', exception => {
1136 |    *   console.log(`Uncaught exception: "${exception}"`);
1137 |    * });
1138 |    *
1139 |    * // Navigate to a page with an exception.
1140 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1141 |    * ```
1142 |    *
1143 |    */
1144 |   on(event: 'pageerror', listener: (error: Error) => any): this;
1145 | 
1146 |   /**
1147 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1148 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1149 |    * only for popups relevant to this page.
1150 |    *
1151 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1152 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1153 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1154 |    * to this network request, use
1155 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1156 |    * and
1157 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1158 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1159 |    *
1160 |    * ```js
1161 |    * // Start waiting for popup before clicking. Note no await.
1162 |    * const popupPromise = page.waitForEvent('popup');
1163 |    * await page.getByText('open the popup').click();
1164 |    * const popup = await popupPromise;
1165 |    * console.log(await popup.evaluate('location.href'));
1166 |    * ```
1167 |    *
1168 |    * **NOTE** Use
1169 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1170 |    * wait until the page gets to a particular state (you should not need it in most cases).
1171 |    *
1172 |    */
1173 |   on(event: 'popup', listener: (page: Page) => any): this;
1174 | 
1175 |   /**
1176 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1177 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1178 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1179 |    */
1180 |   on(event: 'request', listener: (request: Request) => any): this;
1181 | 
1182 |   /**
1183 |    * Emitted when a request fails, for example by timing out.
1184 |    *
1185 |    * ```js
1186 |    * page.on('requestfailed', request => {
1187 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1188 |    * });
1189 |    * ```
1190 |    *
1191 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1192 |    * will complete with
1193 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1194 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1195 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1196 |    * error net::ERR_FAILED.
1197 |    *
1198 |    */
1199 |   on(event: 'requestfailed', listener: (request: Request) => any): this;
1200 | 
1201 |   /**
1202 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1203 |    * sequence of events is `request`, `response` and `requestfinished`.
1204 |    */
1205 |   on(event: 'requestfinished', listener: (request: Request) => any): this;
1206 | 
1207 |   /**
1208 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1209 |    * events is `request`, `response` and `requestfinished`.
1210 |    */
1211 |   on(event: 'response', listener: (response: Response) => any): this;
1212 | 
1213 |   /**
1214 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1215 |    */
1216 |   on(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1217 | 
1218 |   /**
1219 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1220 |    * by the page.
1221 |    */
1222 |   on(event: 'worker', listener: (worker: Worker) => any): this;
1223 | 
1224 |   /**
1225 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1226 |    */
1227 |   once(event: 'close', listener: (page: Page) => any): this;
1228 | 
1229 |   /**
1230 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1231 |    */
1232 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1233 | 
1234 |   /**
1235 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1236 |    */
1237 |   once(event: 'crash', listener: (page: Page) => any): this;
1238 | 
1239 |   /**
1240 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1241 |    */
1242 |   once(event: 'dialog', listener: (dialog: Dialog) => any): this;
1243 | 
1244 |   /**
1245 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1246 |    */
1247 |   once(event: 'domcontentloaded', listener: (page: Page) => any): this;
1248 | 
1249 |   /**
1250 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1251 |    */
1252 |   once(event: 'download', listener: (download: Download) => any): this;
1253 | 
1254 |   /**
1255 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1256 |    */
1257 |   once(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1258 | 
1259 |   /**
1260 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1261 |    */
1262 |   once(event: 'frameattached', listener: (frame: Frame) => any): this;
1263 | 
1264 |   /**
1265 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1266 |    */
1267 |   once(event: 'framedetached', listener: (frame: Frame) => any): this;
1268 | 
1269 |   /**
1270 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1271 |    */
1272 |   once(event: 'framenavigated', listener: (frame: Frame) => any): this;
1273 | 
1274 |   /**
1275 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1276 |    */
1277 |   once(event: 'load', listener: (page: Page) => any): this;
1278 | 
1279 |   /**
1280 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1281 |    */
1282 |   once(event: 'pageerror', listener: (error: Error) => any): this;
1283 | 
1284 |   /**
1285 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1286 |    */
1287 |   once(event: 'popup', listener: (page: Page) => any): this;
1288 | 
1289 |   /**
1290 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1291 |    */
1292 |   once(event: 'request', listener: (request: Request) => any): this;
1293 | 
1294 |   /**
1295 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1296 |    */
1297 |   once(event: 'requestfailed', listener: (request: Request) => any): this;
1298 | 
1299 |   /**
1300 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1301 |    */
1302 |   once(event: 'requestfinished', listener: (request: Request) => any): this;
1303 | 
1304 |   /**
1305 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1306 |    */
1307 |   once(event: 'response', listener: (response: Response) => any): this;
1308 | 
1309 |   /**
1310 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1311 |    */
1312 |   once(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1313 | 
1314 |   /**
1315 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1316 |    */
1317 |   once(event: 'worker', listener: (worker: Worker) => any): this;
1318 | 
1319 |   /**
1320 |    * Emitted when the page closes.
1321 |    */
1322 |   addListener(event: 'close', listener: (page: Page) => any): this;
1323 | 
1324 |   /**
1325 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1326 |    *
1327 |    * The arguments passed into `console.log` are available on the
1328 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1329 |    *
1330 |    * **Usage**
1331 |    *
1332 |    * ```js
1333 |    * page.on('console', async msg => {
1334 |    *   const values = [];
1335 |    *   for (const arg of msg.args())
1336 |    *     values.push(await arg.jsonValue());
1337 |    *   console.log(...values);
1338 |    * });
1339 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1340 |    * ```
1341 |    *
1342 |    */
1343 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1344 | 
1345 |   /**
1346 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1347 |    * crashes, ongoing and subsequent operations will throw.
1348 |    *
1349 |    * The most common way to deal with crashes is to catch an exception:
1350 |    *
1351 |    * ```js
1352 |    * try {
1353 |    *   // Crash might happen during a click.
1354 |    *   await page.click('button');
1355 |    *   // Or while waiting for an event.
1356 |    *   await page.waitForEvent('popup');
1357 |    * } catch (e) {
1358 |    *   // When the page crashes, exception message contains 'crash'.
1359 |    * }
1360 |    * ```
1361 |    *
1362 |    */
1363 |   addListener(event: 'crash', listener: (page: Page) => any): this;
1364 | 
1365 |   /**
1366 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1367 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1368 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1369 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1370 |    * dialog, and actions like click will never finish.
1371 |    *
1372 |    * **Usage**
1373 |    *
1374 |    * ```js
1375 |    * page.on('dialog', dialog => dialog.accept());
1376 |    * ```
1377 |    *
1378 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1379 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1380 |    * listeners are present, all dialogs are automatically dismissed.
1381 |    *
1382 |    */
1383 |   addListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1384 | 
1385 |   /**
1386 |    * Emitted when the JavaScript
1387 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1388 |    */
1389 |   addListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1390 | 
1391 |   /**
1392 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1393 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1394 |    */
1395 |   addListener(event: 'download', listener: (download: Download) => any): this;
1396 | 
1397 |   /**
1398 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1399 |    * respond to it via setting the input files using
1400 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1401 |    * that can be uploaded after that.
1402 |    *
1403 |    * ```js
1404 |    * page.on('filechooser', async fileChooser => {
1405 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1406 |    * });
1407 |    * ```
1408 |    *
1409 |    */
1410 |   addListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1411 | 
1412 |   /**
1413 |    * Emitted when a frame is attached.
1414 |    */
1415 |   addListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1416 | 
1417 |   /**
1418 |    * Emitted when a frame is detached.
1419 |    */
1420 |   addListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1421 | 
1422 |   /**
1423 |    * Emitted when a frame is navigated to a new url.
1424 |    */
1425 |   addListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1426 | 
1427 |   /**
1428 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1429 |    */
1430 |   addListener(event: 'load', listener: (page: Page) => any): this;
1431 | 
1432 |   /**
1433 |    * Emitted when an uncaught exception happens within the page.
1434 |    *
1435 |    * ```js
1436 |    * // Log all uncaught errors to the terminal
1437 |    * page.on('pageerror', exception => {
1438 |    *   console.log(`Uncaught exception: "${exception}"`);
1439 |    * });
1440 |    *
1441 |    * // Navigate to a page with an exception.
1442 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1443 |    * ```
1444 |    *
1445 |    */
1446 |   addListener(event: 'pageerror', listener: (error: Error) => any): this;
1447 | 
1448 |   /**
1449 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1450 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1451 |    * only for popups relevant to this page.
1452 |    *
1453 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1454 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1455 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1456 |    * to this network request, use
1457 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1458 |    * and
1459 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1460 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1461 |    *
1462 |    * ```js
1463 |    * // Start waiting for popup before clicking. Note no await.
1464 |    * const popupPromise = page.waitForEvent('popup');
1465 |    * await page.getByText('open the popup').click();
1466 |    * const popup = await popupPromise;
1467 |    * console.log(await popup.evaluate('location.href'));
1468 |    * ```
1469 |    *
1470 |    * **NOTE** Use
1471 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1472 |    * wait until the page gets to a particular state (you should not need it in most cases).
1473 |    *
1474 |    */
1475 |   addListener(event: 'popup', listener: (page: Page) => any): this;
1476 | 
1477 |   /**
1478 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1479 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1480 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1481 |    */
1482 |   addListener(event: 'request', listener: (request: Request) => any): this;
1483 | 
1484 |   /**
1485 |    * Emitted when a request fails, for example by timing out.
1486 |    *
1487 |    * ```js
1488 |    * page.on('requestfailed', request => {
1489 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1490 |    * });
1491 |    * ```
1492 |    *
1493 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1494 |    * will complete with
1495 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1496 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1497 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1498 |    * error net::ERR_FAILED.
1499 |    *
1500 |    */
1501 |   addListener(event: 'requestfailed', listener: (request: Request) => any): this;
1502 | 
1503 |   /**
1504 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1505 |    * sequence of events is `request`, `response` and `requestfinished`.
1506 |    */
1507 |   addListener(event: 'requestfinished', listener: (request: Request) => any): this;
1508 | 
1509 |   /**
1510 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1511 |    * events is `request`, `response` and `requestfinished`.
1512 |    */
1513 |   addListener(event: 'response', listener: (response: Response) => any): this;
1514 | 
1515 |   /**
1516 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1517 |    */
1518 |   addListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1519 | 
1520 |   /**
1521 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1522 |    * by the page.
1523 |    */
1524 |   addListener(event: 'worker', listener: (worker: Worker) => any): this;
1525 | 
1526 |   /**
1527 |    * Removes an event listener added by `on` or `addListener`.
1528 |    */
1529 |   removeListener(event: 'close', listener: (page: Page) => any): this;
1530 | 
1531 |   /**
1532 |    * Removes an event listener added by `on` or `addListener`.
1533 |    */
1534 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1535 | 
1536 |   /**
1537 |    * Removes an event listener added by `on` or `addListener`.
1538 |    */
1539 |   removeListener(event: 'crash', listener: (page: Page) => any): this;
1540 | 
1541 |   /**
1542 |    * Removes an event listener added by `on` or `addListener`.
1543 |    */
1544 |   removeListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1545 | 
1546 |   /**
1547 |    * Removes an event listener added by `on` or `addListener`.
1548 |    */
1549 |   removeListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1550 | 
1551 |   /**
1552 |    * Removes an event listener added by `on` or `addListener`.
1553 |    */
1554 |   removeListener(event: 'download', listener: (download: Download) => any): this;
1555 | 
1556 |   /**
1557 |    * Removes an event listener added by `on` or `addListener`.
1558 |    */
1559 |   removeListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1560 | 
1561 |   /**
1562 |    * Removes an event listener added by `on` or `addListener`.
1563 |    */
1564 |   removeListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1565 | 
1566 |   /**
1567 |    * Removes an event listener added by `on` or `addListener`.
1568 |    */
1569 |   removeListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1570 | 
1571 |   /**
1572 |    * Removes an event listener added by `on` or `addListener`.
1573 |    */
1574 |   removeListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1575 | 
1576 |   /**
1577 |    * Removes an event listener added by `on` or `addListener`.
1578 |    */
1579 |   removeListener(event: 'load', listener: (page: Page) => any): this;
1580 | 
1581 |   /**
1582 |    * Removes an event listener added by `on` or `addListener`.
1583 |    */
1584 |   removeListener(event: 'pageerror', listener: (error: Error) => any): this;
1585 | 
1586 |   /**
1587 |    * Removes an event listener added by `on` or `addListener`.
1588 |    */
1589 |   removeListener(event: 'popup', listener: (page: Page) => any): this;
1590 | 
1591 |   /**
1592 |    * Removes an event listener added by `on` or `addListener`.
1593 |    */
1594 |   removeListener(event: 'request', listener: (request: Request) => any): this;
1595 | 
1596 |   /**
1597 |    * Removes an event listener added by `on` or `addListener`.
1598 |    */
1599 |   removeListener(event: 'requestfailed', listener: (request: Request) => any): this;
1600 | 
1601 |   /**
1602 |    * Removes an event listener added by `on` or `addListener`.
1603 |    */
1604 |   removeListener(event: 'requestfinished', listener: (request: Request) => any): this;
1605 | 
1606 |   /**
1607 |    * Removes an event listener added by `on` or `addListener`.
1608 |    */
1609 |   removeListener(event: 'response', listener: (response: Response) => any): this;
1610 | 
1611 |   /**
1612 |    * Removes an event listener added by `on` or `addListener`.
1613 |    */
1614 |   removeListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1615 | 
1616 |   /**
1617 |    * Removes an event listener added by `on` or `addListener`.
1618 |    */
1619 |   removeListener(event: 'worker', listener: (worker: Worker) => any): this;
1620 | 
1621 |   /**
1622 |    * Removes an event listener added by `on` or `addListener`.
1623 |    */
1624 |   off(event: 'close', listener: (page: Page) => any): this;
1625 | 
1626 |   /**
1627 |    * Removes an event listener added by `on` or `addListener`.
1628 |    */
1629 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1630 | 
1631 |   /**
1632 |    * Removes an event listener added by `on` or `addListener`.
1633 |    */
1634 |   off(event: 'crash', listener: (page: Page) => any): this;
1635 | 
1636 |   /**
1637 |    * Removes an event listener added by `on` or `addListener`.
1638 |    */
1639 |   off(event: 'dialog', listener: (dialog: Dialog) => any): this;
1640 | 
1641 |   /**
1642 |    * Removes an event listener added by `on` or `addListener`.
1643 |    */
1644 |   off(event: 'domcontentloaded', listener: (page: Page) => any): this;
1645 | 
1646 |   /**
1647 |    * Removes an event listener added by `on` or `addListener`.
1648 |    */
1649 |   off(event: 'download', listener: (download: Download) => any): this;
1650 | 
1651 |   /**
1652 |    * Removes an event listener added by `on` or `addListener`.
1653 |    */
1654 |   off(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1655 | 
1656 |   /**
1657 |    * Removes an event listener added by `on` or `addListener`.
1658 |    */
1659 |   off(event: 'frameattached', listener: (frame: Frame) => any): this;
1660 | 
1661 |   /**
1662 |    * Removes an event listener added by `on` or `addListener`.
1663 |    */
1664 |   off(event: 'framedetached', listener: (frame: Frame) => any): this;
1665 | 
1666 |   /**
1667 |    * Removes an event listener added by `on` or `addListener`.
1668 |    */
1669 |   off(event: 'framenavigated', listener: (frame: Frame) => any): this;
1670 | 
1671 |   /**
1672 |    * Removes an event listener added by `on` or `addListener`.
1673 |    */
1674 |   off(event: 'load', listener: (page: Page) => any): this;
1675 | 
1676 |   /**
1677 |    * Removes an event listener added by `on` or `addListener`.
1678 |    */
1679 |   off(event: 'pageerror', listener: (error: Error) => any): this;
1680 | 
1681 |   /**
1682 |    * Removes an event listener added by `on` or `addListener`.
1683 |    */
1684 |   off(event: 'popup', listener: (page: Page) => any): this;
1685 | 
1686 |   /**
1687 |    * Removes an event listener added by `on` or `addListener`.
1688 |    */
1689 |   off(event: 'request', listener: (request: Request) => any): this;
1690 | 
1691 |   /**
1692 |    * Removes an event listener added by `on` or `addListener`.
1693 |    */
1694 |   off(event: 'requestfailed', listener: (request: Request) => any): this;
1695 | 
1696 |   /**
1697 |    * Removes an event listener added by `on` or `addListener`.
1698 |    */
1699 |   off(event: 'requestfinished', listener: (request: Request) => any): this;
1700 | 
1701 |   /**
1702 |    * Removes an event listener added by `on` or `addListener`.
1703 |    */
1704 |   off(event: 'response', listener: (response: Response) => any): this;
1705 | 
1706 |   /**
1707 |    * Removes an event listener added by `on` or `addListener`.
1708 |    */
1709 |   off(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1710 | 
1711 |   /**
1712 |    * Removes an event listener added by `on` or `addListener`.
1713 |    */
1714 |   off(event: 'worker', listener: (worker: Worker) => any): this;
1715 | 
1716 |   /**
1717 |    * Emitted when the page closes.
1718 |    */
1719 |   prependListener(event: 'close', listener: (page: Page) => any): this;
1720 | 
1721 |   /**
1722 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1723 |    *
1724 |    * The arguments passed into `console.log` are available on the
1725 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1726 |    *
1727 |    * **Usage**
1728 |    *
1729 |    * ```js
1730 |    * page.on('console', async msg => {
1731 |    *   const values = [];
1732 |    *   for (const arg of msg.args())
1733 |    *     values.push(await arg.jsonValue());
1734 |    *   console.log(...values);
1735 |    * });
1736 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1737 |    * ```
1738 |    *
1739 |    */
1740 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1741 | 
1742 |   /**
1743 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1744 |    * crashes, ongoing and subsequent operations will throw.
1745 |    *
1746 |    * The most common way to deal with crashes is to catch an exception:
1747 |    *
1748 |    * ```js
1749 |    * try {
1750 |    *   // Crash might happen during a click.
1751 |    *   await page.click('button');
1752 |    *   // Or while waiting for an event.
1753 |    *   await page.waitForEvent('popup');
1754 |    * } catch (e) {
1755 |    *   // When the page crashes, exception message contains 'crash'.
1756 |    * }
1757 |    * ```
1758 |    *
1759 |    */
1760 |   prependListener(event: 'crash', listener: (page: Page) => any): this;
1761 | 
1762 |   /**
1763 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1764 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1765 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1766 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1767 |    * dialog, and actions like click will never finish.
1768 |    *
1769 |    * **Usage**
1770 |    *
1771 |    * ```js
1772 |    * page.on('dialog', dialog => dialog.accept());
1773 |    * ```
1774 |    *
1775 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1776 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1777 |    * listeners are present, all dialogs are automatically dismissed.
1778 |    *
1779 |    */
1780 |   prependListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1781 | 
1782 |   /**
1783 |    * Emitted when the JavaScript
1784 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1785 |    */
1786 |   prependListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1787 | 
1788 |   /**
1789 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1790 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1791 |    */
1792 |   prependListener(event: 'download', listener: (download: Download) => any): this;
1793 | 
1794 |   /**
1795 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1796 |    * respond to it via setting the input files using
1797 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1798 |    * that can be uploaded after that.
1799 |    *
1800 |    * ```js
1801 |    * page.on('filechooser', async fileChooser => {
1802 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1803 |    * });
1804 |    * ```
1805 |    *
1806 |    */
1807 |   prependListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1808 | 
1809 |   /**
1810 |    * Emitted when a frame is attached.
1811 |    */
1812 |   prependListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1813 | 
1814 |   /**
1815 |    * Emitted when a frame is detached.
1816 |    */
1817 |   prependListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1818 | 
1819 |   /**
1820 |    * Emitted when a frame is navigated to a new url.
1821 |    */
1822 |   prependListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1823 | 
1824 |   /**
1825 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1826 |    */
1827 |   prependListener(event: 'load', listener: (page: Page) => any): this;
1828 | 
1829 |   /**
1830 |    * Emitted when an uncaught exception happens within the page.
1831 |    *
1832 |    * ```js
1833 |    * // Log all uncaught errors to the terminal
1834 |    * page.on('pageerror', exception => {
1835 |    *   console.log(`Uncaught exception: "${exception}"`);
1836 |    * });
1837 |    *
1838 |    * // Navigate to a page with an exception.
1839 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1840 |    * ```
1841 |    *
1842 |    */
1843 |   prependListener(event: 'pageerror', listener: (error: Error) => any): this;
1844 | 
1845 |   /**
1846 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1847 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1848 |    * only for popups relevant to this page.
1849 |    *
1850 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1851 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1852 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1853 |    * to this network request, use
1854 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1855 |    * and
1856 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1857 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1858 |    *
1859 |    * ```js
1860 |    * // Start waiting for popup before clicking. Note no await.
1861 |    * const popupPromise = page.waitForEvent('popup');
1862 |    * await page.getByText('open the popup').click();
1863 |    * const popup = await popupPromise;
1864 |    * console.log(await popup.evaluate('location.href'));
1865 |    * ```
1866 |    *
1867 |    * **NOTE** Use
1868 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1869 |    * wait until the page gets to a particular state (you should not need it in most cases).
1870 |    *
1871 |    */
1872 |   prependListener(event: 'popup', listener: (page: Page) => any): this;
1873 | 
1874 |   /**
1875 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1876 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1877 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1878 |    */
1879 |   prependListener(event: 'request', listener: (request: Request) => any): this;
1880 | 
1881 |   /**
1882 |    * Emitted when a request fails, for example by timing out.
1883 |    *
1884 |    * ```js
1885 |    * page.on('requestfailed', request => {
1886 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1887 |    * });
1888 |    * ```
1889 |    *
1890 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1891 |    * will complete with
1892 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1893 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1894 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1895 |    * error net::ERR_FAILED.
1896 |    *
1897 |    */
1898 |   prependListener(event: 'requestfailed', listener: (request: Request) => any): this;
1899 | 
1900 |   /**
1901 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1902 |    * sequence of events is `request`, `response` and `requestfinished`.
1903 |    */
1904 |   prependListener(event: 'requestfinished', listener: (request: Request) => any): this;
1905 | 
1906 |   /**
1907 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1908 |    * events is `request`, `response` and `requestfinished`.
1909 |    */
1910 |   prependListener(event: 'response', listener: (response: Response) => any): this;
1911 | 
1912 |   /**
1913 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1914 |    */
1915 |   prependListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1916 | 
1917 |   /**
1918 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1919 |    * by the page.
1920 |    */
1921 |   prependListener(event: 'worker', listener: (worker: Worker) => any): this;
1922 | 
1923 |   /**
1924 |    * When testing a web page, sometimes unexpected overlays like a "Sign up" dialog appear and block actions you want to
1925 |    * automate, e.g. clicking a button. These overlays don't always show up in the same way or at the same time, making
1926 |    * them tricky to handle in automated tests.
1927 |    *
1928 |    * This method lets you set up a special function, called a handler, that activates when it detects that overlay is
1929 |    * visible. The handler's job is to remove the overlay, allowing your test to continue as if the overlay wasn't there.
1930 |    *
1931 |    * Things to keep in mind:
1932 |    * - When an overlay is shown predictably, we recommend explicitly waiting for it in your test and dismissing it as
1933 |    *   a part of your normal test flow, instead of using
1934 |    *   [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler).
1935 |    * - Playwright checks for the overlay every time before executing or retrying an action that requires an
1936 |    *   [actionability check](https://playwright.dev/docs/actionability), or before performing an auto-waiting assertion check. When overlay
1937 |    *   is visible, Playwright calls the handler first, and then proceeds with the action/assertion. Note that the
1938 |    *   handler is only called when you perform an action/assertion - if the overlay becomes visible but you don't
1939 |    *   perform any actions, the handler will not be triggered.
1940 |    * - After executing the handler, Playwright will ensure that overlay that triggered the handler is not visible
1941 |    *   anymore. You can opt-out of this behavior with
1942 |    *   [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after).
1943 |    * - The execution time of the handler counts towards the timeout of the action/assertion that executed the handler.
1944 |    *   If your handler takes too long, it might cause timeouts.
1945 |    * - You can register multiple handlers. However, only a single handler will be running at a time. Make sure the
1946 |    *   actions within a handler don't depend on another handler.
1947 |    *
1948 |    * **NOTE** Running the handler will alter your page state mid-test. For example it will change the currently focused
1949 |    * element and move the mouse. Make sure that actions that run after the handler are self-contained and do not rely on
1950 |    * the focus and mouse state being unchanged.
1951 |    *
1952 |    * For example, consider a test that calls
1953 |    * [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) followed by
1954 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press). If your handler
1955 |    * clicks a button between these two actions, the focused element most likely will be wrong, and key press will happen
1956 |    * on the unexpected element. Use
1957 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press) instead to avoid this
1958 |    * problem.
1959 |    *
1960 |    * Another example is a series of mouse actions, where
1961 |    * [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move) is followed by
1962 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down). Again, when the handler runs
1963 |    * between these two actions, the mouse position will be wrong during the mouse down. Prefer self-contained actions
1964 |    * like [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) that do not rely on
1965 |    * the state being unchanged by a handler.
1966 |    *
1967 |    * **Usage**
1968 |    *
1969 |    * An example that closes a "Sign up to the newsletter" dialog when it appears:
1970 |    *
1971 |    * ```js
1972 |    * // Setup the handler.
1973 |    * await page.addLocatorHandler(page.getByText('Sign up to the newsletter'), async () => {
1974 |    *   await page.getByRole('button', { name: 'No thanks' }).click();
1975 |    * });
1976 |    *
1977 |    * // Write the test as usual.
1978 |    * await page.goto('https://example.com');
1979 |    * await page.getByRole('button', { name: 'Start here' }).click();
1980 |    * ```
1981 |    *
1982 |    * An example that skips the "Confirm your security details" page when it is shown:
1983 |    *
1984 |    * ```js
1985 |    * // Setup the handler.
1986 |    * await page.addLocatorHandler(page.getByText('Confirm your security details'), async () => {
1987 |    *   await page.getByRole('button', { name: 'Remind me later' }).click();
1988 |    * });
1989 |    *
1990 |    * // Write the test as usual.
1991 |    * await page.goto('https://example.com');
1992 |    * await page.getByRole('button', { name: 'Start here' }).click();
1993 |    * ```
1994 |    *
1995 |    * An example with a custom callback on every actionability check. It uses a `<body>` locator that is always visible,
1996 |    * so the handler is called before every actionability check. It is important to specify
1997 |    * [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after), because
1998 |    * the handler does not hide the `<body>` element.
1999 |    *
2000 |    * ```js
2001 |    * // Setup the handler.
2002 |    * await page.addLocatorHandler(page.locator('body'), async () => {
2003 |    *   await page.evaluate(() => window.removeObstructionsForTestIfNeeded());
2004 |    * }, { noWaitAfter: true });
2005 |    *
2006 |    * // Write the test as usual.
2007 |    * await page.goto('https://example.com');
2008 |    * await page.getByRole('button', { name: 'Start here' }).click();
2009 |    * ```
2010 |    *
2011 |    * Handler takes the original locator as an argument. You can also automatically remove the handler after a number of
2012 |    * invocations by setting [`times`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-times):
2013 |    *
2014 |    * ```js
2015 |    * await page.addLocatorHandler(page.getByLabel('Close'), async locator => {
2016 |    *   await locator.click();
2017 |    * }, { times: 1 });
2018 |    * ```
2019 |    *
2020 |    * @param locator Locator that triggers the handler.
2021 |    * @param handler Function that should be run once
2022 |    * [`locator`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-locator) appears. This
2023 |    * function should get rid of the element that blocks actions like click.
2024 |    * @param options
2025 |    */
2026 |   addLocatorHandler(locator: Locator, handler: ((locator: Locator) => Promise<any>), options?: {
2027 |     /**
2028 |      * By default, after calling the handler Playwright will wait until the overlay becomes hidden, and only then
2029 |      * Playwright will continue with the action/assertion that triggered the handler. This option allows to opt-out of
2030 |      * this behavior, so that overlay can stay visible after the handler has run.
2031 |      */
2032 |     noWaitAfter?: boolean;
2033 | 
2034 |     /**
2035 |      * Specifies the maximum number of times this handler should be called. Unlimited by default.
2036 |      */
2037 |     times?: number;
2038 |   }): Promise<void>;
2039 | 
2040 |   /**
2041 |    * Adds a `<script>` tag into the page with the desired url or content. Returns the added tag when the script's onload
2042 |    * fires or when the script content was injected into frame.
2043 |    * @param options
2044 |    */
2045 |   addScriptTag(options?: {
2046 |     /**
2047 |      * Raw JavaScript content to be injected into frame.
2048 |      */
2049 |     content?: string;
2050 | 
2051 |     /**
2052 |      * Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
2053 |      * to the current working directory.
2054 |      */
2055 |     path?: string;
2056 | 
2057 |     /**
2058 |      * Script type. Use 'module' in order to load a JavaScript ES6 module. See
2059 |      * [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
2060 |      */
2061 |     type?: string;
2062 | 
2063 |     /**
2064 |      * URL of a script to be added.
2065 |      */
2066 |     url?: string;
2067 |   }): Promise<ElementHandle>;
2068 | 
2069 |   /**
2070 |    * Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
2071 |    * content. Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
2072 |    * @param options
2073 |    */
2074 |   addStyleTag(options?: {
2075 |     /**
2076 |      * Raw CSS content to be injected into frame.
2077 |      */
2078 |     content?: string;
2079 | 
2080 |     /**
2081 |      * Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
2082 |      * current working directory.
2083 |      */
2084 |     path?: string;
2085 | 
2086 |     /**
2087 |      * URL of the `<link>` tag.
2088 |      */
2089 |     url?: string;
2090 |   }): Promise<ElementHandle>;
2091 | 
2092 |   /**
2093 |    * Brings page to front (activates tab).
2094 |    */
2095 |   bringToFront(): Promise<void>;
2096 | 
2097 |   /**
2098 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
2099 |    * Read more about [locators](https://playwright.dev/docs/locators).
2100 |    *
2101 |    * This method checks an element matching
2102 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector) by performing the following
2103 |    * steps:
2104 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector).
2105 |    *    If there is none, wait until a matching element is attached to the DOM.
2106 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
2107 |    *    already checked, this method returns immediately.
2108 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2109 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-check-option-force) option is set. If the element
2110 |    *    is detached during the checks, the whole action is retried.
2111 |    * 1. Scroll the element into view if needed.
2112 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
2113 |    *    element.
2114 |    * 1. Ensure that the element is now checked. If not, this method throws.
2115 |    *
2116 |    * When all steps combined have not finished during the specified
2117 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-check-option-timeout), this method throws a
2118 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2119 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2120 |    * used.
2121 |    * @param options
2122 |    */
2123 |   check(selector: string, options?: {
2124 |     /**
2125 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2126 |      */
2127 |     force?: boolean;
2128 | 
2129 |     /**
2130 |      * This option has no effect.
2131 |      * @deprecated This option has no effect.
2132 |      */
2133 |     noWaitAfter?: boolean;
2134 | 
2135 |     /**
2136 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2137 |      * the element.
2138 |      */
2139 |     position?: {
2140 |       x: number;
2141 | 
2142 |       y: number;
2143 |     };
2144 | 
2145 |     /**
2146 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2147 |      * element, the call throws an exception.
2148 |      */
2149 |     strict?: boolean;
2150 | 
2151 |     /**
2152 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2153 |      * option in the config, or by using the
2154 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2155 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2156 |      */
2157 |     timeout?: number;
2158 | 
2159 |     /**
2160 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2161 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
2162 |      */
2163 |     trial?: boolean;
2164 |   }): Promise<void>;
2165 | 
2166 |   /**
2167 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
2168 |    * Read more about [locators](https://playwright.dev/docs/locators).
2169 |    *
2170 |    * This method clicks an element matching
2171 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector) by performing the following
2172 |    * steps:
2173 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector).
2174 |    *    If there is none, wait until a matching element is attached to the DOM.
2175 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2176 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-click-option-force) option is set. If the element
2177 |    *    is detached during the checks, the whole action is retried.
2178 |    * 1. Scroll the element into view if needed.
2179 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
2180 |    *    element, or the specified
2181 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-click-option-position).
2182 |    * 1. Wait for initiated navigations to either succeed or fail, unless
2183 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-click-option-no-wait-after) option is set.
2184 |    *
2185 |    * When all steps combined have not finished during the specified
2186 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-click-option-timeout), this method throws a
2187 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2188 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2189 |    * used.
2190 |    * @param options
2191 |    */
2192 |   click(selector: string, options?: {
2193 |     /**
2194 |      * Defaults to `left`.
2195 |      */
2196 |     button?: "left"|"right"|"middle";
2197 | 
2198 |     /**
2199 |      * defaults to 1. See [UIEvent.detail].
2200 |      */
2201 |     clickCount?: number;
2202 | 
2203 |     /**
2204 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
2205 |      */
2206 |     delay?: number;
2207 | 
2208 |     /**
2209 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2210 |      */
2211 |     force?: boolean;
2212 | 
2213 |     /**
2214 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
2215 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
2216 |      * "Control" on Windows and Linux and to "Meta" on macOS.
2217 |      */
2218 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
2219 | 
2220 |     /**
2221 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
2222 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
2223 |      * navigating to inaccessible pages. Defaults to `false`.
2224 |      * @deprecated This option will default to `true` in the future.
2225 |      */
2226 |     noWaitAfter?: boolean;
2227 | 
2228 |     /**
2229 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2230 |      * the element.
2231 |      */
2232 |     position?: {
2233 |       x: number;
2234 | 
2235 |       y: number;
2236 |     };
2237 | 
2238 |     /**
2239 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2240 |      * element, the call throws an exception.
2241 |      */
2242 |     strict?: boolean;
2243 | 
2244 |     /**
2245 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2246 |      * option in the config, or by using the
2247 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2248 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2249 |      */
2250 |     timeout?: number;
2251 | 
2252 |     /**
2253 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2254 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
2255 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
2256 |      * are pressed.
2257 |      */
2258 |     trial?: boolean;
2259 |   }): Promise<void>;
2260 | 
2261 |   /**
2262 |    * If [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `false`,
2263 |    * does not run any unload handlers and waits for the page to be closed. If
2264 |    * [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `true` the
2265 |    * method will run unload handlers, but will **not** wait for the page to close.
2266 |    *
2267 |    * By default, `page.close()` **does not** run `beforeunload` handlers.
2268 |    *
2269 |    * **NOTE** if [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is
2270 |    * passed as true, a `beforeunload` dialog might be summoned and should be handled manually via
2271 |    * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
2272 |    *
2273 |    * @param options
2274 |    */
2275 |   close(options?: {
2276 |     /**
2277 |      * The reason to be reported to the operations interrupted by the page closure.
2278 |      */
2279 |     reason?: string;
2280 | 
2281 |     /**
2282 |      * Defaults to `false`. Whether to run the
2283 |      * [before unload](https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload) page handlers.
2284 |      */
2285 |     runBeforeUnload?: boolean;
2286 |   }): Promise<void>;
2287 | 
2288 |   /**
2289 |    * Gets the full HTML contents of the page, including the doctype.
2290 |    */
2291 |   content(): Promise<string>;
2292 | 
2293 |   /**
2294 |    * Get the browser context that the page belongs to.
2295 |    */
2296 |   context(): BrowserContext;
2297 | 
2298 |   /**
2299 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
2300 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2301 |    *
2302 |    * This method double clicks an element matching
2303 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector) by performing the following
2304 |    * steps:
2305 |    * 1. Find an element matching
2306 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector). If there is none,
2307 |    *    wait until a matching element is attached to the DOM.
2308 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2309 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-dblclick-option-force) option is set. If the
2310 |    *    element is detached during the checks, the whole action is retried.
2311 |    * 1. Scroll the element into view if needed.
2312 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
2313 |    *    element, or the specified
2314 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-dblclick-option-position).
2315 |    *
2316 |    * When all steps combined have not finished during the specified
2317 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-dblclick-option-timeout), this method throws a
2318 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2319 |    *
2320 |    * **NOTE** `page.dblclick()` dispatches two `click` events and a single `dblclick` event.
2321 |    *
2322 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2323 |    * used.
2324 |    * @param options
2325 |    */
2326 |   dblclick(selector: string, options?: {
2327 |     /**
2328 |      * Defaults to `left`.
2329 |      */
2330 |     button?: "left"|"right"|"middle";
2331 | 
2332 |     /**
2333 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
2334 |      */
2335 |     delay?: number;
2336 | 
2337 |     /**
2338 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2339 |      */
2340 |     force?: boolean;
2341 | 
2342 |     /**
2343 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
2344 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
2345 |      * "Control" on Windows and Linux and to "Meta" on macOS.
2346 |      */
2347 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
2348 | 
2349 |     /**
2350 |      * This option has no effect.
2351 |      * @deprecated This option has no effect.
2352 |      */
2353 |     noWaitAfter?: boolean;
2354 | 
2355 |     /**
2356 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2357 |      * the element.
2358 |      */
2359 |     position?: {
2360 |       x: number;
2361 | 
2362 |       y: number;
2363 |     };
2364 | 
2365 |     /**
2366 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2367 |      * element, the call throws an exception.
2368 |      */
2369 |     strict?: boolean;
2370 | 
2371 |     /**
2372 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2373 |      * option in the config, or by using the
2374 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2375 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2376 |      */
2377 |     timeout?: number;
2378 | 
2379 |     /**
2380 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2381 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
2382 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
2383 |      * are pressed.
2384 |      */
2385 |     trial?: boolean;
2386 |   }): Promise<void>;
2387 | 
2388 |   /**
2389 |    * **NOTE** Use locator-based
2390 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
2391 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2392 |    *
2393 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
2394 |    * `click` is dispatched. This is equivalent to calling
2395 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
2396 |    *
2397 |    * **Usage**
2398 |    *
2399 |    * ```js
2400 |    * await page.dispatchEvent('button#submit', 'click');
2401 |    * ```
2402 |    *
2403 |    * Under the hood, it creates an instance of an event based on the given
2404 |    * [`type`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-type), initializes it with
2405 |    * [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) properties and
2406 |    * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
2407 |    *
2408 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) is
2409 |    * event-specific, please refer to the events documentation for the lists of initial properties:
2410 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
2411 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
2412 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
2413 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
2414 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
2415 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
2416 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
2417 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
2418 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
2419 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
2420 |    *
2421 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
2422 |    *
2423 |    * ```js
2424 |    * // Note you can only create DataTransfer in Chromium and Firefox
2425 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
2426 |    * await page.dispatchEvent('#source', 'dragstart', { dataTransfer });
2427 |    * ```
2428 |    *
2429 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2430 |    * used.
2431 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
2432 |    * @param eventInit Optional event-specific initialization properties.
2433 |    * @param options
2434 |    */
2435 |   dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
2436 |     /**
2437 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2438 |      * element, the call throws an exception.
2439 |      */
2440 |     strict?: boolean;
2441 | 
2442 |     /**
2443 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2444 |      * option in the config, or by using the
2445 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2446 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2447 |      */
2448 |     timeout?: number;
2449 |   }): Promise<void>;
2450 | 
2451 |   /**
2452 |    * This method drags the source element to the target element. It will first move to the source element, perform a
2453 |    * `mousedown`, then move to the target element and perform a `mouseup`.
2454 |    *
2455 |    * **Usage**
2456 |    *
2457 |    * ```js
2458 |    * await page.dragAndDrop('#source', '#target');
2459 |    * // or specify exact positions relative to the top-left corners of the elements:
2460 |    * await page.dragAndDrop('#source', '#target', {
2461 |    *   sourcePosition: { x: 34, y: 7 },
2462 |    *   targetPosition: { x: 10, y: 20 },
2463 |    * });
2464 |    * ```
2465 |    *
2466 |    * @param source A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
2467 |    * be used.
2468 |    * @param target A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
2469 |    * will be used.
2470 |    * @param options
2471 |    */
2472 |   dragAndDrop(source: string, target: string, options?: {
2473 |     /**
2474 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2475 |      */
2476 |     force?: boolean;
2477 | 
2478 |     /**
2479 |      * This option has no effect.
2480 |      * @deprecated This option has no effect.
2481 |      */
2482 |     noWaitAfter?: boolean;
2483 | 
2484 |     /**
2485 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
2486 |      * specified, some visible point of the element is used.
2487 |      */
2488 |     sourcePosition?: {
2489 |       x: number;
2490 | 
2491 |       y: number;
2492 |     };
2493 | 
2494 |     /**
2495 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2496 |      * element, the call throws an exception.
2497 |      */
2498 |     strict?: boolean;
2499 | 
2500 |     /**
2501 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
2502 |      * specified, some visible point of the element is used.
2503 |      */
2504 |     targetPosition?: {
2505 |       x: number;
2506 | 
2507 |       y: number;
2508 |     };
2509 | 
2510 |     /**
2511 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2512 |      * option in the config, or by using the
2513 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2514 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2515 |      */
2516 |     timeout?: number;
2517 | 
2518 |     /**
2519 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2520 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
2521 |      */
2522 |     trial?: boolean;
2523 |   }): Promise<void>;
2524 | 
2525 |   /**
2526 |    * This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
2527 |    * feature, using the `colorScheme` argument.
2528 |    *
2529 |    * **Usage**
2530 |    *
2531 |    * ```js
2532 |    * await page.evaluate(() => matchMedia('screen').matches);
2533 |    * // → true
2534 |    * await page.evaluate(() => matchMedia('print').matches);
2535 |    * // → false
2536 |    *
2537 |    * await page.emulateMedia({ media: 'print' });
2538 |    * await page.evaluate(() => matchMedia('screen').matches);
2539 |    * // → false
2540 |    * await page.evaluate(() => matchMedia('print').matches);
2541 |    * // → true
2542 |    *
2543 |    * await page.emulateMedia({});
2544 |    * await page.evaluate(() => matchMedia('screen').matches);
2545 |    * // → true
2546 |    * await page.evaluate(() => matchMedia('print').matches);
2547 |    * // → false
2548 |    * ```
2549 |    *
2550 |    * ```js
2551 |    * await page.emulateMedia({ colorScheme: 'dark' });
2552 |    * await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
2553 |    * // → true
2554 |    * await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
2555 |    * // → false
2556 |    * ```
2557 |    *
2558 |    * @param options
2559 |    */
2560 |   emulateMedia(options?: {
2561 |     /**
2562 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
2563 |      * media feature, supported values are `'light'` and `'dark'`. Passing `null` disables color scheme emulation.
2564 |      * `'no-preference'` is deprecated.
2565 |      */
2566 |     colorScheme?: null|"light"|"dark"|"no-preference";
2567 | 
2568 |     /**
2569 |      * Emulates `'forced-colors'` media feature, supported values are `'active'` and `'none'`. Passing `null` disables
2570 |      * forced colors emulation.
2571 |      */
2572 |     forcedColors?: null|"active"|"none";
2573 | 
2574 |     /**
2575 |      * Changes the CSS media type of the page. The only allowed values are `'screen'`, `'print'` and `null`. Passing
2576 |      * `null` disables CSS media emulation.
2577 |      */
2578 |     media?: null|"screen"|"print";
2579 | 
2580 |     /**
2581 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. Passing
2582 |      * `null` disables reduced motion emulation.
2583 |      */
2584 |     reducedMotion?: null|"reduce"|"no-preference";
2585 |   }): Promise<void>;
2586 | 
2587 |   /**
2588 |    * The method adds a function called
2589 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-function-option-name) on the `window` object of
2590 |    * every frame in the page. When called, the function executes
2591 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) and returns a
2592 |    * [Promise] which resolves to the return value of
2593 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback).
2594 |    *
2595 |    * If the [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) returns a
2596 |    * [Promise], it will be awaited.
2597 |    *
2598 |    * See
2599 |    * [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function)
2600 |    * for context-wide exposed function.
2601 |    *
2602 |    * **NOTE** Functions installed via
2603 |    * [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) survive
2604 |    * navigations.
2605 |    *
2606 |    * **Usage**
2607 |    *
2608 |    * An example of adding a `sha256` function to the page:
2609 |    *
2610 |    * ```js
2611 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
2612 |    * const crypto = require('crypto');
2613 |    *
2614 |    * (async () => {
2615 |    *   const browser = await webkit.launch({ headless: false });
2616 |    *   const page = await browser.newPage();
2617 |    *   await page.exposeFunction('sha256', text =>
2618 |    *     crypto.createHash('sha256').update(text).digest('hex'),
2619 |    *   );
2620 |    *   await page.setContent(`
2621 |    *     <script>
2622 |    *       async function onClick() {
2623 |    *         document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
2624 |    *       }
2625 |    *     </script>
2626 |    *     <button onclick="onClick()">Click me</button>
2627 |    *     <div></div>
2628 |    *   `);
2629 |    *   await page.click('button');
2630 |    * })();
2631 |    * ```
2632 |    *
2633 |    * @param name Name of the function on the window object
2634 |    * @param callback Callback function which will be called in Playwright's context.
2635 |    */
2636 |   exposeFunction(name: string, callback: Function): Promise<void>;
2637 | 
2638 |   /**
2639 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
2640 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2641 |    *
2642 |    * This method waits for an element matching
2643 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-fill-option-selector), waits for
2644 |    * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
2645 |    * filling. Note that you can pass an empty string to clear the input field.
2646 |    *
2647 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
2648 |    * error. However, if the element is inside the `<label>` element that has an associated
2649 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
2650 |    * instead.
2651 |    *
2652 |    * To send fine-grained keyboard events, use
2653 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
2654 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2655 |    * used.
2656 |    * @param value Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
2657 |    * @param options
2658 |    */
2659 |   fill(selector: string, value: string, options?: {
2660 |     /**
2661 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2662 |      */
2663 |     force?: boolean;
2664 | 
2665 |     /**
2666 |      * This option has no effect.
2667 |      * @deprecated This option has no effect.
2668 |      */
2669 |     noWaitAfter?: boolean;
2670 | 
2671 |     /**
2672 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2673 |      * element, the call throws an exception.
2674 |      */
2675 |     strict?: boolean;
2676 | 
2677 |     /**
2678 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2679 |      * option in the config, or by using the
2680 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2681 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2682 |      */
2683 |     timeout?: number;
2684 |   }): Promise<void>;
2685 | 
2686 |   /**
2687 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
2688 |    * Read more about [locators](https://playwright.dev/docs/locators).
2689 |    *
2690 |    * This method fetches an element with
2691 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector) and focuses it. If there's no
2692 |    * element matching [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector), the method
2693 |    * waits until a matching element appears in the DOM.
2694 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2695 |    * used.
2696 |    * @param options
2697 |    */
2698 |   focus(selector: string, options?: {
2699 |     /**
2700 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2701 |      * element, the call throws an exception.
2702 |      */
2703 |     strict?: boolean;
2704 | 
2705 |     /**
2706 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2707 |      * option in the config, or by using the
2708 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2709 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2710 |      */
2711 |     timeout?: number;
2712 |   }): Promise<void>;
2713 | 
2714 |   /**
2715 |    * Returns frame matching the specified criteria. Either `name` or `url` must be specified.
2716 |    *
2717 |    * **Usage**
2718 |    *
2719 |    * ```js
2720 |    * const frame = page.frame('frame-name');
2721 |    * ```
2722 |    *
2723 |    * ```js
2724 |    * const frame = page.frame({ url: /.*domain.*\/ });
2725 |    * ```
2726 |    *
2727 |    * @param frameSelector Frame name or other frame lookup options.
2728 |    */
2729 |   frame(frameSelector: string|{
2730 |     /**
2731 |      * Frame name specified in the `iframe`'s `name` attribute. Optional.
2732 |      */
2733 |     name?: string;
2734 | 
2735 |     /**
2736 |      * A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object. Optional.
2737 |      */
2738 |     url?: string|RegExp|((url: URL) => boolean);
2739 |   }): null|Frame;
2740 | 
2741 |   /**
2742 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
2743 |    * in that iframe.
2744 |    *
2745 |    * **Usage**
2746 |    *
2747 |    * Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
2748 |    * id="my-frame">`:
2749 |    *
2750 |    * ```js
2751 |    * const locator = page.frameLocator('#my-iframe').getByText('Submit');
2752 |    * await locator.click();
2753 |    * ```
2754 |    *
2755 |    * @param selector A selector to use when resolving DOM element.
2756 |    */
2757 |   frameLocator(selector: string): FrameLocator;
2758 | 
2759 |   /**
2760 |    * An array of all frames attached to the page.
2761 |    */
2762 |   frames(): Array<Frame>;
2763 | 
2764 |   /**
2765 |    * **NOTE** Use locator-based
2766 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
2767 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2768 |    *
2769 |    * Returns element attribute value.
2770 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2771 |    * used.
2772 |    * @param name Attribute name to get the value for.
2773 |    * @param options
2774 |    */
2775 |   getAttribute(selector: string, name: string, options?: {
2776 |     /**
2777 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2778 |      * element, the call throws an exception.
2779 |      */
2780 |     strict?: boolean;
2781 | 
2782 |     /**
2783 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2784 |      * option in the config, or by using the
2785 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2786 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2787 |      */
2788 |     timeout?: number;
2789 |   }): Promise<null|string>;
2790 | 
2791 |   /**
2792 |    * Allows locating elements by their alt text.
2793 |    *
2794 |    * **Usage**
2795 |    *
2796 |    * For example, this method will find the image by alt text "Playwright logo":
2797 |    *
2798 |    * ```html
2799 |    * <img alt='Playwright logo'>
2800 |    * ```
2801 |    *
2802 |    * ```js
2803 |    * await page.getByAltText('Playwright logo').click();
2804 |    * ```
2805 |    *
2806 |    * @param text Text to locate the element for.
2807 |    * @param options
2808 |    */
2809 |   getByAltText(text: string|RegExp, options?: {
2810 |     /**
2811 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2812 |      * regular expression. Note that exact match still trims whitespace.
2813 |      */
2814 |     exact?: boolean;
2815 |   }): Locator;
2816 | 
2817 |   /**
2818 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
2819 |    * `aria-label` attribute.
2820 |    *
2821 |    * **Usage**
2822 |    *
2823 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
2824 |    *
2825 |    * ```html
2826 |    * <input aria-label="Username">
2827 |    * <label for="password-input">Password:</label>
2828 |    * <input id="password-input">
2829 |    * ```
2830 |    *
2831 |    * ```js
2832 |    * await page.getByLabel('Username').fill('john');
2833 |    * await page.getByLabel('Password').fill('secret');
2834 |    * ```
2835 |    *
2836 |    * @param text Text to locate the element for.
2837 |    * @param options
2838 |    */
2839 |   getByLabel(text: string|RegExp, options?: {
2840 |     /**
2841 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2842 |      * regular expression. Note that exact match still trims whitespace.
2843 |      */
2844 |     exact?: boolean;
2845 |   }): Locator;
2846 | 
2847 |   /**
2848 |    * Allows locating input elements by the placeholder text.
2849 |    *
2850 |    * **Usage**
2851 |    *
2852 |    * For example, consider the following DOM structure.
2853 |    *
2854 |    * ```html
2855 |    * <input type="email" placeholder="name@example.com" />
2856 |    * ```
2857 |    *
2858 |    * You can fill the input after locating it by the placeholder text:
2859 |    *
2860 |    * ```js
2861 |    * await page
2862 |    *     .getByPlaceholder('name@example.com')
2863 |    *     .fill('playwright@microsoft.com');
2864 |    * ```
2865 |    *
2866 |    * @param text Text to locate the element for.
2867 |    * @param options
2868 |    */
2869 |   getByPlaceholder(text: string|RegExp, options?: {
2870 |     /**
2871 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2872 |      * regular expression. Note that exact match still trims whitespace.
2873 |      */
2874 |     exact?: boolean;
2875 |   }): Locator;
2876 | 
2877 |   /**
2878 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
2879 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
2880 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
2881 |    *
2882 |    * **Usage**
2883 |    *
2884 |    * Consider the following DOM structure.
2885 |    *
2886 |    * ```html
2887 |    * <h3>Sign up</h3>
2888 |    * <label>
2889 |    *   <input type="checkbox" /> Subscribe
2890 |    * </label>
2891 |    * <br/>
2892 |    * <button>Submit</button>
2893 |    * ```
2894 |    *
2895 |    * You can locate each element by it's implicit role:
2896 |    *
2897 |    * ```js
2898 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
2899 |    *
2900 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
2901 |    *
2902 |    * await page.getByRole('button', { name: /submit/i }).click();
2903 |    * ```
2904 |    *
2905 |    * **Details**
2906 |    *
2907 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
2908 |    * about the ARIA guidelines.
2909 |    *
2910 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
2911 |    * that is recognized by the role selector. You can find all the
2912 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
2913 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
2914 |    * @param role Required aria role.
2915 |    * @param options
2916 |    */
2917 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
2918 |     /**
2919 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
2920 |      *
2921 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
2922 |      */
2923 |     checked?: boolean;
2924 | 
2925 |     /**
2926 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
2927 |      *
2928 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
2929 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
2930 |      *
2931 |      */
2932 |     disabled?: boolean;
2933 | 
2934 |     /**
2935 |      * Whether [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is matched exactly:
2936 |      * case-sensitive and whole-string. Defaults to false. Ignored when
2937 |      * [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is a regular expression. Note
2938 |      * that exact match still trims whitespace.
2939 |      */
2940 |     exact?: boolean;
2941 | 
2942 |     /**
2943 |      * An attribute that is usually set by `aria-expanded`.
2944 |      *
2945 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
2946 |      */
2947 |     expanded?: boolean;
2948 | 
2949 |     /**
2950 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
2951 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
2952 |      *
2953 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
2954 |      */
2955 |     includeHidden?: boolean;
2956 | 
2957 |     /**
2958 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
2959 |      * for `<h1>-<h6>` elements.
2960 |      *
2961 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
2962 |      */
2963 |     level?: number;
2964 | 
2965 |     /**
2966 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
2967 |      * case-insensitive and searches for a substring, use
2968 |      * [`exact`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-exact) to control this behavior.
2969 |      *
2970 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
2971 |      */
2972 |     name?: string|RegExp;
2973 | 
2974 |     /**
2975 |      * An attribute that is usually set by `aria-pressed`.
2976 |      *
2977 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
2978 |      */
2979 |     pressed?: boolean;
2980 | 
2981 |     /**
2982 |      * An attribute that is usually set by `aria-selected`.
2983 |      *
2984 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
2985 |      */
2986 |     selected?: boolean;
2987 |   }): Locator;
2988 | 
2989 |   /**
2990 |    * Locate element by the test id.
2991 |    *
2992 |    * **Usage**
2993 |    *
2994 |    * Consider the following DOM structure.
2995 |    *
2996 |    * ```html
2997 |    * <button data-testid="directions">Itinéraire</button>
2998 |    * ```
2999 |    *
3000 |    * You can locate the element by it's test id:
3001 |    *
3002 |    * ```js
3003 |    * await page.getByTestId('directions').click();
3004 |    * ```
3005 |    *
3006 |    * **Details**
3007 |    *
3008 |    * By default, the `data-testid` attribute is used as a test id. Use
3009 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
3010 |    * to configure a different test id attribute if necessary.
3011 |    *
3012 |    * ```js
3013 |    * // Set custom test id attribute from @playwright/test config:
3014 |    * import { defineConfig } from '@playwright/test';
3015 |    *
3016 |    * export default defineConfig({
3017 |    *   use: {
3018 |    *     testIdAttribute: 'data-pw'
3019 |    *   },
3020 |    * });
3021 |    * ```
3022 |    *
3023 |    * @param testId Id to locate the element by.
3024 |    */
3025 |   getByTestId(testId: string|RegExp): Locator;
3026 | 
3027 |   /**
3028 |    * Allows locating elements that contain given text.
3029 |    *
3030 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
3031 |    * match by another criteria, like an accessible role, and then filter by the text content.
3032 |    *
3033 |    * **Usage**
3034 |    *
3035 |    * Consider the following DOM structure:
3036 |    *
3037 |    * ```html
3038 |    * <div>Hello <span>world</span></div>
3039 |    * <div>Hello</div>
3040 |    * ```
3041 |    *
3042 |    * You can locate by text substring, exact string, or a regular expression:
3043 |    *
3044 |    * ```js
3045 |    * // Matches <span>
3046 |    * page.getByText('world');
3047 |    *
3048 |    * // Matches first <div>
3049 |    * page.getByText('Hello world');
3050 |    *
3051 |    * // Matches second <div>
3052 |    * page.getByText('Hello', { exact: true });
3053 |    *
3054 |    * // Matches both <div>s
3055 |    * page.getByText(/Hello/);
3056 |    *
3057 |    * // Matches second <div>
3058 |    * page.getByText(/^hello$/i);
3059 |    * ```
3060 |    *
3061 |    * **Details**
3062 |    *
3063 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
3064 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
3065 |    *
3066 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
3067 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
3068 |    * @param text Text to locate the element for.
3069 |    * @param options
3070 |    */
3071 |   getByText(text: string|RegExp, options?: {
3072 |     /**
3073 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
3074 |      * regular expression. Note that exact match still trims whitespace.
3075 |      */
3076 |     exact?: boolean;
3077 |   }): Locator;
3078 | 
3079 |   /**
3080 |    * Allows locating elements by their title attribute.
3081 |    *
3082 |    * **Usage**
3083 |    *
3084 |    * Consider the following DOM structure.
3085 |    *
3086 |    * ```html
3087 |    * <span title='Issues count'>25 issues</span>
3088 |    * ```
3089 |    *
3090 |    * You can check the issues count after locating it by the title text:
3091 |    *
3092 |    * ```js
3093 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
3094 |    * ```
3095 |    *
3096 |    * @param text Text to locate the element for.
3097 |    * @param options
3098 |    */
3099 |   getByTitle(text: string|RegExp, options?: {
3100 |     /**
3101 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
3102 |      * regular expression. Note that exact match still trims whitespace.
3103 |      */
3104 |     exact?: boolean;
3105 |   }): Locator;
3106 | 
3107 |   /**
3108 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
3109 |    * the last redirect. If cannot go back, returns `null`.
3110 |    *
3111 |    * Navigate to the previous page in history.
3112 |    * @param options
3113 |    */
3114 |   goBack(options?: {
3115 |     /**
3116 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3117 |      * `navigationTimeout` option in the config, or by using the
3118 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3119 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3120 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3121 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3122 |      */
3123 |     timeout?: number;
3124 | 
3125 |     /**
3126 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3127 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3128 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3129 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3130 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3131 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3132 |      *   loading.
3133 |      */
3134 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3135 |   }): Promise<null|Response>;
3136 | 
3137 |   /**
3138 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
3139 |    * the last redirect. If cannot go forward, returns `null`.
3140 |    *
3141 |    * Navigate to the next page in history.
3142 |    * @param options
3143 |    */
3144 |   goForward(options?: {
3145 |     /**
3146 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3147 |      * `navigationTimeout` option in the config, or by using the
3148 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3149 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3150 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3151 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3152 |      */
3153 |     timeout?: number;
3154 | 
3155 |     /**
3156 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3157 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3158 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3159 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3160 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3161 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3162 |      *   loading.
3163 |      */
3164 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3165 |   }): Promise<null|Response>;
3166 | 
3167 |   /**
3168 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the first
3169 |    * non-redirect response.
3170 |    *
3171 |    * The method will throw an error if:
3172 |    * - there's an SSL error (e.g. in case of self-signed certificates).
3173 |    * - target URL is invalid.
3174 |    * - the [`timeout`](https://playwright.dev/docs/api/class-page#page-goto-option-timeout) is exceeded during
3175 |    *   navigation.
3176 |    * - the remote server does not respond or is unreachable.
3177 |    * - the main resource failed to load.
3178 |    *
3179 |    * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
3180 |    * "Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
3181 |    * [response.status()](https://playwright.dev/docs/api/class-response#response-status).
3182 |    *
3183 |    * **NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
3184 |    * to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
3185 |    *
3186 |    * **NOTE** Headless mode doesn't support navigation to a PDF document. See the
3187 |    * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
3188 |    *
3189 |    * @param url URL to navigate page to. The url should include scheme, e.g. `https://`. When a
3190 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
3191 |    * options was provided and the passed URL is a path, it gets merged via the
3192 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
3193 |    * @param options
3194 |    */
3195 |   goto(url: string, options?: {
3196 |     /**
3197 |      * Referer header value. If provided it will take preference over the referer header value set by
3198 |      * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
3199 |      */
3200 |     referer?: string;
3201 | 
3202 |     /**
3203 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3204 |      * `navigationTimeout` option in the config, or by using the
3205 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3206 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3207 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3208 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3209 |      */
3210 |     timeout?: number;
3211 | 
3212 |     /**
3213 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3214 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3215 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3216 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3217 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3218 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3219 |      *   loading.
3220 |      */
3221 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3222 |   }): Promise<null|Response>;
3223 | 
3224 |   /**
3225 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
3226 |    * Read more about [locators](https://playwright.dev/docs/locators).
3227 |    *
3228 |    * This method hovers over an element matching
3229 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector) by performing the following
3230 |    * steps:
3231 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector).
3232 |    *    If there is none, wait until a matching element is attached to the DOM.
3233 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
3234 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-hover-option-force) option is set. If the element
3235 |    *    is detached during the checks, the whole action is retried.
3236 |    * 1. Scroll the element into view if needed.
3237 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
3238 |    *    element, or the specified
3239 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-hover-option-position).
3240 |    *
3241 |    * When all steps combined have not finished during the specified
3242 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-hover-option-timeout), this method throws a
3243 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
3244 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3245 |    * used.
3246 |    * @param options
3247 |    */
3248 |   hover(selector: string, options?: {
3249 |     /**
3250 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
3251 |      */
3252 |     force?: boolean;
3253 | 
3254 |     /**
3255 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
3256 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
3257 |      * "Control" on Windows and Linux and to "Meta" on macOS.
3258 |      */
3259 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
3260 | 
3261 |     /**
3262 |      * This option has no effect.
3263 |      * @deprecated This option has no effect.
3264 |      */
3265 |     noWaitAfter?: boolean;
3266 | 
3267 |     /**
3268 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
3269 |      * the element.
3270 |      */
3271 |     position?: {
3272 |       x: number;
3273 | 
3274 |       y: number;
3275 |     };
3276 | 
3277 |     /**
3278 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3279 |      * element, the call throws an exception.
3280 |      */
3281 |     strict?: boolean;
3282 | 
3283 |     /**
3284 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3285 |      * option in the config, or by using the
3286 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3287 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3288 |      */
3289 |     timeout?: number;
3290 | 
3291 |     /**
3292 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
3293 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
3294 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
3295 |      * are pressed.
3296 |      */
3297 |     trial?: boolean;
3298 |   }): Promise<void>;
3299 | 
3300 |   /**
3301 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
3302 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3303 |    *
3304 |    * Returns `element.innerHTML`.
3305 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3306 |    * used.
3307 |    * @param options
3308 |    */
3309 |   innerHTML(selector: string, options?: {
3310 |     /**
3311 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3312 |      * element, the call throws an exception.
3313 |      */
3314 |     strict?: boolean;
3315 | 
3316 |     /**
3317 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3318 |      * option in the config, or by using the
3319 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3320 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3321 |      */
3322 |     timeout?: number;
3323 |   }): Promise<string>;
3324 | 
3325 |   /**
3326 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
3327 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3328 |    *
3329 |    * Returns `element.innerText`.
3330 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3331 |    * used.
3332 |    * @param options
3333 |    */
3334 |   innerText(selector: string, options?: {
3335 |     /**
3336 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3337 |      * element, the call throws an exception.
3338 |      */
3339 |     strict?: boolean;
3340 | 
3341 |     /**
3342 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3343 |      * option in the config, or by using the
3344 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3345 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3346 |      */
3347 |     timeout?: number;
3348 |   }): Promise<string>;
3349 | 
3350 |   /**
3351 |    * **NOTE** Use locator-based
3352 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
3353 |    * more about [locators](https://playwright.dev/docs/locators).
3354 |    *
3355 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
3356 |    *
3357 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
3358 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
3359 |    * control.
3360 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3361 |    * used.
3362 |    * @param options
3363 |    */
3364 |   inputValue(selector: string, options?: {
3365 |     /**
3366 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3367 |      * element, the call throws an exception.
3368 |      */
3369 |     strict?: boolean;
3370 | 
3371 |     /**
3372 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3373 |      * option in the config, or by using the
3374 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3375 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3376 |      */
3377 |     timeout?: number;
3378 |   }): Promise<string>;
3379 | 
3380 |   /**
3381 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
3382 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3383 |    *
3384 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
3385 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3386 |    * used.
3387 |    * @param options
3388 |    */
3389 |   isChecked(selector: string, options?: {
3390 |     /**
3391 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3392 |      * element, the call throws an exception.
3393 |      */
3394 |     strict?: boolean;
3395 | 
3396 |     /**
3397 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3398 |      * option in the config, or by using the
3399 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3400 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3401 |      */
3402 |     timeout?: number;
3403 |   }): Promise<boolean>;
3404 | 
3405 |   /**
3406 |    * Indicates that the page has been closed.
3407 |    */
3408 |   isClosed(): boolean;
3409 | 
3410 |   /**
3411 |    * **NOTE** Use locator-based
3412 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
3413 |    * more about [locators](https://playwright.dev/docs/locators).
3414 |    *
3415 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
3416 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3417 |    * used.
3418 |    * @param options
3419 |    */
3420 |   isDisabled(selector: string, options?: {
3421 |     /**
3422 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3423 |      * element, the call throws an exception.
3424 |      */
3425 |     strict?: boolean;
3426 | 
3427 |     /**
3428 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3429 |      * option in the config, or by using the
3430 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3431 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3432 |      */
3433 |     timeout?: number;
3434 |   }): Promise<boolean>;
3435 | 
3436 |   /**
3437 |    * **NOTE** Use locator-based
3438 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
3439 |    * more about [locators](https://playwright.dev/docs/locators).
3440 |    *
3441 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
3442 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3443 |    * used.
3444 |    * @param options
3445 |    */
3446 |   isEditable(selector: string, options?: {
3447 |     /**
3448 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3449 |      * element, the call throws an exception.
3450 |      */
3451 |     strict?: boolean;
3452 | 
3453 |     /**
3454 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3455 |      * option in the config, or by using the
3456 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3457 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3458 |      */
3459 |     timeout?: number;
3460 |   }): Promise<boolean>;
3461 | 
3462 |   /**
3463 |    * **NOTE** Use locator-based [locator.isEnabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-enabled)
3464 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3465 |    *
3466 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
3467 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3468 |    * used.
3469 |    * @param options
3470 |    */
3471 |   isEnabled(selector: string, options?: {
3472 |     /**
3473 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3474 |      * element, the call throws an exception.
3475 |      */
3476 |     strict?: boolean;
3477 | 
3478 |     /**
3479 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3480 |      * option in the config, or by using the
3481 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3482 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3483 |      */
3484 |     timeout?: number;
3485 |   }): Promise<boolean>;
3486 | 
3487 |   /**
3488 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
3489 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3490 |    *
3491 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
3492 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-is-hidden-option-selector) that does not match any
3493 |    * elements is considered hidden.
3494 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3495 |    * used.
3496 |    * @param options
3497 |    */
3498 |   isHidden(selector: string, options?: {
3499 |     /**
3500 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3501 |      * element, the call throws an exception.
3502 |      */
3503 |     strict?: boolean;
3504 | 
3505 |     /**
3506 |      * @deprecated This option is ignored.
3507 |      * [page.isHidden(selector[, options])](https://playwright.dev/docs/api/class-page#page-is-hidden) does not wait for
3508 |      * the element to become hidden and returns immediately.
3509 |      */
3510 |     timeout?: number;
3511 |   }): Promise<boolean>;
3512 | 
3513 |   /**
3514 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
3515 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3516 |    *
3517 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
3518 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-is-visible-option-selector) that does not match any
3519 |    * elements is considered not visible.
3520 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3521 |    * used.
3522 |    * @param options
3523 |    */
3524 |   isVisible(selector: string, options?: {
3525 |     /**
3526 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3527 |      * element, the call throws an exception.
3528 |      */
3529 |     strict?: boolean;
3530 | 
3531 |     /**
3532 |      * @deprecated This option is ignored.
3533 |      * [page.isVisible(selector[, options])](https://playwright.dev/docs/api/class-page#page-is-visible) does not wait for
3534 |      * the element to become visible and returns immediately.
3535 |      */
3536 |     timeout?: number;
3537 |   }): Promise<boolean>;
3538 | 
3539 |   /**
3540 |    * The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
3541 |    * to the element immediately before performing an action, so a series of actions on the same locator can in fact be
3542 |    * performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
3543 |    *
3544 |    * [Learn more about locators](https://playwright.dev/docs/locators).
3545 |    * @param selector A selector to use when resolving DOM element.
3546 |    * @param options
3547 |    */
3548 |   locator(selector: string, options?: {
3549 |     /**
3550 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
3551 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
3552 |      *
3553 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
3554 |      * the document root. For example, you can find `content` that has `div` in
3555 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
3556 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
3557 |      *
3558 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
3559 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
3560 |      */
3561 |     has?: Locator;
3562 | 
3563 |     /**
3564 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
3565 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
3566 |      *
3567 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
3568 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
3569 |      */
3570 |     hasNot?: Locator;
3571 | 
3572 |     /**
3573 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
3574 |      * When passed a [string], matching is case-insensitive and searches for a substring.
3575 |      */
3576 |     hasNotText?: string|RegExp;
3577 | 
3578 |     /**
3579 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
3580 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
3581 |      * `<article><div>Playwright</div></article>`.
3582 |      */
3583 |     hasText?: string|RegExp;
3584 |   }): Locator;
3585 | 
3586 |   /**
3587 |    * The page's main frame. Page is guaranteed to have a main frame which persists during navigations.
3588 |    */
3589 |   mainFrame(): Frame;
3590 | 
3591 |   /**
3592 |    * Returns the opener for popup pages and `null` for others. If the opener has been closed already the returns `null`.
3593 |    */
3594 |   opener(): Promise<null|Page>;
3595 | 
3596 |   /**
3597 |    * Pauses script execution. Playwright will stop executing the script and wait for the user to either press 'Resume'
3598 |    * button in the page overlay or to call `playwright.resume()` in the DevTools console.
3599 |    *
3600 |    * User can inspect selectors or perform manual steps while paused. Resume will continue running the original script
3601 |    * from the place it was paused.
3602 |    *
3603 |    * **NOTE** This method requires Playwright to be started in a headed mode, with a falsy
3604 |    * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-headless) option.
3605 |    *
3606 |    */
3607 |   pause(): Promise<void>;
3608 | 
3609 |   /**
3610 |    * Returns the PDF buffer.
3611 |    *
3612 |    * **NOTE** Generating a pdf is currently only supported in Chromium headless.
3613 |    *
3614 |    * `page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call
3615 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) before calling
3616 |    * `page.pdf()`:
3617 |    *
3618 |    * **NOTE** By default, `page.pdf()` generates a pdf with modified colors for printing. Use the
3619 |    * [`-webkit-print-color-adjust`](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust)
3620 |    * property to force rendering of exact colors.
3621 |    *
3622 |    * **Usage**
3623 |    *
3624 |    * ```js
3625 |    * // Generates a PDF with 'screen' media type.
3626 |    * await page.emulateMedia({ media: 'screen' });
3627 |    * await page.pdf({ path: 'page.pdf' });
3628 |    * ```
3629 |    *
3630 |    * The [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width),
3631 |    * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height), and
3632 |    * [`margin`](https://playwright.dev/docs/api/class-page#page-pdf-option-margin) options accept values labeled with
3633 |    * units. Unlabeled values are treated as pixels.
3634 |    *
3635 |    * A few examples:
3636 |    * - `page.pdf({width: 100})` - prints with width set to 100 pixels
3637 |    * - `page.pdf({width: '100px'})` - prints with width set to 100 pixels
3638 |    * - `page.pdf({width: '10cm'})` - prints with width set to 10 centimeters.
3639 |    *
3640 |    * All possible units are:
3641 |    * - `px` - pixel
3642 |    * - `in` - inch
3643 |    * - `cm` - centimeter
3644 |    * - `mm` - millimeter
3645 |    *
3646 |    * The [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options are:
3647 |    * - `Letter`: 8.5in x 11in
3648 |    * - `Legal`: 8.5in x 14in
3649 |    * - `Tabloid`: 11in x 17in
3650 |    * - `Ledger`: 17in x 11in
3651 |    * - `A0`: 33.1in x 46.8in
3652 |    * - `A1`: 23.4in x 33.1in
3653 |    * - `A2`: 16.54in x 23.4in
3654 |    * - `A3`: 11.7in x 16.54in
3655 |    * - `A4`: 8.27in x 11.7in
3656 |    * - `A5`: 5.83in x 8.27in
3657 |    * - `A6`: 4.13in x 5.83in
3658 |    *
3659 |    * **NOTE** [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template) and
3660 |    * [`footerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-footer-template) markup have the
3661 |    * following limitations: > 1. Script tags inside templates are not evaluated. > 2. Page styles are not visible inside
3662 |    * templates.
3663 |    *
3664 |    * @param options
3665 |    */
3666 |   pdf(options?: {
3667 |     /**
3668 |      * Display header and footer. Defaults to `false`.
3669 |      */
3670 |     displayHeaderFooter?: boolean;
3671 | 
3672 |     /**
3673 |      * HTML template for the print footer. Should use the same format as the
3674 |      * [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template).
3675 |      */
3676 |     footerTemplate?: string;
3677 | 
3678 |     /**
3679 |      * Paper format. If set, takes priority over
3680 |      * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) or
3681 |      * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) options. Defaults to 'Letter'.
3682 |      */
3683 |     format?: string;
3684 | 
3685 |     /**
3686 |      * HTML template for the print header. Should be valid HTML markup with following classes used to inject printing
3687 |      * values into them:
3688 |      * - `'date'` formatted print date
3689 |      * - `'title'` document title
3690 |      * - `'url'` document location
3691 |      * - `'pageNumber'` current page number
3692 |      * - `'totalPages'` total pages in the document
3693 |      */
3694 |     headerTemplate?: string;
3695 | 
3696 |     /**
3697 |      * Paper height, accepts values labeled with units.
3698 |      */
3699 |     height?: string|number;
3700 | 
3701 |     /**
3702 |      * Paper orientation. Defaults to `false`.
3703 |      */
3704 |     landscape?: boolean;
3705 | 
3706 |     /**
3707 |      * Paper margins, defaults to none.
3708 |      */
3709 |     margin?: {
3710 |       /**
3711 |        * Top margin, accepts values labeled with units. Defaults to `0`.
3712 |        */
3713 |       top?: string|number;
3714 | 
3715 |       /**
3716 |        * Right margin, accepts values labeled with units. Defaults to `0`.
3717 |        */
3718 |       right?: string|number;
3719 | 
3720 |       /**
3721 |        * Bottom margin, accepts values labeled with units. Defaults to `0`.
3722 |        */
3723 |       bottom?: string|number;
3724 | 
3725 |       /**
3726 |        * Left margin, accepts values labeled with units. Defaults to `0`.
3727 |        */
3728 |       left?: string|number;
3729 |     };
3730 | 
3731 |     /**
3732 |      * Whether or not to embed the document outline into the PDF. Defaults to `false`.
3733 |      */
3734 |     outline?: boolean;
3735 | 
3736 |     /**
3737 |      * Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
3738 |      */
3739 |     pageRanges?: string;
3740 | 
3741 |     /**
3742 |      * The file path to save the PDF to. If [`path`](https://playwright.dev/docs/api/class-page#page-pdf-option-path) is a
3743 |      * relative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't
3744 |      * be saved to the disk.
3745 |      */
3746 |     path?: string;
3747 | 
3748 |     /**
3749 |      * Give any CSS `@page` size declared in the page priority over what is declared in
3750 |      * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) and
3751 |      * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) or
3752 |      * [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options. Defaults to `false`, which
3753 |      * will scale the content to fit the paper size.
3754 |      */
3755 |     preferCSSPageSize?: boolean;
3756 | 
3757 |     /**
3758 |      * Print background graphics. Defaults to `false`.
3759 |      */
3760 |     printBackground?: boolean;
3761 | 
3762 |     /**
3763 |      * Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.
3764 |      */
3765 |     scale?: number;
3766 | 
3767 |     /**
3768 |      * Whether or not to generate tagged (accessible) PDF. Defaults to `false`.
3769 |      */
3770 |     tagged?: boolean;
3771 | 
3772 |     /**
3773 |      * Paper width, accepts values labeled with units.
3774 |      */
3775 |     width?: string|number;
3776 |   }): Promise<Buffer>;
3777 | 
3778 |   /**
3779 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
3780 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3781 |    *
3782 |    * Focuses the element, and then uses
3783 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
3784 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
3785 |    *
3786 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) can specify the intended
3787 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
3788 |    * to generate the text for. A superset of the
3789 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) values can be found
3790 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
3791 |    *
3792 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
3793 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
3794 |    * etc.
3795 |    *
3796 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
3797 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
3798 |    *
3799 |    * Holding down `Shift` will type the text that corresponds to the
3800 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) in the upper case.
3801 |    *
3802 |    * If [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) is a single character, it is
3803 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
3804 |    *
3805 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
3806 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
3807 |    *
3808 |    * **Usage**
3809 |    *
3810 |    * ```js
3811 |    * const page = await browser.newPage();
3812 |    * await page.goto('https://keycode.info');
3813 |    * await page.press('body', 'A');
3814 |    * await page.screenshot({ path: 'A.png' });
3815 |    * await page.press('body', 'ArrowLeft');
3816 |    * await page.screenshot({ path: 'ArrowLeft.png' });
3817 |    * await page.press('body', 'Shift+O');
3818 |    * await page.screenshot({ path: 'O.png' });
3819 |    * await browser.close();
3820 |    * ```
3821 |    *
3822 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3823 |    * used.
3824 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
3825 |    * @param options
3826 |    */
3827 |   press(selector: string, key: string, options?: {
3828 |     /**
3829 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
3830 |      */
3831 |     delay?: number;
3832 | 
3833 |     /**
3834 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
3835 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
3836 |      * navigating to inaccessible pages. Defaults to `false`.
3837 |      * @deprecated This option will default to `true` in the future.
3838 |      */
3839 |     noWaitAfter?: boolean;
3840 | 
3841 |     /**
3842 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3843 |      * element, the call throws an exception.
3844 |      */
3845 |     strict?: boolean;
3846 | 
3847 |     /**
3848 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3849 |      * option in the config, or by using the
3850 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3851 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3852 |      */
3853 |     timeout?: number;
3854 |   }): Promise<void>;
3855 | 
3856 |   /**
3857 |    * This method reloads the current page, in the same way as if the user had triggered a browser refresh. Returns the
3858 |    * main resource response. In case of multiple redirects, the navigation will resolve with the response of the last
3859 |    * redirect.
3860 |    * @param options
3861 |    */
3862 |   reload(options?: {
3863 |     /**
3864 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3865 |      * `navigationTimeout` option in the config, or by using the
3866 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3867 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3868 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3869 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3870 |      */
3871 |     timeout?: number;
3872 | 
3873 |     /**
3874 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3875 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3876 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3877 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3878 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3879 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3880 |      *   loading.
3881 |      */
3882 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3883 |   }): Promise<null|Response>;
3884 | 
3885 |   /**
3886 |    * Removes all locator handlers added by
3887 |    * [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
3888 |    * for a specific locator.
3889 |    * @param locator Locator passed to
3890 |    * [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler).
3891 |    */
3892 |   removeLocatorHandler(locator: Locator): Promise<void>;
3893 | 
3894 |   /**
3895 |    * Request the page to perform garbage collection. Note that there is no guarantee that all unreachable objects will
3896 |    * be collected.
3897 |    *
3898 |    * This is useful to help detect memory leaks. For example, if your page has a large object `'suspect'` that might be
3899 |    * leaked, you can check that it does not leak by using a
3900 |    * [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef).
3901 |    *
3902 |    * ```js
3903 |    * // 1. In your page, save a WeakRef for the "suspect".
3904 |    * await page.evaluate(() => globalThis.suspectWeakRef = new WeakRef(suspect));
3905 |    * // 2. Request garbage collection.
3906 |    * await page.requestGC();
3907 |    * // 3. Check that weak ref does not deref to the original object.
3908 |    * expect(await page.evaluate(() => !globalThis.suspectWeakRef.deref())).toBe(true);
3909 |    * ```
3910 |    *
3911 |    */
3912 |   requestGC(): Promise<void>;
3913 | 
3914 |   /**
3915 |    * Routing provides the capability to modify network requests that are made by a page.
3916 |    *
3917 |    * Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or
3918 |    * aborted.
3919 |    *
3920 |    * **NOTE** The handler will only be called for the first url if the response is a redirect.
3921 |    *
3922 |    * **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
3923 |    * intercept requests intercepted by Service Worker. See [this](https://github.com/microsoft/playwright/issues/1090)
3924 |    * issue. We recommend disabling Service Workers when using request interception by setting
3925 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
3926 |    * `'block'`.
3927 |    *
3928 |    * **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
3929 |    * intercept the first request of a popup page. Use
3930 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
3931 |    * instead.
3932 |    *
3933 |    * **Usage**
3934 |    *
3935 |    * An example of a naive handler that aborts all image requests:
3936 |    *
3937 |    * ```js
3938 |    * const page = await browser.newPage();
3939 |    * await page.route('**\/*.{png,jpg,jpeg}', route => route.abort());
3940 |    * await page.goto('https://example.com');
3941 |    * await browser.close();
3942 |    * ```
3943 |    *
3944 |    * or the same snippet using a regex pattern instead:
3945 |    *
3946 |    * ```js
3947 |    * const page = await browser.newPage();
3948 |    * await page.route(/(\.png$)|(\.jpg$)/, route => route.abort());
3949 |    * await page.goto('https://example.com');
3950 |    * await browser.close();
3951 |    * ```
3952 |    *
3953 |    * It is possible to examine the request to decide the route action. For example, mocking all requests that contain
3954 |    * some post data, and leaving all other requests as is:
3955 |    *
3956 |    * ```js
3957 |    * await page.route('/api/**', async route => {
3958 |    *   if (route.request().postData().includes('my-string'))
3959 |    *     await route.fulfill({ body: 'mocked-data' });
3960 |    *   else
3961 |    *     await route.continue();
3962 |    * });
3963 |    * ```
3964 |    *
3965 |    * Page routes take precedence over browser context routes (set up with
3966 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route))
3967 |    * when request matches both handlers.
3968 |    *
3969 |    * To remove a route with its handler you can use
3970 |    * [page.unroute(url[, handler])](https://playwright.dev/docs/api/class-page#page-unroute).
3971 |    *
3972 |    * **NOTE** Enabling routing disables http cache.
3973 |    *
3974 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a
3975 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
3976 |    * options was provided and the passed URL is a path, it gets merged via the
3977 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
3978 |    * @param handler handler function to route the request.
3979 |    * @param options
3980 |    */
3981 |   route(url: string|RegExp|((url: URL) => boolean), handler: ((route: Route, request: Request) => Promise<any>|any), options?: {
3982 |     /**
3983 |      * How often a route should be used. By default it will be used every time.
3984 |      */
3985 |     times?: number;
3986 |   }): Promise<void>;
3987 | 
3988 |   /**
3989 |    * If specified the network requests that are made in the page will be served from the HAR file. Read more about
3990 |    * [Replaying from HAR](https://playwright.dev/docs/mock#replaying-from-har).
3991 |    *
3992 |    * Playwright will not serve requests intercepted by Service Worker from the HAR file. See
3993 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
3994 |    * using request interception by setting
3995 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
3996 |    * `'block'`.
3997 |    * @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
3998 |    * relative path, then it is resolved relative to the current working directory.
3999 |    * @param options
4000 |    */
4001 |   routeFromHAR(har: string, options?: {
4002 |     /**
4003 |      * - If set to 'abort' any request not found in the HAR file will be aborted.
4004 |      * - If set to 'fallback' missing requests will be sent to the network.
4005 |      *
4006 |      * Defaults to abort.
4007 |      */
4008 |     notFound?: "abort"|"fallback";
4009 | 
4010 |     /**
4011 |      * If specified, updates the given HAR with the actual network information instead of serving from file. The file is
4012 |      * written to disk when
4013 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) is
4014 |      * called.
4015 |      */
4016 |     update?: boolean;
4017 | 
4018 |     /**
4019 |      * Optional setting to control resource content management. If `attach` is specified, resources are persisted as
4020 |      * separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
4021 |      */
4022 |     updateContent?: "embed"|"attach";
4023 | 
4024 |     /**
4025 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
4026 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
4027 |      * `minimal`.
4028 |      */
4029 |     updateMode?: "full"|"minimal";
4030 | 
4031 |     /**
4032 |      * A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
4033 |      * pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
4034 |      */
4035 |     url?: string|RegExp;
4036 |   }): Promise<void>;
4037 | 
4038 |   /**
4039 |    * This method allows to modify websocket connections that are made by the page.
4040 |    *
4041 |    * Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
4042 |    * method before navigating the page.
4043 |    *
4044 |    * **Usage**
4045 |    *
4046 |    * Below is an example of a simple mock that responds to a single message. See
4047 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
4048 |    *
4049 |    * ```js
4050 |    * await page.routeWebSocket('/ws', ws => {
4051 |    *   ws.onMessage(message => {
4052 |    *     if (message === 'request')
4053 |    *       ws.send('response');
4054 |    *   });
4055 |    * });
4056 |    * ```
4057 |    *
4058 |    * @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
4059 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
4060 |    * @param handler Handler function to route the WebSocket.
4061 |    */
4062 |   routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
4063 | 
4064 |   /**
4065 |    * Returns the buffer with the captured screenshot.
4066 |    * @param options
4067 |    */
4068 |   screenshot(options?: PageScreenshotOptions): Promise<Buffer>;
4069 | 
4070 |   /**
4071 |    * **NOTE** Use locator-based
4072 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
4073 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4074 |    *
4075 |    * This method waits for an element matching
4076 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-select-option-option-selector), waits for
4077 |    * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
4078 |    * element and selects these options.
4079 |    *
4080 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
4081 |    * the `<label>` element that has an associated
4082 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
4083 |    * instead.
4084 |    *
4085 |    * Returns the array of option values that have been successfully selected.
4086 |    *
4087 |    * Triggers a `change` and `input` event once all the provided options have been selected.
4088 |    *
4089 |    * **Usage**
4090 |    *
4091 |    * ```js
4092 |    * // Single selection matching the value or label
4093 |    * page.selectOption('select#colors', 'blue');
4094 |    *
4095 |    * // single selection matching the label
4096 |    * page.selectOption('select#colors', { label: 'Blue' });
4097 |    *
4098 |    * // multiple selection
4099 |    * page.selectOption('select#colors', ['red', 'green', 'blue']);
4100 |    *
4101 |    * ```
4102 |    *
4103 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4104 |    * used.
4105 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
4106 |    * only the first option matching one of the passed options is selected. String values are matching both values and
4107 |    * labels. Option is considered matching if all specified properties match.
4108 |    * @param options
4109 |    */
4110 |   selectOption(selector: string, values: null|string|ElementHandle|ReadonlyArray<string>|{
4111 |     /**
4112 |      * Matches by `option.value`. Optional.
4113 |      */
4114 |     value?: string;
4115 | 
4116 |     /**
4117 |      * Matches by `option.label`. Optional.
4118 |      */
4119 |     label?: string;
4120 | 
4121 |     /**
4122 |      * Matches by the index. Optional.
4123 |      */
4124 |     index?: number;
4125 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
4126 |     /**
4127 |      * Matches by `option.value`. Optional.
4128 |      */
4129 |     value?: string;
4130 | 
4131 |     /**
4132 |      * Matches by `option.label`. Optional.
4133 |      */
4134 |     label?: string;
4135 | 
4136 |     /**
4137 |      * Matches by the index. Optional.
4138 |      */
4139 |     index?: number;
4140 |   }>, options?: {
4141 |     /**
4142 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4143 |      */
4144 |     force?: boolean;
4145 | 
4146 |     /**
4147 |      * This option has no effect.
4148 |      * @deprecated This option has no effect.
4149 |      */
4150 |     noWaitAfter?: boolean;
4151 | 
4152 |     /**
4153 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4154 |      * element, the call throws an exception.
4155 |      */
4156 |     strict?: boolean;
4157 | 
4158 |     /**
4159 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4160 |      * option in the config, or by using the
4161 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4162 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4163 |      */
4164 |     timeout?: number;
4165 |   }): Promise<Array<string>>;
4166 | 
4167 |   /**
4168 |    * **NOTE** Use locator-based
4169 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
4170 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4171 |    *
4172 |    * This method checks or unchecks an element matching
4173 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector) by performing the
4174 |    * following steps:
4175 |    * 1. Find an element matching
4176 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector). If there is none,
4177 |    *    wait until a matching element is attached to the DOM.
4178 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
4179 |    * 1. If the element already has the right checked state, this method returns immediately.
4180 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4181 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-set-checked-option-force) option is set. If the
4182 |    *    element is detached during the checks, the whole action is retried.
4183 |    * 1. Scroll the element into view if needed.
4184 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
4185 |    *    element.
4186 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
4187 |    *
4188 |    * When all steps combined have not finished during the specified
4189 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-checked-option-timeout), this method throws a
4190 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4191 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4192 |    * used.
4193 |    * @param checked Whether to check or uncheck the checkbox.
4194 |    * @param options
4195 |    */
4196 |   setChecked(selector: string, checked: boolean, options?: {
4197 |     /**
4198 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4199 |      */
4200 |     force?: boolean;
4201 | 
4202 |     /**
4203 |      * This option has no effect.
4204 |      * @deprecated This option has no effect.
4205 |      */
4206 |     noWaitAfter?: boolean;
4207 | 
4208 |     /**
4209 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4210 |      * the element.
4211 |      */
4212 |     position?: {
4213 |       x: number;
4214 | 
4215 |       y: number;
4216 |     };
4217 | 
4218 |     /**
4219 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4220 |      * element, the call throws an exception.
4221 |      */
4222 |     strict?: boolean;
4223 | 
4224 |     /**
4225 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4226 |      * option in the config, or by using the
4227 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4228 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4229 |      */
4230 |     timeout?: number;
4231 | 
4232 |     /**
4233 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4234 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
4235 |      */
4236 |     trial?: boolean;
4237 |   }): Promise<void>;
4238 | 
4239 |   /**
4240 |    * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
4241 |    * inheriting all its specific characteristics and behaviors.
4242 |    * @param html HTML markup to assign to the page.
4243 |    * @param options
4244 |    */
4245 |   setContent(html: string, options?: {
4246 |     /**
4247 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4248 |      * `navigationTimeout` option in the config, or by using the
4249 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
4250 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
4251 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4252 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4253 |      */
4254 |     timeout?: number;
4255 | 
4256 |     /**
4257 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
4258 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
4259 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
4260 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
4261 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
4262 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
4263 |      *   loading.
4264 |      */
4265 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
4266 |   }): Promise<void>;
4267 | 
4268 |   /**
4269 |    * This setting will change the default maximum navigation time for the following methods and related shortcuts:
4270 |    * - [page.goBack([options])](https://playwright.dev/docs/api/class-page#page-go-back)
4271 |    * - [page.goForward([options])](https://playwright.dev/docs/api/class-page#page-go-forward)
4272 |    * - [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto)
4273 |    * - [page.reload([options])](https://playwright.dev/docs/api/class-page#page-reload)
4274 |    * - [page.setContent(html[, options])](https://playwright.dev/docs/api/class-page#page-set-content)
4275 |    * - [page.waitForNavigation([options])](https://playwright.dev/docs/api/class-page#page-wait-for-navigation)
4276 |    * - [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url)
4277 |    *
4278 |    * **NOTE**
4279 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4280 |    * takes priority over
4281 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout),
4282 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4283 |    * and
4284 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout).
4285 |    *
4286 |    * @param timeout Maximum navigation time in milliseconds
4287 |    */
4288 |   setDefaultNavigationTimeout(timeout: number): void;
4289 | 
4290 |   /**
4291 |    * This setting will change the default maximum time for all the methods accepting
4292 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-default-timeout-option-timeout) option.
4293 |    *
4294 |    * **NOTE**
4295 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4296 |    * takes priority over
4297 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout).
4298 |    *
4299 |    * @param timeout Maximum time in milliseconds
4300 |    */
4301 |   setDefaultTimeout(timeout: number): void;
4302 | 
4303 |   /**
4304 |    * The extra HTTP headers will be sent with every request the page initiates.
4305 |    *
4306 |    * **NOTE**
4307 |    * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers) does
4308 |    * not guarantee the order of headers in the outgoing requests.
4309 |    *
4310 |    * @param headers An object containing additional HTTP headers to be sent with every request. All header values must be strings.
4311 |    */
4312 |   setExtraHTTPHeaders(headers: { [key: string]: string; }): Promise<void>;
4313 | 
4314 |   /**
4315 |    * **NOTE** Use locator-based
4316 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
4317 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4318 |    *
4319 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
4320 |    * they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
4321 |    * with a `[webkitdirectory]` attribute, only a single directory path is supported.
4322 |    *
4323 |    * This method expects [`selector`](https://playwright.dev/docs/api/class-page#page-set-input-files-option-selector)
4324 |    * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
4325 |    * element is inside the `<label>` element that has an associated
4326 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
4327 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4328 |    * used.
4329 |    * @param files
4330 |    * @param options
4331 |    */
4332 |   setInputFiles(selector: string, files: string|ReadonlyArray<string>|{
4333 |     /**
4334 |      * File name
4335 |      */
4336 |     name: string;
4337 | 
4338 |     /**
4339 |      * File type
4340 |      */
4341 |     mimeType: string;
4342 | 
4343 |     /**
4344 |      * File content
4345 |      */
4346 |     buffer: Buffer;
4347 |   }|ReadonlyArray<{
4348 |     /**
4349 |      * File name
4350 |      */
4351 |     name: string;
4352 | 
4353 |     /**
4354 |      * File type
4355 |      */
4356 |     mimeType: string;
4357 | 
4358 |     /**
4359 |      * File content
4360 |      */
4361 |     buffer: Buffer;
4362 |   }>, options?: {
4363 |     /**
4364 |      * This option has no effect.
4365 |      * @deprecated This option has no effect.
4366 |      */
4367 |     noWaitAfter?: boolean;
4368 | 
4369 |     /**
4370 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4371 |      * element, the call throws an exception.
4372 |      */
4373 |     strict?: boolean;
4374 | 
4375 |     /**
4376 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4377 |      * option in the config, or by using the
4378 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4379 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4380 |      */
4381 |     timeout?: number;
4382 |   }): Promise<void>;
4383 | 
4384 |   /**
4385 |    * In the case of multiple pages in a single browser, each page can have its own viewport size. However,
4386 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) allows to set
4387 |    * viewport size (and more) for all pages in the context at once.
4388 |    *
4389 |    * [page.setViewportSize(viewportSize)](https://playwright.dev/docs/api/class-page#page-set-viewport-size) will resize
4390 |    * the page. A lot of websites don't expect phones to change size, so you should set the viewport size before
4391 |    * navigating to the page.
4392 |    * [page.setViewportSize(viewportSize)](https://playwright.dev/docs/api/class-page#page-set-viewport-size) will also
4393 |    * reset `screen` size, use
4394 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) with `screen`
4395 |    * and `viewport` parameters if you need better control of these properties.
4396 |    *
4397 |    * **Usage**
4398 |    *
4399 |    * ```js
4400 |    * const page = await browser.newPage();
4401 |    * await page.setViewportSize({
4402 |    *   width: 640,
4403 |    *   height: 480,
4404 |    * });
4405 |    * await page.goto('https://example.com');
4406 |    * ```
4407 |    *
4408 |    * @param viewportSize
4409 |    */
4410 |   setViewportSize(viewportSize: {
4411 |     /**
4412 |      * page width in pixels.
4413 |      */
4414 |     width: number;
4415 | 
4416 |     /**
4417 |      * page height in pixels.
4418 |      */
4419 |     height: number;
4420 |   }): Promise<void>;
4421 | 
4422 |   /**
4423 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
4424 |    * more about [locators](https://playwright.dev/docs/locators).
4425 |    *
4426 |    * This method taps an element matching
4427 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector) by performing the following
4428 |    * steps:
4429 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector).
4430 |    *    If there is none, wait until a matching element is attached to the DOM.
4431 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4432 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-tap-option-force) option is set. If the element is
4433 |    *    detached during the checks, the whole action is retried.
4434 |    * 1. Scroll the element into view if needed.
4435 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
4436 |    *    element, or the specified [`position`](https://playwright.dev/docs/api/class-page#page-tap-option-position).
4437 |    *
4438 |    * When all steps combined have not finished during the specified
4439 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-tap-option-timeout), this method throws a
4440 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4441 |    *
4442 |    * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
4443 |    * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
4444 |    * browser context is false.
4445 |    *
4446 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4447 |    * used.
4448 |    * @param options
4449 |    */
4450 |   tap(selector: string, options?: {
4451 |     /**
4452 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4453 |      */
4454 |     force?: boolean;
4455 | 
4456 |     /**
4457 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
4458 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
4459 |      * "Control" on Windows and Linux and to "Meta" on macOS.
4460 |      */
4461 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
4462 | 
4463 |     /**
4464 |      * This option has no effect.
4465 |      * @deprecated This option has no effect.
4466 |      */
4467 |     noWaitAfter?: boolean;
4468 | 
4469 |     /**
4470 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4471 |      * the element.
4472 |      */
4473 |     position?: {
4474 |       x: number;
4475 | 
4476 |       y: number;
4477 |     };
4478 | 
4479 |     /**
4480 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4481 |      * element, the call throws an exception.
4482 |      */
4483 |     strict?: boolean;
4484 | 
4485 |     /**
4486 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4487 |      * option in the config, or by using the
4488 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4489 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4490 |      */
4491 |     timeout?: number;
4492 | 
4493 |     /**
4494 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4495 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
4496 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
4497 |      * are pressed.
4498 |      */
4499 |     trial?: boolean;
4500 |   }): Promise<void>;
4501 | 
4502 |   /**
4503 |    * **NOTE** Use locator-based
4504 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
4505 |    * more about [locators](https://playwright.dev/docs/locators).
4506 |    *
4507 |    * Returns `element.textContent`.
4508 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4509 |    * used.
4510 |    * @param options
4511 |    */
4512 |   textContent(selector: string, options?: {
4513 |     /**
4514 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4515 |      * element, the call throws an exception.
4516 |      */
4517 |     strict?: boolean;
4518 | 
4519 |     /**
4520 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4521 |      * option in the config, or by using the
4522 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4523 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4524 |      */
4525 |     timeout?: number;
4526 |   }): Promise<null|string>;
4527 | 
4528 |   /**
4529 |    * Returns the page's title.
4530 |    */
4531 |   title(): Promise<string>;
4532 | 
4533 |   /**
4534 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `page.type` can be used to
4535 |    * send fine-grained keyboard events. To fill values in form fields, use
4536 |    * [page.fill(selector, value[, options])](https://playwright.dev/docs/api/class-page#page-fill).
4537 |    *
4538 |    * To press a special key, like `Control` or `ArrowDown`, use
4539 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
4540 |    *
4541 |    * **Usage**
4542 |    * @deprecated In most cases, you should use
4543 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
4544 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
4545 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
4546 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4547 |    * used.
4548 |    * @param text A text to type into a focused element.
4549 |    * @param options
4550 |    */
4551 |   type(selector: string, text: string, options?: {
4552 |     /**
4553 |      * Time to wait between key presses in milliseconds. Defaults to 0.
4554 |      */
4555 |     delay?: number;
4556 | 
4557 |     /**
4558 |      * This option has no effect.
4559 |      * @deprecated This option has no effect.
4560 |      */
4561 |     noWaitAfter?: boolean;
4562 | 
4563 |     /**
4564 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4565 |      * element, the call throws an exception.
4566 |      */
4567 |     strict?: boolean;
4568 | 
4569 |     /**
4570 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4571 |      * option in the config, or by using the
4572 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4573 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4574 |      */
4575 |     timeout?: number;
4576 |   }): Promise<void>;
4577 | 
4578 |   /**
4579 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
4580 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4581 |    *
4582 |    * This method unchecks an element matching
4583 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector) by performing the following
4584 |    * steps:
4585 |    * 1. Find an element matching
4586 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector). If there is none, wait
4587 |    *    until a matching element is attached to the DOM.
4588 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
4589 |    *    already unchecked, this method returns immediately.
4590 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4591 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-uncheck-option-force) option is set. If the element
4592 |    *    is detached during the checks, the whole action is retried.
4593 |    * 1. Scroll the element into view if needed.
4594 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
4595 |    *    element.
4596 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
4597 |    *
4598 |    * When all steps combined have not finished during the specified
4599 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-uncheck-option-timeout), this method throws a
4600 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4601 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4602 |    * used.
4603 |    * @param options
4604 |    */
4605 |   uncheck(selector: string, options?: {
4606 |     /**
4607 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4608 |      */
4609 |     force?: boolean;
4610 | 
4611 |     /**
4612 |      * This option has no effect.
4613 |      * @deprecated This option has no effect.
4614 |      */
4615 |     noWaitAfter?: boolean;
4616 | 
4617 |     /**
4618 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4619 |      * the element.
4620 |      */
4621 |     position?: {
4622 |       x: number;
4623 | 
4624 |       y: number;
4625 |     };
4626 | 
4627 |     /**
4628 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4629 |      * element, the call throws an exception.
4630 |      */
4631 |     strict?: boolean;
4632 | 
4633 |     /**
4634 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4635 |      * option in the config, or by using the
4636 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4637 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4638 |      */
4639 |     timeout?: number;
4640 | 
4641 |     /**
4642 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4643 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
4644 |      */
4645 |     trial?: boolean;
4646 |   }): Promise<void>;
4647 | 
4648 |   /**
4649 |    * Removes a route created with
4650 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route). When
4651 |    * [`handler`](https://playwright.dev/docs/api/class-page#page-unroute-option-handler) is not specified, removes all
4652 |    * routes for the [`url`](https://playwright.dev/docs/api/class-page#page-unroute-option-url).
4653 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
4654 |    * @param handler Optional handler function to route the request.
4655 |    */
4656 |   unroute(url: string|RegExp|((url: URL) => boolean), handler?: ((route: Route, request: Request) => Promise<any>|any)): Promise<void>;
4657 | 
4658 |   /**
4659 |    * Removes all routes created with
4660 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) and
4661 |    * [page.routeFromHAR(har[, options])](https://playwright.dev/docs/api/class-page#page-route-from-har).
4662 |    * @param options
4663 |    */
4664 |   unrouteAll(options?: {
4665 |     /**
4666 |      * Specifies whether to wait for already running handlers and what to do if they throw errors:
4667 |      * - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
4668 |      *   result in unhandled error
4669 |      * - `'wait'` - wait for current handler calls (if any) to finish
4670 |      * - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
4671 |      *   after unrouting are silently caught
4672 |      */
4673 |     behavior?: "wait"|"ignoreErrors"|"default";
4674 |   }): Promise<void>;
4675 | 
4676 |   url(): string;
4677 | 
4678 |   /**
4679 |    * Video object associated with this page.
4680 |    */
4681 |   video(): null|Video;
4682 | 
4683 |   viewportSize(): null|{
4684 |     /**
4685 |      * page width in pixels.
4686 |      */
4687 |     width: number;
4688 | 
4689 |     /**
4690 |      * page height in pixels.
4691 |      */
4692 |     height: number;
4693 |   };
4694 | 
4695 |   /**
4696 |    * Emitted when the page closes.
4697 |    */
4698 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4699 | 
4700 |   /**
4701 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
4702 |    *
4703 |    * The arguments passed into `console.log` are available on the
4704 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
4705 |    *
4706 |    * **Usage**
4707 |    *
4708 |    * ```js
4709 |    * page.on('console', async msg => {
4710 |    *   const values = [];
4711 |    *   for (const arg of msg.args())
4712 |    *     values.push(await arg.jsonValue());
4713 |    *   console.log(...values);
4714 |    * });
4715 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
4716 |    * ```
4717 |    *
4718 |    */
4719 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
4720 | 
4721 |   /**
4722 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
4723 |    * crashes, ongoing and subsequent operations will throw.
4724 |    *
4725 |    * The most common way to deal with crashes is to catch an exception:
4726 |    *
4727 |    * ```js
4728 |    * try {
4729 |    *   // Crash might happen during a click.
4730 |    *   await page.click('button');
4731 |    *   // Or while waiting for an event.
4732 |    *   await page.waitForEvent('popup');
4733 |    * } catch (e) {
4734 |    *   // When the page crashes, exception message contains 'crash'.
4735 |    * }
4736 |    * ```
4737 |    *
4738 |    */
4739 |   waitForEvent(event: 'crash', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4740 | 
4741 |   /**
4742 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
4743 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
4744 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
4745 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
4746 |    * dialog, and actions like click will never finish.
4747 |    *
4748 |    * **Usage**
4749 |    *
4750 |    * ```js
4751 |    * page.on('dialog', dialog => dialog.accept());
4752 |    * ```
4753 |    *
4754 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
4755 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
4756 |    * listeners are present, all dialogs are automatically dismissed.
4757 |    *
4758 |    */
4759 |   waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
4760 | 
4761 |   /**
4762 |    * Emitted when the JavaScript
4763 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
4764 |    */
4765 |   waitForEvent(event: 'domcontentloaded', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4766 | 
4767 |   /**
4768 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
4769 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
4770 |    */
4771 |   waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
4772 | 
4773 |   /**
4774 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
4775 |    * respond to it via setting the input files using
4776 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
4777 |    * that can be uploaded after that.
4778 |    *
4779 |    * ```js
4780 |    * page.on('filechooser', async fileChooser => {
4781 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
4782 |    * });
4783 |    * ```
4784 |    *
4785 |    */
4786 |   waitForEvent(event: 'filechooser', optionsOrPredicate?: { predicate?: (fileChooser: FileChooser) => boolean | Promise<boolean>, timeout?: number } | ((fileChooser: FileChooser) => boolean | Promise<boolean>)): Promise<FileChooser>;
4787 | 
4788 |   /**
4789 |    * Emitted when a frame is attached.
4790 |    */
4791 |   waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4792 | 
4793 |   /**
4794 |    * Emitted when a frame is detached.
4795 |    */
4796 |   waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4797 | 
4798 |   /**
4799 |    * Emitted when a frame is navigated to a new url.
4800 |    */
4801 |   waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4802 | 
4803 |   /**
4804 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
4805 |    */
4806 |   waitForEvent(event: 'load', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4807 | 
4808 |   /**
4809 |    * Emitted when an uncaught exception happens within the page.
4810 |    *
4811 |    * ```js
4812 |    * // Log all uncaught errors to the terminal
4813 |    * page.on('pageerror', exception => {
4814 |    *   console.log(`Uncaught exception: "${exception}"`);
4815 |    * });
4816 |    *
4817 |    * // Navigate to a page with an exception.
4818 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
4819 |    * ```
4820 |    *
4821 |    */
4822 |   waitForEvent(event: 'pageerror', optionsOrPredicate?: { predicate?: (error: Error) => boolean | Promise<boolean>, timeout?: number } | ((error: Error) => boolean | Promise<boolean>)): Promise<Error>;
4823 | 
4824 |   /**
4825 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
4826 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
4827 |    * only for popups relevant to this page.
4828 |    *
4829 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
4830 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
4831 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
4832 |    * to this network request, use
4833 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
4834 |    * and
4835 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
4836 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
4837 |    *
4838 |    * ```js
4839 |    * // Start waiting for popup before clicking. Note no await.
4840 |    * const popupPromise = page.waitForEvent('popup');
4841 |    * await page.getByText('open the popup').click();
4842 |    * const popup = await popupPromise;
4843 |    * console.log(await popup.evaluate('location.href'));
4844 |    * ```
4845 |    *
4846 |    * **NOTE** Use
4847 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
4848 |    * wait until the page gets to a particular state (you should not need it in most cases).
4849 |    *
4850 |    */
4851 |   waitForEvent(event: 'popup', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4852 | 
4853 |   /**
4854 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
4855 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
4856 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
4857 |    */
4858 |   waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4859 | 
4860 |   /**
4861 |    * Emitted when a request fails, for example by timing out.
4862 |    *
4863 |    * ```js
4864 |    * page.on('requestfailed', request => {
4865 |    *   console.log(request.url() + ' ' + request.failure().errorText);
4866 |    * });
4867 |    * ```
4868 |    *
4869 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
4870 |    * will complete with
4871 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
4872 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
4873 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
4874 |    * error net::ERR_FAILED.
4875 |    *
4876 |    */
4877 |   waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4878 | 
4879 |   /**
4880 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
4881 |    * sequence of events is `request`, `response` and `requestfinished`.
4882 |    */
4883 |   waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4884 | 
4885 |   /**
4886 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
4887 |    * events is `request`, `response` and `requestfinished`.
4888 |    */
4889 |   waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
4890 | 
4891 |   /**
4892 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
4893 |    */
4894 |   waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
4895 | 
4896 |   /**
4897 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
4898 |    * by the page.
4899 |    */
4900 |   waitForEvent(event: 'worker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
4901 | 
4902 | 
4903 |   /**
4904 |    * Returns when the required load state has been reached.
4905 |    *
4906 |    * This resolves when the page reaches a required load state, `load` by default. The navigation must have been
4907 |    * committed when this method is called. If current document has already reached the required state, resolves
4908 |    * immediately.
4909 |    *
4910 |    * **NOTE** Most of the time, this method is not needed because Playwright
4911 |    * [auto-waits before every action](https://playwright.dev/docs/actionability).
4912 |    *
4913 |    * **Usage**
4914 |    *
4915 |    * ```js
4916 |    * await page.getByRole('button').click(); // Click triggers navigation.
4917 |    * await page.waitForLoadState(); // The promise resolves after 'load' event.
4918 |    * ```
4919 |    *
4920 |    * ```js
4921 |    * const popupPromise = page.waitForEvent('popup');
4922 |    * await page.getByRole('button').click(); // Click triggers a popup.
4923 |    * const popup = await popupPromise;
4924 |    * await popup.waitForLoadState('domcontentloaded'); // Wait for the 'DOMContentLoaded' event.
4925 |    * console.log(await popup.title()); // Popup is ready to use.
4926 |    * ```
4927 |    *
4928 |    * @param state Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
4929 |    * document, the method resolves immediately. Can be one of:
4930 |    * - `'load'` - wait for the `load` event to be fired.
4931 |    * - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
4932 |    * - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
4933 |    * this method for testing, rely on web assertions to assess readiness instead.
4934 |    * @param options
4935 |    */
4936 |   waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
4937 |     /**
4938 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4939 |      * `navigationTimeout` option in the config, or by using the
4940 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
4941 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
4942 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4943 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4944 |      */
4945 |     timeout?: number;
4946 |   }): Promise<void>;
4947 | 
4948 |   /**
4949 |    * Waits for the main frame navigation and returns the main resource response. In case of multiple redirects, the
4950 |    * navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
4951 |    * navigation due to History API usage, the navigation will resolve with `null`.
4952 |    *
4953 |    * **Usage**
4954 |    *
4955 |    * This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will
4956 |    * indirectly cause the page to navigate. e.g. The click target has an `onclick` handler that triggers navigation from
4957 |    * a `setTimeout`. Consider this example:
4958 |    *
4959 |    * ```js
4960 |    * // Start waiting for navigation before clicking. Note no await.
4961 |    * const navigationPromise = page.waitForNavigation();
4962 |    * await page.getByText('Navigate after timeout').click();
4963 |    * await navigationPromise;
4964 |    * ```
4965 |    *
4966 |    * **NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
4967 |    * is considered a navigation.
4968 |    *
4969 |    * @deprecated This method is inherently racy, please use
4970 |    * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url) instead.
4971 |    * @param options
4972 |    */
4973 |   waitForNavigation(options?: {
4974 |     /**
4975 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4976 |      * `navigationTimeout` option in the config, or by using the
4977 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
4978 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
4979 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4980 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4981 |      */
4982 |     timeout?: number;
4983 | 
4984 |     /**
4985 |      * A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
4986 |      * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
4987 |      * equal to the string.
4988 |      */
4989 |     url?: string|RegExp|((url: URL) => boolean);
4990 | 
4991 |     /**
4992 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
4993 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
4994 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
4995 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
4996 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
4997 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
4998 |      *   loading.
4999 |      */
5000 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
5001 |   }): Promise<null|Response>;
5002 | 
5003 |   /**
5004 |    * Waits for the matching request and returns it. See [waiting for event](https://playwright.dev/docs/events#waiting-for-event) for more
5005 |    * details about events.
5006 |    *
5007 |    * **Usage**
5008 |    *
5009 |    * ```js
5010 |    * // Start waiting for request before clicking. Note no await.
5011 |    * const requestPromise = page.waitForRequest('https://example.com/resource');
5012 |    * await page.getByText('trigger request').click();
5013 |    * const request = await requestPromise;
5014 |    *
5015 |    * // Alternative way with a predicate. Note no await.
5016 |    * const requestPromise = page.waitForRequest(request =>
5017 |    *   request.url() === 'https://example.com' && request.method() === 'GET',
5018 |    * );
5019 |    * await page.getByText('trigger request').click();
5020 |    * const request = await requestPromise;
5021 |    * ```
5022 |    *
5023 |    * @param urlOrPredicate Request URL string, regex or predicate receiving [Request](https://playwright.dev/docs/api/class-request) object.
5024 |    * @param options
5025 |    */
5026 |   waitForRequest(urlOrPredicate: string|RegExp|((request: Request) => boolean|Promise<boolean>), options?: {
5027 |     /**
5028 |      * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5029 |      * be changed by using the
5030 |      * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) method.
5031 |      */
5032 |     timeout?: number;
5033 |   }): Promise<Request>;
5034 | 
5035 |   /**
5036 |    * Returns the matched response. See [waiting for event](https://playwright.dev/docs/events#waiting-for-event) for more details about
5037 |    * events.
5038 |    *
5039 |    * **Usage**
5040 |    *
5041 |    * ```js
5042 |    * // Start waiting for response before clicking. Note no await.
5043 |    * const responsePromise = page.waitForResponse('https://example.com/resource');
5044 |    * await page.getByText('trigger response').click();
5045 |    * const response = await responsePromise;
5046 |    *
5047 |    * // Alternative way with a predicate. Note no await.
5048 |    * const responsePromise = page.waitForResponse(response =>
5049 |    *   response.url() === 'https://example.com' && response.status() === 200
5050 |    *       && response.request().method() === 'GET'
5051 |    * );
5052 |    * await page.getByText('trigger response').click();
5053 |    * const response = await responsePromise;
5054 |    * ```
5055 |    *
5056 |    * @param urlOrPredicate Request URL string, regex or predicate receiving [Response](https://playwright.dev/docs/api/class-response) object.
5057 |    * When a [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the
5058 |    * context options was provided and the passed URL is a path, it gets merged via the
5059 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
5060 |    * @param options
5061 |    */
5062 |   waitForResponse(urlOrPredicate: string|RegExp|((response: Response) => boolean|Promise<boolean>), options?: {
5063 |     /**
5064 |      * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5065 |      * be changed by using the
5066 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
5067 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
5068 |      */
5069 |     timeout?: number;
5070 |   }): Promise<Response>;
5071 | 
5072 |   /**
5073 |    * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
5074 |    * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
5075 |    *
5076 |    * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-timeout-option-timeout) in
5077 |    * milliseconds.
5078 |    *
5079 |    * Note that `page.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
5080 |    * to be flaky. Use signals such as network events, selectors becoming visible and others instead.
5081 |    *
5082 |    * **Usage**
5083 |    *
5084 |    * ```js
5085 |    * // wait for 1 second
5086 |    * await page.waitForTimeout(1000);
5087 |    * ```
5088 |    *
5089 |    * @param timeout A timeout to wait for
5090 |    */
5091 |   waitForTimeout(timeout: number): Promise<void>;
5092 | 
5093 |   /**
5094 |    * Waits for the main frame to navigate to the given URL.
5095 |    *
5096 |    * **Usage**
5097 |    *
5098 |    * ```js
5099 |    * await page.click('a.delayed-navigation'); // Clicking the link will indirectly cause a navigation
5100 |    * await page.waitForURL('**\/target.html');
5101 |    * ```
5102 |    *
5103 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
5104 |    * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
5105 |    * equal to the string.
5106 |    * @param options
5107 |    */
5108 |   waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {
5109 |     /**
5110 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5111 |      * `navigationTimeout` option in the config, or by using the
5112 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
5113 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
5114 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
5115 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
5116 |      */
5117 |     timeout?: number;
5118 | 
5119 |     /**
5120 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
5121 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
5122 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
5123 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
5124 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
5125 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
5126 |      *   loading.
5127 |      */
5128 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
5129 |   }): Promise<void>;
5130 | 
5131 |   /**
5132 |    * This method returns all of the dedicated
5133 |    * [WebWorkers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) associated with the page.
5134 |    *
5135 |    * **NOTE** This does not contain ServiceWorkers
5136 |    *
5137 |    */
5138 |   workers(): Array<Worker>;
5139 | 
5140 |   /**
5141 |    * @deprecated This property is discouraged. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to
5142 |    * test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration
5143 |    * with Axe.
5144 |    */
5145 |   accessibility: Accessibility;
5146 | 
5147 |   /**
5148 |    * Playwright has ability to mock clock and passage of time.
5149 |    */
5150 |   clock: Clock;
5151 | 
5152 |   /**
5153 |    * **NOTE** Only available for Chromium atm.
5154 |    *
5155 |    * Browser-specific Coverage implementation. See [Coverage](https://playwright.dev/docs/api/class-coverage) for more
5156 |    * details.
5157 |    */
5158 |   coverage: Coverage;
5159 | 
5160 |   keyboard: Keyboard;
5161 | 
5162 |   mouse: Mouse;
5163 | 
5164 |   /**
5165 |    * API testing helper associated with this page. This method returns the same instance as
5166 |    * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) on the
5167 |    * page's context. See
5168 |    * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) for more
5169 |    * details.
5170 |    */
5171 |   request: APIRequestContext;
5172 | 
5173 |   touchscreen: Touchscreen;
5174 | 
5175 |   [Symbol.asyncDispose](): Promise<void>;
5176 | }
5177 | 
5178 | /**
5179 |  * At every point of time, page exposes its current frame tree via the
5180 |  * [page.mainFrame()](https://playwright.dev/docs/api/class-page#page-main-frame) and
5181 |  * [frame.childFrames()](https://playwright.dev/docs/api/class-frame#frame-child-frames) methods.
5182 |  *
5183 |  * [Frame](https://playwright.dev/docs/api/class-frame) object's lifecycle is controlled by three events, dispatched
5184 |  * on the page object:
5185 |  * - [page.on('frameattached')](https://playwright.dev/docs/api/class-page#page-event-frame-attached) - fired when
5186 |  *   the frame gets attached to the page. A Frame can be attached to the page only once.
5187 |  * - [page.on('framenavigated')](https://playwright.dev/docs/api/class-page#page-event-frame-navigated) - fired when
5188 |  *   the frame commits navigation to a different URL.
5189 |  * - [page.on('framedetached')](https://playwright.dev/docs/api/class-page#page-event-frame-detached) - fired when
5190 |  *   the frame gets detached from the page.  A Frame can be detached from the page only once.
5191 |  *
5192 |  * An example of dumping frame tree:
5193 |  *
5194 |  * ```js
5195 |  * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5196 |  *
5197 |  * (async () => {
5198 |  *   const browser = await firefox.launch();
5199 |  *   const page = await browser.newPage();
5200 |  *   await page.goto('https://www.google.com/chrome/browser/canary.html');
5201 |  *   dumpFrameTree(page.mainFrame(), '');
5202 |  *   await browser.close();
5203 |  *
5204 |  *   function dumpFrameTree(frame, indent) {
5205 |  *     console.log(indent + frame.url());
5206 |  *     for (const child of frame.childFrames())
5207 |  *       dumpFrameTree(child, indent + '  ');
5208 |  *   }
5209 |  * })();
5210 |  * ```
5211 |  *
5212 |  */
5213 | export interface Frame {
5214 |   /**
5215 |    * Returns the return value of
5216 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5217 |    *
5218 |    * If the function passed to the
5219 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5220 |    * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5221 |    * would wait for the promise to resolve and return its value.
5222 |    *
5223 |    * If the function passed to the
5224 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5225 |    * non-[Serializable] value, then
5226 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5227 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5228 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
5229 |    *
5230 |    * **Usage**
5231 |    *
5232 |    * ```js
5233 |    * const result = await frame.evaluate(([x, y]) => {
5234 |    *   return Promise.resolve(x * y);
5235 |    * }, [7, 8]);
5236 |    * console.log(result); // prints "56"
5237 |    * ```
5238 |    *
5239 |    * A string can also be passed in instead of a function.
5240 |    *
5241 |    * ```js
5242 |    * console.log(await frame.evaluate('1 + 2')); // prints "3"
5243 |    * ```
5244 |    *
5245 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5246 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5247 |    *
5248 |    * ```js
5249 |    * const bodyHandle = await frame.evaluate('document.body');
5250 |    * const html = await frame.evaluate(([body, suffix]) =>
5251 |    *   body.innerHTML + suffix, [bodyHandle, 'hello'],
5252 |    * );
5253 |    * await bodyHandle.dispose();
5254 |    * ```
5255 |    *
5256 |    * @param pageFunction Function to be evaluated in the page context.
5257 |    * @param arg Optional argument to pass to
5258 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5259 |    */
5260 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
5261 |   /**
5262 |    * Returns the return value of
5263 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5264 |    *
5265 |    * If the function passed to the
5266 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5267 |    * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5268 |    * would wait for the promise to resolve and return its value.
5269 |    *
5270 |    * If the function passed to the
5271 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5272 |    * non-[Serializable] value, then
5273 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5274 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5275 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
5276 |    *
5277 |    * **Usage**
5278 |    *
5279 |    * ```js
5280 |    * const result = await frame.evaluate(([x, y]) => {
5281 |    *   return Promise.resolve(x * y);
5282 |    * }, [7, 8]);
5283 |    * console.log(result); // prints "56"
5284 |    * ```
5285 |    *
5286 |    * A string can also be passed in instead of a function.
5287 |    *
5288 |    * ```js
5289 |    * console.log(await frame.evaluate('1 + 2')); // prints "3"
5290 |    * ```
5291 |    *
5292 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5293 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5294 |    *
5295 |    * ```js
5296 |    * const bodyHandle = await frame.evaluate('document.body');
5297 |    * const html = await frame.evaluate(([body, suffix]) =>
5298 |    *   body.innerHTML + suffix, [bodyHandle, 'hello'],
5299 |    * );
5300 |    * await bodyHandle.dispose();
5301 |    * ```
5302 |    *
5303 |    * @param pageFunction Function to be evaluated in the page context.
5304 |    * @param arg Optional argument to pass to
5305 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5306 |    */
5307 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
5308 | 
5309 |   /**
5310 |    * Returns the return value of
5311 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
5312 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5313 |    *
5314 |    * The only difference between
5315 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5316 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5317 |    * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5318 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5319 |    *
5320 |    * If the function, passed to the
5321 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5322 |    * returns a [Promise], then
5323 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5324 |    * would wait for the promise to resolve and return its value.
5325 |    *
5326 |    * **Usage**
5327 |    *
5328 |    * ```js
5329 |    * // Handle for the window object
5330 |    * const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window));
5331 |    * ```
5332 |    *
5333 |    * A string can also be passed in instead of a function.
5334 |    *
5335 |    * ```js
5336 |    * const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
5337 |    * ```
5338 |    *
5339 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5340 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5341 |    *
5342 |    * ```js
5343 |    * const aHandle = await frame.evaluateHandle(() => document.body);
5344 |    * const resultHandle = await frame.evaluateHandle(([body, suffix]) =>
5345 |    *   body.innerHTML + suffix, [aHandle, 'hello'],
5346 |    * );
5347 |    * console.log(await resultHandle.jsonValue());
5348 |    * await resultHandle.dispose();
5349 |    * ```
5350 |    *
5351 |    * @param pageFunction Function to be evaluated in the page context.
5352 |    * @param arg Optional argument to pass to
5353 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
5354 |    */
5355 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
5356 |   /**
5357 |    * Returns the return value of
5358 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
5359 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5360 |    *
5361 |    * The only difference between
5362 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5363 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5364 |    * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5365 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5366 |    *
5367 |    * If the function, passed to the
5368 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5369 |    * returns a [Promise], then
5370 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5371 |    * would wait for the promise to resolve and return its value.
5372 |    *
5373 |    * **Usage**
5374 |    *
5375 |    * ```js
5376 |    * // Handle for the window object
5377 |    * const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window));
5378 |    * ```
5379 |    *
5380 |    * A string can also be passed in instead of a function.
5381 |    *
5382 |    * ```js
5383 |    * const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
5384 |    * ```
5385 |    *
5386 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5387 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5388 |    *
5389 |    * ```js
5390 |    * const aHandle = await frame.evaluateHandle(() => document.body);
5391 |    * const resultHandle = await frame.evaluateHandle(([body, suffix]) =>
5392 |    *   body.innerHTML + suffix, [aHandle, 'hello'],
5393 |    * );
5394 |    * console.log(await resultHandle.jsonValue());
5395 |    * await resultHandle.dispose();
5396 |    * ```
5397 |    *
5398 |    * @param pageFunction Function to be evaluated in the page context.
5399 |    * @param arg Optional argument to pass to
5400 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
5401 |    */
5402 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
5403 | 
5404 |   /**
5405 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5406 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5407 |    *
5408 |    * Returns the ElementHandle pointing to the frame element.
5409 |    *
5410 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5411 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
5412 |    *
5413 |    * The method finds an element matching the specified selector within the frame. If no elements match the selector,
5414 |    * returns `null`.
5415 |    * @param selector A selector to query for.
5416 |    * @param options
5417 |    */
5418 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
5419 |   /**
5420 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5421 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5422 |    *
5423 |    * Returns the ElementHandle pointing to the frame element.
5424 |    *
5425 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5426 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
5427 |    *
5428 |    * The method finds an element matching the specified selector within the frame. If no elements match the selector,
5429 |    * returns `null`.
5430 |    * @param selector A selector to query for.
5431 |    * @param options
5432 |    */
5433 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
5434 | 
5435 |   /**
5436 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5437 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5438 |    *
5439 |    * Returns the ElementHandles pointing to the frame elements.
5440 |    *
5441 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5442 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
5443 |    *
5444 |    * The method finds all elements matching the specified selector within the frame. If no elements match the selector,
5445 |    * returns empty array.
5446 |    * @param selector A selector to query for.
5447 |    */
5448 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
5449 |   /**
5450 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5451 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5452 |    *
5453 |    * Returns the ElementHandles pointing to the frame elements.
5454 |    *
5455 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5456 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
5457 |    *
5458 |    * The method finds all elements matching the specified selector within the frame. If no elements match the selector,
5459 |    * returns empty array.
5460 |    * @param selector A selector to query for.
5461 |    */
5462 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
5463 | 
5464 |   /**
5465 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5466 |    * tests. Use
5467 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5468 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5469 |    *
5470 |    * Returns the return value of
5471 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5472 |    *
5473 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5474 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5475 |    * elements match the selector, the method throws an error.
5476 |    *
5477 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5478 |    * [Promise], then
5479 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5480 |    * would wait for the promise to resolve and return its value.
5481 |    *
5482 |    * **Usage**
5483 |    *
5484 |    * ```js
5485 |    * const searchValue = await frame.$eval('#search', el => el.value);
5486 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5487 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5488 |    * ```
5489 |    *
5490 |    * @param selector A selector to query for.
5491 |    * @param pageFunction Function to be evaluated in the page context.
5492 |    * @param arg Optional argument to pass to
5493 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5494 |    * @param options
5495 |    */
5496 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
5497 |   /**
5498 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5499 |    * tests. Use
5500 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5501 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5502 |    *
5503 |    * Returns the return value of
5504 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5505 |    *
5506 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5507 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5508 |    * elements match the selector, the method throws an error.
5509 |    *
5510 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5511 |    * [Promise], then
5512 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5513 |    * would wait for the promise to resolve and return its value.
5514 |    *
5515 |    * **Usage**
5516 |    *
5517 |    * ```js
5518 |    * const searchValue = await frame.$eval('#search', el => el.value);
5519 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5520 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5521 |    * ```
5522 |    *
5523 |    * @param selector A selector to query for.
5524 |    * @param pageFunction Function to be evaluated in the page context.
5525 |    * @param arg Optional argument to pass to
5526 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5527 |    * @param options
5528 |    */
5529 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
5530 |   /**
5531 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5532 |    * tests. Use
5533 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5534 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5535 |    *
5536 |    * Returns the return value of
5537 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5538 |    *
5539 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5540 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5541 |    * elements match the selector, the method throws an error.
5542 |    *
5543 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5544 |    * [Promise], then
5545 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5546 |    * would wait for the promise to resolve and return its value.
5547 |    *
5548 |    * **Usage**
5549 |    *
5550 |    * ```js
5551 |    * const searchValue = await frame.$eval('#search', el => el.value);
5552 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5553 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5554 |    * ```
5555 |    *
5556 |    * @param selector A selector to query for.
5557 |    * @param pageFunction Function to be evaluated in the page context.
5558 |    * @param arg Optional argument to pass to
5559 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5560 |    * @param options
5561 |    */
5562 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
5563 |   /**
5564 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5565 |    * tests. Use
5566 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5567 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5568 |    *
5569 |    * Returns the return value of
5570 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5571 |    *
5572 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5573 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5574 |    * elements match the selector, the method throws an error.
5575 |    *
5576 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5577 |    * [Promise], then
5578 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5579 |    * would wait for the promise to resolve and return its value.
5580 |    *
5581 |    * **Usage**
5582 |    *
5583 |    * ```js
5584 |    * const searchValue = await frame.$eval('#search', el => el.value);
5585 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5586 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5587 |    * ```
5588 |    *
5589 |    * @param selector A selector to query for.
5590 |    * @param pageFunction Function to be evaluated in the page context.
5591 |    * @param arg Optional argument to pass to
5592 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5593 |    * @param options
5594 |    */
5595 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
5596 | 
5597 |   /**
5598 |    * **NOTE** In most cases,
5599 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5600 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5601 |    * job.
5602 |    *
5603 |    * Returns the return value of
5604 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5605 |    *
5606 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5607 |    * elements as a first argument to
5608 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5609 |    *
5610 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5611 |    * returns a [Promise], then
5612 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5613 |    * would wait for the promise to resolve and return its value.
5614 |    *
5615 |    * **Usage**
5616 |    *
5617 |    * ```js
5618 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5619 |    * ```
5620 |    *
5621 |    * @param selector A selector to query for.
5622 |    * @param pageFunction Function to be evaluated in the page context.
5623 |    * @param arg Optional argument to pass to
5624 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5625 |    */
5626 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
5627 |   /**
5628 |    * **NOTE** In most cases,
5629 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5630 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5631 |    * job.
5632 |    *
5633 |    * Returns the return value of
5634 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5635 |    *
5636 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5637 |    * elements as a first argument to
5638 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5639 |    *
5640 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5641 |    * returns a [Promise], then
5642 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5643 |    * would wait for the promise to resolve and return its value.
5644 |    *
5645 |    * **Usage**
5646 |    *
5647 |    * ```js
5648 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5649 |    * ```
5650 |    *
5651 |    * @param selector A selector to query for.
5652 |    * @param pageFunction Function to be evaluated in the page context.
5653 |    * @param arg Optional argument to pass to
5654 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5655 |    */
5656 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
5657 |   /**
5658 |    * **NOTE** In most cases,
5659 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5660 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5661 |    * job.
5662 |    *
5663 |    * Returns the return value of
5664 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5665 |    *
5666 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5667 |    * elements as a first argument to
5668 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5669 |    *
5670 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5671 |    * returns a [Promise], then
5672 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5673 |    * would wait for the promise to resolve and return its value.
5674 |    *
5675 |    * **Usage**
5676 |    *
5677 |    * ```js
5678 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5679 |    * ```
5680 |    *
5681 |    * @param selector A selector to query for.
5682 |    * @param pageFunction Function to be evaluated in the page context.
5683 |    * @param arg Optional argument to pass to
5684 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5685 |    */
5686 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
5687 |   /**
5688 |    * **NOTE** In most cases,
5689 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5690 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5691 |    * job.
5692 |    *
5693 |    * Returns the return value of
5694 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5695 |    *
5696 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5697 |    * elements as a first argument to
5698 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5699 |    *
5700 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5701 |    * returns a [Promise], then
5702 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5703 |    * would wait for the promise to resolve and return its value.
5704 |    *
5705 |    * **Usage**
5706 |    *
5707 |    * ```js
5708 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5709 |    * ```
5710 |    *
5711 |    * @param selector A selector to query for.
5712 |    * @param pageFunction Function to be evaluated in the page context.
5713 |    * @param arg Optional argument to pass to
5714 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5715 |    */
5716 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
5717 | 
5718 |   /**
5719 |    * Returns when the
5720 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
5721 |    * truthy value, returns that value.
5722 |    *
5723 |    * **Usage**
5724 |    *
5725 |    * The
5726 |    * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-function)
5727 |    * can be used to observe viewport size change:
5728 |    *
5729 |    * ```js
5730 |    * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5731 |    *
5732 |    * (async () => {
5733 |    *   const browser = await firefox.launch();
5734 |    *   const page = await browser.newPage();
5735 |    *   const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100');
5736 |    *   await page.setViewportSize({ width: 50, height: 50 });
5737 |    *   await watchDog;
5738 |    *   await browser.close();
5739 |    * })();
5740 |    * ```
5741 |    *
5742 |    * To pass an argument to the predicate of `frame.waitForFunction` function:
5743 |    *
5744 |    * ```js
5745 |    * const selector = '.foo';
5746 |    * await frame.waitForFunction(selector => !!document.querySelector(selector), selector);
5747 |    * ```
5748 |    *
5749 |    * @param pageFunction Function to be evaluated in the page context.
5750 |    * @param arg Optional argument to pass to
5751 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
5752 |    * @param options
5753 |    */
5754 |   waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
5755 |   /**
5756 |    * Returns when the
5757 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
5758 |    * truthy value, returns that value.
5759 |    *
5760 |    * **Usage**
5761 |    *
5762 |    * The
5763 |    * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-function)
5764 |    * can be used to observe viewport size change:
5765 |    *
5766 |    * ```js
5767 |    * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5768 |    *
5769 |    * (async () => {
5770 |    *   const browser = await firefox.launch();
5771 |    *   const page = await browser.newPage();
5772 |    *   const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100');
5773 |    *   await page.setViewportSize({ width: 50, height: 50 });
5774 |    *   await watchDog;
5775 |    *   await browser.close();
5776 |    * })();
5777 |    * ```
5778 |    *
5779 |    * To pass an argument to the predicate of `frame.waitForFunction` function:
5780 |    *
5781 |    * ```js
5782 |    * const selector = '.foo';
5783 |    * await frame.waitForFunction(selector => !!document.querySelector(selector), selector);
5784 |    * ```
5785 |    *
5786 |    * @param pageFunction Function to be evaluated in the page context.
5787 |    * @param arg Optional argument to pass to
5788 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
5789 |    * @param options
5790 |    */
5791 |   waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
5792 | 
5793 |   /**
5794 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5795 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5796 |    * about [locators](https://playwright.dev/docs/locators).
5797 |    *
5798 |    * Returns when element specified by selector satisfies
5799 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5800 |    * if waiting for `hidden` or `detached`.
5801 |    *
5802 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5803 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5804 |    * wait-for-selector-free.
5805 |    *
5806 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5807 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5808 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5809 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5810 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5811 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5812 |    * function will throw.
5813 |    *
5814 |    * **Usage**
5815 |    *
5816 |    * This method works across navigations:
5817 |    *
5818 |    * ```js
5819 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5820 |    *
5821 |    * (async () => {
5822 |    *   const browser = await chromium.launch();
5823 |    *   const page = await browser.newPage();
5824 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5825 |    *     await page.goto(currentURL);
5826 |    *     const element = await page.mainFrame().waitForSelector('img');
5827 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5828 |    *   }
5829 |    *   await browser.close();
5830 |    * })();
5831 |    * ```
5832 |    *
5833 |    * @param selector A selector to query for.
5834 |    * @param options
5835 |    */
5836 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
5837 |   /**
5838 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5839 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5840 |    * about [locators](https://playwright.dev/docs/locators).
5841 |    *
5842 |    * Returns when element specified by selector satisfies
5843 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5844 |    * if waiting for `hidden` or `detached`.
5845 |    *
5846 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5847 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5848 |    * wait-for-selector-free.
5849 |    *
5850 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5851 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5852 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5853 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5854 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5855 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5856 |    * function will throw.
5857 |    *
5858 |    * **Usage**
5859 |    *
5860 |    * This method works across navigations:
5861 |    *
5862 |    * ```js
5863 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5864 |    *
5865 |    * (async () => {
5866 |    *   const browser = await chromium.launch();
5867 |    *   const page = await browser.newPage();
5868 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5869 |    *     await page.goto(currentURL);
5870 |    *     const element = await page.mainFrame().waitForSelector('img');
5871 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5872 |    *   }
5873 |    *   await browser.close();
5874 |    * })();
5875 |    * ```
5876 |    *
5877 |    * @param selector A selector to query for.
5878 |    * @param options
5879 |    */
5880 |   waitForSelector(selector: string, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
5881 |   /**
5882 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5883 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5884 |    * about [locators](https://playwright.dev/docs/locators).
5885 |    *
5886 |    * Returns when element specified by selector satisfies
5887 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5888 |    * if waiting for `hidden` or `detached`.
5889 |    *
5890 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5891 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5892 |    * wait-for-selector-free.
5893 |    *
5894 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5895 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5896 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5897 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5898 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5899 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5900 |    * function will throw.
5901 |    *
5902 |    * **Usage**
5903 |    *
5904 |    * This method works across navigations:
5905 |    *
5906 |    * ```js
5907 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5908 |    *
5909 |    * (async () => {
5910 |    *   const browser = await chromium.launch();
5911 |    *   const page = await browser.newPage();
5912 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5913 |    *     await page.goto(currentURL);
5914 |    *     const element = await page.mainFrame().waitForSelector('img');
5915 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5916 |    *   }
5917 |    *   await browser.close();
5918 |    * })();
5919 |    * ```
5920 |    *
5921 |    * @param selector A selector to query for.
5922 |    * @param options
5923 |    */
5924 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: PageWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
5925 |   /**
5926 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5927 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5928 |    * about [locators](https://playwright.dev/docs/locators).
5929 |    *
5930 |    * Returns when element specified by selector satisfies
5931 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5932 |    * if waiting for `hidden` or `detached`.
5933 |    *
5934 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5935 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5936 |    * wait-for-selector-free.
5937 |    *
5938 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5939 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5940 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5941 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5942 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5943 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5944 |    * function will throw.
5945 |    *
5946 |    * **Usage**
5947 |    *
5948 |    * This method works across navigations:
5949 |    *
5950 |    * ```js
5951 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5952 |    *
5953 |    * (async () => {
5954 |    *   const browser = await chromium.launch();
5955 |    *   const page = await browser.newPage();
5956 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5957 |    *     await page.goto(currentURL);
5958 |    *     const element = await page.mainFrame().waitForSelector('img');
5959 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5960 |    *   }
5961 |    *   await browser.close();
5962 |    * })();
5963 |    * ```
5964 |    *
5965 |    * @param selector A selector to query for.
5966 |    * @param options
5967 |    */
5968 |   waitForSelector(selector: string, options: PageWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
5969 |   /**
5970 |    * Returns the added tag when the script's onload fires or when the script content was injected into frame.
5971 |    *
5972 |    * Adds a `<script>` tag into the page with the desired url or content.
5973 |    * @param options
5974 |    */
5975 |   addScriptTag(options?: {
5976 |     /**
5977 |      * Raw JavaScript content to be injected into frame.
5978 |      */
5979 |     content?: string;
5980 | 
5981 |     /**
5982 |      * Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
5983 |      * to the current working directory.
5984 |      */
5985 |     path?: string;
5986 | 
5987 |     /**
5988 |      * Script type. Use 'module' in order to load a JavaScript ES6 module. See
5989 |      * [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
5990 |      */
5991 |     type?: string;
5992 | 
5993 |     /**
5994 |      * URL of a script to be added.
5995 |      */
5996 |     url?: string;
5997 |   }): Promise<ElementHandle>;
5998 | 
5999 |   /**
6000 |    * Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
6001 |    *
6002 |    * Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
6003 |    * content.
6004 |    * @param options
6005 |    */
6006 |   addStyleTag(options?: {
6007 |     /**
6008 |      * Raw CSS content to be injected into frame.
6009 |      */
6010 |     content?: string;
6011 | 
6012 |     /**
6013 |      * Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
6014 |      * current working directory.
6015 |      */
6016 |     path?: string;
6017 | 
6018 |     /**
6019 |      * URL of the `<link>` tag.
6020 |      */
6021 |     url?: string;
6022 |   }): Promise<ElementHandle>;
6023 | 
6024 |   /**
6025 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
6026 |    * Read more about [locators](https://playwright.dev/docs/locators).
6027 |    *
6028 |    * This method checks an element matching
6029 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector) by performing the following
6030 |    * steps:
6031 |    * 1. Find an element matching
6032 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector). If there is none, wait
6033 |    *    until a matching element is attached to the DOM.
6034 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
6035 |    *    already checked, this method returns immediately.
6036 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6037 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-check-option-force) option is set. If the element
6038 |    *    is detached during the checks, the whole action is retried.
6039 |    * 1. Scroll the element into view if needed.
6040 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
6041 |    *    element.
6042 |    * 1. Ensure that the element is now checked. If not, this method throws.
6043 |    *
6044 |    * When all steps combined have not finished during the specified
6045 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-check-option-timeout), this method throws a
6046 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6047 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6048 |    * used.
6049 |    * @param options
6050 |    */
6051 |   check(selector: string, options?: {
6052 |     /**
6053 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6054 |      */
6055 |     force?: boolean;
6056 | 
6057 |     /**
6058 |      * This option has no effect.
6059 |      * @deprecated This option has no effect.
6060 |      */
6061 |     noWaitAfter?: boolean;
6062 | 
6063 |     /**
6064 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6065 |      * the element.
6066 |      */
6067 |     position?: {
6068 |       x: number;
6069 | 
6070 |       y: number;
6071 |     };
6072 | 
6073 |     /**
6074 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6075 |      * element, the call throws an exception.
6076 |      */
6077 |     strict?: boolean;
6078 | 
6079 |     /**
6080 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6081 |      * option in the config, or by using the
6082 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6083 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6084 |      */
6085 |     timeout?: number;
6086 | 
6087 |     /**
6088 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6089 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
6090 |      */
6091 |     trial?: boolean;
6092 |   }): Promise<void>;
6093 | 
6094 |   childFrames(): Array<Frame>;
6095 | 
6096 |   /**
6097 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
6098 |    * Read more about [locators](https://playwright.dev/docs/locators).
6099 |    *
6100 |    * This method clicks an element matching
6101 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector) by performing the following
6102 |    * steps:
6103 |    * 1. Find an element matching
6104 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector). If there is none, wait
6105 |    *    until a matching element is attached to the DOM.
6106 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6107 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-click-option-force) option is set. If the element
6108 |    *    is detached during the checks, the whole action is retried.
6109 |    * 1. Scroll the element into view if needed.
6110 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
6111 |    *    element, or the specified
6112 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-click-option-position).
6113 |    * 1. Wait for initiated navigations to either succeed or fail, unless
6114 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-frame#frame-click-option-no-wait-after) option is set.
6115 |    *
6116 |    * When all steps combined have not finished during the specified
6117 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-click-option-timeout), this method throws a
6118 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6119 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6120 |    * used.
6121 |    * @param options
6122 |    */
6123 |   click(selector: string, options?: {
6124 |     /**
6125 |      * Defaults to `left`.
6126 |      */
6127 |     button?: "left"|"right"|"middle";
6128 | 
6129 |     /**
6130 |      * defaults to 1. See [UIEvent.detail].
6131 |      */
6132 |     clickCount?: number;
6133 | 
6134 |     /**
6135 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
6136 |      */
6137 |     delay?: number;
6138 | 
6139 |     /**
6140 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6141 |      */
6142 |     force?: boolean;
6143 | 
6144 |     /**
6145 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6146 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6147 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6148 |      */
6149 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6150 | 
6151 |     /**
6152 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
6153 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
6154 |      * navigating to inaccessible pages. Defaults to `false`.
6155 |      * @deprecated This option will default to `true` in the future.
6156 |      */
6157 |     noWaitAfter?: boolean;
6158 | 
6159 |     /**
6160 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6161 |      * the element.
6162 |      */
6163 |     position?: {
6164 |       x: number;
6165 | 
6166 |       y: number;
6167 |     };
6168 | 
6169 |     /**
6170 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6171 |      * element, the call throws an exception.
6172 |      */
6173 |     strict?: boolean;
6174 | 
6175 |     /**
6176 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6177 |      * option in the config, or by using the
6178 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6179 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6180 |      */
6181 |     timeout?: number;
6182 | 
6183 |     /**
6184 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6185 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
6186 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
6187 |      * are pressed.
6188 |      */
6189 |     trial?: boolean;
6190 |   }): Promise<void>;
6191 | 
6192 |   /**
6193 |    * Gets the full HTML contents of the frame, including the doctype.
6194 |    */
6195 |   content(): Promise<string>;
6196 | 
6197 |   /**
6198 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
6199 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6200 |    *
6201 |    * This method double clicks an element matching
6202 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector) by performing the
6203 |    * following steps:
6204 |    * 1. Find an element matching
6205 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector). If there is none,
6206 |    *    wait until a matching element is attached to the DOM.
6207 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6208 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-force) option is set. If the
6209 |    *    element is detached during the checks, the whole action is retried.
6210 |    * 1. Scroll the element into view if needed.
6211 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
6212 |    *    element, or the specified
6213 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-position). if the first click
6214 |    *    of the `dblclick()` triggers a navigation event, this method will throw.
6215 |    *
6216 |    * When all steps combined have not finished during the specified
6217 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-timeout), this method throws a
6218 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6219 |    *
6220 |    * **NOTE** `frame.dblclick()` dispatches two `click` events and a single `dblclick` event.
6221 |    *
6222 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6223 |    * used.
6224 |    * @param options
6225 |    */
6226 |   dblclick(selector: string, options?: {
6227 |     /**
6228 |      * Defaults to `left`.
6229 |      */
6230 |     button?: "left"|"right"|"middle";
6231 | 
6232 |     /**
6233 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
6234 |      */
6235 |     delay?: number;
6236 | 
6237 |     /**
6238 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6239 |      */
6240 |     force?: boolean;
6241 | 
6242 |     /**
6243 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6244 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6245 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6246 |      */
6247 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6248 | 
6249 |     /**
6250 |      * This option has no effect.
6251 |      * @deprecated This option has no effect.
6252 |      */
6253 |     noWaitAfter?: boolean;
6254 | 
6255 |     /**
6256 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6257 |      * the element.
6258 |      */
6259 |     position?: {
6260 |       x: number;
6261 | 
6262 |       y: number;
6263 |     };
6264 | 
6265 |     /**
6266 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6267 |      * element, the call throws an exception.
6268 |      */
6269 |     strict?: boolean;
6270 | 
6271 |     /**
6272 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6273 |      * option in the config, or by using the
6274 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6275 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6276 |      */
6277 |     timeout?: number;
6278 | 
6279 |     /**
6280 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6281 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
6282 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
6283 |      * are pressed.
6284 |      */
6285 |     trial?: boolean;
6286 |   }): Promise<void>;
6287 | 
6288 |   /**
6289 |    * **NOTE** Use locator-based
6290 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
6291 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6292 |    *
6293 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
6294 |    * `click` is dispatched. This is equivalent to calling
6295 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
6296 |    *
6297 |    * **Usage**
6298 |    *
6299 |    * ```js
6300 |    * await frame.dispatchEvent('button#submit', 'click');
6301 |    * ```
6302 |    *
6303 |    * Under the hood, it creates an instance of an event based on the given
6304 |    * [`type`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-type), initializes it with
6305 |    * [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) properties and
6306 |    * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
6307 |    *
6308 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) is
6309 |    * event-specific, please refer to the events documentation for the lists of initial properties:
6310 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
6311 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
6312 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
6313 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
6314 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
6315 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
6316 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
6317 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
6318 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
6319 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
6320 |    *
6321 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
6322 |    *
6323 |    * ```js
6324 |    * // Note you can only create DataTransfer in Chromium and Firefox
6325 |    * const dataTransfer = await frame.evaluateHandle(() => new DataTransfer());
6326 |    * await frame.dispatchEvent('#source', 'dragstart', { dataTransfer });
6327 |    * ```
6328 |    *
6329 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6330 |    * used.
6331 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
6332 |    * @param eventInit Optional event-specific initialization properties.
6333 |    * @param options
6334 |    */
6335 |   dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
6336 |     /**
6337 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6338 |      * element, the call throws an exception.
6339 |      */
6340 |     strict?: boolean;
6341 | 
6342 |     /**
6343 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6344 |      * option in the config, or by using the
6345 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6346 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6347 |      */
6348 |     timeout?: number;
6349 |   }): Promise<void>;
6350 | 
6351 |   /**
6352 |    * @param source A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
6353 |    * be used.
6354 |    * @param target A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
6355 |    * will be used.
6356 |    * @param options
6357 |    */
6358 |   dragAndDrop(source: string, target: string, options?: {
6359 |     /**
6360 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6361 |      */
6362 |     force?: boolean;
6363 | 
6364 |     /**
6365 |      * This option has no effect.
6366 |      * @deprecated This option has no effect.
6367 |      */
6368 |     noWaitAfter?: boolean;
6369 | 
6370 |     /**
6371 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
6372 |      * specified, some visible point of the element is used.
6373 |      */
6374 |     sourcePosition?: {
6375 |       x: number;
6376 | 
6377 |       y: number;
6378 |     };
6379 | 
6380 |     /**
6381 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6382 |      * element, the call throws an exception.
6383 |      */
6384 |     strict?: boolean;
6385 | 
6386 |     /**
6387 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
6388 |      * specified, some visible point of the element is used.
6389 |      */
6390 |     targetPosition?: {
6391 |       x: number;
6392 | 
6393 |       y: number;
6394 |     };
6395 | 
6396 |     /**
6397 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6398 |      * option in the config, or by using the
6399 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6400 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6401 |      */
6402 |     timeout?: number;
6403 | 
6404 |     /**
6405 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6406 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
6407 |      */
6408 |     trial?: boolean;
6409 |   }): Promise<void>;
6410 | 
6411 |   /**
6412 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
6413 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6414 |    *
6415 |    * This method waits for an element matching
6416 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-fill-option-selector), waits for
6417 |    * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
6418 |    * filling. Note that you can pass an empty string to clear the input field.
6419 |    *
6420 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
6421 |    * error. However, if the element is inside the `<label>` element that has an associated
6422 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
6423 |    * instead.
6424 |    *
6425 |    * To send fine-grained keyboard events, use
6426 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
6427 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6428 |    * used.
6429 |    * @param value Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
6430 |    * @param options
6431 |    */
6432 |   fill(selector: string, value: string, options?: {
6433 |     /**
6434 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6435 |      */
6436 |     force?: boolean;
6437 | 
6438 |     /**
6439 |      * This option has no effect.
6440 |      * @deprecated This option has no effect.
6441 |      */
6442 |     noWaitAfter?: boolean;
6443 | 
6444 |     /**
6445 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6446 |      * element, the call throws an exception.
6447 |      */
6448 |     strict?: boolean;
6449 | 
6450 |     /**
6451 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6452 |      * option in the config, or by using the
6453 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6454 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6455 |      */
6456 |     timeout?: number;
6457 |   }): Promise<void>;
6458 | 
6459 |   /**
6460 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
6461 |    * Read more about [locators](https://playwright.dev/docs/locators).
6462 |    *
6463 |    * This method fetches an element with
6464 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector) and focuses it. If there's no
6465 |    * element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector), the method
6466 |    * waits until a matching element appears in the DOM.
6467 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6468 |    * used.
6469 |    * @param options
6470 |    */
6471 |   focus(selector: string, options?: {
6472 |     /**
6473 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6474 |      * element, the call throws an exception.
6475 |      */
6476 |     strict?: boolean;
6477 | 
6478 |     /**
6479 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6480 |      * option in the config, or by using the
6481 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6482 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6483 |      */
6484 |     timeout?: number;
6485 |   }): Promise<void>;
6486 | 
6487 |   /**
6488 |    * Returns the `frame` or `iframe` element handle which corresponds to this frame.
6489 |    *
6490 |    * This is an inverse of
6491 |    * [elementHandle.contentFrame()](https://playwright.dev/docs/api/class-elementhandle#element-handle-content-frame).
6492 |    * Note that returned handle actually belongs to the parent frame.
6493 |    *
6494 |    * This method throws an error if the frame has been detached before `frameElement()` returns.
6495 |    *
6496 |    * **Usage**
6497 |    *
6498 |    * ```js
6499 |    * const frameElement = await frame.frameElement();
6500 |    * const contentFrame = await frameElement.contentFrame();
6501 |    * console.log(frame === contentFrame);  // -> true
6502 |    * ```
6503 |    *
6504 |    */
6505 |   frameElement(): Promise<ElementHandle>;
6506 | 
6507 |   /**
6508 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
6509 |    * in that iframe.
6510 |    *
6511 |    * **Usage**
6512 |    *
6513 |    * Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
6514 |    * id="my-frame">`:
6515 |    *
6516 |    * ```js
6517 |    * const locator = frame.frameLocator('#my-iframe').getByText('Submit');
6518 |    * await locator.click();
6519 |    * ```
6520 |    *
6521 |    * @param selector A selector to use when resolving DOM element.
6522 |    */
6523 |   frameLocator(selector: string): FrameLocator;
6524 | 
6525 |   /**
6526 |    * **NOTE** Use locator-based
6527 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
6528 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6529 |    *
6530 |    * Returns element attribute value.
6531 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6532 |    * used.
6533 |    * @param name Attribute name to get the value for.
6534 |    * @param options
6535 |    */
6536 |   getAttribute(selector: string, name: string, options?: {
6537 |     /**
6538 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6539 |      * element, the call throws an exception.
6540 |      */
6541 |     strict?: boolean;
6542 | 
6543 |     /**
6544 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6545 |      * option in the config, or by using the
6546 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6547 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6548 |      */
6549 |     timeout?: number;
6550 |   }): Promise<null|string>;
6551 | 
6552 |   /**
6553 |    * Allows locating elements by their alt text.
6554 |    *
6555 |    * **Usage**
6556 |    *
6557 |    * For example, this method will find the image by alt text "Playwright logo":
6558 |    *
6559 |    * ```html
6560 |    * <img alt='Playwright logo'>
6561 |    * ```
6562 |    *
6563 |    * ```js
6564 |    * await page.getByAltText('Playwright logo').click();
6565 |    * ```
6566 |    *
6567 |    * @param text Text to locate the element for.
6568 |    * @param options
6569 |    */
6570 |   getByAltText(text: string|RegExp, options?: {
6571 |     /**
6572 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6573 |      * regular expression. Note that exact match still trims whitespace.
6574 |      */
6575 |     exact?: boolean;
6576 |   }): Locator;
6577 | 
6578 |   /**
6579 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
6580 |    * `aria-label` attribute.
6581 |    *
6582 |    * **Usage**
6583 |    *
6584 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
6585 |    *
6586 |    * ```html
6587 |    * <input aria-label="Username">
6588 |    * <label for="password-input">Password:</label>
6589 |    * <input id="password-input">
6590 |    * ```
6591 |    *
6592 |    * ```js
6593 |    * await page.getByLabel('Username').fill('john');
6594 |    * await page.getByLabel('Password').fill('secret');
6595 |    * ```
6596 |    *
6597 |    * @param text Text to locate the element for.
6598 |    * @param options
6599 |    */
6600 |   getByLabel(text: string|RegExp, options?: {
6601 |     /**
6602 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6603 |      * regular expression. Note that exact match still trims whitespace.
6604 |      */
6605 |     exact?: boolean;
6606 |   }): Locator;
6607 | 
6608 |   /**
6609 |    * Allows locating input elements by the placeholder text.
6610 |    *
6611 |    * **Usage**
6612 |    *
6613 |    * For example, consider the following DOM structure.
6614 |    *
6615 |    * ```html
6616 |    * <input type="email" placeholder="name@example.com" />
6617 |    * ```
6618 |    *
6619 |    * You can fill the input after locating it by the placeholder text:
6620 |    *
6621 |    * ```js
6622 |    * await page
6623 |    *     .getByPlaceholder('name@example.com')
6624 |    *     .fill('playwright@microsoft.com');
6625 |    * ```
6626 |    *
6627 |    * @param text Text to locate the element for.
6628 |    * @param options
6629 |    */
6630 |   getByPlaceholder(text: string|RegExp, options?: {
6631 |     /**
6632 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6633 |      * regular expression. Note that exact match still trims whitespace.
6634 |      */
6635 |     exact?: boolean;
6636 |   }): Locator;
6637 | 
6638 |   /**
6639 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
6640 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
6641 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
6642 |    *
6643 |    * **Usage**
6644 |    *
6645 |    * Consider the following DOM structure.
6646 |    *
6647 |    * ```html
6648 |    * <h3>Sign up</h3>
6649 |    * <label>
6650 |    *   <input type="checkbox" /> Subscribe
6651 |    * </label>
6652 |    * <br/>
6653 |    * <button>Submit</button>
6654 |    * ```
6655 |    *
6656 |    * You can locate each element by it's implicit role:
6657 |    *
6658 |    * ```js
6659 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
6660 |    *
6661 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
6662 |    *
6663 |    * await page.getByRole('button', { name: /submit/i }).click();
6664 |    * ```
6665 |    *
6666 |    * **Details**
6667 |    *
6668 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
6669 |    * about the ARIA guidelines.
6670 |    *
6671 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
6672 |    * that is recognized by the role selector. You can find all the
6673 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
6674 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
6675 |    * @param role Required aria role.
6676 |    * @param options
6677 |    */
6678 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
6679 |     /**
6680 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
6681 |      *
6682 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
6683 |      */
6684 |     checked?: boolean;
6685 | 
6686 |     /**
6687 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
6688 |      *
6689 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
6690 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
6691 |      *
6692 |      */
6693 |     disabled?: boolean;
6694 | 
6695 |     /**
6696 |      * Whether [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is matched exactly:
6697 |      * case-sensitive and whole-string. Defaults to false. Ignored when
6698 |      * [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is a regular expression. Note
6699 |      * that exact match still trims whitespace.
6700 |      */
6701 |     exact?: boolean;
6702 | 
6703 |     /**
6704 |      * An attribute that is usually set by `aria-expanded`.
6705 |      *
6706 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
6707 |      */
6708 |     expanded?: boolean;
6709 | 
6710 |     /**
6711 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
6712 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
6713 |      *
6714 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
6715 |      */
6716 |     includeHidden?: boolean;
6717 | 
6718 |     /**
6719 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
6720 |      * for `<h1>-<h6>` elements.
6721 |      *
6722 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
6723 |      */
6724 |     level?: number;
6725 | 
6726 |     /**
6727 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
6728 |      * case-insensitive and searches for a substring, use
6729 |      * [`exact`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-exact) to control this behavior.
6730 |      *
6731 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
6732 |      */
6733 |     name?: string|RegExp;
6734 | 
6735 |     /**
6736 |      * An attribute that is usually set by `aria-pressed`.
6737 |      *
6738 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
6739 |      */
6740 |     pressed?: boolean;
6741 | 
6742 |     /**
6743 |      * An attribute that is usually set by `aria-selected`.
6744 |      *
6745 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
6746 |      */
6747 |     selected?: boolean;
6748 |   }): Locator;
6749 | 
6750 |   /**
6751 |    * Locate element by the test id.
6752 |    *
6753 |    * **Usage**
6754 |    *
6755 |    * Consider the following DOM structure.
6756 |    *
6757 |    * ```html
6758 |    * <button data-testid="directions">Itinéraire</button>
6759 |    * ```
6760 |    *
6761 |    * You can locate the element by it's test id:
6762 |    *
6763 |    * ```js
6764 |    * await page.getByTestId('directions').click();
6765 |    * ```
6766 |    *
6767 |    * **Details**
6768 |    *
6769 |    * By default, the `data-testid` attribute is used as a test id. Use
6770 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
6771 |    * to configure a different test id attribute if necessary.
6772 |    *
6773 |    * ```js
6774 |    * // Set custom test id attribute from @playwright/test config:
6775 |    * import { defineConfig } from '@playwright/test';
6776 |    *
6777 |    * export default defineConfig({
6778 |    *   use: {
6779 |    *     testIdAttribute: 'data-pw'
6780 |    *   },
6781 |    * });
6782 |    * ```
6783 |    *
6784 |    * @param testId Id to locate the element by.
6785 |    */
6786 |   getByTestId(testId: string|RegExp): Locator;
6787 | 
6788 |   /**
6789 |    * Allows locating elements that contain given text.
6790 |    *
6791 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
6792 |    * match by another criteria, like an accessible role, and then filter by the text content.
6793 |    *
6794 |    * **Usage**
6795 |    *
6796 |    * Consider the following DOM structure:
6797 |    *
6798 |    * ```html
6799 |    * <div>Hello <span>world</span></div>
6800 |    * <div>Hello</div>
6801 |    * ```
6802 |    *
6803 |    * You can locate by text substring, exact string, or a regular expression:
6804 |    *
6805 |    * ```js
6806 |    * // Matches <span>
6807 |    * page.getByText('world');
6808 |    *
6809 |    * // Matches first <div>
6810 |    * page.getByText('Hello world');
6811 |    *
6812 |    * // Matches second <div>
6813 |    * page.getByText('Hello', { exact: true });
6814 |    *
6815 |    * // Matches both <div>s
6816 |    * page.getByText(/Hello/);
6817 |    *
6818 |    * // Matches second <div>
6819 |    * page.getByText(/^hello$/i);
6820 |    * ```
6821 |    *
6822 |    * **Details**
6823 |    *
6824 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
6825 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
6826 |    *
6827 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
6828 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
6829 |    * @param text Text to locate the element for.
6830 |    * @param options
6831 |    */
6832 |   getByText(text: string|RegExp, options?: {
6833 |     /**
6834 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6835 |      * regular expression. Note that exact match still trims whitespace.
6836 |      */
6837 |     exact?: boolean;
6838 |   }): Locator;
6839 | 
6840 |   /**
6841 |    * Allows locating elements by their title attribute.
6842 |    *
6843 |    * **Usage**
6844 |    *
6845 |    * Consider the following DOM structure.
6846 |    *
6847 |    * ```html
6848 |    * <span title='Issues count'>25 issues</span>
6849 |    * ```
6850 |    *
6851 |    * You can check the issues count after locating it by the title text:
6852 |    *
6853 |    * ```js
6854 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
6855 |    * ```
6856 |    *
6857 |    * @param text Text to locate the element for.
6858 |    * @param options
6859 |    */
6860 |   getByTitle(text: string|RegExp, options?: {
6861 |     /**
6862 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6863 |      * regular expression. Note that exact match still trims whitespace.
6864 |      */
6865 |     exact?: boolean;
6866 |   }): Locator;
6867 | 
6868 |   /**
6869 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
6870 |    * the last redirect.
6871 |    *
6872 |    * The method will throw an error if:
6873 |    * - there's an SSL error (e.g. in case of self-signed certificates).
6874 |    * - target URL is invalid.
6875 |    * - the [`timeout`](https://playwright.dev/docs/api/class-frame#frame-goto-option-timeout) is exceeded during
6876 |    *   navigation.
6877 |    * - the remote server does not respond or is unreachable.
6878 |    * - the main resource failed to load.
6879 |    *
6880 |    * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
6881 |    * "Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
6882 |    * [response.status()](https://playwright.dev/docs/api/class-response#response-status).
6883 |    *
6884 |    * **NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
6885 |    * to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
6886 |    *
6887 |    * **NOTE** Headless mode doesn't support navigation to a PDF document. See the
6888 |    * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
6889 |    *
6890 |    * @param url URL to navigate frame to. The url should include scheme, e.g. `https://`.
6891 |    * @param options
6892 |    */
6893 |   goto(url: string, options?: {
6894 |     /**
6895 |      * Referer header value. If provided it will take preference over the referer header value set by
6896 |      * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
6897 |      */
6898 |     referer?: string;
6899 | 
6900 |     /**
6901 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
6902 |      * `navigationTimeout` option in the config, or by using the
6903 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
6904 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
6905 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
6906 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6907 |      */
6908 |     timeout?: number;
6909 | 
6910 |     /**
6911 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
6912 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
6913 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
6914 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
6915 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
6916 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
6917 |      *   loading.
6918 |      */
6919 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
6920 |   }): Promise<null|Response>;
6921 | 
6922 |   /**
6923 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
6924 |    * Read more about [locators](https://playwright.dev/docs/locators).
6925 |    *
6926 |    * This method hovers over an element matching
6927 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector) by performing the following
6928 |    * steps:
6929 |    * 1. Find an element matching
6930 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector). If there is none, wait
6931 |    *    until a matching element is attached to the DOM.
6932 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6933 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-hover-option-force) option is set. If the element
6934 |    *    is detached during the checks, the whole action is retried.
6935 |    * 1. Scroll the element into view if needed.
6936 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
6937 |    *    element, or the specified
6938 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-hover-option-position).
6939 |    *
6940 |    * When all steps combined have not finished during the specified
6941 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-hover-option-timeout), this method throws a
6942 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6943 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6944 |    * used.
6945 |    * @param options
6946 |    */
6947 |   hover(selector: string, options?: {
6948 |     /**
6949 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6950 |      */
6951 |     force?: boolean;
6952 | 
6953 |     /**
6954 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6955 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6956 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6957 |      */
6958 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6959 | 
6960 |     /**
6961 |      * This option has no effect.
6962 |      * @deprecated This option has no effect.
6963 |      */
6964 |     noWaitAfter?: boolean;
6965 | 
6966 |     /**
6967 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6968 |      * the element.
6969 |      */
6970 |     position?: {
6971 |       x: number;
6972 | 
6973 |       y: number;
6974 |     };
6975 | 
6976 |     /**
6977 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6978 |      * element, the call throws an exception.
6979 |      */
6980 |     strict?: boolean;
6981 | 
6982 |     /**
6983 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6984 |      * option in the config, or by using the
6985 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6986 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6987 |      */
6988 |     timeout?: number;
6989 | 
6990 |     /**
6991 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6992 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
6993 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
6994 |      * are pressed.
6995 |      */
6996 |     trial?: boolean;
6997 |   }): Promise<void>;
6998 | 
6999 |   /**
7000 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
7001 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7002 |    *
7003 |    * Returns `element.innerHTML`.
7004 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7005 |    * used.
7006 |    * @param options
7007 |    */
7008 |   innerHTML(selector: string, options?: {
7009 |     /**
7010 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7011 |      * element, the call throws an exception.
7012 |      */
7013 |     strict?: boolean;
7014 | 
7015 |     /**
7016 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7017 |      * option in the config, or by using the
7018 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7019 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7020 |      */
7021 |     timeout?: number;
7022 |   }): Promise<string>;
7023 | 
7024 |   /**
7025 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
7026 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7027 |    *
7028 |    * Returns `element.innerText`.
7029 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7030 |    * used.
7031 |    * @param options
7032 |    */
7033 |   innerText(selector: string, options?: {
7034 |     /**
7035 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7036 |      * element, the call throws an exception.
7037 |      */
7038 |     strict?: boolean;
7039 | 
7040 |     /**
7041 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7042 |      * option in the config, or by using the
7043 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7044 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7045 |      */
7046 |     timeout?: number;
7047 |   }): Promise<string>;
7048 | 
7049 |   /**
7050 |    * **NOTE** Use locator-based
7051 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
7052 |    * more about [locators](https://playwright.dev/docs/locators).
7053 |    *
7054 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
7055 |    *
7056 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
7057 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
7058 |    * control.
7059 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7060 |    * used.
7061 |    * @param options
7062 |    */
7063 |   inputValue(selector: string, options?: {
7064 |     /**
7065 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7066 |      * element, the call throws an exception.
7067 |      */
7068 |     strict?: boolean;
7069 | 
7070 |     /**
7071 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7072 |      * option in the config, or by using the
7073 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7074 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7075 |      */
7076 |     timeout?: number;
7077 |   }): Promise<string>;
7078 | 
7079 |   /**
7080 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
7081 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7082 |    *
7083 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
7084 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7085 |    * used.
7086 |    * @param options
7087 |    */
7088 |   isChecked(selector: string, options?: {
7089 |     /**
7090 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7091 |      * element, the call throws an exception.
7092 |      */
7093 |     strict?: boolean;
7094 | 
7095 |     /**
7096 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7097 |      * option in the config, or by using the
7098 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7099 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7100 |      */
7101 |     timeout?: number;
7102 |   }): Promise<boolean>;
7103 | 
7104 |   /**
7105 |    * Returns `true` if the frame has been detached, or `false` otherwise.
7106 |    */
7107 |   isDetached(): boolean;
7108 | 
7109 |   /**
7110 |    * **NOTE** Use locator-based
7111 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
7112 |    * more about [locators](https://playwright.dev/docs/locators).
7113 |    *
7114 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
7115 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7116 |    * used.
7117 |    * @param options
7118 |    */
7119 |   isDisabled(selector: string, options?: {
7120 |     /**
7121 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7122 |      * element, the call throws an exception.
7123 |      */
7124 |     strict?: boolean;
7125 | 
7126 |     /**
7127 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7128 |      * option in the config, or by using the
7129 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7130 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7131 |      */
7132 |     timeout?: number;
7133 |   }): Promise<boolean>;
7134 | 
7135 |   /**
7136 |    * **NOTE** Use locator-based
7137 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
7138 |    * more about [locators](https://playwright.dev/docs/locators).
7139 |    *
7140 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
7141 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7142 |    * used.
7143 |    * @param options
7144 |    */
7145 |   isEditable(selector: string, options?: {
7146 |     /**
7147 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7148 |      * element, the call throws an exception.
7149 |      */
7150 |     strict?: boolean;
7151 | 
7152 |     /**
7153 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7154 |      * option in the config, or by using the
7155 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7156 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7157 |      */
7158 |     timeout?: number;
7159 |   }): Promise<boolean>;
7160 | 
7161 |   /**
7162 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
7163 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7164 |    * used.
7165 |    * @param options
7166 |    */
7167 |   isEnabled(selector: string, options?: {
7168 |     /**
7169 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7170 |      * element, the call throws an exception.
7171 |      */
7172 |     strict?: boolean;
7173 | 
7174 |     /**
7175 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7176 |      * option in the config, or by using the
7177 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7178 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7179 |      */
7180 |     timeout?: number;
7181 |   }): Promise<boolean>;
7182 | 
7183 |   /**
7184 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
7185 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7186 |    *
7187 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
7188 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-hidden-option-selector) that does not match any
7189 |    * elements is considered hidden.
7190 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7191 |    * used.
7192 |    * @param options
7193 |    */
7194 |   isHidden(selector: string, options?: {
7195 |     /**
7196 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7197 |      * element, the call throws an exception.
7198 |      */
7199 |     strict?: boolean;
7200 | 
7201 |     /**
7202 |      * @deprecated This option is ignored.
7203 |      * [frame.isHidden(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-is-hidden) does not wait
7204 |      * for the element to become hidden and returns immediately.
7205 |      */
7206 |     timeout?: number;
7207 |   }): Promise<boolean>;
7208 | 
7209 |   /**
7210 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
7211 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7212 |    *
7213 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
7214 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-visible-option-selector) that does not match any
7215 |    * elements is considered not visible.
7216 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7217 |    * used.
7218 |    * @param options
7219 |    */
7220 |   isVisible(selector: string, options?: {
7221 |     /**
7222 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7223 |      * element, the call throws an exception.
7224 |      */
7225 |     strict?: boolean;
7226 | 
7227 |     /**
7228 |      * @deprecated This option is ignored.
7229 |      * [frame.isVisible(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-is-visible) does not wait
7230 |      * for the element to become visible and returns immediately.
7231 |      */
7232 |     timeout?: number;
7233 |   }): Promise<boolean>;
7234 | 
7235 |   /**
7236 |    * The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
7237 |    * to the element immediately before performing an action, so a series of actions on the same locator can in fact be
7238 |    * performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
7239 |    *
7240 |    * [Learn more about locators](https://playwright.dev/docs/locators).
7241 |    *
7242 |    * [Learn more about locators](https://playwright.dev/docs/locators).
7243 |    * @param selector A selector to use when resolving DOM element.
7244 |    * @param options
7245 |    */
7246 |   locator(selector: string, options?: {
7247 |     /**
7248 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
7249 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
7250 |      *
7251 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
7252 |      * the document root. For example, you can find `content` that has `div` in
7253 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
7254 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
7255 |      *
7256 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
7257 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
7258 |      */
7259 |     has?: Locator;
7260 | 
7261 |     /**
7262 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
7263 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
7264 |      *
7265 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
7266 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
7267 |      */
7268 |     hasNot?: Locator;
7269 | 
7270 |     /**
7271 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
7272 |      * When passed a [string], matching is case-insensitive and searches for a substring.
7273 |      */
7274 |     hasNotText?: string|RegExp;
7275 | 
7276 |     /**
7277 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
7278 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
7279 |      * `<article><div>Playwright</div></article>`.
7280 |      */
7281 |     hasText?: string|RegExp;
7282 |   }): Locator;
7283 | 
7284 |   /**
7285 |    * Returns frame's name attribute as specified in the tag.
7286 |    *
7287 |    * If the name is empty, returns the id attribute instead.
7288 |    *
7289 |    * **NOTE** This value is calculated once when the frame is created, and will not update if the attribute is changed
7290 |    * later.
7291 |    *
7292 |    */
7293 |   name(): string;
7294 | 
7295 |   /**
7296 |    * Returns the page containing this frame.
7297 |    */
7298 |   page(): Page;
7299 | 
7300 |   /**
7301 |    * Parent frame, if any. Detached frames and main frames return `null`.
7302 |    */
7303 |   parentFrame(): null|Frame;
7304 | 
7305 |   /**
7306 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
7307 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7308 |    *
7309 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) can specify the intended
7310 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
7311 |    * to generate the text for. A superset of the
7312 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) values can be found
7313 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
7314 |    *
7315 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
7316 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
7317 |    * etc.
7318 |    *
7319 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
7320 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
7321 |    *
7322 |    * Holding down `Shift` will type the text that corresponds to the
7323 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) in the upper case.
7324 |    *
7325 |    * If [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) is a single character, it is
7326 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
7327 |    *
7328 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
7329 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
7330 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7331 |    * used.
7332 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
7333 |    * @param options
7334 |    */
7335 |   press(selector: string, key: string, options?: {
7336 |     /**
7337 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
7338 |      */
7339 |     delay?: number;
7340 | 
7341 |     /**
7342 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
7343 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
7344 |      * navigating to inaccessible pages. Defaults to `false`.
7345 |      * @deprecated This option will default to `true` in the future.
7346 |      */
7347 |     noWaitAfter?: boolean;
7348 | 
7349 |     /**
7350 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7351 |      * element, the call throws an exception.
7352 |      */
7353 |     strict?: boolean;
7354 | 
7355 |     /**
7356 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7357 |      * option in the config, or by using the
7358 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7359 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7360 |      */
7361 |     timeout?: number;
7362 |   }): Promise<void>;
7363 | 
7364 |   /**
7365 |    * **NOTE** Use locator-based
7366 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
7367 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7368 |    *
7369 |    * This method waits for an element matching
7370 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-select-option-option-selector), waits for
7371 |    * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
7372 |    * element and selects these options.
7373 |    *
7374 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
7375 |    * the `<label>` element that has an associated
7376 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
7377 |    * instead.
7378 |    *
7379 |    * Returns the array of option values that have been successfully selected.
7380 |    *
7381 |    * Triggers a `change` and `input` event once all the provided options have been selected.
7382 |    *
7383 |    * **Usage**
7384 |    *
7385 |    * ```js
7386 |    * // Single selection matching the value or label
7387 |    * frame.selectOption('select#colors', 'blue');
7388 |    *
7389 |    * // single selection matching both the value and the label
7390 |    * frame.selectOption('select#colors', { label: 'Blue' });
7391 |    *
7392 |    * // multiple selection
7393 |    * frame.selectOption('select#colors', 'red', 'green', 'blue');
7394 |    * ```
7395 |    *
7396 |    * @param selector A selector to query for.
7397 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
7398 |    * only the first option matching one of the passed options is selected. String values are matching both values and
7399 |    * labels. Option is considered matching if all specified properties match.
7400 |    * @param options
7401 |    */
7402 |   selectOption(selector: string, values: null|string|ElementHandle|ReadonlyArray<string>|{
7403 |     /**
7404 |      * Matches by `option.value`. Optional.
7405 |      */
7406 |     value?: string;
7407 | 
7408 |     /**
7409 |      * Matches by `option.label`. Optional.
7410 |      */
7411 |     label?: string;
7412 | 
7413 |     /**
7414 |      * Matches by the index. Optional.
7415 |      */
7416 |     index?: number;
7417 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
7418 |     /**
7419 |      * Matches by `option.value`. Optional.
7420 |      */
7421 |     value?: string;
7422 | 
7423 |     /**
7424 |      * Matches by `option.label`. Optional.
7425 |      */
7426 |     label?: string;
7427 | 
7428 |     /**
7429 |      * Matches by the index. Optional.
7430 |      */
7431 |     index?: number;
7432 |   }>, options?: {
7433 |     /**
7434 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7435 |      */
7436 |     force?: boolean;
7437 | 
7438 |     /**
7439 |      * This option has no effect.
7440 |      * @deprecated This option has no effect.
7441 |      */
7442 |     noWaitAfter?: boolean;
7443 | 
7444 |     /**
7445 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7446 |      * element, the call throws an exception.
7447 |      */
7448 |     strict?: boolean;
7449 | 
7450 |     /**
7451 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7452 |      * option in the config, or by using the
7453 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7454 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7455 |      */
7456 |     timeout?: number;
7457 |   }): Promise<Array<string>>;
7458 | 
7459 |   /**
7460 |    * **NOTE** Use locator-based
7461 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
7462 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7463 |    *
7464 |    * This method checks or unchecks an element matching
7465 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector) by performing the
7466 |    * following steps:
7467 |    * 1. Find an element matching
7468 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector). If there is
7469 |    *    none, wait until a matching element is attached to the DOM.
7470 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
7471 |    * 1. If the element already has the right checked state, this method returns immediately.
7472 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7473 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-force) option is set. If the
7474 |    *    element is detached during the checks, the whole action is retried.
7475 |    * 1. Scroll the element into view if needed.
7476 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
7477 |    *    element.
7478 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
7479 |    *
7480 |    * When all steps combined have not finished during the specified
7481 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-timeout), this method throws a
7482 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7483 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7484 |    * used.
7485 |    * @param checked Whether to check or uncheck the checkbox.
7486 |    * @param options
7487 |    */
7488 |   setChecked(selector: string, checked: boolean, options?: {
7489 |     /**
7490 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7491 |      */
7492 |     force?: boolean;
7493 | 
7494 |     /**
7495 |      * This option has no effect.
7496 |      * @deprecated This option has no effect.
7497 |      */
7498 |     noWaitAfter?: boolean;
7499 | 
7500 |     /**
7501 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7502 |      * the element.
7503 |      */
7504 |     position?: {
7505 |       x: number;
7506 | 
7507 |       y: number;
7508 |     };
7509 | 
7510 |     /**
7511 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7512 |      * element, the call throws an exception.
7513 |      */
7514 |     strict?: boolean;
7515 | 
7516 |     /**
7517 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7518 |      * option in the config, or by using the
7519 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7520 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7521 |      */
7522 |     timeout?: number;
7523 | 
7524 |     /**
7525 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7526 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
7527 |      */
7528 |     trial?: boolean;
7529 |   }): Promise<void>;
7530 | 
7531 |   /**
7532 |    * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
7533 |    * inheriting all its specific characteristics and behaviors.
7534 |    * @param html HTML markup to assign to the page.
7535 |    * @param options
7536 |    */
7537 |   setContent(html: string, options?: {
7538 |     /**
7539 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7540 |      * `navigationTimeout` option in the config, or by using the
7541 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7542 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7543 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7544 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7545 |      */
7546 |     timeout?: number;
7547 | 
7548 |     /**
7549 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
7550 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
7551 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
7552 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
7553 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
7554 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
7555 |      *   loading.
7556 |      */
7557 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
7558 |   }): Promise<void>;
7559 | 
7560 |   /**
7561 |    * **NOTE** Use locator-based
7562 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
7563 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7564 |    *
7565 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
7566 |    * they are resolved relative to the current working directory. For empty array, clears the selected files.
7567 |    *
7568 |    * This method expects [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-input-files-option-selector)
7569 |    * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
7570 |    * element is inside the `<label>` element that has an associated
7571 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
7572 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7573 |    * used.
7574 |    * @param files
7575 |    * @param options
7576 |    */
7577 |   setInputFiles(selector: string, files: string|ReadonlyArray<string>|{
7578 |     /**
7579 |      * File name
7580 |      */
7581 |     name: string;
7582 | 
7583 |     /**
7584 |      * File type
7585 |      */
7586 |     mimeType: string;
7587 | 
7588 |     /**
7589 |      * File content
7590 |      */
7591 |     buffer: Buffer;
7592 |   }|ReadonlyArray<{
7593 |     /**
7594 |      * File name
7595 |      */
7596 |     name: string;
7597 | 
7598 |     /**
7599 |      * File type
7600 |      */
7601 |     mimeType: string;
7602 | 
7603 |     /**
7604 |      * File content
7605 |      */
7606 |     buffer: Buffer;
7607 |   }>, options?: {
7608 |     /**
7609 |      * This option has no effect.
7610 |      * @deprecated This option has no effect.
7611 |      */
7612 |     noWaitAfter?: boolean;
7613 | 
7614 |     /**
7615 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7616 |      * element, the call throws an exception.
7617 |      */
7618 |     strict?: boolean;
7619 | 
7620 |     /**
7621 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7622 |      * option in the config, or by using the
7623 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7624 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7625 |      */
7626 |     timeout?: number;
7627 |   }): Promise<void>;
7628 | 
7629 |   /**
7630 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
7631 |    * more about [locators](https://playwright.dev/docs/locators).
7632 |    *
7633 |    * This method taps an element matching
7634 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector) by performing the following
7635 |    * steps:
7636 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector).
7637 |    *    If there is none, wait until a matching element is attached to the DOM.
7638 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7639 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-tap-option-force) option is set. If the element
7640 |    *    is detached during the checks, the whole action is retried.
7641 |    * 1. Scroll the element into view if needed.
7642 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
7643 |    *    element, or the specified
7644 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-tap-option-position).
7645 |    *
7646 |    * When all steps combined have not finished during the specified
7647 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-tap-option-timeout), this method throws a
7648 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7649 |    *
7650 |    * **NOTE** `frame.tap()` requires that the `hasTouch` option of the browser context be set to true.
7651 |    *
7652 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7653 |    * used.
7654 |    * @param options
7655 |    */
7656 |   tap(selector: string, options?: {
7657 |     /**
7658 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7659 |      */
7660 |     force?: boolean;
7661 | 
7662 |     /**
7663 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
7664 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
7665 |      * "Control" on Windows and Linux and to "Meta" on macOS.
7666 |      */
7667 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
7668 | 
7669 |     /**
7670 |      * This option has no effect.
7671 |      * @deprecated This option has no effect.
7672 |      */
7673 |     noWaitAfter?: boolean;
7674 | 
7675 |     /**
7676 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7677 |      * the element.
7678 |      */
7679 |     position?: {
7680 |       x: number;
7681 | 
7682 |       y: number;
7683 |     };
7684 | 
7685 |     /**
7686 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7687 |      * element, the call throws an exception.
7688 |      */
7689 |     strict?: boolean;
7690 | 
7691 |     /**
7692 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7693 |      * option in the config, or by using the
7694 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7695 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7696 |      */
7697 |     timeout?: number;
7698 | 
7699 |     /**
7700 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7701 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
7702 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
7703 |      * are pressed.
7704 |      */
7705 |     trial?: boolean;
7706 |   }): Promise<void>;
7707 | 
7708 |   /**
7709 |    * **NOTE** Use locator-based
7710 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
7711 |    * more about [locators](https://playwright.dev/docs/locators).
7712 |    *
7713 |    * Returns `element.textContent`.
7714 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7715 |    * used.
7716 |    * @param options
7717 |    */
7718 |   textContent(selector: string, options?: {
7719 |     /**
7720 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7721 |      * element, the call throws an exception.
7722 |      */
7723 |     strict?: boolean;
7724 | 
7725 |     /**
7726 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7727 |      * option in the config, or by using the
7728 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7729 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7730 |      */
7731 |     timeout?: number;
7732 |   }): Promise<null|string>;
7733 | 
7734 |   /**
7735 |    * Returns the page title.
7736 |    */
7737 |   title(): Promise<string>;
7738 | 
7739 |   /**
7740 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `frame.type` can be used
7741 |    * to send fine-grained keyboard events. To fill values in form fields, use
7742 |    * [frame.fill(selector, value[, options])](https://playwright.dev/docs/api/class-frame#frame-fill).
7743 |    *
7744 |    * To press a special key, like `Control` or `ArrowDown`, use
7745 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
7746 |    *
7747 |    * **Usage**
7748 |    * @deprecated In most cases, you should use
7749 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
7750 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
7751 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
7752 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7753 |    * used.
7754 |    * @param text A text to type into a focused element.
7755 |    * @param options
7756 |    */
7757 |   type(selector: string, text: string, options?: {
7758 |     /**
7759 |      * Time to wait between key presses in milliseconds. Defaults to 0.
7760 |      */
7761 |     delay?: number;
7762 | 
7763 |     /**
7764 |      * This option has no effect.
7765 |      * @deprecated This option has no effect.
7766 |      */
7767 |     noWaitAfter?: boolean;
7768 | 
7769 |     /**
7770 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7771 |      * element, the call throws an exception.
7772 |      */
7773 |     strict?: boolean;
7774 | 
7775 |     /**
7776 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7777 |      * option in the config, or by using the
7778 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7779 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7780 |      */
7781 |     timeout?: number;
7782 |   }): Promise<void>;
7783 | 
7784 |   /**
7785 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
7786 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7787 |    *
7788 |    * This method checks an element matching
7789 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector) by performing the following
7790 |    * steps:
7791 |    * 1. Find an element matching
7792 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector). If there is none,
7793 |    *    wait until a matching element is attached to the DOM.
7794 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
7795 |    *    already unchecked, this method returns immediately.
7796 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7797 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-force) option is set. If the
7798 |    *    element is detached during the checks, the whole action is retried.
7799 |    * 1. Scroll the element into view if needed.
7800 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
7801 |    *    element.
7802 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
7803 |    *
7804 |    * When all steps combined have not finished during the specified
7805 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-timeout), this method throws a
7806 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7807 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7808 |    * used.
7809 |    * @param options
7810 |    */
7811 |   uncheck(selector: string, options?: {
7812 |     /**
7813 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7814 |      */
7815 |     force?: boolean;
7816 | 
7817 |     /**
7818 |      * This option has no effect.
7819 |      * @deprecated This option has no effect.
7820 |      */
7821 |     noWaitAfter?: boolean;
7822 | 
7823 |     /**
7824 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7825 |      * the element.
7826 |      */
7827 |     position?: {
7828 |       x: number;
7829 | 
7830 |       y: number;
7831 |     };
7832 | 
7833 |     /**
7834 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7835 |      * element, the call throws an exception.
7836 |      */
7837 |     strict?: boolean;
7838 | 
7839 |     /**
7840 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7841 |      * option in the config, or by using the
7842 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7843 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7844 |      */
7845 |     timeout?: number;
7846 | 
7847 |     /**
7848 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7849 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
7850 |      */
7851 |     trial?: boolean;
7852 |   }): Promise<void>;
7853 | 
7854 |   /**
7855 |    * Returns frame's url.
7856 |    */
7857 |   url(): string;
7858 | 
7859 |   /**
7860 |    * Waits for the required load state to be reached.
7861 |    *
7862 |    * This returns when the frame reaches a required load state, `load` by default. The navigation must have been
7863 |    * committed when this method is called. If current document has already reached the required state, resolves
7864 |    * immediately.
7865 |    *
7866 |    * **NOTE** Most of the time, this method is not needed because Playwright
7867 |    * [auto-waits before every action](https://playwright.dev/docs/actionability).
7868 |    *
7869 |    * **Usage**
7870 |    *
7871 |    * ```js
7872 |    * await frame.click('button'); // Click triggers navigation.
7873 |    * await frame.waitForLoadState(); // Waits for 'load' state by default.
7874 |    * ```
7875 |    *
7876 |    * @param state Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
7877 |    * document, the method resolves immediately. Can be one of:
7878 |    * - `'load'` - wait for the `load` event to be fired.
7879 |    * - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
7880 |    * - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
7881 |    * this method for testing, rely on web assertions to assess readiness instead.
7882 |    * @param options
7883 |    */
7884 |   waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
7885 |     /**
7886 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7887 |      * `navigationTimeout` option in the config, or by using the
7888 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7889 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7890 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7891 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7892 |      */
7893 |     timeout?: number;
7894 |   }): Promise<void>;
7895 | 
7896 |   /**
7897 |    * Waits for the frame navigation and returns the main resource response. In case of multiple redirects, the
7898 |    * navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
7899 |    * navigation due to History API usage, the navigation will resolve with `null`.
7900 |    *
7901 |    * **Usage**
7902 |    *
7903 |    * This method waits for the frame to navigate to a new URL. It is useful for when you run code which will indirectly
7904 |    * cause the frame to navigate. Consider this example:
7905 |    *
7906 |    * ```js
7907 |    * // Start waiting for navigation before clicking. Note no await.
7908 |    * const navigationPromise = page.waitForNavigation();
7909 |    * await page.getByText('Navigate after timeout').click();
7910 |    * await navigationPromise;
7911 |    * ```
7912 |    *
7913 |    * **NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
7914 |    * is considered a navigation.
7915 |    *
7916 |    * @deprecated This method is inherently racy, please use
7917 |    * [frame.waitForURL(url[, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-url) instead.
7918 |    * @param options
7919 |    */
7920 |   waitForNavigation(options?: {
7921 |     /**
7922 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7923 |      * `navigationTimeout` option in the config, or by using the
7924 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7925 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7926 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7927 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7928 |      */
7929 |     timeout?: number;
7930 | 
7931 |     /**
7932 |      * A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
7933 |      * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
7934 |      * equal to the string.
7935 |      */
7936 |     url?: string|RegExp|((url: URL) => boolean);
7937 | 
7938 |     /**
7939 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
7940 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
7941 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
7942 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
7943 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
7944 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
7945 |      *   loading.
7946 |      */
7947 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
7948 |   }): Promise<null|Response>;
7949 | 
7950 |   /**
7951 |    * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
7952 |    * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
7953 |    *
7954 |    * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-timeout-option-timeout)
7955 |    * in milliseconds.
7956 |    *
7957 |    * Note that `frame.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
7958 |    * to be flaky. Use signals such as network events, selectors becoming visible and others instead.
7959 |    * @param timeout A timeout to wait for
7960 |    */
7961 |   waitForTimeout(timeout: number): Promise<void>;
7962 | 
7963 |   /**
7964 |    * Waits for the frame to navigate to the given URL.
7965 |    *
7966 |    * **Usage**
7967 |    *
7968 |    * ```js
7969 |    * await frame.click('a.delayed-navigation'); // Clicking the link will indirectly cause a navigation
7970 |    * await frame.waitForURL('**\/target.html');
7971 |    * ```
7972 |    *
7973 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
7974 |    * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
7975 |    * equal to the string.
7976 |    * @param options
7977 |    */
7978 |   waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {
7979 |     /**
7980 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7981 |      * `navigationTimeout` option in the config, or by using the
7982 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7983 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7984 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7985 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7986 |      */
7987 |     timeout?: number;
7988 | 
7989 |     /**
7990 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
7991 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
7992 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
7993 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
7994 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
7995 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
7996 |      *   loading.
7997 |      */
7998 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
7999 |   }): Promise<void>;
8000 | }
8001 | 
8002 | /**
8003 |  * BrowserContexts provide a way to operate multiple independent browser sessions.
8004 |  *
8005 |  * If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser
8006 |  * context.
8007 |  *
8008 |  * Playwright allows creating isolated non-persistent browser contexts with
8009 |  * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) method.
8010 |  * Non-persistent browser contexts don't write any browsing data to disk.
8011 |  *
8012 |  * ```js
8013 |  * // Create a new incognito browser context
8014 |  * const context = await browser.newContext();
8015 |  * // Create a new page inside context.
8016 |  * const page = await context.newPage();
8017 |  * await page.goto('https://example.com');
8018 |  * // Dispose context once it's no longer needed.
8019 |  * await context.close();
8020 |  * ```
8021 |  *
8022 |  */
8023 | export interface BrowserContext {
8024 |   /**
8025 |    * The method adds a function called
8026 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
8027 |    * `window` object of every frame in every page in the context. When called, the function executes
8028 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8029 |    * and returns a [Promise] which resolves to the return value of
8030 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
8031 |    * If the
8032 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8033 |    * returns a [Promise], it will be awaited.
8034 |    *
8035 |    * The first argument of the
8036 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8037 |    * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
8038 |    *
8039 |    * See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
8040 |    * for page-only version.
8041 |    *
8042 |    * **Usage**
8043 |    *
8044 |    * An example of exposing page URL to all frames in all pages in the context:
8045 |    *
8046 |    * ```js
8047 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8048 |    *
8049 |    * (async () => {
8050 |    *   const browser = await webkit.launch({ headless: false });
8051 |    *   const context = await browser.newContext();
8052 |    *   await context.exposeBinding('pageURL', ({ page }) => page.url());
8053 |    *   const page = await context.newPage();
8054 |    *   await page.setContent(`
8055 |    *     <script>
8056 |    *       async function onClick() {
8057 |    *         document.querySelector('div').textContent = await window.pageURL();
8058 |    *       }
8059 |    *     </script>
8060 |    *     <button onclick="onClick()">Click me</button>
8061 |    *     <div></div>
8062 |    *   `);
8063 |    *   await page.getByRole('button').click();
8064 |    * })();
8065 |    * ```
8066 |    *
8067 |    * @param name Name of the function on the window object.
8068 |    * @param callback Callback function that will be called in the Playwright's context.
8069 |    * @param options
8070 |    */
8071 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
8072 |   /**
8073 |    * The method adds a function called
8074 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
8075 |    * `window` object of every frame in every page in the context. When called, the function executes
8076 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8077 |    * and returns a [Promise] which resolves to the return value of
8078 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
8079 |    * If the
8080 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8081 |    * returns a [Promise], it will be awaited.
8082 |    *
8083 |    * The first argument of the
8084 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8085 |    * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
8086 |    *
8087 |    * See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
8088 |    * for page-only version.
8089 |    *
8090 |    * **Usage**
8091 |    *
8092 |    * An example of exposing page URL to all frames in all pages in the context:
8093 |    *
8094 |    * ```js
8095 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8096 |    *
8097 |    * (async () => {
8098 |    *   const browser = await webkit.launch({ headless: false });
8099 |    *   const context = await browser.newContext();
8100 |    *   await context.exposeBinding('pageURL', ({ page }) => page.url());
8101 |    *   const page = await context.newPage();
8102 |    *   await page.setContent(`
8103 |    *     <script>
8104 |    *       async function onClick() {
8105 |    *         document.querySelector('div').textContent = await window.pageURL();
8106 |    *       }
8107 |    *     </script>
8108 |    *     <button onclick="onClick()">Click me</button>
8109 |    *     <div></div>
8110 |    *   `);
8111 |    *   await page.getByRole('button').click();
8112 |    * })();
8113 |    * ```
8114 |    *
8115 |    * @param name Name of the function on the window object.
8116 |    * @param callback Callback function that will be called in the Playwright's context.
8117 |    * @param options
8118 |    */
8119 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, ...args: any[]) => any, options?: { handle?: boolean }): Promise<void>;
8120 | 
8121 |   /**
8122 |    * Adds a script which would be evaluated in one of the following scenarios:
8123 |    * - Whenever a page is created in the browser context or is navigated.
8124 |    * - Whenever a child frame is attached or navigated in any page in the browser context. In this case, the script is
8125 |    *   evaluated in the context of the newly attached frame.
8126 |    *
8127 |    * The script is evaluated after the document was created but before any of its scripts were run. This is useful to
8128 |    * amend the JavaScript environment, e.g. to seed `Math.random`.
8129 |    *
8130 |    * **Usage**
8131 |    *
8132 |    * An example of overriding `Math.random` before the page loads:
8133 |    *
8134 |    * ```js
8135 |    * // preload.js
8136 |    * Math.random = () => 42;
8137 |    * ```
8138 |    *
8139 |    * ```js
8140 |    * // In your playwright script, assuming the preload.js file is in same directory.
8141 |    * await browserContext.addInitScript({
8142 |    *   path: 'preload.js'
8143 |    * });
8144 |    * ```
8145 |    *
8146 |    * **NOTE** The order of evaluation of multiple scripts installed via
8147 |    * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
8148 |    * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
8149 |    * defined.
8150 |    *
8151 |    * @param script Script to be evaluated in all pages in the browser context.
8152 |    * @param arg Optional argument to pass to
8153 |    * [`script`](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script-option-script)
8154 |    * (only supported when passing a function).
8155 |    */
8156 |   addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
8157 | 
8158 |   /**
8159 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
8160 |    * async listeners to complete or to ignore subsequent errors from these listeners.
8161 |    * @param type
8162 |    * @param options
8163 |    */
8164 |   removeAllListeners(type?: string): this;
8165 |   /**
8166 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
8167 |    * async listeners to complete or to ignore subsequent errors from these listeners.
8168 |    * @param type
8169 |    * @param options
8170 |    */
8171 |   removeAllListeners(type: string | undefined, options: {
8172 |     /**
8173 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
8174 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
8175 |      * - `'wait'` - wait for current listener calls (if any) to finish
8176 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
8177 |      */
8178 |     behavior?: 'wait'|'ignoreErrors'|'default'
8179 |   }): Promise<void>;
8180 |   /**
8181 |    * **NOTE** Only works with Chromium browser's persistent context.
8182 |    *
8183 |    * Emitted when new background page is created in the context.
8184 |    *
8185 |    * ```js
8186 |    * const backgroundPage = await context.waitForEvent('backgroundpage');
8187 |    * ```
8188 |    *
8189 |    */
8190 |   on(event: 'backgroundpage', listener: (page: Page) => any): this;
8191 | 
8192 |   /**
8193 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8194 |    * - Browser context is closed.
8195 |    * - Browser application is closed or crashed.
8196 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8197 |    */
8198 |   on(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8199 | 
8200 |   /**
8201 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8202 |    *
8203 |    * The arguments passed into `console.log` and the page are available on the
8204 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8205 |    *
8206 |    * **Usage**
8207 |    *
8208 |    * ```js
8209 |    * context.on('console', async msg => {
8210 |    *   const values = [];
8211 |    *   for (const arg of msg.args())
8212 |    *     values.push(await arg.jsonValue());
8213 |    *   console.log(...values);
8214 |    * });
8215 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8216 |    * ```
8217 |    *
8218 |    */
8219 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8220 | 
8221 |   /**
8222 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8223 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8224 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8225 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8226 |    * dialog, and actions like click will never finish.
8227 |    *
8228 |    * **Usage**
8229 |    *
8230 |    * ```js
8231 |    * context.on('dialog', dialog => {
8232 |    *   dialog.accept();
8233 |    * });
8234 |    * ```
8235 |    *
8236 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8237 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8238 |    * listeners are present, all dialogs are automatically dismissed.
8239 |    *
8240 |    */
8241 |   on(event: 'dialog', listener: (dialog: Dialog) => any): this;
8242 | 
8243 |   /**
8244 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8245 |    * will also fire for popup pages. See also
8246 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8247 |    * relevant to a specific page.
8248 |    *
8249 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8250 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8251 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8252 |    * to this network request, use
8253 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8254 |    * and
8255 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8256 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8257 |    *
8258 |    * ```js
8259 |    * const newPagePromise = context.waitForEvent('page');
8260 |    * await page.getByText('open new page').click();
8261 |    * const newPage = await newPagePromise;
8262 |    * console.log(await newPage.evaluate('location.href'));
8263 |    * ```
8264 |    *
8265 |    * **NOTE** Use
8266 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8267 |    * wait until the page gets to a particular state (you should not need it in most cases).
8268 |    *
8269 |    */
8270 |   on(event: 'page', listener: (page: Page) => any): this;
8271 | 
8272 |   /**
8273 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8274 |    * only listen for requests from a particular page, use
8275 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8276 |    *
8277 |    * In order to intercept and mutate requests, see
8278 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8279 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8280 |    */
8281 |   on(event: 'request', listener: (request: Request) => any): this;
8282 | 
8283 |   /**
8284 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8285 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8286 |    *
8287 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8288 |    * will complete with
8289 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8290 |    * event and not with
8291 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8292 |    *
8293 |    */
8294 |   on(event: 'requestfailed', listener: (request: Request) => any): this;
8295 | 
8296 |   /**
8297 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8298 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8299 |    * particular page, use
8300 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8301 |    */
8302 |   on(event: 'requestfinished', listener: (request: Request) => any): this;
8303 | 
8304 |   /**
8305 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8306 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8307 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8308 |    */
8309 |   on(event: 'response', listener: (response: Response) => any): this;
8310 | 
8311 |   /**
8312 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8313 |    *
8314 |    * Emitted when new service worker is created in the context.
8315 |    */
8316 |   on(event: 'serviceworker', listener: (worker: Worker) => any): this;
8317 | 
8318 |   /**
8319 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8320 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8321 |    */
8322 |   on(event: 'weberror', listener: (webError: WebError) => any): this;
8323 | 
8324 |   /**
8325 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8326 |    */
8327 |   once(event: 'backgroundpage', listener: (page: Page) => any): this;
8328 | 
8329 |   /**
8330 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8331 |    */
8332 |   once(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8333 | 
8334 |   /**
8335 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8336 |    */
8337 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8338 | 
8339 |   /**
8340 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8341 |    */
8342 |   once(event: 'dialog', listener: (dialog: Dialog) => any): this;
8343 | 
8344 |   /**
8345 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8346 |    */
8347 |   once(event: 'page', listener: (page: Page) => any): this;
8348 | 
8349 |   /**
8350 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8351 |    */
8352 |   once(event: 'request', listener: (request: Request) => any): this;
8353 | 
8354 |   /**
8355 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8356 |    */
8357 |   once(event: 'requestfailed', listener: (request: Request) => any): this;
8358 | 
8359 |   /**
8360 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8361 |    */
8362 |   once(event: 'requestfinished', listener: (request: Request) => any): this;
8363 | 
8364 |   /**
8365 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8366 |    */
8367 |   once(event: 'response', listener: (response: Response) => any): this;
8368 | 
8369 |   /**
8370 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8371 |    */
8372 |   once(event: 'serviceworker', listener: (worker: Worker) => any): this;
8373 | 
8374 |   /**
8375 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8376 |    */
8377 |   once(event: 'weberror', listener: (webError: WebError) => any): this;
8378 | 
8379 |   /**
8380 |    * **NOTE** Only works with Chromium browser's persistent context.
8381 |    *
8382 |    * Emitted when new background page is created in the context.
8383 |    *
8384 |    * ```js
8385 |    * const backgroundPage = await context.waitForEvent('backgroundpage');
8386 |    * ```
8387 |    *
8388 |    */
8389 |   addListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8390 | 
8391 |   /**
8392 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8393 |    * - Browser context is closed.
8394 |    * - Browser application is closed or crashed.
8395 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8396 |    */
8397 |   addListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8398 | 
8399 |   /**
8400 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8401 |    *
8402 |    * The arguments passed into `console.log` and the page are available on the
8403 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8404 |    *
8405 |    * **Usage**
8406 |    *
8407 |    * ```js
8408 |    * context.on('console', async msg => {
8409 |    *   const values = [];
8410 |    *   for (const arg of msg.args())
8411 |    *     values.push(await arg.jsonValue());
8412 |    *   console.log(...values);
8413 |    * });
8414 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8415 |    * ```
8416 |    *
8417 |    */
8418 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8419 | 
8420 |   /**
8421 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8422 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8423 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8424 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8425 |    * dialog, and actions like click will never finish.
8426 |    *
8427 |    * **Usage**
8428 |    *
8429 |    * ```js
8430 |    * context.on('dialog', dialog => {
8431 |    *   dialog.accept();
8432 |    * });
8433 |    * ```
8434 |    *
8435 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8436 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8437 |    * listeners are present, all dialogs are automatically dismissed.
8438 |    *
8439 |    */
8440 |   addListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8441 | 
8442 |   /**
8443 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8444 |    * will also fire for popup pages. See also
8445 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8446 |    * relevant to a specific page.
8447 |    *
8448 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8449 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8450 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8451 |    * to this network request, use
8452 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8453 |    * and
8454 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8455 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8456 |    *
8457 |    * ```js
8458 |    * const newPagePromise = context.waitForEvent('page');
8459 |    * await page.getByText('open new page').click();
8460 |    * const newPage = await newPagePromise;
8461 |    * console.log(await newPage.evaluate('location.href'));
8462 |    * ```
8463 |    *
8464 |    * **NOTE** Use
8465 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8466 |    * wait until the page gets to a particular state (you should not need it in most cases).
8467 |    *
8468 |    */
8469 |   addListener(event: 'page', listener: (page: Page) => any): this;
8470 | 
8471 |   /**
8472 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8473 |    * only listen for requests from a particular page, use
8474 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8475 |    *
8476 |    * In order to intercept and mutate requests, see
8477 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8478 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8479 |    */
8480 |   addListener(event: 'request', listener: (request: Request) => any): this;
8481 | 
8482 |   /**
8483 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8484 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8485 |    *
8486 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8487 |    * will complete with
8488 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8489 |    * event and not with
8490 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8491 |    *
8492 |    */
8493 |   addListener(event: 'requestfailed', listener: (request: Request) => any): this;
8494 | 
8495 |   /**
8496 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8497 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8498 |    * particular page, use
8499 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8500 |    */
8501 |   addListener(event: 'requestfinished', listener: (request: Request) => any): this;
8502 | 
8503 |   /**
8504 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8505 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8506 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8507 |    */
8508 |   addListener(event: 'response', listener: (response: Response) => any): this;
8509 | 
8510 |   /**
8511 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8512 |    *
8513 |    * Emitted when new service worker is created in the context.
8514 |    */
8515 |   addListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8516 | 
8517 |   /**
8518 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8519 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8520 |    */
8521 |   addListener(event: 'weberror', listener: (webError: WebError) => any): this;
8522 | 
8523 |   /**
8524 |    * Removes an event listener added by `on` or `addListener`.
8525 |    */
8526 |   removeListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8527 | 
8528 |   /**
8529 |    * Removes an event listener added by `on` or `addListener`.
8530 |    */
8531 |   removeListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8532 | 
8533 |   /**
8534 |    * Removes an event listener added by `on` or `addListener`.
8535 |    */
8536 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8537 | 
8538 |   /**
8539 |    * Removes an event listener added by `on` or `addListener`.
8540 |    */
8541 |   removeListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8542 | 
8543 |   /**
8544 |    * Removes an event listener added by `on` or `addListener`.
8545 |    */
8546 |   removeListener(event: 'page', listener: (page: Page) => any): this;
8547 | 
8548 |   /**
8549 |    * Removes an event listener added by `on` or `addListener`.
8550 |    */
8551 |   removeListener(event: 'request', listener: (request: Request) => any): this;
8552 | 
8553 |   /**
8554 |    * Removes an event listener added by `on` or `addListener`.
8555 |    */
8556 |   removeListener(event: 'requestfailed', listener: (request: Request) => any): this;
8557 | 
8558 |   /**
8559 |    * Removes an event listener added by `on` or `addListener`.
8560 |    */
8561 |   removeListener(event: 'requestfinished', listener: (request: Request) => any): this;
8562 | 
8563 |   /**
8564 |    * Removes an event listener added by `on` or `addListener`.
8565 |    */
8566 |   removeListener(event: 'response', listener: (response: Response) => any): this;
8567 | 
8568 |   /**
8569 |    * Removes an event listener added by `on` or `addListener`.
8570 |    */
8571 |   removeListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8572 | 
8573 |   /**
8574 |    * Removes an event listener added by `on` or `addListener`.
8575 |    */
8576 |   removeListener(event: 'weberror', listener: (webError: WebError) => any): this;
8577 | 
8578 |   /**
8579 |    * Removes an event listener added by `on` or `addListener`.
8580 |    */
8581 |   off(event: 'backgroundpage', listener: (page: Page) => any): this;
8582 | 
8583 |   /**
8584 |    * Removes an event listener added by `on` or `addListener`.
8585 |    */
8586 |   off(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8587 | 
8588 |   /**
8589 |    * Removes an event listener added by `on` or `addListener`.
8590 |    */
8591 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8592 | 
8593 |   /**
8594 |    * Removes an event listener added by `on` or `addListener`.
8595 |    */
8596 |   off(event: 'dialog', listener: (dialog: Dialog) => any): this;
8597 | 
8598 |   /**
8599 |    * Removes an event listener added by `on` or `addListener`.
8600 |    */
8601 |   off(event: 'page', listener: (page: Page) => any): this;
8602 | 
8603 |   /**
8604 |    * Removes an event listener added by `on` or `addListener`.
8605 |    */
8606 |   off(event: 'request', listener: (request: Request) => any): this;
8607 | 
8608 |   /**
8609 |    * Removes an event listener added by `on` or `addListener`.
8610 |    */
8611 |   off(event: 'requestfailed', listener: (request: Request) => any): this;
8612 | 
8613 |   /**
8614 |    * Removes an event listener added by `on` or `addListener`.
8615 |    */
8616 |   off(event: 'requestfinished', listener: (request: Request) => any): this;
8617 | 
8618 |   /**
8619 |    * Removes an event listener added by `on` or `addListener`.
8620 |    */
8621 |   off(event: 'response', listener: (response: Response) => any): this;
8622 | 
8623 |   /**
8624 |    * Removes an event listener added by `on` or `addListener`.
8625 |    */
8626 |   off(event: 'serviceworker', listener: (worker: Worker) => any): this;
8627 | 
8628 |   /**
8629 |    * Removes an event listener added by `on` or `addListener`.
8630 |    */
8631 |   off(event: 'weberror', listener: (webError: WebError) => any): this;
8632 | 
8633 |   /**
8634 |    * **NOTE** Only works with Chromium browser's persistent context.
8635 |    *
8636 |    * Emitted when new background page is created in the context.
8637 |    *
8638 |    * ```js
8639 |    * const backgroundPage = await context.waitForEvent('backgroundpage');
8640 |    * ```
8641 |    *
8642 |    */
8643 |   prependListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8644 | 
8645 |   /**
8646 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8647 |    * - Browser context is closed.
8648 |    * - Browser application is closed or crashed.
8649 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8650 |    */
8651 |   prependListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8652 | 
8653 |   /**
8654 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8655 |    *
8656 |    * The arguments passed into `console.log` and the page are available on the
8657 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8658 |    *
8659 |    * **Usage**
8660 |    *
8661 |    * ```js
8662 |    * context.on('console', async msg => {
8663 |    *   const values = [];
8664 |    *   for (const arg of msg.args())
8665 |    *     values.push(await arg.jsonValue());
8666 |    *   console.log(...values);
8667 |    * });
8668 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8669 |    * ```
8670 |    *
8671 |    */
8672 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8673 | 
8674 |   /**
8675 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8676 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8677 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8678 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8679 |    * dialog, and actions like click will never finish.
8680 |    *
8681 |    * **Usage**
8682 |    *
8683 |    * ```js
8684 |    * context.on('dialog', dialog => {
8685 |    *   dialog.accept();
8686 |    * });
8687 |    * ```
8688 |    *
8689 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8690 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8691 |    * listeners are present, all dialogs are automatically dismissed.
8692 |    *
8693 |    */
8694 |   prependListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8695 | 
8696 |   /**
8697 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8698 |    * will also fire for popup pages. See also
8699 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8700 |    * relevant to a specific page.
8701 |    *
8702 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8703 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8704 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8705 |    * to this network request, use
8706 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8707 |    * and
8708 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8709 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8710 |    *
8711 |    * ```js
8712 |    * const newPagePromise = context.waitForEvent('page');
8713 |    * await page.getByText('open new page').click();
8714 |    * const newPage = await newPagePromise;
8715 |    * console.log(await newPage.evaluate('location.href'));
8716 |    * ```
8717 |    *
8718 |    * **NOTE** Use
8719 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8720 |    * wait until the page gets to a particular state (you should not need it in most cases).
8721 |    *
8722 |    */
8723 |   prependListener(event: 'page', listener: (page: Page) => any): this;
8724 | 
8725 |   /**
8726 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8727 |    * only listen for requests from a particular page, use
8728 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8729 |    *
8730 |    * In order to intercept and mutate requests, see
8731 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8732 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8733 |    */
8734 |   prependListener(event: 'request', listener: (request: Request) => any): this;
8735 | 
8736 |   /**
8737 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8738 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8739 |    *
8740 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8741 |    * will complete with
8742 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8743 |    * event and not with
8744 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8745 |    *
8746 |    */
8747 |   prependListener(event: 'requestfailed', listener: (request: Request) => any): this;
8748 | 
8749 |   /**
8750 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8751 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8752 |    * particular page, use
8753 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8754 |    */
8755 |   prependListener(event: 'requestfinished', listener: (request: Request) => any): this;
8756 | 
8757 |   /**
8758 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8759 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8760 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8761 |    */
8762 |   prependListener(event: 'response', listener: (response: Response) => any): this;
8763 | 
8764 |   /**
8765 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8766 |    *
8767 |    * Emitted when new service worker is created in the context.
8768 |    */
8769 |   prependListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8770 | 
8771 |   /**
8772 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8773 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8774 |    */
8775 |   prependListener(event: 'weberror', listener: (webError: WebError) => any): this;
8776 | 
8777 |   /**
8778 |    * Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies
8779 |    * can be obtained via
8780 |    * [browserContext.cookies([urls])](https://playwright.dev/docs/api/class-browsercontext#browser-context-cookies).
8781 |    *
8782 |    * **Usage**
8783 |    *
8784 |    * ```js
8785 |    * await browserContext.addCookies([cookieObject1, cookieObject2]);
8786 |    * ```
8787 |    *
8788 |    * @param cookies
8789 |    */
8790 |   addCookies(cookies: ReadonlyArray<{
8791 |     name: string;
8792 | 
8793 |     value: string;
8794 | 
8795 |     /**
8796 |      * Either url or domain / path are required. Optional.
8797 |      */
8798 |     url?: string;
8799 | 
8800 |     /**
8801 |      * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url
8802 |      * or domain / path are required. Optional.
8803 |      */
8804 |     domain?: string;
8805 | 
8806 |     /**
8807 |      * Either url or domain / path are required Optional.
8808 |      */
8809 |     path?: string;
8810 | 
8811 |     /**
8812 |      * Unix time in seconds. Optional.
8813 |      */
8814 |     expires?: number;
8815 | 
8816 |     /**
8817 |      * Optional.
8818 |      */
8819 |     httpOnly?: boolean;
8820 | 
8821 |     /**
8822 |      * Optional.
8823 |      */
8824 |     secure?: boolean;
8825 | 
8826 |     /**
8827 |      * Optional.
8828 |      */
8829 |     sameSite?: "Strict"|"Lax"|"None";
8830 |   }>): Promise<void>;
8831 | 
8832 |   /**
8833 |    * **NOTE** Background pages are only supported on Chromium-based browsers.
8834 |    *
8835 |    * All existing background pages in the context.
8836 |    */
8837 |   backgroundPages(): Array<Page>;
8838 | 
8839 |   /**
8840 |    * Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
8841 |    */
8842 |   browser(): null|Browser;
8843 | 
8844 |   /**
8845 |    * Removes cookies from context. Accepts optional filter.
8846 |    *
8847 |    * **Usage**
8848 |    *
8849 |    * ```js
8850 |    * await context.clearCookies();
8851 |    * await context.clearCookies({ name: 'session-id' });
8852 |    * await context.clearCookies({ domain: 'my-origin.com' });
8853 |    * await context.clearCookies({ domain: /.*my-origin\.com/ });
8854 |    * await context.clearCookies({ path: '/api/v1' });
8855 |    * await context.clearCookies({ name: 'session-id', domain: 'my-origin.com' });
8856 |    * ```
8857 |    *
8858 |    * @param options
8859 |    */
8860 |   clearCookies(options?: {
8861 |     /**
8862 |      * Only removes cookies with the given domain.
8863 |      */
8864 |     domain?: string|RegExp;
8865 | 
8866 |     /**
8867 |      * Only removes cookies with the given name.
8868 |      */
8869 |     name?: string|RegExp;
8870 | 
8871 |     /**
8872 |      * Only removes cookies with the given path.
8873 |      */
8874 |     path?: string|RegExp;
8875 |   }): Promise<void>;
8876 | 
8877 |   /**
8878 |    * Clears all permission overrides for the browser context.
8879 |    *
8880 |    * **Usage**
8881 |    *
8882 |    * ```js
8883 |    * const context = await browser.newContext();
8884 |    * await context.grantPermissions(['clipboard-read']);
8885 |    * // do stuff ..
8886 |    * context.clearPermissions();
8887 |    * ```
8888 |    *
8889 |    */
8890 |   clearPermissions(): Promise<void>;
8891 | 
8892 |   /**
8893 |    * Closes the browser context. All the pages that belong to the browser context will be closed.
8894 |    *
8895 |    * **NOTE** The default browser context cannot be closed.
8896 |    *
8897 |    * @param options
8898 |    */
8899 |   close(options?: {
8900 |     /**
8901 |      * The reason to be reported to the operations interrupted by the context closure.
8902 |      */
8903 |     reason?: string;
8904 |   }): Promise<void>;
8905 | 
8906 |   /**
8907 |    * If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those
8908 |    * URLs are returned.
8909 |    * @param urls Optional list of URLs.
8910 |    */
8911 |   cookies(urls?: string|ReadonlyArray<string>): Promise<Array<Cookie>>;
8912 | 
8913 |   /**
8914 |    * The method adds a function called
8915 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-name) on the
8916 |    * `window` object of every frame in every page in the context. When called, the function executes
8917 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
8918 |    * and returns a [Promise] which resolves to the return value of
8919 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback).
8920 |    *
8921 |    * If the
8922 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
8923 |    * returns a [Promise], it will be awaited.
8924 |    *
8925 |    * See [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) for
8926 |    * page-only version.
8927 |    *
8928 |    * **Usage**
8929 |    *
8930 |    * An example of adding a `sha256` function to all pages in the context:
8931 |    *
8932 |    * ```js
8933 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8934 |    * const crypto = require('crypto');
8935 |    *
8936 |    * (async () => {
8937 |    *   const browser = await webkit.launch({ headless: false });
8938 |    *   const context = await browser.newContext();
8939 |    *   await context.exposeFunction('sha256', text =>
8940 |    *     crypto.createHash('sha256').update(text).digest('hex'),
8941 |    *   );
8942 |    *   const page = await context.newPage();
8943 |    *   await page.setContent(`
8944 |    *     <script>
8945 |    *       async function onClick() {
8946 |    *         document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
8947 |    *       }
8948 |    *     </script>
8949 |    *     <button onclick="onClick()">Click me</button>
8950 |    *     <div></div>
8951 |    *   `);
8952 |    *   await page.getByRole('button').click();
8953 |    * })();
8954 |    * ```
8955 |    *
8956 |    * @param name Name of the function on the window object.
8957 |    * @param callback Callback function that will be called in the Playwright's context.
8958 |    */
8959 |   exposeFunction(name: string, callback: Function): Promise<void>;
8960 | 
8961 |   /**
8962 |    * Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if
8963 |    * specified.
8964 |    * @param permissions A permission or an array of permissions to grant. Permissions can be one of the following values:
8965 |    * - `'accelerometer'`
8966 |    * - `'accessibility-events'`
8967 |    * - `'ambient-light-sensor'`
8968 |    * - `'background-sync'`
8969 |    * - `'camera'`
8970 |    * - `'clipboard-read'`
8971 |    * - `'clipboard-write'`
8972 |    * - `'geolocation'`
8973 |    * - `'gyroscope'`
8974 |    * - `'magnetometer'`
8975 |    * - `'microphone'`
8976 |    * - `'midi-sysex'` (system-exclusive midi)
8977 |    * - `'midi'`
8978 |    * - `'notifications'`
8979 |    * - `'payment-handler'`
8980 |    * - `'storage-access'`
8981 |    * @param options
8982 |    */
8983 |   grantPermissions(permissions: ReadonlyArray<string>, options?: {
8984 |     /**
8985 |      * The [origin] to grant permissions to, e.g. "https://example.com".
8986 |      */
8987 |     origin?: string;
8988 |   }): Promise<void>;
8989 | 
8990 |   /**
8991 |    * **NOTE** CDP sessions are only supported on Chromium-based browsers.
8992 |    *
8993 |    * Returns the newly created session.
8994 |    * @param page Target to create new session for. For backwards-compatibility, this parameter is named `page`, but it can be a
8995 |    * `Page` or `Frame` type.
8996 |    */
8997 |   newCDPSession(page: Page|Frame): Promise<CDPSession>;
8998 | 
8999 |   /**
9000 |    * Creates a new page in the browser context.
9001 |    */
9002 |   newPage(): Promise<Page>;
9003 | 
9004 |   /**
9005 |    * Returns all open pages in the context.
9006 |    */
9007 |   pages(): Array<Page>;
9008 | 
9009 |   /**
9010 |    * Routing provides the capability to modify network requests that are made by any page in the browser context. Once
9011 |    * route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.
9012 |    *
9013 |    * **NOTE**
9014 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9015 |    * will not intercept requests intercepted by Service Worker. See
9016 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
9017 |    * using request interception by setting
9018 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
9019 |    * `'block'`.
9020 |    *
9021 |    * **Usage**
9022 |    *
9023 |    * An example of a naive handler that aborts all image requests:
9024 |    *
9025 |    * ```js
9026 |    * const context = await browser.newContext();
9027 |    * await context.route('**\/*.{png,jpg,jpeg}', route => route.abort());
9028 |    * const page = await context.newPage();
9029 |    * await page.goto('https://example.com');
9030 |    * await browser.close();
9031 |    * ```
9032 |    *
9033 |    * or the same snippet using a regex pattern instead:
9034 |    *
9035 |    * ```js
9036 |    * const context = await browser.newContext();
9037 |    * await context.route(/(\.png$)|(\.jpg$)/, route => route.abort());
9038 |    * const page = await context.newPage();
9039 |    * await page.goto('https://example.com');
9040 |    * await browser.close();
9041 |    * ```
9042 |    *
9043 |    * It is possible to examine the request to decide the route action. For example, mocking all requests that contain
9044 |    * some post data, and leaving all other requests as is:
9045 |    *
9046 |    * ```js
9047 |    * await context.route('/api/**', async route => {
9048 |    *   if (route.request().postData().includes('my-string'))
9049 |    *     await route.fulfill({ body: 'mocked-data' });
9050 |    *   else
9051 |    *     await route.continue();
9052 |    * });
9053 |    * ```
9054 |    *
9055 |    * Page routes (set up with
9056 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route)) take precedence over
9057 |    * browser context routes when request matches both handlers.
9058 |    *
9059 |    * To remove a route with its handler you can use
9060 |    * [browserContext.unroute(url[, handler])](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute).
9061 |    *
9062 |    * **NOTE** Enabling routing disables http cache.
9063 |    *
9064 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a
9065 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
9066 |    * options was provided and the passed URL is a path, it gets merged via the
9067 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
9068 |    * @param handler handler function to route the request.
9069 |    * @param options
9070 |    */
9071 |   route(url: string|RegExp|((url: URL) => boolean), handler: ((route: Route, request: Request) => Promise<any>|any), options?: {
9072 |     /**
9073 |      * How often a route should be used. By default it will be used every time.
9074 |      */
9075 |     times?: number;
9076 |   }): Promise<void>;
9077 | 
9078 |   /**
9079 |    * If specified the network requests that are made in the context will be served from the HAR file. Read more about
9080 |    * [Replaying from HAR](https://playwright.dev/docs/mock#replaying-from-har).
9081 |    *
9082 |    * Playwright will not serve requests intercepted by Service Worker from the HAR file. See
9083 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
9084 |    * using request interception by setting
9085 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
9086 |    * `'block'`.
9087 |    * @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
9088 |    * relative path, then it is resolved relative to the current working directory.
9089 |    * @param options
9090 |    */
9091 |   routeFromHAR(har: string, options?: {
9092 |     /**
9093 |      * - If set to 'abort' any request not found in the HAR file will be aborted.
9094 |      * - If set to 'fallback' falls through to the next route handler in the handler chain.
9095 |      *
9096 |      * Defaults to abort.
9097 |      */
9098 |     notFound?: "abort"|"fallback";
9099 | 
9100 |     /**
9101 |      * If specified, updates the given HAR with the actual network information instead of serving from file. The file is
9102 |      * written to disk when
9103 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) is
9104 |      * called.
9105 |      */
9106 |     update?: boolean;
9107 | 
9108 |     /**
9109 |      * Optional setting to control resource content management. If `attach` is specified, resources are persisted as
9110 |      * separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
9111 |      */
9112 |     updateContent?: "embed"|"attach";
9113 | 
9114 |     /**
9115 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
9116 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
9117 |      * `minimal`.
9118 |      */
9119 |     updateMode?: "full"|"minimal";
9120 | 
9121 |     /**
9122 |      * A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
9123 |      * pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
9124 |      */
9125 |     url?: string|RegExp;
9126 |   }): Promise<void>;
9127 | 
9128 |   /**
9129 |    * This method allows to modify websocket connections that are made by any page in the browser context.
9130 |    *
9131 |    * Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
9132 |    * method before creating any pages.
9133 |    *
9134 |    * **Usage**
9135 |    *
9136 |    * Below is an example of a simple handler that blocks some websocket messages. See
9137 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
9138 |    *
9139 |    * ```js
9140 |    * await context.routeWebSocket('/ws', async ws => {
9141 |    *   ws.routeSend(message => {
9142 |    *     if (message === 'to-be-blocked')
9143 |    *       return;
9144 |    *     ws.send(message);
9145 |    *   });
9146 |    *   await ws.connect();
9147 |    * });
9148 |    * ```
9149 |    *
9150 |    * @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
9151 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
9152 |    * @param handler Handler function to route the WebSocket.
9153 |    */
9154 |   routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
9155 | 
9156 |   /**
9157 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
9158 |    *
9159 |    * All existing service workers in the context.
9160 |    */
9161 |   serviceWorkers(): Array<Worker>;
9162 | 
9163 |   /**
9164 |    * This setting will change the default maximum navigation time for the following methods and related shortcuts:
9165 |    * - [page.goBack([options])](https://playwright.dev/docs/api/class-page#page-go-back)
9166 |    * - [page.goForward([options])](https://playwright.dev/docs/api/class-page#page-go-forward)
9167 |    * - [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto)
9168 |    * - [page.reload([options])](https://playwright.dev/docs/api/class-page#page-reload)
9169 |    * - [page.setContent(html[, options])](https://playwright.dev/docs/api/class-page#page-set-content)
9170 |    * - [page.waitForNavigation([options])](https://playwright.dev/docs/api/class-page#page-wait-for-navigation)
9171 |    *
9172 |    * **NOTE**
9173 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
9174 |    * and [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) take
9175 |    * priority over
9176 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout).
9177 |    *
9178 |    * @param timeout Maximum navigation time in milliseconds
9179 |    */
9180 |   setDefaultNavigationTimeout(timeout: number): void;
9181 | 
9182 |   /**
9183 |    * This setting will change the default maximum time for all the methods accepting
9184 |    * [`timeout`](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout-option-timeout)
9185 |    * option.
9186 |    *
9187 |    * **NOTE**
9188 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout),
9189 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) and
9190 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout)
9191 |    * take priority over
9192 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout).
9193 |    *
9194 |    * @param timeout Maximum time in milliseconds
9195 |    */
9196 |   setDefaultTimeout(timeout: number): void;
9197 | 
9198 |   /**
9199 |    * The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are
9200 |    * merged with page-specific extra HTTP headers set with
9201 |    * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers). If
9202 |    * page overrides a particular header, page-specific header value will be used instead of the browser context header
9203 |    * value.
9204 |    *
9205 |    * **NOTE**
9206 |    * [browserContext.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-extra-http-headers)
9207 |    * does not guarantee the order of headers in the outgoing requests.
9208 |    *
9209 |    * @param headers An object containing additional HTTP headers to be sent with every request. All header values must be strings.
9210 |    */
9211 |   setExtraHTTPHeaders(headers: { [key: string]: string; }): Promise<void>;
9212 | 
9213 |   /**
9214 |    * Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable.
9215 |    *
9216 |    * **Usage**
9217 |    *
9218 |    * ```js
9219 |    * await browserContext.setGeolocation({ latitude: 59.95, longitude: 30.31667 });
9220 |    * ```
9221 |    *
9222 |    * **NOTE** Consider using
9223 |    * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
9224 |    * to grant permissions for the browser context pages to read its geolocation.
9225 |    *
9226 |    * @param geolocation
9227 |    */
9228 |   setGeolocation(geolocation: null|{
9229 |     /**
9230 |      * Latitude between -90 and 90.
9231 |      */
9232 |     latitude: number;
9233 | 
9234 |     /**
9235 |      * Longitude between -180 and 180.
9236 |      */
9237 |     longitude: number;
9238 | 
9239 |     /**
9240 |      * Non-negative accuracy value. Defaults to `0`.
9241 |      */
9242 |     accuracy?: number;
9243 |   }): Promise<void>;
9244 | 
9245 |   /**
9246 |    * @deprecated Browsers may cache credentials after successful authentication. Create a new browser context instead.
9247 |    * @param httpCredentials
9248 |    */
9249 |   setHTTPCredentials(httpCredentials: null|{
9250 |     username: string;
9251 | 
9252 |     password: string;
9253 |   }): Promise<void>;
9254 | 
9255 |   /**
9256 |    * @param offline Whether to emulate network being offline for the browser context.
9257 |    */
9258 |   setOffline(offline: boolean): Promise<void>;
9259 | 
9260 |   /**
9261 |    * Returns storage state for this browser context, contains current cookies and local storage snapshot.
9262 |    * @param options
9263 |    */
9264 |   storageState(options?: {
9265 |     /**
9266 |      * The file path to save the storage state to. If
9267 |      * [`path`](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-path) is a
9268 |      * relative path, then it is resolved relative to current working directory. If no path is provided, storage state is
9269 |      * still returned, but won't be saved to the disk.
9270 |      */
9271 |     path?: string;
9272 |   }): Promise<{
9273 |     cookies: Array<{
9274 |       name: string;
9275 | 
9276 |       value: string;
9277 | 
9278 |       domain: string;
9279 | 
9280 |       path: string;
9281 | 
9282 |       /**
9283 |        * Unix time in seconds.
9284 |        */
9285 |       expires: number;
9286 | 
9287 |       httpOnly: boolean;
9288 | 
9289 |       secure: boolean;
9290 | 
9291 |       sameSite: "Strict"|"Lax"|"None";
9292 |     }>;
9293 | 
9294 |     origins: Array<{
9295 |       origin: string;
9296 | 
9297 |       localStorage: Array<{
9298 |         name: string;
9299 | 
9300 |         value: string;
9301 |       }>;
9302 |     }>;
9303 |   }>;
9304 | 
9305 |   /**
9306 |    * Removes a route created with
9307 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9308 |    * When [`handler`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-handler) is
9309 |    * not specified, removes all routes for the
9310 |    * [`url`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-url).
9311 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] used to register a routing with
9312 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9313 |    * @param handler Optional handler function used to register a routing with
9314 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9315 |    */
9316 |   unroute(url: string|RegExp|((url: URL) => boolean), handler?: ((route: Route, request: Request) => Promise<any>|any)): Promise<void>;
9317 | 
9318 |   /**
9319 |    * Removes all routes created with
9320 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9321 |    * and
9322 |    * [browserContext.routeFromHAR(har[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-from-har).
9323 |    * @param options
9324 |    */
9325 |   unrouteAll(options?: {
9326 |     /**
9327 |      * Specifies whether to wait for already running handlers and what to do if they throw errors:
9328 |      * - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
9329 |      *   result in unhandled error
9330 |      * - `'wait'` - wait for current handler calls (if any) to finish
9331 |      * - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
9332 |      *   after unrouting are silently caught
9333 |      */
9334 |     behavior?: "wait"|"ignoreErrors"|"default";
9335 |   }): Promise<void>;
9336 | 
9337 |   /**
9338 |    * **NOTE** Only works with Chromium browser's persistent context.
9339 |    *
9340 |    * Emitted when new background page is created in the context.
9341 |    *
9342 |    * ```js
9343 |    * const backgroundPage = await context.waitForEvent('backgroundpage');
9344 |    * ```
9345 |    *
9346 |    */
9347 |   waitForEvent(event: 'backgroundpage', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9348 | 
9349 |   /**
9350 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
9351 |    * - Browser context is closed.
9352 |    * - Browser application is closed or crashed.
9353 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9354 |    */
9355 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (browserContext: BrowserContext) => boolean | Promise<boolean>, timeout?: number } | ((browserContext: BrowserContext) => boolean | Promise<boolean>)): Promise<BrowserContext>;
9356 | 
9357 |   /**
9358 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
9359 |    *
9360 |    * The arguments passed into `console.log` and the page are available on the
9361 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
9362 |    *
9363 |    * **Usage**
9364 |    *
9365 |    * ```js
9366 |    * context.on('console', async msg => {
9367 |    *   const values = [];
9368 |    *   for (const arg of msg.args())
9369 |    *     values.push(await arg.jsonValue());
9370 |    *   console.log(...values);
9371 |    * });
9372 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
9373 |    * ```
9374 |    *
9375 |    */
9376 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
9377 | 
9378 |   /**
9379 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
9380 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
9381 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
9382 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
9383 |    * dialog, and actions like click will never finish.
9384 |    *
9385 |    * **Usage**
9386 |    *
9387 |    * ```js
9388 |    * context.on('dialog', dialog => {
9389 |    *   dialog.accept();
9390 |    * });
9391 |    * ```
9392 |    *
9393 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
9394 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
9395 |    * listeners are present, all dialogs are automatically dismissed.
9396 |    *
9397 |    */
9398 |   waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
9399 | 
9400 |   /**
9401 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
9402 |    * will also fire for popup pages. See also
9403 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
9404 |    * relevant to a specific page.
9405 |    *
9406 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
9407 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
9408 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
9409 |    * to this network request, use
9410 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9411 |    * and
9412 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
9413 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
9414 |    *
9415 |    * ```js
9416 |    * const newPagePromise = context.waitForEvent('page');
9417 |    * await page.getByText('open new page').click();
9418 |    * const newPage = await newPagePromise;
9419 |    * console.log(await newPage.evaluate('location.href'));
9420 |    * ```
9421 |    *
9422 |    * **NOTE** Use
9423 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
9424 |    * wait until the page gets to a particular state (you should not need it in most cases).
9425 |    *
9426 |    */
9427 |   waitForEvent(event: 'page', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9428 | 
9429 |   /**
9430 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
9431 |    * only listen for requests from a particular page, use
9432 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
9433 |    *
9434 |    * In order to intercept and mutate requests, see
9435 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9436 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
9437 |    */
9438 |   waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9439 | 
9440 |   /**
9441 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
9442 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
9443 |    *
9444 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
9445 |    * will complete with
9446 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
9447 |    * event and not with
9448 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
9449 |    *
9450 |    */
9451 |   waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9452 | 
9453 |   /**
9454 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
9455 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
9456 |    * particular page, use
9457 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
9458 |    */
9459 |   waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9460 | 
9461 |   /**
9462 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
9463 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
9464 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
9465 |    */
9466 |   waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
9467 | 
9468 |   /**
9469 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
9470 |    *
9471 |    * Emitted when new service worker is created in the context.
9472 |    */
9473 |   waitForEvent(event: 'serviceworker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
9474 | 
9475 |   /**
9476 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
9477 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
9478 |    */
9479 |   waitForEvent(event: 'weberror', optionsOrPredicate?: { predicate?: (webError: WebError) => boolean | Promise<boolean>, timeout?: number } | ((webError: WebError) => boolean | Promise<boolean>)): Promise<WebError>;
9480 | 
9481 | 
9482 |   /**
9483 |    * Playwright has ability to mock clock and passage of time.
9484 |    */
9485 |   clock: Clock;
9486 | 
9487 |   /**
9488 |    * API testing helper associated with this context. Requests made with this API will use context cookies.
9489 |    */
9490 |   request: APIRequestContext;
9491 | 
9492 |   tracing: Tracing;
9493 | 
9494 |   [Symbol.asyncDispose](): Promise<void>;
9495 | }
9496 | 
9497 | /**
9498 |  * A Browser is created via
9499 |  * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). An example
9500 |  * of using a [Browser](https://playwright.dev/docs/api/class-browser) to create a
9501 |  * [Page](https://playwright.dev/docs/api/class-page):
9502 |  *
9503 |  * ```js
9504 |  * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
9505 |  *
9506 |  * (async () => {
9507 |  *   const browser = await firefox.launch();
9508 |  *   const page = await browser.newPage();
9509 |  *   await page.goto('https://example.com');
9510 |  *   await browser.close();
9511 |  * })();
9512 |  * ```
9513 |  *
9514 |  */
9515 | export interface Browser {
9516 |   /**
9517 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
9518 |    * async listeners to complete or to ignore subsequent errors from these listeners.
9519 |    * @param type
9520 |    * @param options
9521 |    */
9522 |   removeAllListeners(type?: string): this;
9523 |   /**
9524 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
9525 |    * async listeners to complete or to ignore subsequent errors from these listeners.
9526 |    * @param type
9527 |    * @param options
9528 |    */
9529 |   removeAllListeners(type: string | undefined, options: {
9530 |     /**
9531 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
9532 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
9533 |      * - `'wait'` - wait for current listener calls (if any) to finish
9534 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
9535 |      */
9536 |     behavior?: 'wait'|'ignoreErrors'|'default'
9537 |   }): Promise<void>;
9538 |   /**
9539 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9540 |    * following:
9541 |    * - Browser application is closed or crashed.
9542 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9543 |    */
9544 |   on(event: 'disconnected', listener: (browser: Browser) => any): this;
9545 | 
9546 |   /**
9547 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
9548 |    */
9549 |   once(event: 'disconnected', listener: (browser: Browser) => any): this;
9550 | 
9551 |   /**
9552 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9553 |    * following:
9554 |    * - Browser application is closed or crashed.
9555 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9556 |    */
9557 |   addListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9558 | 
9559 |   /**
9560 |    * Removes an event listener added by `on` or `addListener`.
9561 |    */
9562 |   removeListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9563 | 
9564 |   /**
9565 |    * Removes an event listener added by `on` or `addListener`.
9566 |    */
9567 |   off(event: 'disconnected', listener: (browser: Browser) => any): this;
9568 | 
9569 |   /**
9570 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9571 |    * following:
9572 |    * - Browser application is closed or crashed.
9573 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9574 |    */
9575 |   prependListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9576 | 
9577 |   /**
9578 |    * Get the browser type (chromium, firefox or webkit) that the browser belongs to.
9579 |    */
9580 |   browserType(): BrowserType;
9581 | 
9582 |   /**
9583 |    * In case this browser is obtained using
9584 |    * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch), closes the
9585 |    * browser and all of its pages (if any were opened).
9586 |    *
9587 |    * In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from
9588 |    * the browser server.
9589 |    *
9590 |    * **NOTE** This is similar to force quitting the browser. Therefore, you should call
9591 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on
9592 |    * any [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)'s you explicitly created earlier with
9593 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
9594 |    * calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close).
9595 |    *
9596 |    * The [Browser](https://playwright.dev/docs/api/class-browser) object itself is considered to be disposed and cannot
9597 |    * be used anymore.
9598 |    * @param options
9599 |    */
9600 |   close(options?: {
9601 |     /**
9602 |      * The reason to be reported to the operations interrupted by the browser closure.
9603 |      */
9604 |     reason?: string;
9605 |   }): Promise<void>;
9606 | 
9607 |   /**
9608 |    * Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.
9609 |    *
9610 |    * **Usage**
9611 |    *
9612 |    * ```js
9613 |    * const browser = await pw.webkit.launch();
9614 |    * console.log(browser.contexts().length); // prints `0`
9615 |    *
9616 |    * const context = await browser.newContext();
9617 |    * console.log(browser.contexts().length); // prints `1`
9618 |    * ```
9619 |    *
9620 |    */
9621 |   contexts(): Array<BrowserContext>;
9622 | 
9623 |   /**
9624 |    * Indicates that the browser is connected.
9625 |    */
9626 |   isConnected(): boolean;
9627 | 
9628 |   /**
9629 |    * **NOTE** CDP Sessions are only supported on Chromium-based browsers.
9630 |    *
9631 |    * Returns the newly created browser session.
9632 |    */
9633 |   newBrowserCDPSession(): Promise<CDPSession>;
9634 | 
9635 |   /**
9636 |    * Creates a new browser context. It won't share cookies/cache with other browser contexts.
9637 |    *
9638 |    * **NOTE** If directly using this method to create
9639 |    * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)s, it is best practice to explicitly close
9640 |    * the returned context via
9641 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) when
9642 |    * your code is done with the [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), and before
9643 |    * calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close). This will ensure
9644 |    * the `context` is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved.
9645 |    *
9646 |    * **Usage**
9647 |    *
9648 |    * ```js
9649 |    * (async () => {
9650 |    *   const browser = await playwright.firefox.launch();  // Or 'chromium' or 'webkit'.
9651 |    *   // Create a new incognito browser context.
9652 |    *   const context = await browser.newContext();
9653 |    *   // Create a new page in a pristine context.
9654 |    *   const page = await context.newPage();
9655 |    *   await page.goto('https://example.com');
9656 |    *
9657 |    *   // Gracefully close up everything
9658 |    *   await context.close();
9659 |    *   await browser.close();
9660 |    * })();
9661 |    * ```
9662 |    *
9663 |    * @param options
9664 |    */
9665 |   newContext(options?: BrowserContextOptions): Promise<BrowserContext>;
9666 | 
9667 |   /**
9668 |    * Creates a new page in a new browser context. Closing this page will close the context as well.
9669 |    *
9670 |    * This is a convenience API that should only be used for the single-page scenarios and short snippets. Production
9671 |    * code and testing frameworks should explicitly create
9672 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) followed by the
9673 |    * [browserContext.newPage()](https://playwright.dev/docs/api/class-browsercontext#browser-context-new-page) to
9674 |    * control their exact life times.
9675 |    * @param options
9676 |    */
9677 |   newPage(options?: {
9678 |     /**
9679 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
9680 |      */
9681 |     acceptDownloads?: boolean;
9682 | 
9683 |     /**
9684 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
9685 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
9686 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
9687 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
9688 |      * or
9689 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
9690 |      * it takes the base URL in consideration by using the
9691 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
9692 |      * Unset by default. Examples:
9693 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
9694 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
9695 |      *   `http://localhost:3000/foo/bar.html`
9696 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
9697 |      *   `http://localhost:3000/bar.html`
9698 |      */
9699 |     baseURL?: string;
9700 | 
9701 |     /**
9702 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
9703 |      */
9704 |     bypassCSP?: boolean;
9705 | 
9706 |     /**
9707 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
9708 |      *
9709 |      * **Details**
9710 |      *
9711 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
9712 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
9713 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
9714 |      * with an exact match to the request origin that the certificate is valid for.
9715 |      *
9716 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
9717 |      * work by replacing `localhost` with `local.playwright`.
9718 |      *
9719 |      */
9720 |     clientCertificates?: Array<{
9721 |       /**
9722 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
9723 |        */
9724 |       origin: string;
9725 | 
9726 |       /**
9727 |        * Path to the file with the certificate in PEM format.
9728 |        */
9729 |       certPath?: string;
9730 | 
9731 |       /**
9732 |        * Direct value of the certificate in PEM format.
9733 |        */
9734 |       cert?: Buffer;
9735 | 
9736 |       /**
9737 |        * Path to the file with the private key in PEM format.
9738 |        */
9739 |       keyPath?: string;
9740 | 
9741 |       /**
9742 |        * Direct value of the private key in PEM format.
9743 |        */
9744 |       key?: Buffer;
9745 | 
9746 |       /**
9747 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
9748 |        */
9749 |       pfxPath?: string;
9750 | 
9751 |       /**
9752 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
9753 |        */
9754 |       pfx?: Buffer;
9755 | 
9756 |       /**
9757 |        * Passphrase for the private key (PEM or PFX).
9758 |        */
9759 |       passphrase?: string;
9760 |     }>;
9761 | 
9762 |     /**
9763 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
9764 |      * media feature, supported values are `'light'` and `'dark'`. See
9765 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9766 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
9767 |      */
9768 |     colorScheme?: null|"light"|"dark"|"no-preference";
9769 | 
9770 |     /**
9771 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
9772 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
9773 |      */
9774 |     deviceScaleFactor?: number;
9775 | 
9776 |     /**
9777 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
9778 |      */
9779 |     extraHTTPHeaders?: { [key: string]: string; };
9780 | 
9781 |     /**
9782 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
9783 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9784 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
9785 |      */
9786 |     forcedColors?: null|"active"|"none";
9787 | 
9788 |     geolocation?: {
9789 |       /**
9790 |        * Latitude between -90 and 90.
9791 |        */
9792 |       latitude: number;
9793 | 
9794 |       /**
9795 |        * Longitude between -180 and 180.
9796 |        */
9797 |       longitude: number;
9798 | 
9799 |       /**
9800 |        * Non-negative accuracy value. Defaults to `0`.
9801 |        */
9802 |       accuracy?: number;
9803 |     };
9804 | 
9805 |     /**
9806 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
9807 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
9808 |      */
9809 |     hasTouch?: boolean;
9810 | 
9811 |     /**
9812 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
9813 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
9814 |      */
9815 |     httpCredentials?: {
9816 |       username: string;
9817 | 
9818 |       password: string;
9819 | 
9820 |       /**
9821 |        * Restrain sending http credentials on specific origin (scheme://host:port).
9822 |        */
9823 |       origin?: string;
9824 | 
9825 |       /**
9826 |        * This option only applies to the requests sent from corresponding
9827 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
9828 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
9829 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
9830 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
9831 |        */
9832 |       send?: "unauthorized"|"always";
9833 |     };
9834 | 
9835 |     /**
9836 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
9837 |      */
9838 |     ignoreHTTPSErrors?: boolean;
9839 | 
9840 |     /**
9841 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
9842 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
9843 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
9844 |      */
9845 |     isMobile?: boolean;
9846 | 
9847 |     /**
9848 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
9849 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
9850 |      */
9851 |     javaScriptEnabled?: boolean;
9852 | 
9853 |     /**
9854 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
9855 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
9856 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
9857 |      */
9858 |     locale?: string;
9859 | 
9860 |     /**
9861 |      * Logger sink for Playwright logging.
9862 |      */
9863 |     logger?: Logger;
9864 | 
9865 |     /**
9866 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
9867 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
9868 |      */
9869 |     offline?: boolean;
9870 | 
9871 |     /**
9872 |      * A list of permissions to grant to all pages in this context. See
9873 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
9874 |      * for more details. Defaults to none.
9875 |      */
9876 |     permissions?: Array<string>;
9877 | 
9878 |     /**
9879 |      * Network proxy settings to use with this context. Defaults to none.
9880 |      */
9881 |     proxy?: {
9882 |       /**
9883 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
9884 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
9885 |        */
9886 |       server: string;
9887 | 
9888 |       /**
9889 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
9890 |        */
9891 |       bypass?: string;
9892 | 
9893 |       /**
9894 |        * Optional username to use if HTTP proxy requires authentication.
9895 |        */
9896 |       username?: string;
9897 | 
9898 |       /**
9899 |        * Optional password to use if HTTP proxy requires authentication.
9900 |        */
9901 |       password?: string;
9902 |     };
9903 | 
9904 |     /**
9905 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
9906 |      * If not specified, the HAR is not recorded. Make sure to await
9907 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
9908 |      * the HAR to be saved.
9909 |      */
9910 |     recordHar?: {
9911 |       /**
9912 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
9913 |        * `content` policy instead.
9914 |        */
9915 |       omitContent?: boolean;
9916 | 
9917 |       /**
9918 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
9919 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
9920 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
9921 |        * files and to `embed` for all other file extensions.
9922 |        */
9923 |       content?: "omit"|"embed"|"attach";
9924 | 
9925 |       /**
9926 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
9927 |        * default.
9928 |        */
9929 |       path: string;
9930 | 
9931 |       /**
9932 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
9933 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
9934 |        */
9935 |       mode?: "full"|"minimal";
9936 | 
9937 |       /**
9938 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
9939 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
9940 |        * options was provided and the passed URL is a path, it gets merged via the
9941 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
9942 |        */
9943 |       urlFilter?: string|RegExp;
9944 |     };
9945 | 
9946 |     /**
9947 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
9948 |      * Make sure to await
9949 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
9950 |      * videos to be saved.
9951 |      */
9952 |     recordVideo?: {
9953 |       /**
9954 |        * Path to the directory to put videos into.
9955 |        */
9956 |       dir: string;
9957 | 
9958 |       /**
9959 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
9960 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
9961 |        * each page will be scaled down if necessary to fit the specified size.
9962 |        */
9963 |       size?: {
9964 |         /**
9965 |          * Video frame width.
9966 |          */
9967 |         width: number;
9968 | 
9969 |         /**
9970 |          * Video frame height.
9971 |          */
9972 |         height: number;
9973 |       };
9974 |     };
9975 | 
9976 |     /**
9977 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
9978 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9979 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
9980 |      */
9981 |     reducedMotion?: null|"reduce"|"no-preference";
9982 | 
9983 |     /**
9984 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
9985 |      * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-viewport) is set.
9986 |      */
9987 |     screen?: {
9988 |       /**
9989 |        * page width in pixels.
9990 |        */
9991 |       width: number;
9992 | 
9993 |       /**
9994 |        * page height in pixels.
9995 |        */
9996 |       height: number;
9997 |     };
9998 | 
9999 |     /**
10000 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
10001 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
10002 |      *   registered.
10003 |      * - `'block'`: Playwright will block all registration of Service Workers.
10004 |      */
10005 |     serviceWorkers?: "allow"|"block";
10006 | 
10007 |     /**
10008 |      * Learn more about [storage state and auth](https://playwright.dev/docs/auth).
10009 |      *
10010 |      * Populates context with given storage state. This option can be used to initialize context with logged-in
10011 |      * information obtained via
10012 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state).
10013 |      */
10014 |     storageState?: string|{
10015 |       /**
10016 |        * Cookies to set for context
10017 |        */
10018 |       cookies: Array<{
10019 |         name: string;
10020 | 
10021 |         value: string;
10022 | 
10023 |         /**
10024 |          * Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like
10025 |          * this: ".example.com"
10026 |          */
10027 |         domain: string;
10028 | 
10029 |         /**
10030 |          * Domain and path are required
10031 |          */
10032 |         path: string;
10033 | 
10034 |         /**
10035 |          * Unix time in seconds.
10036 |          */
10037 |         expires: number;
10038 | 
10039 |         httpOnly: boolean;
10040 | 
10041 |         secure: boolean;
10042 | 
10043 |         /**
10044 |          * sameSite flag
10045 |          */
10046 |         sameSite: "Strict"|"Lax"|"None";
10047 |       }>;
10048 | 
10049 |       /**
10050 |        * localStorage to set for context
10051 |        */
10052 |       origins: Array<{
10053 |         origin: string;
10054 | 
10055 |         localStorage: Array<{
10056 |           name: string;
10057 | 
10058 |           value: string;
10059 |         }>;
10060 |       }>;
10061 |     };
10062 | 
10063 |     /**
10064 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
10065 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
10066 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
10067 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
10068 |      */
10069 |     strictSelectors?: boolean;
10070 | 
10071 |     /**
10072 |      * Changes the timezone of the context. See
10073 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
10074 |      * for a list of supported timezone IDs. Defaults to the system timezone.
10075 |      */
10076 |     timezoneId?: string;
10077 | 
10078 |     /**
10079 |      * Specific user agent to use in this context.
10080 |      */
10081 |     userAgent?: string;
10082 | 
10083 |     /**
10084 |      * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
10085 |      */
10086 |     videoSize?: {
10087 |       /**
10088 |        * Video frame width.
10089 |        */
10090 |       width: number;
10091 | 
10092 |       /**
10093 |        * Video frame height.
10094 |        */
10095 |       height: number;
10096 |     };
10097 | 
10098 |     /**
10099 |      * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
10100 |      */
10101 |     videosPath?: string;
10102 | 
10103 |     /**
10104 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
10105 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
10106 |      *
10107 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
10108 |      * by the operating system. It makes the execution of the tests non-deterministic.
10109 |      *
10110 |      */
10111 |     viewport?: null|{
10112 |       /**
10113 |        * page width in pixels.
10114 |        */
10115 |       width: number;
10116 | 
10117 |       /**
10118 |        * page height in pixels.
10119 |        */
10120 |       height: number;
10121 |     };
10122 |   }): Promise<Page>;
10123 | 
10124 |   /**
10125 |    * **NOTE** This API controls
10126 |    * [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
10127 |    * chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/docs/trace-viewer) could be found
10128 |    * [here](https://playwright.dev/docs/api/class-tracing).
10129 |    *
10130 |    * You can use
10131 |    * [browser.startTracing([page, options])](https://playwright.dev/docs/api/class-browser#browser-start-tracing) and
10132 |    * [browser.stopTracing()](https://playwright.dev/docs/api/class-browser#browser-stop-tracing) to create a trace file
10133 |    * that can be opened in Chrome DevTools performance panel.
10134 |    *
10135 |    * **Usage**
10136 |    *
10137 |    * ```js
10138 |    * await browser.startTracing(page, { path: 'trace.json' });
10139 |    * await page.goto('https://www.google.com');
10140 |    * await browser.stopTracing();
10141 |    * ```
10142 |    *
10143 |    * @param page Optional, if specified, tracing includes screenshots of the given page.
10144 |    * @param options
10145 |    */
10146 |   startTracing(page?: Page, options?: {
10147 |     /**
10148 |      * specify custom categories to use instead of default.
10149 |      */
10150 |     categories?: Array<string>;
10151 | 
10152 |     /**
10153 |      * A path to write the trace file to.
10154 |      */
10155 |     path?: string;
10156 | 
10157 |     /**
10158 |      * captures screenshots in the trace.
10159 |      */
10160 |     screenshots?: boolean;
10161 |   }): Promise<void>;
10162 | 
10163 |   /**
10164 |    * **NOTE** This API controls
10165 |    * [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
10166 |    * chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/docs/trace-viewer) could be found
10167 |    * [here](https://playwright.dev/docs/api/class-tracing).
10168 |    *
10169 |    * Returns the buffer with trace data.
10170 |    */
10171 |   stopTracing(): Promise<Buffer>;
10172 | 
10173 |   /**
10174 |    * Returns the browser version.
10175 |    */
10176 |   version(): string;
10177 | 
10178 |   [Symbol.asyncDispose](): Promise<void>;
10179 | }
10180 | 
10181 | /**
10182 |  * The Worker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
10183 |  * `worker` event is emitted on the page object to signal a worker creation. `close` event is emitted on the worker
10184 |  * object when the worker is gone.
10185 |  *
10186 |  * ```js
10187 |  * page.on('worker', worker => {
10188 |  *   console.log('Worker created: ' + worker.url());
10189 |  *   worker.on('close', worker => console.log('Worker destroyed: ' + worker.url()));
10190 |  * });
10191 |  *
10192 |  * console.log('Current workers:');
10193 |  * for (const worker of page.workers())
10194 |  *   console.log('  ' + worker.url());
10195 |  * ```
10196 |  *
10197 |  */
10198 | export interface Worker {
10199 |   /**
10200 |    * Returns the return value of
10201 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10202 |    *
10203 |    * If the function passed to the
10204 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10205 |    * [Promise], then
10206 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) would wait for
10207 |    * the promise to resolve and return its value.
10208 |    *
10209 |    * If the function passed to the
10210 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10211 |    * non-[Serializable] value, then
10212 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns
10213 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
10214 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
10215 |    * @param pageFunction Function to be evaluated in the worker context.
10216 |    * @param arg Optional argument to pass to
10217 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10218 |    */
10219 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
10220 |   /**
10221 |    * Returns the return value of
10222 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10223 |    *
10224 |    * If the function passed to the
10225 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10226 |    * [Promise], then
10227 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) would wait for
10228 |    * the promise to resolve and return its value.
10229 |    *
10230 |    * If the function passed to the
10231 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10232 |    * non-[Serializable] value, then
10233 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns
10234 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
10235 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
10236 |    * @param pageFunction Function to be evaluated in the worker context.
10237 |    * @param arg Optional argument to pass to
10238 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10239 |    */
10240 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
10241 | 
10242 |   /**
10243 |    * Returns the return value of
10244 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
10245 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10246 |    *
10247 |    * The only difference between
10248 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
10249 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10250 |    * is that
10251 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10252 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10253 |    *
10254 |    * If the function passed to the
10255 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10256 |    * returns a [Promise], then
10257 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10258 |    * would wait for the promise to resolve and return its value.
10259 |    * @param pageFunction Function to be evaluated in the worker context.
10260 |    * @param arg Optional argument to pass to
10261 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
10262 |    */
10263 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
10264 |   /**
10265 |    * Returns the return value of
10266 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
10267 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10268 |    *
10269 |    * The only difference between
10270 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
10271 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10272 |    * is that
10273 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10274 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10275 |    *
10276 |    * If the function passed to the
10277 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10278 |    * returns a [Promise], then
10279 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10280 |    * would wait for the promise to resolve and return its value.
10281 |    * @param pageFunction Function to be evaluated in the worker context.
10282 |    * @param arg Optional argument to pass to
10283 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
10284 |    */
10285 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
10286 |   /**
10287 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10288 |    * terminated.
10289 |    */
10290 |   on(event: 'close', listener: (worker: Worker) => any): this;
10291 | 
10292 |   /**
10293 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
10294 |    */
10295 |   once(event: 'close', listener: (worker: Worker) => any): this;
10296 | 
10297 |   /**
10298 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10299 |    * terminated.
10300 |    */
10301 |   addListener(event: 'close', listener: (worker: Worker) => any): this;
10302 | 
10303 |   /**
10304 |    * Removes an event listener added by `on` or `addListener`.
10305 |    */
10306 |   removeListener(event: 'close', listener: (worker: Worker) => any): this;
10307 | 
10308 |   /**
10309 |    * Removes an event listener added by `on` or `addListener`.
10310 |    */
10311 |   off(event: 'close', listener: (worker: Worker) => any): this;
10312 | 
10313 |   /**
10314 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10315 |    * terminated.
10316 |    */
10317 |   prependListener(event: 'close', listener: (worker: Worker) => any): this;
10318 | 
10319 |   url(): string;
10320 | }
10321 | 
10322 | /**
10323 |  * JSHandle represents an in-page JavaScript object. JSHandles can be created with the
10324 |  * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) method.
10325 |  *
10326 |  * ```js
10327 |  * const windowHandle = await page.evaluateHandle(() => window);
10328 |  * // ...
10329 |  * ```
10330 |  *
10331 |  * JSHandle prevents the referenced JavaScript object being garbage collected unless the handle is exposed with
10332 |  * [jsHandle.dispose()](https://playwright.dev/docs/api/class-jshandle#js-handle-dispose). JSHandles are auto-disposed
10333 |  * when their origin frame gets navigated or the parent context gets destroyed.
10334 |  *
10335 |  * JSHandle instances can be used as an argument in
10336 |  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector),
10337 |  * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
10338 |  * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
10339 |  * methods.
10340 |  */
10341 | export interface JSHandle<T = any> {
10342 |   /**
10343 |    * Returns the return value of
10344 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10345 |    *
10346 |    * This method passes this handle as the first argument to
10347 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10348 |    *
10349 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
10350 |    * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
10351 |    *
10352 |    * **Usage**
10353 |    *
10354 |    * ```js
10355 |    * const tweetHandle = await page.$('.tweet .retweets');
10356 |    * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10 retweets');
10357 |    * ```
10358 |    *
10359 |    * @param pageFunction Function to be evaluated in the page context.
10360 |    * @param arg Optional argument to pass to
10361 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10362 |    */
10363 |   evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<R>;
10364 |   /**
10365 |    * Returns the return value of
10366 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10367 |    *
10368 |    * This method passes this handle as the first argument to
10369 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10370 |    *
10371 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
10372 |    * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
10373 |    *
10374 |    * **Usage**
10375 |    *
10376 |    * ```js
10377 |    * const tweetHandle = await page.$('.tweet .retweets');
10378 |    * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10 retweets');
10379 |    * ```
10380 |    *
10381 |    * @param pageFunction Function to be evaluated in the page context.
10382 |    * @param arg Optional argument to pass to
10383 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10384 |    */
10385 |   evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
10386 | 
10387 |   /**
10388 |    * Returns the return value of
10389 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
10390 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10391 |    *
10392 |    * This method passes this handle as the first argument to
10393 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10394 |    *
10395 |    * The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
10396 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10397 |    *
10398 |    * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10399 |    * wait for the promise to resolve and return its value.
10400 |    *
10401 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10402 |    * more details.
10403 |    * @param pageFunction Function to be evaluated in the page context.
10404 |    * @param arg Optional argument to pass to
10405 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10406 |    */
10407 |   evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
10408 |   /**
10409 |    * Returns the return value of
10410 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
10411 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10412 |    *
10413 |    * This method passes this handle as the first argument to
10414 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10415 |    *
10416 |    * The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
10417 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10418 |    *
10419 |    * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10420 |    * wait for the promise to resolve and return its value.
10421 |    *
10422 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10423 |    * more details.
10424 |    * @param pageFunction Function to be evaluated in the page context.
10425 |    * @param arg Optional argument to pass to
10426 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10427 |    */
10428 |   evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<SmartHandle<R>>;
10429 | 
10430 |   /**
10431 |    * Returns a JSON representation of the object. If the object has a `toJSON` function, it **will not be called**.
10432 |    *
10433 |    * **NOTE** The method will return an empty JSON object if the referenced object is not stringifiable. It will throw
10434 |    * an error if the object has circular references.
10435 |    *
10436 |    */
10437 |   jsonValue(): Promise<T>;
10438 |   /**
10439 |    * Returns either `null` or the object handle itself, if the object handle is an instance of
10440 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle).
10441 |    */
10442 |   asElement(): T extends Node ? ElementHandle<T> : null;
10443 |   /**
10444 |    * The `jsHandle.dispose` method stops referencing the element handle.
10445 |    */
10446 |   dispose(): Promise<void>;
10447 | 
10448 |   /**
10449 |    * The method returns a map with **own property names** as keys and JSHandle instances for the property values.
10450 |    *
10451 |    * **Usage**
10452 |    *
10453 |    * ```js
10454 |    * const handle = await page.evaluateHandle(() => ({ window, document }));
10455 |    * const properties = await handle.getProperties();
10456 |    * const windowHandle = properties.get('window');
10457 |    * const documentHandle = properties.get('document');
10458 |    * await handle.dispose();
10459 |    * ```
10460 |    *
10461 |    */
10462 |   getProperties(): Promise<Map<string, JSHandle>>;
10463 | 
10464 |   /**
10465 |    * Fetches a single property from the referenced object.
10466 |    * @param propertyName property to get
10467 |    */
10468 |   getProperty(propertyName: string): Promise<JSHandle>;
10469 | 
10470 |   [Symbol.asyncDispose](): Promise<void>;
10471 | }
10472 | 
10473 | /**
10474 |  * - extends: [JSHandle](https://playwright.dev/docs/api/class-jshandle)
10475 |  *
10476 |  * ElementHandle represents an in-page DOM element. ElementHandles can be created with the
10477 |  * [page.$(selector[, options])](https://playwright.dev/docs/api/class-page#page-query-selector) method.
10478 |  *
10479 |  * **NOTE** The use of ElementHandle is discouraged, use [Locator](https://playwright.dev/docs/api/class-locator)
10480 |  * objects and web-first assertions instead.
10481 |  *
10482 |  * ```js
10483 |  * const hrefElement = await page.$('a');
10484 |  * await hrefElement.click();
10485 |  * ```
10486 |  *
10487 |  * ElementHandle prevents DOM element from garbage collection unless the handle is disposed with
10488 |  * [jsHandle.dispose()](https://playwright.dev/docs/api/class-jshandle#js-handle-dispose). ElementHandles are
10489 |  * auto-disposed when their origin frame gets navigated.
10490 |  *
10491 |  * ElementHandle instances can be used as an argument in
10492 |  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
10493 |  * and [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) methods.
10494 |  *
10495 |  * The difference between the [Locator](https://playwright.dev/docs/api/class-locator) and ElementHandle is that the
10496 |  * ElementHandle points to a particular element, while [Locator](https://playwright.dev/docs/api/class-locator)
10497 |  * captures the logic of how to retrieve an element.
10498 |  *
10499 |  * In the example below, handle points to a particular DOM element on page. If that element changes text or is used by
10500 |  * React to render an entirely different component, handle is still pointing to that very DOM element. This can lead
10501 |  * to unexpected behaviors.
10502 |  *
10503 |  * ```js
10504 |  * const handle = await page.$('text=Submit');
10505 |  * // ...
10506 |  * await handle.hover();
10507 |  * await handle.click();
10508 |  * ```
10509 |  *
10510 |  * With the locator, every time the `element` is used, up-to-date DOM element is located in the page using the
10511 |  * selector. So in the snippet below, underlying DOM element is going to be located twice.
10512 |  *
10513 |  * ```js
10514 |  * const locator = page.getByText('Submit');
10515 |  * // ...
10516 |  * await locator.hover();
10517 |  * await locator.click();
10518 |  * ```
10519 |  *
10520 |  */
10521 | export interface ElementHandle<T=Node> extends JSHandle<T> {
10522 |   /**
10523 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10524 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10525 |    *
10526 |    * The method finds an element matching the specified selector in the `ElementHandle`'s subtree. If no elements match
10527 |    * the selector, returns `null`.
10528 |    * @param selector A selector to query for.
10529 |    */
10530 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
10531 |   /**
10532 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10533 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10534 |    *
10535 |    * The method finds an element matching the specified selector in the `ElementHandle`'s subtree. If no elements match
10536 |    * the selector, returns `null`.
10537 |    * @param selector A selector to query for.
10538 |    */
10539 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
10540 | 
10541 |   /**
10542 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10543 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10544 |    *
10545 |    * The method finds all elements matching the specified selector in the `ElementHandle`s subtree. If no elements match
10546 |    * the selector, returns empty array.
10547 |    * @param selector A selector to query for.
10548 |    */
10549 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
10550 |   /**
10551 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10552 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10553 |    *
10554 |    * The method finds all elements matching the specified selector in the `ElementHandle`s subtree. If no elements match
10555 |    * the selector, returns empty array.
10556 |    * @param selector A selector to query for.
10557 |    */
10558 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
10559 | 
10560 |   /**
10561 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10562 |    * Use
10563 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10564 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10565 |    *
10566 |    * Returns the return value of
10567 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10568 |    *
10569 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10570 |    * first argument to
10571 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10572 |    * If no elements match the selector, the method throws an error.
10573 |    *
10574 |    * If
10575 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10576 |    * returns a [Promise], then
10577 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10578 |    * would wait for the promise to resolve and return its value.
10579 |    *
10580 |    * **Usage**
10581 |    *
10582 |    * ```js
10583 |    * const tweetHandle = await page.$('.tweet');
10584 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10585 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10586 |    * ```
10587 |    *
10588 |    * @param selector A selector to query for.
10589 |    * @param pageFunction Function to be evaluated in the page context.
10590 |    * @param arg Optional argument to pass to
10591 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10592 |    */
10593 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
10594 |   /**
10595 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10596 |    * Use
10597 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10598 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10599 |    *
10600 |    * Returns the return value of
10601 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10602 |    *
10603 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10604 |    * first argument to
10605 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10606 |    * If no elements match the selector, the method throws an error.
10607 |    *
10608 |    * If
10609 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10610 |    * returns a [Promise], then
10611 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10612 |    * would wait for the promise to resolve and return its value.
10613 |    *
10614 |    * **Usage**
10615 |    *
10616 |    * ```js
10617 |    * const tweetHandle = await page.$('.tweet');
10618 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10619 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10620 |    * ```
10621 |    *
10622 |    * @param selector A selector to query for.
10623 |    * @param pageFunction Function to be evaluated in the page context.
10624 |    * @param arg Optional argument to pass to
10625 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10626 |    */
10627 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
10628 |   /**
10629 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10630 |    * Use
10631 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10632 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10633 |    *
10634 |    * Returns the return value of
10635 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10636 |    *
10637 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10638 |    * first argument to
10639 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10640 |    * If no elements match the selector, the method throws an error.
10641 |    *
10642 |    * If
10643 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10644 |    * returns a [Promise], then
10645 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10646 |    * would wait for the promise to resolve and return its value.
10647 |    *
10648 |    * **Usage**
10649 |    *
10650 |    * ```js
10651 |    * const tweetHandle = await page.$('.tweet');
10652 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10653 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10654 |    * ```
10655 |    *
10656 |    * @param selector A selector to query for.
10657 |    * @param pageFunction Function to be evaluated in the page context.
10658 |    * @param arg Optional argument to pass to
10659 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10660 |    */
10661 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
10662 |   /**
10663 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10664 |    * Use
10665 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10666 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10667 |    *
10668 |    * Returns the return value of
10669 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10670 |    *
10671 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10672 |    * first argument to
10673 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10674 |    * If no elements match the selector, the method throws an error.
10675 |    *
10676 |    * If
10677 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10678 |    * returns a [Promise], then
10679 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10680 |    * would wait for the promise to resolve and return its value.
10681 |    *
10682 |    * **Usage**
10683 |    *
10684 |    * ```js
10685 |    * const tweetHandle = await page.$('.tweet');
10686 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10687 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10688 |    * ```
10689 |    *
10690 |    * @param selector A selector to query for.
10691 |    * @param pageFunction Function to be evaluated in the page context.
10692 |    * @param arg Optional argument to pass to
10693 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10694 |    */
10695 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
10696 | 
10697 |   /**
10698 |    * **NOTE** In most cases,
10699 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10700 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10701 |    * job.
10702 |    *
10703 |    * Returns the return value of
10704 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10705 |    *
10706 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10707 |    * of matched elements as a first argument to
10708 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10709 |    *
10710 |    * If
10711 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10712 |    * returns a [Promise], then
10713 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10714 |    * would wait for the promise to resolve and return its value.
10715 |    *
10716 |    * **Usage**
10717 |    *
10718 |    * ```html
10719 |    * <div class="feed">
10720 |    *   <div class="tweet">Hello!</div>
10721 |    *   <div class="tweet">Hi!</div>
10722 |    * </div>
10723 |    * ```
10724 |    *
10725 |    * ```js
10726 |    * const feedHandle = await page.$('.feed');
10727 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10728 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10729 |    * );
10730 |    * ```
10731 |    *
10732 |    * @param selector A selector to query for.
10733 |    * @param pageFunction Function to be evaluated in the page context.
10734 |    * @param arg Optional argument to pass to
10735 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10736 |    */
10737 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
10738 |   /**
10739 |    * **NOTE** In most cases,
10740 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10741 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10742 |    * job.
10743 |    *
10744 |    * Returns the return value of
10745 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10746 |    *
10747 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10748 |    * of matched elements as a first argument to
10749 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10750 |    *
10751 |    * If
10752 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10753 |    * returns a [Promise], then
10754 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10755 |    * would wait for the promise to resolve and return its value.
10756 |    *
10757 |    * **Usage**
10758 |    *
10759 |    * ```html
10760 |    * <div class="feed">
10761 |    *   <div class="tweet">Hello!</div>
10762 |    *   <div class="tweet">Hi!</div>
10763 |    * </div>
10764 |    * ```
10765 |    *
10766 |    * ```js
10767 |    * const feedHandle = await page.$('.feed');
10768 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10769 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10770 |    * );
10771 |    * ```
10772 |    *
10773 |    * @param selector A selector to query for.
10774 |    * @param pageFunction Function to be evaluated in the page context.
10775 |    * @param arg Optional argument to pass to
10776 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10777 |    */
10778 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
10779 |   /**
10780 |    * **NOTE** In most cases,
10781 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10782 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10783 |    * job.
10784 |    *
10785 |    * Returns the return value of
10786 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10787 |    *
10788 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10789 |    * of matched elements as a first argument to
10790 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10791 |    *
10792 |    * If
10793 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10794 |    * returns a [Promise], then
10795 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10796 |    * would wait for the promise to resolve and return its value.
10797 |    *
10798 |    * **Usage**
10799 |    *
10800 |    * ```html
10801 |    * <div class="feed">
10802 |    *   <div class="tweet">Hello!</div>
10803 |    *   <div class="tweet">Hi!</div>
10804 |    * </div>
10805 |    * ```
10806 |    *
10807 |    * ```js
10808 |    * const feedHandle = await page.$('.feed');
10809 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10810 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10811 |    * );
10812 |    * ```
10813 |    *
10814 |    * @param selector A selector to query for.
10815 |    * @param pageFunction Function to be evaluated in the page context.
10816 |    * @param arg Optional argument to pass to
10817 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10818 |    */
10819 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
10820 |   /**
10821 |    * **NOTE** In most cases,
10822 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10823 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10824 |    * job.
10825 |    *
10826 |    * Returns the return value of
10827 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10828 |    *
10829 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10830 |    * of matched elements as a first argument to
10831 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10832 |    *
10833 |    * If
10834 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10835 |    * returns a [Promise], then
10836 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10837 |    * would wait for the promise to resolve and return its value.
10838 |    *
10839 |    * **Usage**
10840 |    *
10841 |    * ```html
10842 |    * <div class="feed">
10843 |    *   <div class="tweet">Hello!</div>
10844 |    *   <div class="tweet">Hi!</div>
10845 |    * </div>
10846 |    * ```
10847 |    *
10848 |    * ```js
10849 |    * const feedHandle = await page.$('.feed');
10850 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10851 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10852 |    * );
10853 |    * ```
10854 |    *
10855 |    * @param selector A selector to query for.
10856 |    * @param pageFunction Function to be evaluated in the page context.
10857 |    * @param arg Optional argument to pass to
10858 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10859 |    */
10860 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
10861 | 
10862 |   /**
10863 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10864 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10865 |    *
10866 |    * Returns element specified by selector when it satisfies
10867 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10868 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10869 |    *
10870 |    * Wait for the
10871 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10872 |    * relative to the element handle to satisfy
10873 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10874 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10875 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10876 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10877 |    * for the
10878 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10879 |    * milliseconds, the function will throw.
10880 |    *
10881 |    * **Usage**
10882 |    *
10883 |    * ```js
10884 |    * await page.setContent(`<div><span></span></div>`);
10885 |    * const div = await page.$('div');
10886 |    * // Waiting for the 'span' selector relative to the div.
10887 |    * const span = await div.waitForSelector('span', { state: 'attached' });
10888 |    * ```
10889 |    *
10890 |    * **NOTE** This method does not work across navigations, use
10891 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
10892 |    * instead.
10893 |    *
10894 |    * @param selector A selector to query for.
10895 |    * @param options
10896 |    */
10897 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: ElementHandleWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
10898 |   /**
10899 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10900 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10901 |    *
10902 |    * Returns element specified by selector when it satisfies
10903 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10904 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10905 |    *
10906 |    * Wait for the
10907 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10908 |    * relative to the element handle to satisfy
10909 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10910 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10911 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10912 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10913 |    * for the
10914 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10915 |    * milliseconds, the function will throw.
10916 |    *
10917 |    * **Usage**
10918 |    *
10919 |    * ```js
10920 |    * await page.setContent(`<div><span></span></div>`);
10921 |    * const div = await page.$('div');
10922 |    * // Waiting for the 'span' selector relative to the div.
10923 |    * const span = await div.waitForSelector('span', { state: 'attached' });
10924 |    * ```
10925 |    *
10926 |    * **NOTE** This method does not work across navigations, use
10927 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
10928 |    * instead.
10929 |    *
10930 |    * @param selector A selector to query for.
10931 |    * @param options
10932 |    */
10933 |   waitForSelector(selector: string, options?: ElementHandleWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
10934 |   /**
10935 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10936 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10937 |    *
10938 |    * Returns element specified by selector when it satisfies
10939 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10940 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10941 |    *
10942 |    * Wait for the
10943 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10944 |    * relative to the element handle to satisfy
10945 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10946 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10947 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10948 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10949 |    * for the
10950 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10951 |    * milliseconds, the function will throw.
10952 |    *
10953 |    * **Usage**
10954 |    *
10955 |    * ```js
10956 |    * await page.setContent(`<div><span></span></div>`);
10957 |    * const div = await page.$('div');
10958 |    * // Waiting for the 'span' selector relative to the div.
10959 |    * const span = await div.waitForSelector('span', { state: 'attached' });
10960 |    * ```
10961 |    *
10962 |    * **NOTE** This method does not work across navigations, use
10963 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
10964 |    * instead.
10965 |    *
10966 |    * @param selector A selector to query for.
10967 |    * @param options
10968 |    */
10969 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: ElementHandleWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
10970 |   /**
10971 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10972 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10973 |    *
10974 |    * Returns element specified by selector when it satisfies
10975 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10976 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10977 |    *
10978 |    * Wait for the
10979 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10980 |    * relative to the element handle to satisfy
10981 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10982 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10983 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10984 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10985 |    * for the
10986 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10987 |    * milliseconds, the function will throw.
10988 |    *
10989 |    * **Usage**
10990 |    *
10991 |    * ```js
10992 |    * await page.setContent(`<div><span></span></div>`);
10993 |    * const div = await page.$('div');
10994 |    * // Waiting for the 'span' selector relative to the div.
10995 |    * const span = await div.waitForSelector('span', { state: 'attached' });
10996 |    * ```
10997 |    *
10998 |    * **NOTE** This method does not work across navigations, use
10999 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
11000 |    * instead.
11001 |    *
11002 |    * @param selector A selector to query for.
11003 |    * @param options
11004 |    */
11005 |   waitForSelector(selector: string, options: ElementHandleWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
11006 |   /**
11007 |    * This method returns the bounding box of the element, or `null` if the element is not visible. The bounding box is
11008 |    * calculated relative to the main frame viewport - which is usually the same as the browser window.
11009 |    *
11010 |    * Scrolling affects the returned bounding box, similarly to
11011 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
11012 |    * That means `x` and/or `y` may be negative.
11013 |    *
11014 |    * Elements from child frames return the bounding box relative to the main frame, unlike the
11015 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
11016 |    *
11017 |    * Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
11018 |    * following snippet should click the center of the element.
11019 |    *
11020 |    * **Usage**
11021 |    *
11022 |    * ```js
11023 |    * const box = await elementHandle.boundingBox();
11024 |    * await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
11025 |    * ```
11026 |    *
11027 |    */
11028 |   boundingBox(): Promise<null|{
11029 |     /**
11030 |      * the x coordinate of the element in pixels.
11031 |      */
11032 |     x: number;
11033 | 
11034 |     /**
11035 |      * the y coordinate of the element in pixels.
11036 |      */
11037 |     y: number;
11038 | 
11039 |     /**
11040 |      * the width of the element in pixels.
11041 |      */
11042 |     width: number;
11043 | 
11044 |     /**
11045 |      * the height of the element in pixels.
11046 |      */
11047 |     height: number;
11048 |   }>;
11049 | 
11050 |   /**
11051 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
11052 |    * Read more about [locators](https://playwright.dev/docs/locators).
11053 |    *
11054 |    * This method checks the element by performing the following steps:
11055 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
11056 |    *    checked, this method returns immediately.
11057 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11058 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-force) option is
11059 |    *    set.
11060 |    * 1. Scroll the element into view if needed.
11061 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11062 |    *    element.
11063 |    * 1. Ensure that the element is now checked. If not, this method throws.
11064 |    *
11065 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11066 |    *
11067 |    * When all steps combined have not finished during the specified
11068 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-timeout), this method
11069 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11070 |    * @param options
11071 |    */
11072 |   check(options?: {
11073 |     /**
11074 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11075 |      */
11076 |     force?: boolean;
11077 | 
11078 |     /**
11079 |      * This option has no effect.
11080 |      * @deprecated This option has no effect.
11081 |      */
11082 |     noWaitAfter?: boolean;
11083 | 
11084 |     /**
11085 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11086 |      * the element.
11087 |      */
11088 |     position?: {
11089 |       x: number;
11090 | 
11091 |       y: number;
11092 |     };
11093 | 
11094 |     /**
11095 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11096 |      * option in the config, or by using the
11097 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11098 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11099 |      */
11100 |     timeout?: number;
11101 | 
11102 |     /**
11103 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11104 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11105 |      */
11106 |     trial?: boolean;
11107 |   }): Promise<void>;
11108 | 
11109 |   /**
11110 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
11111 |    * Read more about [locators](https://playwright.dev/docs/locators).
11112 |    *
11113 |    * This method clicks the element by performing the following steps:
11114 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11115 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-force) option is
11116 |    *    set.
11117 |    * 1. Scroll the element into view if needed.
11118 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11119 |    *    element, or the specified
11120 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-position).
11121 |    * 1. Wait for initiated navigations to either succeed or fail, unless
11122 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-no-wait-after)
11123 |    *    option is set.
11124 |    *
11125 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11126 |    *
11127 |    * When all steps combined have not finished during the specified
11128 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-timeout), this method
11129 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11130 |    * @param options
11131 |    */
11132 |   click(options?: {
11133 |     /**
11134 |      * Defaults to `left`.
11135 |      */
11136 |     button?: "left"|"right"|"middle";
11137 | 
11138 |     /**
11139 |      * defaults to 1. See [UIEvent.detail].
11140 |      */
11141 |     clickCount?: number;
11142 | 
11143 |     /**
11144 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
11145 |      */
11146 |     delay?: number;
11147 | 
11148 |     /**
11149 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11150 |      */
11151 |     force?: boolean;
11152 | 
11153 |     /**
11154 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11155 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11156 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11157 |      */
11158 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11159 | 
11160 |     /**
11161 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
11162 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
11163 |      * navigating to inaccessible pages. Defaults to `false`.
11164 |      * @deprecated This option will default to `true` in the future.
11165 |      */
11166 |     noWaitAfter?: boolean;
11167 | 
11168 |     /**
11169 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11170 |      * the element.
11171 |      */
11172 |     position?: {
11173 |       x: number;
11174 | 
11175 |       y: number;
11176 |     };
11177 | 
11178 |     /**
11179 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11180 |      * option in the config, or by using the
11181 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11182 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11183 |      */
11184 |     timeout?: number;
11185 | 
11186 |     /**
11187 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11188 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11189 |      */
11190 |     trial?: boolean;
11191 |   }): Promise<void>;
11192 | 
11193 |   /**
11194 |    * Returns the content frame for element handles referencing iframe nodes, or `null` otherwise
11195 |    */
11196 |   contentFrame(): Promise<null|Frame>;
11197 | 
11198 |   /**
11199 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
11200 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11201 |    *
11202 |    * This method double clicks the element by performing the following steps:
11203 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11204 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-force) option is
11205 |    *    set.
11206 |    * 1. Scroll the element into view if needed.
11207 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
11208 |    *    element, or the specified
11209 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-position).
11210 |    *
11211 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11212 |    *
11213 |    * When all steps combined have not finished during the specified
11214 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-timeout), this
11215 |    * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
11216 |    * this.
11217 |    *
11218 |    * **NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.
11219 |    *
11220 |    * @param options
11221 |    */
11222 |   dblclick(options?: {
11223 |     /**
11224 |      * Defaults to `left`.
11225 |      */
11226 |     button?: "left"|"right"|"middle";
11227 | 
11228 |     /**
11229 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
11230 |      */
11231 |     delay?: number;
11232 | 
11233 |     /**
11234 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11235 |      */
11236 |     force?: boolean;
11237 | 
11238 |     /**
11239 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11240 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11241 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11242 |      */
11243 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11244 | 
11245 |     /**
11246 |      * This option has no effect.
11247 |      * @deprecated This option has no effect.
11248 |      */
11249 |     noWaitAfter?: boolean;
11250 | 
11251 |     /**
11252 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11253 |      * the element.
11254 |      */
11255 |     position?: {
11256 |       x: number;
11257 | 
11258 |       y: number;
11259 |     };
11260 | 
11261 |     /**
11262 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11263 |      * option in the config, or by using the
11264 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11265 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11266 |      */
11267 |     timeout?: number;
11268 | 
11269 |     /**
11270 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11271 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11272 |      */
11273 |     trial?: boolean;
11274 |   }): Promise<void>;
11275 | 
11276 |   /**
11277 |    * **NOTE** Use locator-based
11278 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
11279 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11280 |    *
11281 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
11282 |    * `click` is dispatched. This is equivalent to calling
11283 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
11284 |    *
11285 |    * **Usage**
11286 |    *
11287 |    * ```js
11288 |    * await elementHandle.dispatchEvent('click');
11289 |    * ```
11290 |    *
11291 |    * Under the hood, it creates an instance of an event based on the given
11292 |    * [`type`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-type),
11293 |    * initializes it with
11294 |    * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
11295 |    * properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
11296 |    *
11297 |    * Since
11298 |    * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
11299 |    * is event-specific, please refer to the events documentation for the lists of initial properties:
11300 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
11301 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
11302 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
11303 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
11304 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
11305 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
11306 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
11307 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
11308 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
11309 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
11310 |    *
11311 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
11312 |    *
11313 |    * ```js
11314 |    * // Note you can only create DataTransfer in Chromium and Firefox
11315 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
11316 |    * await elementHandle.dispatchEvent('dragstart', { dataTransfer });
11317 |    * ```
11318 |    *
11319 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
11320 |    * @param eventInit Optional event-specific initialization properties.
11321 |    */
11322 |   dispatchEvent(type: string, eventInit?: EvaluationArgument): Promise<void>;
11323 | 
11324 |   /**
11325 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
11326 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11327 |    *
11328 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an
11329 |    * `input` event after filling. Note that you can pass an empty string to clear the input field.
11330 |    *
11331 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
11332 |    * error. However, if the element is inside the `<label>` element that has an associated
11333 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
11334 |    * instead.
11335 |    *
11336 |    * To send fine-grained keyboard events, use
11337 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
11338 |    * @param value Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
11339 |    * @param options
11340 |    */
11341 |   fill(value: string, options?: {
11342 |     /**
11343 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11344 |      */
11345 |     force?: boolean;
11346 | 
11347 |     /**
11348 |      * This option has no effect.
11349 |      * @deprecated This option has no effect.
11350 |      */
11351 |     noWaitAfter?: boolean;
11352 | 
11353 |     /**
11354 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11355 |      * option in the config, or by using the
11356 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11357 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11358 |      */
11359 |     timeout?: number;
11360 |   }): Promise<void>;
11361 | 
11362 |   /**
11363 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
11364 |    * Read more about [locators](https://playwright.dev/docs/locators).
11365 |    *
11366 |    * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
11367 |    */
11368 |   focus(): Promise<void>;
11369 | 
11370 |   /**
11371 |    * **NOTE** Use locator-based
11372 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
11373 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11374 |    *
11375 |    * Returns element attribute value.
11376 |    * @param name Attribute name to get the value for.
11377 |    */
11378 |   getAttribute(name: string): Promise<null|string>;
11379 | 
11380 |   /**
11381 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
11382 |    * Read more about [locators](https://playwright.dev/docs/locators).
11383 |    *
11384 |    * This method hovers over the element by performing the following steps:
11385 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11386 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-force) option is
11387 |    *    set.
11388 |    * 1. Scroll the element into view if needed.
11389 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
11390 |    *    element, or the specified
11391 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-position).
11392 |    *
11393 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11394 |    *
11395 |    * When all steps combined have not finished during the specified
11396 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-timeout), this method
11397 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11398 |    * @param options
11399 |    */
11400 |   hover(options?: {
11401 |     /**
11402 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11403 |      */
11404 |     force?: boolean;
11405 | 
11406 |     /**
11407 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11408 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11409 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11410 |      */
11411 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11412 | 
11413 |     /**
11414 |      * This option has no effect.
11415 |      * @deprecated This option has no effect.
11416 |      */
11417 |     noWaitAfter?: boolean;
11418 | 
11419 |     /**
11420 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11421 |      * the element.
11422 |      */
11423 |     position?: {
11424 |       x: number;
11425 | 
11426 |       y: number;
11427 |     };
11428 | 
11429 |     /**
11430 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11431 |      * option in the config, or by using the
11432 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11433 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11434 |      */
11435 |     timeout?: number;
11436 | 
11437 |     /**
11438 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11439 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11440 |      */
11441 |     trial?: boolean;
11442 |   }): Promise<void>;
11443 | 
11444 |   /**
11445 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
11446 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11447 |    *
11448 |    * Returns the `element.innerHTML`.
11449 |    */
11450 |   innerHTML(): Promise<string>;
11451 | 
11452 |   /**
11453 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
11454 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11455 |    *
11456 |    * Returns the `element.innerText`.
11457 |    */
11458 |   innerText(): Promise<string>;
11459 | 
11460 |   /**
11461 |    * **NOTE** Use locator-based
11462 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
11463 |    * more about [locators](https://playwright.dev/docs/locators).
11464 |    *
11465 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
11466 |    *
11467 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
11468 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
11469 |    * control.
11470 |    * @param options
11471 |    */
11472 |   inputValue(options?: {
11473 |     /**
11474 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11475 |      * option in the config, or by using the
11476 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11477 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11478 |      */
11479 |     timeout?: number;
11480 |   }): Promise<string>;
11481 | 
11482 |   /**
11483 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
11484 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11485 |    *
11486 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
11487 |    */
11488 |   isChecked(): Promise<boolean>;
11489 | 
11490 |   /**
11491 |    * **NOTE** Use locator-based
11492 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
11493 |    * more about [locators](https://playwright.dev/docs/locators).
11494 |    *
11495 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
11496 |    */
11497 |   isDisabled(): Promise<boolean>;
11498 | 
11499 |   /**
11500 |    * **NOTE** Use locator-based
11501 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
11502 |    * more about [locators](https://playwright.dev/docs/locators).
11503 |    *
11504 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
11505 |    */
11506 |   isEditable(): Promise<boolean>;
11507 | 
11508 |   /**
11509 |    * **NOTE** Use locator-based [locator.isEnabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-enabled)
11510 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11511 |    *
11512 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
11513 |    */
11514 |   isEnabled(): Promise<boolean>;
11515 | 
11516 |   /**
11517 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
11518 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11519 |    *
11520 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
11521 |    */
11522 |   isHidden(): Promise<boolean>;
11523 | 
11524 |   /**
11525 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
11526 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11527 |    *
11528 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
11529 |    */
11530 |   isVisible(): Promise<boolean>;
11531 | 
11532 |   /**
11533 |    * Returns the frame containing the given element.
11534 |    */
11535 |   ownerFrame(): Promise<null|Frame>;
11536 | 
11537 |   /**
11538 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
11539 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11540 |    *
11541 |    * Focuses the element, and then uses
11542 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
11543 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
11544 |    *
11545 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) can specify the
11546 |    * intended [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single
11547 |    * character to generate the text for. A superset of the
11548 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) values can be found
11549 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
11550 |    *
11551 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
11552 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
11553 |    * etc.
11554 |    *
11555 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
11556 |    * `ControlOrMeta`.
11557 |    *
11558 |    * Holding down `Shift` will type the text that corresponds to the
11559 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) in the upper case.
11560 |    *
11561 |    * If [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) is a single
11562 |    * character, it is case-sensitive, so the values `a` and `A` will generate different respective texts.
11563 |    *
11564 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
11565 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
11566 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
11567 |    * @param options
11568 |    */
11569 |   press(key: string, options?: {
11570 |     /**
11571 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
11572 |      */
11573 |     delay?: number;
11574 | 
11575 |     /**
11576 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
11577 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
11578 |      * navigating to inaccessible pages. Defaults to `false`.
11579 |      * @deprecated This option will default to `true` in the future.
11580 |      */
11581 |     noWaitAfter?: boolean;
11582 | 
11583 |     /**
11584 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11585 |      * option in the config, or by using the
11586 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11587 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11588 |      */
11589 |     timeout?: number;
11590 |   }): Promise<void>;
11591 | 
11592 |   /**
11593 |    * **NOTE** Use locator-based [locator.screenshot([options])](https://playwright.dev/docs/api/class-locator#locator-screenshot)
11594 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11595 |    *
11596 |    * This method captures a screenshot of the page, clipped to the size and position of this particular element. If the
11597 |    * element is covered by other elements, it will not be actually visible on the screenshot. If the element is a
11598 |    * scrollable container, only the currently scrolled content will be visible on the screenshot.
11599 |    *
11600 |    * This method waits for the [actionability](https://playwright.dev/docs/actionability) checks, then scrolls element into view before taking
11601 |    * a screenshot. If the element is detached from DOM, the method throws an error.
11602 |    *
11603 |    * Returns the buffer with the captured screenshot.
11604 |    * @param options
11605 |    */
11606 |   screenshot(options?: {
11607 |     /**
11608 |      * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
11609 |      * treatment depending on their duration:
11610 |      * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
11611 |      * - infinite animations are canceled to initial state, and then played over after the screenshot.
11612 |      *
11613 |      * Defaults to `"allow"` that leaves animations untouched.
11614 |      */
11615 |     animations?: "disabled"|"allow";
11616 | 
11617 |     /**
11618 |      * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
11619 |      * changed.  Defaults to `"hide"`.
11620 |      */
11621 |     caret?: "hide"|"initial";
11622 | 
11623 |     /**
11624 |      * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
11625 |      * box `#FF00FF` (customized by
11626 |      * [`maskColor`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-mask-color))
11627 |      * that completely covers its bounding box.
11628 |      */
11629 |     mask?: Array<Locator>;
11630 | 
11631 |     /**
11632 |      * Specify the color of the overlay box for masked elements, in
11633 |      * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
11634 |      */
11635 |     maskColor?: string;
11636 | 
11637 |     /**
11638 |      * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
11639 |      * Defaults to `false`.
11640 |      */
11641 |     omitBackground?: boolean;
11642 | 
11643 |     /**
11644 |      * The file path to save the image to. The screenshot type will be inferred from file extension. If
11645 |      * [`path`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-path) is a relative
11646 |      * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
11647 |      * saved to the disk.
11648 |      */
11649 |     path?: string;
11650 | 
11651 |     /**
11652 |      * The quality of the image, between 0-100. Not applicable to `png` images.
11653 |      */
11654 |     quality?: number;
11655 | 
11656 |     /**
11657 |      * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
11658 |      * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
11659 |      * screenshots of high-dpi devices will be twice as large or even larger.
11660 |      *
11661 |      * Defaults to `"device"`.
11662 |      */
11663 |     scale?: "css"|"device";
11664 | 
11665 |     /**
11666 |      * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
11667 |      * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
11668 |      * the Shadow DOM and applies to the inner frames.
11669 |      */
11670 |     style?: string;
11671 | 
11672 |     /**
11673 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11674 |      * option in the config, or by using the
11675 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11676 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11677 |      */
11678 |     timeout?: number;
11679 | 
11680 |     /**
11681 |      * Specify screenshot type, defaults to `png`.
11682 |      */
11683 |     type?: "png"|"jpeg";
11684 |   }): Promise<Buffer>;
11685 | 
11686 |   /**
11687 |    * **NOTE** Use locator-based
11688 |    * [locator.scrollIntoViewIfNeeded([options])](https://playwright.dev/docs/api/class-locator#locator-scroll-into-view-if-needed)
11689 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11690 |    *
11691 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then tries to scroll element into view, unless
11692 |    * it is completely visible as defined by
11693 |    * [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.
11694 |    *
11695 |    * Throws when `elementHandle` does not point to an element
11696 |    * [connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.
11697 |    *
11698 |    * See [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
11699 |    * @param options
11700 |    */
11701 |   scrollIntoViewIfNeeded(options?: {
11702 |     /**
11703 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11704 |      * option in the config, or by using the
11705 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11706 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11707 |      */
11708 |     timeout?: number;
11709 |   }): Promise<void>;
11710 | 
11711 |   /**
11712 |    * **NOTE** Use locator-based
11713 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
11714 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11715 |    *
11716 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in
11717 |    * the `<select>` element and selects these options.
11718 |    *
11719 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
11720 |    * the `<label>` element that has an associated
11721 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
11722 |    * instead.
11723 |    *
11724 |    * Returns the array of option values that have been successfully selected.
11725 |    *
11726 |    * Triggers a `change` and `input` event once all the provided options have been selected.
11727 |    *
11728 |    * **Usage**
11729 |    *
11730 |    * ```js
11731 |    * // Single selection matching the value or label
11732 |    * handle.selectOption('blue');
11733 |    *
11734 |    * // single selection matching the label
11735 |    * handle.selectOption({ label: 'Blue' });
11736 |    *
11737 |    * // multiple selection
11738 |    * handle.selectOption(['red', 'green', 'blue']);
11739 |    * ```
11740 |    *
11741 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
11742 |    * only the first option matching one of the passed options is selected. String values are matching both values and
11743 |    * labels. Option is considered matching if all specified properties match.
11744 |    * @param options
11745 |    */
11746 |   selectOption(values: null|string|ElementHandle|ReadonlyArray<string>|{
11747 |     /**
11748 |      * Matches by `option.value`. Optional.
11749 |      */
11750 |     value?: string;
11751 | 
11752 |     /**
11753 |      * Matches by `option.label`. Optional.
11754 |      */
11755 |     label?: string;
11756 | 
11757 |     /**
11758 |      * Matches by the index. Optional.
11759 |      */
11760 |     index?: number;
11761 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
11762 |     /**
11763 |      * Matches by `option.value`. Optional.
11764 |      */
11765 |     value?: string;
11766 | 
11767 |     /**
11768 |      * Matches by `option.label`. Optional.
11769 |      */
11770 |     label?: string;
11771 | 
11772 |     /**
11773 |      * Matches by the index. Optional.
11774 |      */
11775 |     index?: number;
11776 |   }>, options?: {
11777 |     /**
11778 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11779 |      */
11780 |     force?: boolean;
11781 | 
11782 |     /**
11783 |      * This option has no effect.
11784 |      * @deprecated This option has no effect.
11785 |      */
11786 |     noWaitAfter?: boolean;
11787 | 
11788 |     /**
11789 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11790 |      * option in the config, or by using the
11791 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11792 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11793 |      */
11794 |     timeout?: number;
11795 |   }): Promise<Array<string>>;
11796 | 
11797 |   /**
11798 |    * **NOTE** Use locator-based
11799 |    * [locator.selectText([options])](https://playwright.dev/docs/api/class-locator#locator-select-text) instead. Read
11800 |    * more about [locators](https://playwright.dev/docs/locators).
11801 |    *
11802 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then focuses the element and selects all its
11803 |    * text content.
11804 |    *
11805 |    * If the element is inside the `<label>` element that has an associated
11806 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
11807 |    * the control instead.
11808 |    * @param options
11809 |    */
11810 |   selectText(options?: {
11811 |     /**
11812 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11813 |      */
11814 |     force?: boolean;
11815 | 
11816 |     /**
11817 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11818 |      * option in the config, or by using the
11819 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11820 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11821 |      */
11822 |     timeout?: number;
11823 |   }): Promise<void>;
11824 | 
11825 |   /**
11826 |    * **NOTE** Use locator-based
11827 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
11828 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11829 |    *
11830 |    * This method checks or unchecks an element by performing the following steps:
11831 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws.
11832 |    * 1. If the element already has the right checked state, this method returns immediately.
11833 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
11834 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-force) option
11835 |    *    is set. If the element is detached during the checks, the whole action is retried.
11836 |    * 1. Scroll the element into view if needed.
11837 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11838 |    *    element.
11839 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
11840 |    *
11841 |    * When all steps combined have not finished during the specified
11842 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-timeout), this
11843 |    * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
11844 |    * this.
11845 |    * @param checked Whether to check or uncheck the checkbox.
11846 |    * @param options
11847 |    */
11848 |   setChecked(checked: boolean, options?: {
11849 |     /**
11850 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11851 |      */
11852 |     force?: boolean;
11853 | 
11854 |     /**
11855 |      * This option has no effect.
11856 |      * @deprecated This option has no effect.
11857 |      */
11858 |     noWaitAfter?: boolean;
11859 | 
11860 |     /**
11861 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11862 |      * the element.
11863 |      */
11864 |     position?: {
11865 |       x: number;
11866 | 
11867 |       y: number;
11868 |     };
11869 | 
11870 |     /**
11871 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11872 |      * option in the config, or by using the
11873 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11874 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11875 |      */
11876 |     timeout?: number;
11877 | 
11878 |     /**
11879 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11880 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11881 |      */
11882 |     trial?: boolean;
11883 |   }): Promise<void>;
11884 | 
11885 |   /**
11886 |    * **NOTE** Use locator-based
11887 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
11888 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11889 |    *
11890 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
11891 |    * they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
11892 |    * with a `[webkitdirectory]` attribute, only a single directory path is supported.
11893 |    *
11894 |    * This method expects [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) to point to an
11895 |    * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
11896 |    * the `<label>` element that has an associated
11897 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
11898 |    * @param files
11899 |    * @param options
11900 |    */
11901 |   setInputFiles(files: string|ReadonlyArray<string>|{
11902 |     /**
11903 |      * File name
11904 |      */
11905 |     name: string;
11906 | 
11907 |     /**
11908 |      * File type
11909 |      */
11910 |     mimeType: string;
11911 | 
11912 |     /**
11913 |      * File content
11914 |      */
11915 |     buffer: Buffer;
11916 |   }|ReadonlyArray<{
11917 |     /**
11918 |      * File name
11919 |      */
11920 |     name: string;
11921 | 
11922 |     /**
11923 |      * File type
11924 |      */
11925 |     mimeType: string;
11926 | 
11927 |     /**
11928 |      * File content
11929 |      */
11930 |     buffer: Buffer;
11931 |   }>, options?: {
11932 |     /**
11933 |      * This option has no effect.
11934 |      * @deprecated This option has no effect.
11935 |      */
11936 |     noWaitAfter?: boolean;
11937 | 
11938 |     /**
11939 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11940 |      * option in the config, or by using the
11941 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11942 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11943 |      */
11944 |     timeout?: number;
11945 |   }): Promise<void>;
11946 | 
11947 |   /**
11948 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
11949 |    * more about [locators](https://playwright.dev/docs/locators).
11950 |    *
11951 |    * This method taps the element by performing the following steps:
11952 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11953 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-force) option is set.
11954 |    * 1. Scroll the element into view if needed.
11955 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
11956 |    *    element, or the specified
11957 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-position).
11958 |    *
11959 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11960 |    *
11961 |    * When all steps combined have not finished during the specified
11962 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-timeout), this method
11963 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11964 |    *
11965 |    * **NOTE** `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true.
11966 |    *
11967 |    * @param options
11968 |    */
11969 |   tap(options?: {
11970 |     /**
11971 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11972 |      */
11973 |     force?: boolean;
11974 | 
11975 |     /**
11976 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11977 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11978 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11979 |      */
11980 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11981 | 
11982 |     /**
11983 |      * This option has no effect.
11984 |      * @deprecated This option has no effect.
11985 |      */
11986 |     noWaitAfter?: boolean;
11987 | 
11988 |     /**
11989 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11990 |      * the element.
11991 |      */
11992 |     position?: {
11993 |       x: number;
11994 | 
11995 |       y: number;
11996 |     };
11997 | 
11998 |     /**
11999 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12000 |      * option in the config, or by using the
12001 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12002 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12003 |      */
12004 |     timeout?: number;
12005 | 
12006 |     /**
12007 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12008 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12009 |      */
12010 |     trial?: boolean;
12011 |   }): Promise<void>;
12012 | 
12013 |   /**
12014 |    * **NOTE** Use locator-based
12015 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
12016 |    * more about [locators](https://playwright.dev/docs/locators).
12017 |    *
12018 |    * Returns the `node.textContent`.
12019 |    */
12020 |   textContent(): Promise<null|string>;
12021 | 
12022 |   /**
12023 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
12024 |    * text.
12025 |    *
12026 |    * To press a special key, like `Control` or `ArrowDown`, use
12027 |    * [elementHandle.press(key[, options])](https://playwright.dev/docs/api/class-elementhandle#element-handle-press).
12028 |    *
12029 |    * **Usage**
12030 |    * @deprecated In most cases, you should use
12031 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
12032 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
12033 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
12034 |    * @param text A text to type into a focused element.
12035 |    * @param options
12036 |    */
12037 |   type(text: string, options?: {
12038 |     /**
12039 |      * Time to wait between key presses in milliseconds. Defaults to 0.
12040 |      */
12041 |     delay?: number;
12042 | 
12043 |     /**
12044 |      * This option has no effect.
12045 |      * @deprecated This option has no effect.
12046 |      */
12047 |     noWaitAfter?: boolean;
12048 | 
12049 |     /**
12050 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12051 |      * option in the config, or by using the
12052 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12053 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12054 |      */
12055 |     timeout?: number;
12056 |   }): Promise<void>;
12057 | 
12058 |   /**
12059 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
12060 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
12061 |    *
12062 |    * This method checks the element by performing the following steps:
12063 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
12064 |    *    unchecked, this method returns immediately.
12065 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12066 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-force) option is
12067 |    *    set.
12068 |    * 1. Scroll the element into view if needed.
12069 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12070 |    *    element.
12071 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
12072 |    *
12073 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12074 |    *
12075 |    * When all steps combined have not finished during the specified
12076 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-timeout), this method
12077 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12078 |    * @param options
12079 |    */
12080 |   uncheck(options?: {
12081 |     /**
12082 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12083 |      */
12084 |     force?: boolean;
12085 | 
12086 |     /**
12087 |      * This option has no effect.
12088 |      * @deprecated This option has no effect.
12089 |      */
12090 |     noWaitAfter?: boolean;
12091 | 
12092 |     /**
12093 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12094 |      * the element.
12095 |      */
12096 |     position?: {
12097 |       x: number;
12098 | 
12099 |       y: number;
12100 |     };
12101 | 
12102 |     /**
12103 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12104 |      * option in the config, or by using the
12105 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12106 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12107 |      */
12108 |     timeout?: number;
12109 | 
12110 |     /**
12111 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12112 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12113 |      */
12114 |     trial?: boolean;
12115 |   }): Promise<void>;
12116 | 
12117 |   /**
12118 |    * Returns when the element satisfies the
12119 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state).
12120 |    *
12121 |    * Depending on the
12122 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state)
12123 |    * parameter, this method waits for one of the [actionability](https://playwright.dev/docs/actionability) checks to pass. This method throws
12124 |    * when the element is detached while waiting, unless waiting for the `"hidden"` state.
12125 |    * - `"visible"` Wait until the element is [visible](https://playwright.dev/docs/actionability#visible).
12126 |    * - `"hidden"` Wait until the element is [not visible](https://playwright.dev/docs/actionability#visible) or not attached. Note that
12127 |    *   waiting for hidden does not throw when the element detaches.
12128 |    * - `"stable"` Wait until the element is both [visible](https://playwright.dev/docs/actionability#visible) and
12129 |    *   [stable](https://playwright.dev/docs/actionability#stable).
12130 |    * - `"enabled"` Wait until the element is [enabled](https://playwright.dev/docs/actionability#enabled).
12131 |    * - `"disabled"` Wait until the element is [not enabled](https://playwright.dev/docs/actionability#enabled).
12132 |    * - `"editable"` Wait until the element is [editable](https://playwright.dev/docs/actionability#editable).
12133 |    *
12134 |    * If the element does not satisfy the condition for the
12135 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-timeout)
12136 |    * milliseconds, this method will throw.
12137 |    * @param state A state to wait for, see below for more details.
12138 |    * @param options
12139 |    */
12140 |   waitForElementState(state: "visible"|"hidden"|"stable"|"enabled"|"disabled"|"editable", options?: {
12141 |     /**
12142 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12143 |      * option in the config, or by using the
12144 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12145 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12146 |      */
12147 |     timeout?: number;
12148 |   }): Promise<void>;
12149 | }
12150 | 
12151 | /**
12152 |  * Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a
12153 |  * way to find element(s) on the page at any moment. A locator can be created with the
12154 |  * [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator) method.
12155 |  *
12156 |  * [Learn more about locators](https://playwright.dev/docs/locators).
12157 |  */
12158 | export interface Locator {
12159 |   /**
12160 |    * Execute JavaScript code in the page, taking the matching element as an argument.
12161 |    *
12162 |    * **Details**
12163 |    *
12164 |    * Returns the return value of
12165 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
12166 |    * matching element as a first argument, and
12167 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
12168 |    *
12169 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
12170 |    * [Promise], this method will wait for the promise to resolve and return its value.
12171 |    *
12172 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
12173 |    * rejects, this method throws.
12174 |    *
12175 |    * **Usage**
12176 |    *
12177 |    * ```js
12178 |    * const tweets = page.locator('.tweet .retweets');
12179 |    * expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
12180 |    * ```
12181 |    *
12182 |    * @param pageFunction Function to be evaluated in the page context.
12183 |    * @param arg Optional argument to pass to
12184 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12185 |    * @param options
12186 |    */
12187 |   evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, options?: {
12188 |     timeout?: number;
12189 |   }): Promise<R>;
12190 |   /**
12191 |    * Execute JavaScript code in the page, taking the matching element as an argument.
12192 |    *
12193 |    * **Details**
12194 |    *
12195 |    * Returns the return value of
12196 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
12197 |    * matching element as a first argument, and
12198 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
12199 |    *
12200 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
12201 |    * [Promise], this method will wait for the promise to resolve and return its value.
12202 |    *
12203 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
12204 |    * rejects, this method throws.
12205 |    *
12206 |    * **Usage**
12207 |    *
12208 |    * ```js
12209 |    * const tweets = page.locator('.tweet .retweets');
12210 |    * expect(await tweets.evaluate(node => node.innerText)).toBe('10 retweets');
12211 |    * ```
12212 |    *
12213 |    * @param pageFunction Function to be evaluated in the page context.
12214 |    * @param arg Optional argument to pass to
12215 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12216 |    * @param options
12217 |    */
12218 |   evaluate<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, options?: {
12219 |     timeout?: number;
12220 |   }): Promise<R>;
12221 |   /**
12222 |    * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12223 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
12224 |    *
12225 |    * **Details**
12226 |    *
12227 |    * Returns the return value of
12228 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
12229 |    * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
12230 |    * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
12231 |    *
12232 |    * The only difference between
12233 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
12234 |    * and
12235 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12236 |    * is that
12237 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12238 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
12239 |    *
12240 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
12241 |    * returns a [Promise], this method will wait for the promise to resolve and return its value.
12242 |    *
12243 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12244 |    * or rejects, this method throws.
12245 |    *
12246 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12247 |    * more details.
12248 |    * @param pageFunction Function to be evaluated in the page context.
12249 |    * @param arg Optional argument to pass to
12250 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12251 |    * @param options
12252 |    */
12253 |   evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
12254 |   /**
12255 |    * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12256 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
12257 |    *
12258 |    * **Details**
12259 |    *
12260 |    * Returns the return value of
12261 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
12262 |    * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
12263 |    * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
12264 |    *
12265 |    * The only difference between
12266 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
12267 |    * and
12268 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12269 |    * is that
12270 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12271 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
12272 |    *
12273 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
12274 |    * returns a [Promise], this method will wait for the promise to resolve and return its value.
12275 |    *
12276 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12277 |    * or rejects, this method throws.
12278 |    *
12279 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12280 |    * more details.
12281 |    * @param pageFunction Function to be evaluated in the page context.
12282 |    * @param arg Optional argument to pass to
12283 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12284 |    * @param options
12285 |    */
12286 |   evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>): Promise<SmartHandle<R>>;
12287 |   /**
12288 |    * Execute JavaScript code in the page, taking all matching elements as an argument.
12289 |    *
12290 |    * **Details**
12291 |    *
12292 |    * Returns the return value of
12293 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
12294 |    * an array of all matching elements as a first argument, and
12295 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
12296 |    *
12297 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
12298 |    * [Promise], this method will wait for the promise to resolve and return its value.
12299 |    *
12300 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
12301 |    * rejects, this method throws.
12302 |    *
12303 |    * **Usage**
12304 |    *
12305 |    * ```js
12306 |    * const locator = page.locator('div');
12307 |    * const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min, 10);
12308 |    * ```
12309 |    *
12310 |    * @param pageFunction Function to be evaluated in the page context.
12311 |    * @param arg Optional argument to pass to
12312 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
12313 |    */
12314 |   evaluateAll<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
12315 |   /**
12316 |    * Execute JavaScript code in the page, taking all matching elements as an argument.
12317 |    *
12318 |    * **Details**
12319 |    *
12320 |    * Returns the return value of
12321 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
12322 |    * an array of all matching elements as a first argument, and
12323 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
12324 |    *
12325 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
12326 |    * [Promise], this method will wait for the promise to resolve and return its value.
12327 |    *
12328 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
12329 |    * rejects, this method throws.
12330 |    *
12331 |    * **Usage**
12332 |    *
12333 |    * ```js
12334 |    * const locator = page.locator('div');
12335 |    * const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min, 10);
12336 |    * ```
12337 |    *
12338 |    * @param pageFunction Function to be evaluated in the page context.
12339 |    * @param arg Optional argument to pass to
12340 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
12341 |    */
12342 |   evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
12343 |   /**
12344 |    * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
12345 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
12346 |    *
12347 |    * Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If
12348 |    * multiple elements match the locator, throws.
12349 |    * @param options
12350 |    */
12351 |   elementHandle(options?: {
12352 |     timeout?: number;
12353 |   }): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
12354 |   /**
12355 |    * When the locator points to a list of elements, this returns an array of locators, pointing to their respective
12356 |    * elements.
12357 |    *
12358 |    * **NOTE** [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all) does not wait for elements to
12359 |    * match the locator, and instead immediately returns whatever is present in the page.
12360 |    *
12361 |    * When the list of elements changes dynamically,
12362 |    * [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all) will produce unpredictable and flaky
12363 |    * results.
12364 |    *
12365 |    * When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before
12366 |    * calling [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all).
12367 |    *
12368 |    * **Usage**
12369 |    *
12370 |    * ```js
12371 |    * for (const li of await page.getByRole('listitem').all())
12372 |    *   await li.click();
12373 |    * ```
12374 |    *
12375 |    */
12376 |   all(): Promise<Array<Locator>>;
12377 | 
12378 |   /**
12379 |    * Returns an array of `node.innerText` values for all matching nodes.
12380 |    *
12381 |    * **NOTE** If you need to assert text on the page, prefer
12382 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
12383 |    * with
12384 |    * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
12385 |    * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12386 |    *
12387 |    * **Usage**
12388 |    *
12389 |    * ```js
12390 |    * const texts = await page.getByRole('link').allInnerTexts();
12391 |    * ```
12392 |    *
12393 |    */
12394 |   allInnerTexts(): Promise<Array<string>>;
12395 | 
12396 |   /**
12397 |    * Returns an array of `node.textContent` values for all matching nodes.
12398 |    *
12399 |    * **NOTE** If you need to assert text on the page, prefer
12400 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
12401 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12402 |    *
12403 |    * **Usage**
12404 |    *
12405 |    * ```js
12406 |    * const texts = await page.getByRole('link').allTextContents();
12407 |    * ```
12408 |    *
12409 |    */
12410 |   allTextContents(): Promise<Array<string>>;
12411 | 
12412 |   /**
12413 |    * Creates a locator that matches both this locator and the argument locator.
12414 |    *
12415 |    * **Usage**
12416 |    *
12417 |    * The following example finds a button with a specific title.
12418 |    *
12419 |    * ```js
12420 |    * const button = page.getByRole('button').and(page.getByTitle('Subscribe'));
12421 |    * ```
12422 |    *
12423 |    * @param locator Additional locator to match.
12424 |    */
12425 |   and(locator: Locator): Locator;
12426 | 
12427 |   /**
12428 |    * Captures the aria snapshot of the given element. Read more about [aria snapshots](https://playwright.dev/docs/aria-snapshots) and
12429 |    * [expect(locator).toMatchAriaSnapshot(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot)
12430 |    * for the corresponding assertion.
12431 |    *
12432 |    * **Usage**
12433 |    *
12434 |    * ```js
12435 |    * await page.getByRole('link').ariaSnapshot();
12436 |    * ```
12437 |    *
12438 |    * **Details**
12439 |    *
12440 |    * This method captures the aria snapshot of the given element. The snapshot is a string that represents the state of
12441 |    * the element and its children. The snapshot can be used to assert the state of the element in the test, or to
12442 |    * compare it to state in the future.
12443 |    *
12444 |    * The ARIA snapshot is represented using [YAML](https://yaml.org/spec/1.2.2/) markup language:
12445 |    * - The keys of the objects are the roles and optional accessible names of the elements.
12446 |    * - The values are either text content or an array of child elements.
12447 |    * - Generic static text can be represented with the `text` key.
12448 |    *
12449 |    * Below is the HTML markup and the respective ARIA snapshot:
12450 |    *
12451 |    * ```html
12452 |    * <ul aria-label="Links">
12453 |    *   <li><a href="/">Home</a></li>
12454 |    *   <li><a href="/about">About</a></li>
12455 |    * <ul>
12456 |    * ```
12457 |    *
12458 |    * ```yml
12459 |    * - list "Links":
12460 |    *   - listitem:
12461 |    *     - link "Home"
12462 |    *   - listitem:
12463 |    *     - link "About"
12464 |    * ```
12465 |    *
12466 |    * @param options
12467 |    */
12468 |   ariaSnapshot(options?: {
12469 |     /**
12470 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12471 |      * option in the config, or by using the
12472 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12473 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12474 |      */
12475 |     timeout?: number;
12476 |   }): Promise<string>;
12477 | 
12478 |   /**
12479 |    * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur) on the element.
12480 |    * @param options
12481 |    */
12482 |   blur(options?: {
12483 |     /**
12484 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12485 |      * option in the config, or by using the
12486 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12487 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12488 |      */
12489 |     timeout?: number;
12490 |   }): Promise<void>;
12491 | 
12492 |   /**
12493 |    * This method returns the bounding box of the element matching the locator, or `null` if the element is not visible.
12494 |    * The bounding box is calculated relative to the main frame viewport - which is usually the same as the browser
12495 |    * window.
12496 |    *
12497 |    * **Details**
12498 |    *
12499 |    * Scrolling affects the returned bounding box, similarly to
12500 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
12501 |    * That means `x` and/or `y` may be negative.
12502 |    *
12503 |    * Elements from child frames return the bounding box relative to the main frame, unlike the
12504 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
12505 |    *
12506 |    * Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
12507 |    * following snippet should click the center of the element.
12508 |    *
12509 |    * **Usage**
12510 |    *
12511 |    * ```js
12512 |    * const box = await page.getByRole('button').boundingBox();
12513 |    * await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
12514 |    * ```
12515 |    *
12516 |    * @param options
12517 |    */
12518 |   boundingBox(options?: {
12519 |     /**
12520 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12521 |      * option in the config, or by using the
12522 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12523 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12524 |      */
12525 |     timeout?: number;
12526 |   }): Promise<null|{
12527 |     /**
12528 |      * the x coordinate of the element in pixels.
12529 |      */
12530 |     x: number;
12531 | 
12532 |     /**
12533 |      * the y coordinate of the element in pixels.
12534 |      */
12535 |     y: number;
12536 | 
12537 |     /**
12538 |      * the width of the element in pixels.
12539 |      */
12540 |     width: number;
12541 | 
12542 |     /**
12543 |      * the height of the element in pixels.
12544 |      */
12545 |     height: number;
12546 |   }>;
12547 | 
12548 |   /**
12549 |    * Ensure that checkbox or radio element is checked.
12550 |    *
12551 |    * **Details**
12552 |    *
12553 |    * Performs the following steps:
12554 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
12555 |    *    checked, this method returns immediately.
12556 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12557 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-check-option-force) option is set.
12558 |    * 1. Scroll the element into view if needed.
12559 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12560 |    *    element.
12561 |    * 1. Ensure that the element is now checked. If not, this method throws.
12562 |    *
12563 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12564 |    *
12565 |    * When all steps combined have not finished during the specified
12566 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-check-option-timeout), this method throws a
12567 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12568 |    *
12569 |    * **Usage**
12570 |    *
12571 |    * ```js
12572 |    * await page.getByRole('checkbox').check();
12573 |    * ```
12574 |    *
12575 |    * @param options
12576 |    */
12577 |   check(options?: {
12578 |     /**
12579 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12580 |      */
12581 |     force?: boolean;
12582 | 
12583 |     /**
12584 |      * This option has no effect.
12585 |      * @deprecated This option has no effect.
12586 |      */
12587 |     noWaitAfter?: boolean;
12588 | 
12589 |     /**
12590 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12591 |      * the element.
12592 |      */
12593 |     position?: {
12594 |       x: number;
12595 | 
12596 |       y: number;
12597 |     };
12598 | 
12599 |     /**
12600 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12601 |      * option in the config, or by using the
12602 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12603 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12604 |      */
12605 |     timeout?: number;
12606 | 
12607 |     /**
12608 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12609 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12610 |      */
12611 |     trial?: boolean;
12612 |   }): Promise<void>;
12613 | 
12614 |   /**
12615 |    * Clear the input field.
12616 |    *
12617 |    * **Details**
12618 |    *
12619 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, clears it and triggers an
12620 |    * `input` event after clearing.
12621 |    *
12622 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
12623 |    * error. However, if the element is inside the `<label>` element that has an associated
12624 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
12625 |    * instead.
12626 |    *
12627 |    * **Usage**
12628 |    *
12629 |    * ```js
12630 |    * await page.getByRole('textbox').clear();
12631 |    * ```
12632 |    *
12633 |    * @param options
12634 |    */
12635 |   clear(options?: {
12636 |     /**
12637 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12638 |      */
12639 |     force?: boolean;
12640 | 
12641 |     /**
12642 |      * This option has no effect.
12643 |      * @deprecated This option has no effect.
12644 |      */
12645 |     noWaitAfter?: boolean;
12646 | 
12647 |     /**
12648 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12649 |      * option in the config, or by using the
12650 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12651 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12652 |      */
12653 |     timeout?: number;
12654 |   }): Promise<void>;
12655 | 
12656 |   /**
12657 |    * Click an element.
12658 |    *
12659 |    * **Details**
12660 |    *
12661 |    * This method clicks the element by performing the following steps:
12662 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12663 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-click-option-force) option is set.
12664 |    * 1. Scroll the element into view if needed.
12665 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12666 |    *    element, or the specified
12667 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-click-option-position).
12668 |    * 1. Wait for initiated navigations to either succeed or fail, unless
12669 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-locator#locator-click-option-no-wait-after) option is
12670 |    *    set.
12671 |    *
12672 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12673 |    *
12674 |    * When all steps combined have not finished during the specified
12675 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-click-option-timeout), this method throws a
12676 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12677 |    *
12678 |    * **Usage**
12679 |    *
12680 |    * Click a button:
12681 |    *
12682 |    * ```js
12683 |    * await page.getByRole('button').click();
12684 |    * ```
12685 |    *
12686 |    * Shift-right-click at a specific position on a canvas:
12687 |    *
12688 |    * ```js
12689 |    * await page.locator('canvas').click({
12690 |    *   button: 'right',
12691 |    *   modifiers: ['Shift'],
12692 |    *   position: { x: 23, y: 32 },
12693 |    * });
12694 |    * ```
12695 |    *
12696 |    * @param options
12697 |    */
12698 |   click(options?: {
12699 |     /**
12700 |      * Defaults to `left`.
12701 |      */
12702 |     button?: "left"|"right"|"middle";
12703 | 
12704 |     /**
12705 |      * defaults to 1. See [UIEvent.detail].
12706 |      */
12707 |     clickCount?: number;
12708 | 
12709 |     /**
12710 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
12711 |      */
12712 |     delay?: number;
12713 | 
12714 |     /**
12715 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12716 |      */
12717 |     force?: boolean;
12718 | 
12719 |     /**
12720 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
12721 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
12722 |      * "Control" on Windows and Linux and to "Meta" on macOS.
12723 |      */
12724 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
12725 | 
12726 |     /**
12727 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
12728 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
12729 |      * navigating to inaccessible pages. Defaults to `false`.
12730 |      * @deprecated This option will default to `true` in the future.
12731 |      */
12732 |     noWaitAfter?: boolean;
12733 | 
12734 |     /**
12735 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12736 |      * the element.
12737 |      */
12738 |     position?: {
12739 |       x: number;
12740 | 
12741 |       y: number;
12742 |     };
12743 | 
12744 |     /**
12745 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12746 |      * option in the config, or by using the
12747 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12748 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12749 |      */
12750 |     timeout?: number;
12751 | 
12752 |     /**
12753 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12754 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
12755 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
12756 |      * are pressed.
12757 |      */
12758 |     trial?: boolean;
12759 |   }): Promise<void>;
12760 | 
12761 |   /**
12762 |    * Returns a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object pointing to the same `iframe`
12763 |    * as this locator.
12764 |    *
12765 |    * Useful when you have a [Locator](https://playwright.dev/docs/api/class-locator) object obtained somewhere, and
12766 |    * later on would like to interact with the content inside the frame.
12767 |    *
12768 |    * For a reverse operation, use
12769 |    * [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
12770 |    *
12771 |    * **Usage**
12772 |    *
12773 |    * ```js
12774 |    * const locator = page.locator('iframe[name="embedded"]');
12775 |    * // ...
12776 |    * const frameLocator = locator.contentFrame();
12777 |    * await frameLocator.getByRole('button').click();
12778 |    * ```
12779 |    *
12780 |    */
12781 |   contentFrame(): FrameLocator;
12782 | 
12783 |   /**
12784 |    * Returns the number of elements matching the locator.
12785 |    *
12786 |    * **NOTE** If you need to assert the number of elements on the page, prefer
12787 |    * [expect(locator).toHaveCount(count[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-count)
12788 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12789 |    *
12790 |    * **Usage**
12791 |    *
12792 |    * ```js
12793 |    * const count = await page.getByRole('listitem').count();
12794 |    * ```
12795 |    *
12796 |    */
12797 |   count(): Promise<number>;
12798 | 
12799 |   /**
12800 |    * Double-click an element.
12801 |    *
12802 |    * **Details**
12803 |    *
12804 |    * This method double clicks the element by performing the following steps:
12805 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12806 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-force) option is set.
12807 |    * 1. Scroll the element into view if needed.
12808 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
12809 |    *    element, or the specified
12810 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-position).
12811 |    *
12812 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12813 |    *
12814 |    * When all steps combined have not finished during the specified
12815 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-timeout), this method throws a
12816 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12817 |    *
12818 |    * **NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.
12819 |    *
12820 |    * @param options
12821 |    */
12822 |   dblclick(options?: {
12823 |     /**
12824 |      * Defaults to `left`.
12825 |      */
12826 |     button?: "left"|"right"|"middle";
12827 | 
12828 |     /**
12829 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
12830 |      */
12831 |     delay?: number;
12832 | 
12833 |     /**
12834 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12835 |      */
12836 |     force?: boolean;
12837 | 
12838 |     /**
12839 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
12840 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
12841 |      * "Control" on Windows and Linux and to "Meta" on macOS.
12842 |      */
12843 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
12844 | 
12845 |     /**
12846 |      * This option has no effect.
12847 |      * @deprecated This option has no effect.
12848 |      */
12849 |     noWaitAfter?: boolean;
12850 | 
12851 |     /**
12852 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12853 |      * the element.
12854 |      */
12855 |     position?: {
12856 |       x: number;
12857 | 
12858 |       y: number;
12859 |     };
12860 | 
12861 |     /**
12862 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12863 |      * option in the config, or by using the
12864 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12865 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12866 |      */
12867 |     timeout?: number;
12868 | 
12869 |     /**
12870 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12871 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
12872 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
12873 |      * are pressed.
12874 |      */
12875 |     trial?: boolean;
12876 |   }): Promise<void>;
12877 | 
12878 |   /**
12879 |    * Programmatically dispatch an event on the matching element.
12880 |    *
12881 |    * **Usage**
12882 |    *
12883 |    * ```js
12884 |    * await locator.dispatchEvent('click');
12885 |    * ```
12886 |    *
12887 |    * **Details**
12888 |    *
12889 |    * The snippet above dispatches the `click` event on the element. Regardless of the visibility state of the element,
12890 |    * `click` is dispatched. This is equivalent to calling
12891 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
12892 |    *
12893 |    * Under the hood, it creates an instance of an event based on the given
12894 |    * [`type`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-type), initializes it with
12895 |    * [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) properties
12896 |    * and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
12897 |    *
12898 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) is
12899 |    * event-specific, please refer to the events documentation for the lists of initial properties:
12900 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
12901 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
12902 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
12903 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
12904 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
12905 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
12906 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
12907 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
12908 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
12909 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
12910 |    *
12911 |    * You can also specify [JSHandle](https://playwright.dev/docs/api/class-jshandle) as the property value if you want
12912 |    * live objects to be passed into the event:
12913 |    *
12914 |    * ```js
12915 |    * // Note you can only create DataTransfer in Chromium and Firefox
12916 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
12917 |    * await locator.dispatchEvent('dragstart', { dataTransfer });
12918 |    * ```
12919 |    *
12920 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
12921 |    * @param eventInit Optional event-specific initialization properties.
12922 |    * @param options
12923 |    */
12924 |   dispatchEvent(type: string, eventInit?: EvaluationArgument, options?: {
12925 |     /**
12926 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12927 |      * option in the config, or by using the
12928 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12929 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12930 |      */
12931 |     timeout?: number;
12932 |   }): Promise<void>;
12933 | 
12934 |   /**
12935 |    * Drag the source element towards the target element and drop it.
12936 |    *
12937 |    * **Details**
12938 |    *
12939 |    * This method drags the locator to another target locator or target position. It will first move to the source
12940 |    * element, perform a `mousedown`, then move to the target element or position and perform a `mouseup`.
12941 |    *
12942 |    * **Usage**
12943 |    *
12944 |    * ```js
12945 |    * const source = page.locator('#source');
12946 |    * const target = page.locator('#target');
12947 |    *
12948 |    * await source.dragTo(target);
12949 |    * // or specify exact positions relative to the top-left corners of the elements:
12950 |    * await source.dragTo(target, {
12951 |    *   sourcePosition: { x: 34, y: 7 },
12952 |    *   targetPosition: { x: 10, y: 20 },
12953 |    * });
12954 |    * ```
12955 |    *
12956 |    * @param target Locator of the element to drag to.
12957 |    * @param options
12958 |    */
12959 |   dragTo(target: Locator, options?: {
12960 |     /**
12961 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12962 |      */
12963 |     force?: boolean;
12964 | 
12965 |     /**
12966 |      * This option has no effect.
12967 |      * @deprecated This option has no effect.
12968 |      */
12969 |     noWaitAfter?: boolean;
12970 | 
12971 |     /**
12972 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
12973 |      * specified, some visible point of the element is used.
12974 |      */
12975 |     sourcePosition?: {
12976 |       x: number;
12977 | 
12978 |       y: number;
12979 |     };
12980 | 
12981 |     /**
12982 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
12983 |      * specified, some visible point of the element is used.
12984 |      */
12985 |     targetPosition?: {
12986 |       x: number;
12987 | 
12988 |       y: number;
12989 |     };
12990 | 
12991 |     /**
12992 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12993 |      * option in the config, or by using the
12994 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12995 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12996 |      */
12997 |     timeout?: number;
12998 | 
12999 |     /**
13000 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
13001 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
13002 |      */
13003 |     trial?: boolean;
13004 |   }): Promise<void>;
13005 | 
13006 |   /**
13007 |    * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
13008 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
13009 |    *
13010 |    * Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.
13011 |    */
13012 |   elementHandles(): Promise<Array<ElementHandle>>;
13013 | 
13014 |   /**
13015 |    * Set a value to the input field.
13016 |    *
13017 |    * **Usage**
13018 |    *
13019 |    * ```js
13020 |    * await page.getByRole('textbox').fill('example value');
13021 |    * ```
13022 |    *
13023 |    * **Details**
13024 |    *
13025 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an
13026 |    * `input` event after filling. Note that you can pass an empty string to clear the input field.
13027 |    *
13028 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
13029 |    * error. However, if the element is inside the `<label>` element that has an associated
13030 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
13031 |    * instead.
13032 |    *
13033 |    * To send fine-grained keyboard events, use
13034 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
13035 |    * @param value Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
13036 |    * @param options
13037 |    */
13038 |   fill(value: string, options?: {
13039 |     /**
13040 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
13041 |      */
13042 |     force?: boolean;
13043 | 
13044 |     /**
13045 |      * This option has no effect.
13046 |      * @deprecated This option has no effect.
13047 |      */
13048 |     noWaitAfter?: boolean;
13049 | 
13050 |     /**
13051 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13052 |      * option in the config, or by using the
13053 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13054 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13055 |      */
13056 |     timeout?: number;
13057 |   }): Promise<void>;
13058 | 
13059 |   /**
13060 |    * This method narrows existing locator according to the options, for example filters by text. It can be chained to
13061 |    * filter multiple times.
13062 |    *
13063 |    * **Usage**
13064 |    *
13065 |    * ```js
13066 |    * const rowLocator = page.locator('tr');
13067 |    * // ...
13068 |    * await rowLocator
13069 |    *     .filter({ hasText: 'text in column 1' })
13070 |    *     .filter({ has: page.getByRole('button', { name: 'column 2 button' }) })
13071 |    *     .screenshot();
13072 |    * ```
13073 |    *
13074 |    * @param options
13075 |    */
13076 |   filter(options?: {
13077 |     /**
13078 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
13079 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
13080 |      *
13081 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
13082 |      * the document root. For example, you can find `content` that has `div` in
13083 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
13084 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
13085 |      *
13086 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13087 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13088 |      */
13089 |     has?: Locator;
13090 | 
13091 |     /**
13092 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
13093 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
13094 |      *
13095 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13096 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13097 |      */
13098 |     hasNot?: Locator;
13099 | 
13100 |     /**
13101 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
13102 |      * When passed a [string], matching is case-insensitive and searches for a substring.
13103 |      */
13104 |     hasNotText?: string|RegExp;
13105 | 
13106 |     /**
13107 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
13108 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
13109 |      * `<article><div>Playwright</div></article>`.
13110 |      */
13111 |     hasText?: string|RegExp;
13112 |   }): Locator;
13113 | 
13114 |   /**
13115 |    * Returns locator to the first matching element.
13116 |    */
13117 |   first(): Locator;
13118 | 
13119 |   /**
13120 |    * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
13121 |    * @param options
13122 |    */
13123 |   focus(options?: {
13124 |     /**
13125 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13126 |      * option in the config, or by using the
13127 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13128 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13129 |      */
13130 |     timeout?: number;
13131 |   }): Promise<void>;
13132 | 
13133 |   /**
13134 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow locating elements in
13135 |    * that iframe:
13136 |    *
13137 |    * **Usage**
13138 |    *
13139 |    * ```js
13140 |    * const locator = page.frameLocator('iframe').getByText('Submit');
13141 |    * await locator.click();
13142 |    * ```
13143 |    *
13144 |    * @param selector A selector to use when resolving DOM element.
13145 |    */
13146 |   frameLocator(selector: string): FrameLocator;
13147 | 
13148 |   /**
13149 |    * Returns the matching element's attribute value.
13150 |    *
13151 |    * **NOTE** If you need to assert an element's attribute, prefer
13152 |    * [expect(locator).toHaveAttribute(name, value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute)
13153 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13154 |    *
13155 |    * @param name Attribute name to get the value for.
13156 |    * @param options
13157 |    */
13158 |   getAttribute(name: string, options?: {
13159 |     /**
13160 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13161 |      * option in the config, or by using the
13162 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13163 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13164 |      */
13165 |     timeout?: number;
13166 |   }): Promise<null|string>;
13167 | 
13168 |   /**
13169 |    * Allows locating elements by their alt text.
13170 |    *
13171 |    * **Usage**
13172 |    *
13173 |    * For example, this method will find the image by alt text "Playwright logo":
13174 |    *
13175 |    * ```html
13176 |    * <img alt='Playwright logo'>
13177 |    * ```
13178 |    *
13179 |    * ```js
13180 |    * await page.getByAltText('Playwright logo').click();
13181 |    * ```
13182 |    *
13183 |    * @param text Text to locate the element for.
13184 |    * @param options
13185 |    */
13186 |   getByAltText(text: string|RegExp, options?: {
13187 |     /**
13188 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13189 |      * regular expression. Note that exact match still trims whitespace.
13190 |      */
13191 |     exact?: boolean;
13192 |   }): Locator;
13193 | 
13194 |   /**
13195 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
13196 |    * `aria-label` attribute.
13197 |    *
13198 |    * **Usage**
13199 |    *
13200 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
13201 |    *
13202 |    * ```html
13203 |    * <input aria-label="Username">
13204 |    * <label for="password-input">Password:</label>
13205 |    * <input id="password-input">
13206 |    * ```
13207 |    *
13208 |    * ```js
13209 |    * await page.getByLabel('Username').fill('john');
13210 |    * await page.getByLabel('Password').fill('secret');
13211 |    * ```
13212 |    *
13213 |    * @param text Text to locate the element for.
13214 |    * @param options
13215 |    */
13216 |   getByLabel(text: string|RegExp, options?: {
13217 |     /**
13218 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13219 |      * regular expression. Note that exact match still trims whitespace.
13220 |      */
13221 |     exact?: boolean;
13222 |   }): Locator;
13223 | 
13224 |   /**
13225 |    * Allows locating input elements by the placeholder text.
13226 |    *
13227 |    * **Usage**
13228 |    *
13229 |    * For example, consider the following DOM structure.
13230 |    *
13231 |    * ```html
13232 |    * <input type="email" placeholder="name@example.com" />
13233 |    * ```
13234 |    *
13235 |    * You can fill the input after locating it by the placeholder text:
13236 |    *
13237 |    * ```js
13238 |    * await page
13239 |    *     .getByPlaceholder('name@example.com')
13240 |    *     .fill('playwright@microsoft.com');
13241 |    * ```
13242 |    *
13243 |    * @param text Text to locate the element for.
13244 |    * @param options
13245 |    */
13246 |   getByPlaceholder(text: string|RegExp, options?: {
13247 |     /**
13248 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13249 |      * regular expression. Note that exact match still trims whitespace.
13250 |      */
13251 |     exact?: boolean;
13252 |   }): Locator;
13253 | 
13254 |   /**
13255 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
13256 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
13257 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
13258 |    *
13259 |    * **Usage**
13260 |    *
13261 |    * Consider the following DOM structure.
13262 |    *
13263 |    * ```html
13264 |    * <h3>Sign up</h3>
13265 |    * <label>
13266 |    *   <input type="checkbox" /> Subscribe
13267 |    * </label>
13268 |    * <br/>
13269 |    * <button>Submit</button>
13270 |    * ```
13271 |    *
13272 |    * You can locate each element by it's implicit role:
13273 |    *
13274 |    * ```js
13275 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
13276 |    *
13277 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
13278 |    *
13279 |    * await page.getByRole('button', { name: /submit/i }).click();
13280 |    * ```
13281 |    *
13282 |    * **Details**
13283 |    *
13284 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
13285 |    * about the ARIA guidelines.
13286 |    *
13287 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
13288 |    * that is recognized by the role selector. You can find all the
13289 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
13290 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
13291 |    * @param role Required aria role.
13292 |    * @param options
13293 |    */
13294 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
13295 |     /**
13296 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
13297 |      *
13298 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
13299 |      */
13300 |     checked?: boolean;
13301 | 
13302 |     /**
13303 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
13304 |      *
13305 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
13306 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
13307 |      *
13308 |      */
13309 |     disabled?: boolean;
13310 | 
13311 |     /**
13312 |      * Whether [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is matched exactly:
13313 |      * case-sensitive and whole-string. Defaults to false. Ignored when
13314 |      * [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is a regular expression.
13315 |      * Note that exact match still trims whitespace.
13316 |      */
13317 |     exact?: boolean;
13318 | 
13319 |     /**
13320 |      * An attribute that is usually set by `aria-expanded`.
13321 |      *
13322 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
13323 |      */
13324 |     expanded?: boolean;
13325 | 
13326 |     /**
13327 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
13328 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
13329 |      *
13330 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
13331 |      */
13332 |     includeHidden?: boolean;
13333 | 
13334 |     /**
13335 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
13336 |      * for `<h1>-<h6>` elements.
13337 |      *
13338 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
13339 |      */
13340 |     level?: number;
13341 | 
13342 |     /**
13343 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
13344 |      * case-insensitive and searches for a substring, use
13345 |      * [`exact`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-exact) to control this behavior.
13346 |      *
13347 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
13348 |      */
13349 |     name?: string|RegExp;
13350 | 
13351 |     /**
13352 |      * An attribute that is usually set by `aria-pressed`.
13353 |      *
13354 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
13355 |      */
13356 |     pressed?: boolean;
13357 | 
13358 |     /**
13359 |      * An attribute that is usually set by `aria-selected`.
13360 |      *
13361 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
13362 |      */
13363 |     selected?: boolean;
13364 |   }): Locator;
13365 | 
13366 |   /**
13367 |    * Locate element by the test id.
13368 |    *
13369 |    * **Usage**
13370 |    *
13371 |    * Consider the following DOM structure.
13372 |    *
13373 |    * ```html
13374 |    * <button data-testid="directions">Itinéraire</button>
13375 |    * ```
13376 |    *
13377 |    * You can locate the element by it's test id:
13378 |    *
13379 |    * ```js
13380 |    * await page.getByTestId('directions').click();
13381 |    * ```
13382 |    *
13383 |    * **Details**
13384 |    *
13385 |    * By default, the `data-testid` attribute is used as a test id. Use
13386 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
13387 |    * to configure a different test id attribute if necessary.
13388 |    *
13389 |    * ```js
13390 |    * // Set custom test id attribute from @playwright/test config:
13391 |    * import { defineConfig } from '@playwright/test';
13392 |    *
13393 |    * export default defineConfig({
13394 |    *   use: {
13395 |    *     testIdAttribute: 'data-pw'
13396 |    *   },
13397 |    * });
13398 |    * ```
13399 |    *
13400 |    * @param testId Id to locate the element by.
13401 |    */
13402 |   getByTestId(testId: string|RegExp): Locator;
13403 | 
13404 |   /**
13405 |    * Allows locating elements that contain given text.
13406 |    *
13407 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
13408 |    * match by another criteria, like an accessible role, and then filter by the text content.
13409 |    *
13410 |    * **Usage**
13411 |    *
13412 |    * Consider the following DOM structure:
13413 |    *
13414 |    * ```html
13415 |    * <div>Hello <span>world</span></div>
13416 |    * <div>Hello</div>
13417 |    * ```
13418 |    *
13419 |    * You can locate by text substring, exact string, or a regular expression:
13420 |    *
13421 |    * ```js
13422 |    * // Matches <span>
13423 |    * page.getByText('world');
13424 |    *
13425 |    * // Matches first <div>
13426 |    * page.getByText('Hello world');
13427 |    *
13428 |    * // Matches second <div>
13429 |    * page.getByText('Hello', { exact: true });
13430 |    *
13431 |    * // Matches both <div>s
13432 |    * page.getByText(/Hello/);
13433 |    *
13434 |    * // Matches second <div>
13435 |    * page.getByText(/^hello$/i);
13436 |    * ```
13437 |    *
13438 |    * **Details**
13439 |    *
13440 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
13441 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
13442 |    *
13443 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
13444 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
13445 |    * @param text Text to locate the element for.
13446 |    * @param options
13447 |    */
13448 |   getByText(text: string|RegExp, options?: {
13449 |     /**
13450 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13451 |      * regular expression. Note that exact match still trims whitespace.
13452 |      */
13453 |     exact?: boolean;
13454 |   }): Locator;
13455 | 
13456 |   /**
13457 |    * Allows locating elements by their title attribute.
13458 |    *
13459 |    * **Usage**
13460 |    *
13461 |    * Consider the following DOM structure.
13462 |    *
13463 |    * ```html
13464 |    * <span title='Issues count'>25 issues</span>
13465 |    * ```
13466 |    *
13467 |    * You can check the issues count after locating it by the title text:
13468 |    *
13469 |    * ```js
13470 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
13471 |    * ```
13472 |    *
13473 |    * @param text Text to locate the element for.
13474 |    * @param options
13475 |    */
13476 |   getByTitle(text: string|RegExp, options?: {
13477 |     /**
13478 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13479 |      * regular expression. Note that exact match still trims whitespace.
13480 |      */
13481 |     exact?: boolean;
13482 |   }): Locator;
13483 | 
13484 |   /**
13485 |    * Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses
13486 |    * [locator.highlight()](https://playwright.dev/docs/api/class-locator#locator-highlight).
13487 |    */
13488 |   highlight(): Promise<void>;
13489 | 
13490 |   /**
13491 |    * Hover over the matching element.
13492 |    *
13493 |    * **Usage**
13494 |    *
13495 |    * ```js
13496 |    * await page.getByRole('link').hover();
13497 |    * ```
13498 |    *
13499 |    * **Details**
13500 |    *
13501 |    * This method hovers over the element by performing the following steps:
13502 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
13503 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-hover-option-force) option is set.
13504 |    * 1. Scroll the element into view if needed.
13505 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
13506 |    *    element, or the specified
13507 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-hover-option-position).
13508 |    *
13509 |    * If the element is detached from the DOM at any moment during the action, this method throws.
13510 |    *
13511 |    * When all steps combined have not finished during the specified
13512 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-hover-option-timeout), this method throws a
13513 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
13514 |    * @param options
13515 |    */
13516 |   hover(options?: {
13517 |     /**
13518 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
13519 |      */
13520 |     force?: boolean;
13521 | 
13522 |     /**
13523 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
13524 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
13525 |      * "Control" on Windows and Linux and to "Meta" on macOS.
13526 |      */
13527 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
13528 | 
13529 |     /**
13530 |      * This option has no effect.
13531 |      * @deprecated This option has no effect.
13532 |      */
13533 |     noWaitAfter?: boolean;
13534 | 
13535 |     /**
13536 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
13537 |      * the element.
13538 |      */
13539 |     position?: {
13540 |       x: number;
13541 | 
13542 |       y: number;
13543 |     };
13544 | 
13545 |     /**
13546 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13547 |      * option in the config, or by using the
13548 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13549 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13550 |      */
13551 |     timeout?: number;
13552 | 
13553 |     /**
13554 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
13555 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
13556 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
13557 |      * are pressed.
13558 |      */
13559 |     trial?: boolean;
13560 |   }): Promise<void>;
13561 | 
13562 |   /**
13563 |    * Returns the [`element.innerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).
13564 |    * @param options
13565 |    */
13566 |   innerHTML(options?: {
13567 |     /**
13568 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13569 |      * option in the config, or by using the
13570 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13571 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13572 |      */
13573 |     timeout?: number;
13574 |   }): Promise<string>;
13575 | 
13576 |   /**
13577 |    * Returns the [`element.innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText).
13578 |    *
13579 |    * **NOTE** If you need to assert text on the page, prefer
13580 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
13581 |    * with
13582 |    * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
13583 |    * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13584 |    *
13585 |    * @param options
13586 |    */
13587 |   innerText(options?: {
13588 |     /**
13589 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13590 |      * option in the config, or by using the
13591 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13592 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13593 |      */
13594 |     timeout?: number;
13595 |   }): Promise<string>;
13596 | 
13597 |   /**
13598 |    * Returns the value for the matching `<input>` or `<textarea>` or `<select>` element.
13599 |    *
13600 |    * **NOTE** If you need to assert input value, prefer
13601 |    * [expect(locator).toHaveValue(value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-value)
13602 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13603 |    *
13604 |    * **Usage**
13605 |    *
13606 |    * ```js
13607 |    * const value = await page.getByRole('textbox').inputValue();
13608 |    * ```
13609 |    *
13610 |    * **Details**
13611 |    *
13612 |    * Throws elements that are not an input, textarea or a select. However, if the element is inside the `<label>`
13613 |    * element that has an associated
13614 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
13615 |    * control.
13616 |    * @param options
13617 |    */
13618 |   inputValue(options?: {
13619 |     /**
13620 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13621 |      * option in the config, or by using the
13622 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13623 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13624 |      */
13625 |     timeout?: number;
13626 |   }): Promise<string>;
13627 | 
13628 |   /**
13629 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
13630 |    *
13631 |    * **NOTE** If you need to assert that checkbox is checked, prefer
13632 |    * [expect(locator).toBeChecked([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-checked)
13633 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13634 |    *
13635 |    * **Usage**
13636 |    *
13637 |    * ```js
13638 |    * const checked = await page.getByRole('checkbox').isChecked();
13639 |    * ```
13640 |    *
13641 |    * @param options
13642 |    */
13643 |   isChecked(options?: {
13644 |     /**
13645 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13646 |      * option in the config, or by using the
13647 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13648 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13649 |      */
13650 |     timeout?: number;
13651 |   }): Promise<boolean>;
13652 | 
13653 |   /**
13654 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
13655 |    *
13656 |    * **NOTE** If you need to assert that an element is disabled, prefer
13657 |    * [expect(locator).toBeDisabled([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-disabled)
13658 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13659 |    *
13660 |    * **Usage**
13661 |    *
13662 |    * ```js
13663 |    * const disabled = await page.getByRole('button').isDisabled();
13664 |    * ```
13665 |    *
13666 |    * @param options
13667 |    */
13668 |   isDisabled(options?: {
13669 |     /**
13670 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13671 |      * option in the config, or by using the
13672 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13673 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13674 |      */
13675 |     timeout?: number;
13676 |   }): Promise<boolean>;
13677 | 
13678 |   /**
13679 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
13680 |    *
13681 |    * **NOTE** If you need to assert that an element is editable, prefer
13682 |    * [expect(locator).toBeEditable([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-editable)
13683 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13684 |    *
13685 |    * **Usage**
13686 |    *
13687 |    * ```js
13688 |    * const editable = await page.getByRole('textbox').isEditable();
13689 |    * ```
13690 |    *
13691 |    * @param options
13692 |    */
13693 |   isEditable(options?: {
13694 |     /**
13695 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13696 |      * option in the config, or by using the
13697 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13698 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13699 |      */
13700 |     timeout?: number;
13701 |   }): Promise<boolean>;
13702 | 
13703 |   /**
13704 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
13705 |    *
13706 |    * **NOTE** If you need to assert that an element is enabled, prefer
13707 |    * [expect(locator).toBeEnabled([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-enabled)
13708 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13709 |    *
13710 |    * **Usage**
13711 |    *
13712 |    * ```js
13713 |    * const enabled = await page.getByRole('button').isEnabled();
13714 |    * ```
13715 |    *
13716 |    * @param options
13717 |    */
13718 |   isEnabled(options?: {
13719 |     /**
13720 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13721 |      * option in the config, or by using the
13722 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13723 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13724 |      */
13725 |     timeout?: number;
13726 |   }): Promise<boolean>;
13727 | 
13728 |   /**
13729 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
13730 |    *
13731 |    * **NOTE** If you need to assert that element is hidden, prefer
13732 |    * [expect(locator).toBeHidden([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-hidden)
13733 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13734 |    *
13735 |    * **Usage**
13736 |    *
13737 |    * ```js
13738 |    * const hidden = await page.getByRole('button').isHidden();
13739 |    * ```
13740 |    *
13741 |    * @param options
13742 |    */
13743 |   isHidden(options?: {
13744 |     /**
13745 |      * @deprecated This option is ignored.
13746 |      * [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden) does not wait for
13747 |      * the element to become hidden and returns immediately.
13748 |      */
13749 |     timeout?: number;
13750 |   }): Promise<boolean>;
13751 | 
13752 |   /**
13753 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
13754 |    *
13755 |    * **NOTE** If you need to assert that element is visible, prefer
13756 |    * [expect(locator).toBeVisible([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-visible)
13757 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13758 |    *
13759 |    * **Usage**
13760 |    *
13761 |    * ```js
13762 |    * const visible = await page.getByRole('button').isVisible();
13763 |    * ```
13764 |    *
13765 |    * @param options
13766 |    */
13767 |   isVisible(options?: {
13768 |     /**
13769 |      * @deprecated This option is ignored.
13770 |      * [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible) does not wait for
13771 |      * the element to become visible and returns immediately.
13772 |      */
13773 |     timeout?: number;
13774 |   }): Promise<boolean>;
13775 | 
13776 |   /**
13777 |    * Returns locator to the last matching element.
13778 |    *
13779 |    * **Usage**
13780 |    *
13781 |    * ```js
13782 |    * const banana = await page.getByRole('listitem').last();
13783 |    * ```
13784 |    *
13785 |    */
13786 |   last(): Locator;
13787 | 
13788 |   /**
13789 |    * The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
13790 |    * options, similar to [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter)
13791 |    * method.
13792 |    *
13793 |    * [Learn more about locators](https://playwright.dev/docs/locators).
13794 |    * @param selectorOrLocator A selector or locator to use when resolving DOM element.
13795 |    * @param options
13796 |    */
13797 |   locator(selectorOrLocator: string|Locator, options?: {
13798 |     /**
13799 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
13800 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
13801 |      *
13802 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
13803 |      * the document root. For example, you can find `content` that has `div` in
13804 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
13805 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
13806 |      *
13807 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13808 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13809 |      */
13810 |     has?: Locator;
13811 | 
13812 |     /**
13813 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
13814 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
13815 |      *
13816 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13817 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13818 |      */
13819 |     hasNot?: Locator;
13820 | 
13821 |     /**
13822 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
13823 |      * When passed a [string], matching is case-insensitive and searches for a substring.
13824 |      */
13825 |     hasNotText?: string|RegExp;
13826 | 
13827 |     /**
13828 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
13829 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
13830 |      * `<article><div>Playwright</div></article>`.
13831 |      */
13832 |     hasText?: string|RegExp;
13833 |   }): Locator;
13834 | 
13835 |   /**
13836 |    * Returns locator to the n-th matching element. It's zero based, `nth(0)` selects the first element.
13837 |    *
13838 |    * **Usage**
13839 |    *
13840 |    * ```js
13841 |    * const banana = await page.getByRole('listitem').nth(2);
13842 |    * ```
13843 |    *
13844 |    * @param index
13845 |    */
13846 |   nth(index: number): Locator;
13847 | 
13848 |   /**
13849 |    * Creates a locator matching all elements that match one or both of the two locators.
13850 |    *
13851 |    * Note that when both locators match something, the resulting locator will have multiple matches and violate
13852 |    * [locator strictness](https://playwright.dev/docs/locators#strictness) guidelines.
13853 |    *
13854 |    * **Usage**
13855 |    *
13856 |    * Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog
13857 |    * shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.
13858 |    *
13859 |    * ```js
13860 |    * const newEmail = page.getByRole('button', { name: 'New' });
13861 |    * const dialog = page.getByText('Confirm security settings');
13862 |    * await expect(newEmail.or(dialog)).toBeVisible();
13863 |    * if (await dialog.isVisible())
13864 |    *   await page.getByRole('button', { name: 'Dismiss' }).click();
13865 |    * await newEmail.click();
13866 |    * ```
13867 |    *
13868 |    * @param locator Alternative locator to match.
13869 |    */
13870 |   or(locator: Locator): Locator;
13871 | 
13872 |   /**
13873 |    * A page this locator belongs to.
13874 |    */
13875 |   page(): Page;
13876 | 
13877 |   /**
13878 |    * Focuses the matching element and presses a combination of the keys.
13879 |    *
13880 |    * **Usage**
13881 |    *
13882 |    * ```js
13883 |    * await page.getByRole('textbox').press('Backspace');
13884 |    * ```
13885 |    *
13886 |    * **Details**
13887 |    *
13888 |    * Focuses the element, and then uses
13889 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
13890 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
13891 |    *
13892 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) can specify the intended
13893 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
13894 |    * to generate the text for. A superset of the
13895 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) values can be found
13896 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
13897 |    *
13898 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
13899 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
13900 |    * etc.
13901 |    *
13902 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
13903 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
13904 |    *
13905 |    * Holding down `Shift` will type the text that corresponds to the
13906 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) in the upper case.
13907 |    *
13908 |    * If [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) is a single character, it is
13909 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
13910 |    *
13911 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
13912 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
13913 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
13914 |    * @param options
13915 |    */
13916 |   press(key: string, options?: {
13917 |     /**
13918 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
13919 |      */
13920 |     delay?: number;
13921 | 
13922 |     /**
13923 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
13924 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
13925 |      * navigating to inaccessible pages. Defaults to `false`.
13926 |      * @deprecated This option will default to `true` in the future.
13927 |      */
13928 |     noWaitAfter?: boolean;
13929 | 
13930 |     /**
13931 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13932 |      * option in the config, or by using the
13933 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13934 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13935 |      */
13936 |     timeout?: number;
13937 |   }): Promise<void>;
13938 | 
13939 |   /**
13940 |    * **NOTE** In most cases, you should use
13941 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
13942 |    * to press keys one by one if there is special keyboard handling on the page.
13943 |    *
13944 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
13945 |    * text.
13946 |    *
13947 |    * To press a special key, like `Control` or `ArrowDown`, use
13948 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press).
13949 |    *
13950 |    * **Usage**
13951 |    *
13952 |    * ```js
13953 |    * await locator.pressSequentially('Hello'); // Types instantly
13954 |    * await locator.pressSequentially('World', { delay: 100 }); // Types slower, like a user
13955 |    * ```
13956 |    *
13957 |    * An example of typing into a text field and then submitting the form:
13958 |    *
13959 |    * ```js
13960 |    * const locator = page.getByLabel('Password');
13961 |    * await locator.pressSequentially('my password');
13962 |    * await locator.press('Enter');
13963 |    * ```
13964 |    *
13965 |    * @param text String of characters to sequentially press into a focused element.
13966 |    * @param options
13967 |    */
13968 |   pressSequentially(text: string, options?: {
13969 |     /**
13970 |      * Time to wait between key presses in milliseconds. Defaults to 0.
13971 |      */
13972 |     delay?: number;
13973 | 
13974 |     /**
13975 |      * This option has no effect.
13976 |      * @deprecated This option has no effect.
13977 |      */
13978 |     noWaitAfter?: boolean;
13979 | 
13980 |     /**
13981 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13982 |      * option in the config, or by using the
13983 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13984 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13985 |      */
13986 |     timeout?: number;
13987 |   }): Promise<void>;
13988 | 
13989 |   /**
13990 |    * Take a screenshot of the element matching the locator.
13991 |    *
13992 |    * **Usage**
13993 |    *
13994 |    * ```js
13995 |    * await page.getByRole('link').screenshot();
13996 |    * ```
13997 |    *
13998 |    * Disable animations and save screenshot to a file:
13999 |    *
14000 |    * ```js
14001 |    * await page.getByRole('link').screenshot({ animations: 'disabled', path: 'link.png' });
14002 |    * ```
14003 |    *
14004 |    * **Details**
14005 |    *
14006 |    * This method captures a screenshot of the page, clipped to the size and position of a particular element matching
14007 |    * the locator. If the element is covered by other elements, it will not be actually visible on the screenshot. If the
14008 |    * element is a scrollable container, only the currently scrolled content will be visible on the screenshot.
14009 |    *
14010 |    * This method waits for the [actionability](https://playwright.dev/docs/actionability) checks, then scrolls element into view before taking
14011 |    * a screenshot. If the element is detached from DOM, the method throws an error.
14012 |    *
14013 |    * Returns the buffer with the captured screenshot.
14014 |    * @param options
14015 |    */
14016 |   screenshot(options?: LocatorScreenshotOptions): Promise<Buffer>;
14017 | 
14018 |   /**
14019 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then tries to scroll element into view, unless
14020 |    * it is completely visible as defined by
14021 |    * [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.
14022 |    *
14023 |    * See [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
14024 |    * @param options
14025 |    */
14026 |   scrollIntoViewIfNeeded(options?: {
14027 |     /**
14028 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14029 |      * option in the config, or by using the
14030 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14031 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14032 |      */
14033 |     timeout?: number;
14034 |   }): Promise<void>;
14035 | 
14036 |   /**
14037 |    * Selects option or options in `<select>`.
14038 |    *
14039 |    * **Details**
14040 |    *
14041 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in
14042 |    * the `<select>` element and selects these options.
14043 |    *
14044 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
14045 |    * the `<label>` element that has an associated
14046 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
14047 |    * instead.
14048 |    *
14049 |    * Returns the array of option values that have been successfully selected.
14050 |    *
14051 |    * Triggers a `change` and `input` event once all the provided options have been selected.
14052 |    *
14053 |    * **Usage**
14054 |    *
14055 |    * ```html
14056 |    * <select multiple>
14057 |    *   <option value="red">Red</div>
14058 |    *   <option value="green">Green</div>
14059 |    *   <option value="blue">Blue</div>
14060 |    * </select>
14061 |    * ```
14062 |    *
14063 |    * ```js
14064 |    * // single selection matching the value or label
14065 |    * element.selectOption('blue');
14066 |    *
14067 |    * // single selection matching the label
14068 |    * element.selectOption({ label: 'Blue' });
14069 |    *
14070 |    * // multiple selection for red, green and blue options
14071 |    * element.selectOption(['red', 'green', 'blue']);
14072 |    * ```
14073 |    *
14074 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
14075 |    * only the first option matching one of the passed options is selected. String values are matching both values and
14076 |    * labels. Option is considered matching if all specified properties match.
14077 |    * @param options
14078 |    */
14079 |   selectOption(values: null|string|ElementHandle|ReadonlyArray<string>|{
14080 |     /**
14081 |      * Matches by `option.value`. Optional.
14082 |      */
14083 |     value?: string;
14084 | 
14085 |     /**
14086 |      * Matches by `option.label`. Optional.
14087 |      */
14088 |     label?: string;
14089 | 
14090 |     /**
14091 |      * Matches by the index. Optional.
14092 |      */
14093 |     index?: number;
14094 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
14095 |     /**
14096 |      * Matches by `option.value`. Optional.
14097 |      */
14098 |     value?: string;
14099 | 
14100 |     /**
14101 |      * Matches by `option.label`. Optional.
14102 |      */
14103 |     label?: string;
14104 | 
14105 |     /**
14106 |      * Matches by the index. Optional.
14107 |      */
14108 |     index?: number;
14109 |   }>, options?: {
14110 |     /**
14111 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14112 |      */
14113 |     force?: boolean;
14114 | 
14115 |     /**
14116 |      * This option has no effect.
14117 |      * @deprecated This option has no effect.
14118 |      */
14119 |     noWaitAfter?: boolean;
14120 | 
14121 |     /**
14122 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14123 |      * option in the config, or by using the
14124 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14125 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14126 |      */
14127 |     timeout?: number;
14128 |   }): Promise<Array<string>>;
14129 | 
14130 |   /**
14131 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then focuses the element and selects all its
14132 |    * text content.
14133 |    *
14134 |    * If the element is inside the `<label>` element that has an associated
14135 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
14136 |    * the control instead.
14137 |    * @param options
14138 |    */
14139 |   selectText(options?: {
14140 |     /**
14141 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14142 |      */
14143 |     force?: boolean;
14144 | 
14145 |     /**
14146 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14147 |      * option in the config, or by using the
14148 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14149 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14150 |      */
14151 |     timeout?: number;
14152 |   }): Promise<void>;
14153 | 
14154 |   /**
14155 |    * Set the state of a checkbox or a radio element.
14156 |    *
14157 |    * **Usage**
14158 |    *
14159 |    * ```js
14160 |    * await page.getByRole('checkbox').setChecked(true);
14161 |    * ```
14162 |    *
14163 |    * **Details**
14164 |    *
14165 |    * This method checks or unchecks an element by performing the following steps:
14166 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
14167 |    * 1. If the element already has the right checked state, this method returns immediately.
14168 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
14169 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-force) option is set. If
14170 |    *    the element is detached during the checks, the whole action is retried.
14171 |    * 1. Scroll the element into view if needed.
14172 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
14173 |    *    element.
14174 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
14175 |    *
14176 |    * When all steps combined have not finished during the specified
14177 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-timeout), this method throws a
14178 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14179 |    * @param checked Whether to check or uncheck the checkbox.
14180 |    * @param options
14181 |    */
14182 |   setChecked(checked: boolean, options?: {
14183 |     /**
14184 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14185 |      */
14186 |     force?: boolean;
14187 | 
14188 |     /**
14189 |      * This option has no effect.
14190 |      * @deprecated This option has no effect.
14191 |      */
14192 |     noWaitAfter?: boolean;
14193 | 
14194 |     /**
14195 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14196 |      * the element.
14197 |      */
14198 |     position?: {
14199 |       x: number;
14200 | 
14201 |       y: number;
14202 |     };
14203 | 
14204 |     /**
14205 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14206 |      * option in the config, or by using the
14207 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14208 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14209 |      */
14210 |     timeout?: number;
14211 | 
14212 |     /**
14213 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14214 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
14215 |      */
14216 |     trial?: boolean;
14217 |   }): Promise<void>;
14218 | 
14219 |   /**
14220 |    * Upload file or multiple files into `<input type=file>`. For inputs with a `[webkitdirectory]` attribute, only a
14221 |    * single directory path is supported.
14222 |    *
14223 |    * **Usage**
14224 |    *
14225 |    * ```js
14226 |    * // Select one file
14227 |    * await page.getByLabel('Upload file').setInputFiles(path.join(__dirname, 'myfile.pdf'));
14228 |    *
14229 |    * // Select multiple files
14230 |    * await page.getByLabel('Upload files').setInputFiles([
14231 |    *   path.join(__dirname, 'file1.txt'),
14232 |    *   path.join(__dirname, 'file2.txt'),
14233 |    * ]);
14234 |    *
14235 |    * // Select a directory
14236 |    * await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
14237 |    *
14238 |    * // Remove all the selected files
14239 |    * await page.getByLabel('Upload file').setInputFiles([]);
14240 |    *
14241 |    * // Upload buffer from memory
14242 |    * await page.getByLabel('Upload file').setInputFiles({
14243 |    *   name: 'file.txt',
14244 |    *   mimeType: 'text/plain',
14245 |    *   buffer: Buffer.from('this is test')
14246 |    * });
14247 |    * ```
14248 |    *
14249 |    * **Details**
14250 |    *
14251 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
14252 |    * they are resolved relative to the current working directory. For empty array, clears the selected files.
14253 |    *
14254 |    * This method expects [Locator](https://playwright.dev/docs/api/class-locator) to point to an
14255 |    * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
14256 |    * the `<label>` element that has an associated
14257 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
14258 |    * @param files
14259 |    * @param options
14260 |    */
14261 |   setInputFiles(files: string|ReadonlyArray<string>|{
14262 |     /**
14263 |      * File name
14264 |      */
14265 |     name: string;
14266 | 
14267 |     /**
14268 |      * File type
14269 |      */
14270 |     mimeType: string;
14271 | 
14272 |     /**
14273 |      * File content
14274 |      */
14275 |     buffer: Buffer;
14276 |   }|ReadonlyArray<{
14277 |     /**
14278 |      * File name
14279 |      */
14280 |     name: string;
14281 | 
14282 |     /**
14283 |      * File type
14284 |      */
14285 |     mimeType: string;
14286 | 
14287 |     /**
14288 |      * File content
14289 |      */
14290 |     buffer: Buffer;
14291 |   }>, options?: {
14292 |     /**
14293 |      * This option has no effect.
14294 |      * @deprecated This option has no effect.
14295 |      */
14296 |     noWaitAfter?: boolean;
14297 | 
14298 |     /**
14299 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14300 |      * option in the config, or by using the
14301 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14302 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14303 |      */
14304 |     timeout?: number;
14305 |   }): Promise<void>;
14306 | 
14307 |   /**
14308 |    * Perform a tap gesture on the element matching the locator.
14309 |    *
14310 |    * **Details**
14311 |    *
14312 |    * This method taps the element by performing the following steps:
14313 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
14314 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-tap-option-force) option is set.
14315 |    * 1. Scroll the element into view if needed.
14316 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
14317 |    *    element, or the specified
14318 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-tap-option-position).
14319 |    *
14320 |    * If the element is detached from the DOM at any moment during the action, this method throws.
14321 |    *
14322 |    * When all steps combined have not finished during the specified
14323 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-tap-option-timeout), this method throws a
14324 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14325 |    *
14326 |    * **NOTE** `element.tap()` requires that the `hasTouch` option of the browser context be set to true.
14327 |    *
14328 |    * @param options
14329 |    */
14330 |   tap(options?: {
14331 |     /**
14332 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14333 |      */
14334 |     force?: boolean;
14335 | 
14336 |     /**
14337 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
14338 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
14339 |      * "Control" on Windows and Linux and to "Meta" on macOS.
14340 |      */
14341 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
14342 | 
14343 |     /**
14344 |      * This option has no effect.
14345 |      * @deprecated This option has no effect.
14346 |      */
14347 |     noWaitAfter?: boolean;
14348 | 
14349 |     /**
14350 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14351 |      * the element.
14352 |      */
14353 |     position?: {
14354 |       x: number;
14355 | 
14356 |       y: number;
14357 |     };
14358 | 
14359 |     /**
14360 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14361 |      * option in the config, or by using the
14362 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14363 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14364 |      */
14365 |     timeout?: number;
14366 | 
14367 |     /**
14368 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14369 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
14370 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
14371 |      * are pressed.
14372 |      */
14373 |     trial?: boolean;
14374 |   }): Promise<void>;
14375 | 
14376 |   /**
14377 |    * Returns the [`node.textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent).
14378 |    *
14379 |    * **NOTE** If you need to assert text on the page, prefer
14380 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
14381 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
14382 |    *
14383 |    * @param options
14384 |    */
14385 |   textContent(options?: {
14386 |     /**
14387 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14388 |      * option in the config, or by using the
14389 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14390 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14391 |      */
14392 |     timeout?: number;
14393 |   }): Promise<null|string>;
14394 | 
14395 |   /**
14396 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
14397 |    * text.
14398 |    *
14399 |    * To press a special key, like `Control` or `ArrowDown`, use
14400 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press).
14401 |    *
14402 |    * **Usage**
14403 |    * @deprecated In most cases, you should use
14404 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
14405 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
14406 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
14407 |    * @param text A text to type into a focused element.
14408 |    * @param options
14409 |    */
14410 |   type(text: string, options?: {
14411 |     /**
14412 |      * Time to wait between key presses in milliseconds. Defaults to 0.
14413 |      */
14414 |     delay?: number;
14415 | 
14416 |     /**
14417 |      * This option has no effect.
14418 |      * @deprecated This option has no effect.
14419 |      */
14420 |     noWaitAfter?: boolean;
14421 | 
14422 |     /**
14423 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14424 |      * option in the config, or by using the
14425 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14426 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14427 |      */
14428 |     timeout?: number;
14429 |   }): Promise<void>;
14430 | 
14431 |   /**
14432 |    * Ensure that checkbox or radio element is unchecked.
14433 |    *
14434 |    * **Usage**
14435 |    *
14436 |    * ```js
14437 |    * await page.getByRole('checkbox').uncheck();
14438 |    * ```
14439 |    *
14440 |    * **Details**
14441 |    *
14442 |    * This method unchecks the element by performing the following steps:
14443 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
14444 |    *    unchecked, this method returns immediately.
14445 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
14446 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-force) option is set.
14447 |    * 1. Scroll the element into view if needed.
14448 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
14449 |    *    element.
14450 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
14451 |    *
14452 |    * If the element is detached from the DOM at any moment during the action, this method throws.
14453 |    *
14454 |    * When all steps combined have not finished during the specified
14455 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-timeout), this method throws a
14456 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14457 |    * @param options
14458 |    */
14459 |   uncheck(options?: {
14460 |     /**
14461 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14462 |      */
14463 |     force?: boolean;
14464 | 
14465 |     /**
14466 |      * This option has no effect.
14467 |      * @deprecated This option has no effect.
14468 |      */
14469 |     noWaitAfter?: boolean;
14470 | 
14471 |     /**
14472 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14473 |      * the element.
14474 |      */
14475 |     position?: {
14476 |       x: number;
14477 | 
14478 |       y: number;
14479 |     };
14480 | 
14481 |     /**
14482 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14483 |      * option in the config, or by using the
14484 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14485 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14486 |      */
14487 |     timeout?: number;
14488 | 
14489 |     /**
14490 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14491 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
14492 |      */
14493 |     trial?: boolean;
14494 |   }): Promise<void>;
14495 | 
14496 |   /**
14497 |    * Returns when element specified by locator satisfies the
14498 |    * [`state`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-state) option.
14499 |    *
14500 |    * If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to
14501 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-timeout) milliseconds until the
14502 |    * condition is met.
14503 |    *
14504 |    * **Usage**
14505 |    *
14506 |    * ```js
14507 |    * const orderSent = page.locator('#order-sent');
14508 |    * await orderSent.waitFor();
14509 |    * ```
14510 |    *
14511 |    * @param options
14512 |    */
14513 |   waitFor(options?: {
14514 |     /**
14515 |      * Defaults to `'visible'`. Can be either:
14516 |      * - `'attached'` - wait for element to be present in DOM.
14517 |      * - `'detached'` - wait for element to not be present in DOM.
14518 |      * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
14519 |      *   without any content or with `display:none` has an empty bounding box and is not considered visible.
14520 |      * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
14521 |      *   `visibility:hidden`. This is opposite to the `'visible'` option.
14522 |      */
14523 |     state?: "attached"|"detached"|"visible"|"hidden";
14524 | 
14525 |     /**
14526 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14527 |      * option in the config, or by using the
14528 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14529 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14530 |      */
14531 |     timeout?: number;
14532 |   }): Promise<void>;
14533 | }
14534 | 
14535 | /**
14536 |  * BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is
14537 |  * a typical example of using Playwright to drive automation:
14538 |  *
14539 |  * ```js
14540 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
14541 |  *
14542 |  * (async () => {
14543 |  *   const browser = await chromium.launch();
14544 |  *   const page = await browser.newPage();
14545 |  *   await page.goto('https://example.com');
14546 |  *   // other actions...
14547 |  *   await browser.close();
14548 |  * })();
14549 |  * ```
14550 |  *
14551 |  */
14552 | export interface BrowserType<Unused = {}> {
14553 |   /**
14554 |    * This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.
14555 |    *
14556 |    * The default browser context is accessible via
14557 |    * [browser.contexts()](https://playwright.dev/docs/api/class-browser#browser-contexts).
14558 |    *
14559 |    * **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
14560 |    *
14561 |    * **Usage**
14562 |    *
14563 |    * ```js
14564 |    * const browser = await playwright.chromium.connectOverCDP('http://localhost:9222');
14565 |    * const defaultContext = browser.contexts()[0];
14566 |    * const page = defaultContext.pages()[0];
14567 |    * ```
14568 |    *
14569 |    * @param endpointURL A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or
14570 |    * `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.
14571 |    * @param options
14572 |    */
14573 |   connectOverCDP(endpointURL: string, options?: ConnectOverCDPOptions): Promise<Browser>;
14574 |   /**
14575 |    * Option `wsEndpoint` is deprecated. Instead use `endpointURL`.
14576 |    * @deprecated
14577 |    */
14578 |   /**
14579 |    * This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.
14580 |    *
14581 |    * The default browser context is accessible via
14582 |    * [browser.contexts()](https://playwright.dev/docs/api/class-browser#browser-contexts).
14583 |    *
14584 |    * **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
14585 |    *
14586 |    * **Usage**
14587 |    *
14588 |    * ```js
14589 |    * const browser = await playwright.chromium.connectOverCDP('http://localhost:9222');
14590 |    * const defaultContext = browser.contexts()[0];
14591 |    * const page = defaultContext.pages()[0];
14592 |    * ```
14593 |    *
14594 |    * @param endpointURL A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or
14595 |    * `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.
14596 |    * @param options
14597 |    */
14598 |   connectOverCDP(options: ConnectOverCDPOptions & { wsEndpoint?: string }): Promise<Browser>;
14599 |   /**
14600 |    * This method attaches Playwright to an existing browser instance. When connecting to another browser launched via
14601 |    * `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is
14602 |    * compatible with 1.2.x).
14603 |    * @param wsEndpoint A browser websocket endpoint to connect to.
14604 |    * @param options
14605 |    */
14606 |   connect(wsEndpoint: string, options?: ConnectOptions): Promise<Browser>;
14607 |   /**
14608 |    * wsEndpoint in options is deprecated. Instead use `wsEndpoint`.
14609 |    * @param wsEndpoint A browser websocket endpoint to connect to.
14610 |    * @param options
14611 |    * @deprecated
14612 |    */
14613 |   /**
14614 |    * This method attaches Playwright to an existing browser instance. When connecting to another browser launched via
14615 |    * `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is
14616 |    * compatible with 1.2.x).
14617 |    * @param wsEndpoint A browser websocket endpoint to connect to.
14618 |    * @param options
14619 |    */
14620 |   connect(options: ConnectOptions & { wsEndpoint?: string }): Promise<Browser>;
14621 |   /**
14622 |    * A path where Playwright expects to find a bundled browser executable.
14623 |    */
14624 |   executablePath(): string;
14625 | 
14626 |   /**
14627 |    * Returns the browser instance.
14628 |    *
14629 |    * **Usage**
14630 |    *
14631 |    * You can use
14632 |    * [`ignoreDefaultArgs`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-ignore-default-args)
14633 |    * to filter out `--mute-audio` from default arguments:
14634 |    *
14635 |    * ```js
14636 |    * const browser = await chromium.launch({  // Or 'firefox' or 'webkit'.
14637 |    *   ignoreDefaultArgs: ['--mute-audio']
14638 |    * });
14639 |    * ```
14640 |    *
14641 |    * > **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it
14642 |    * works best with the version of Chromium it is bundled with. There is no guarantee it will work with any other
14643 |    * version. Use
14644 |    * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path)
14645 |    * option with extreme caution.
14646 |    * >
14647 |    * > If Google Chrome (rather than Chromium) is preferred, a
14648 |    * [Chrome Canary](https://www.google.com/chrome/browser/canary.html) or
14649 |    * [Dev Channel](https://www.chromium.org/getting-involved/dev-channel) build is suggested.
14650 |    * >
14651 |    * > Stock browsers like Google Chrome and Microsoft Edge are suitable for tests that require proprietary media codecs
14652 |    * for video playback. See
14653 |    * [this article](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for
14654 |    * other differences between Chromium and Chrome.
14655 |    * [This article](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md)
14656 |    * describes some differences for Linux users.
14657 |    * @param options
14658 |    */
14659 |   launch(options?: LaunchOptions): Promise<Browser>;
14660 | 
14661 |   /**
14662 |    * Returns the persistent browser context instance.
14663 |    *
14664 |    * Launches browser that uses persistent storage located at
14665 |    * [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)
14666 |    * and returns the only context. Closing this context will automatically close the browser.
14667 |    * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for
14668 |    * [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
14669 |    * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's
14670 |    * user data directory is the **parent** directory of the "Profile Path" seen at `chrome://version`. Pass an empty
14671 |    * string to use a temporary directory instead.
14672 |    * @param options
14673 |    */
14674 |   launchPersistentContext(userDataDir: string, options?: {
14675 |     /**
14676 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
14677 |      */
14678 |     acceptDownloads?: boolean;
14679 | 
14680 |     /**
14681 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
14682 |      *
14683 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
14684 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
14685 |      */
14686 |     args?: Array<string>;
14687 | 
14688 |     /**
14689 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
14690 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
14691 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
14692 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
14693 |      * or
14694 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
14695 |      * it takes the base URL in consideration by using the
14696 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
14697 |      * Unset by default. Examples:
14698 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
14699 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
14700 |      *   `http://localhost:3000/foo/bar.html`
14701 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
14702 |      *   `http://localhost:3000/bar.html`
14703 |      */
14704 |     baseURL?: string;
14705 | 
14706 |     /**
14707 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
14708 |      */
14709 |     bypassCSP?: boolean;
14710 | 
14711 |     /**
14712 |      * Browser distribution channel.
14713 |      *
14714 |      * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#opt-in-to-new-headless-mode).
14715 |      *
14716 |      * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
14717 |      * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
14718 |      */
14719 |     channel?: string;
14720 | 
14721 |     /**
14722 |      * Enable Chromium sandboxing. Defaults to `false`.
14723 |      */
14724 |     chromiumSandbox?: boolean;
14725 | 
14726 |     /**
14727 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
14728 |      *
14729 |      * **Details**
14730 |      *
14731 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
14732 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
14733 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
14734 |      * with an exact match to the request origin that the certificate is valid for.
14735 |      *
14736 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
14737 |      * work by replacing `localhost` with `local.playwright`.
14738 |      *
14739 |      */
14740 |     clientCertificates?: Array<{
14741 |       /**
14742 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
14743 |        */
14744 |       origin: string;
14745 | 
14746 |       /**
14747 |        * Path to the file with the certificate in PEM format.
14748 |        */
14749 |       certPath?: string;
14750 | 
14751 |       /**
14752 |        * Direct value of the certificate in PEM format.
14753 |        */
14754 |       cert?: Buffer;
14755 | 
14756 |       /**
14757 |        * Path to the file with the private key in PEM format.
14758 |        */
14759 |       keyPath?: string;
14760 | 
14761 |       /**
14762 |        * Direct value of the private key in PEM format.
14763 |        */
14764 |       key?: Buffer;
14765 | 
14766 |       /**
14767 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
14768 |        */
14769 |       pfxPath?: string;
14770 | 
14771 |       /**
14772 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
14773 |        */
14774 |       pfx?: Buffer;
14775 | 
14776 |       /**
14777 |        * Passphrase for the private key (PEM or PFX).
14778 |        */
14779 |       passphrase?: string;
14780 |     }>;
14781 | 
14782 |     /**
14783 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
14784 |      * media feature, supported values are `'light'` and `'dark'`. See
14785 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
14786 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
14787 |      */
14788 |     colorScheme?: null|"light"|"dark"|"no-preference";
14789 | 
14790 |     /**
14791 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
14792 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
14793 |      */
14794 |     deviceScaleFactor?: number;
14795 | 
14796 |     /**
14797 |      * **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
14798 |      * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-headless)
14799 |      * option will be set `false`.
14800 |      * @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
14801 |      */
14802 |     devtools?: boolean;
14803 | 
14804 |     /**
14805 |      * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
14806 |      * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
14807 |      * created in is closed.
14808 |      */
14809 |     downloadsPath?: string;
14810 | 
14811 |     /**
14812 |      * Specify environment variables that will be visible to the browser. Defaults to `process.env`.
14813 |      */
14814 |     env?: { [key: string]: string|number|boolean; };
14815 | 
14816 |     /**
14817 |      * Path to a browser executable to run instead of the bundled one. If
14818 |      * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-executable-path)
14819 |      * is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
14820 |      * with the bundled Chromium, Firefox or WebKit, use at your own risk.
14821 |      */
14822 |     executablePath?: string;
14823 | 
14824 |     /**
14825 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
14826 |      */
14827 |     extraHTTPHeaders?: { [key: string]: string; };
14828 | 
14829 |     /**
14830 |      * Firefox user preferences. Learn more about the Firefox user preferences at
14831 |      * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
14832 |      */
14833 |     firefoxUserPrefs?: { [key: string]: string|number|boolean; };
14834 | 
14835 |     /**
14836 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
14837 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
14838 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
14839 |      */
14840 |     forcedColors?: null|"active"|"none";
14841 | 
14842 |     geolocation?: {
14843 |       /**
14844 |        * Latitude between -90 and 90.
14845 |        */
14846 |       latitude: number;
14847 | 
14848 |       /**
14849 |        * Longitude between -180 and 180.
14850 |        */
14851 |       longitude: number;
14852 | 
14853 |       /**
14854 |        * Non-negative accuracy value. Defaults to `0`.
14855 |        */
14856 |       accuracy?: number;
14857 |     };
14858 | 
14859 |     /**
14860 |      * Close the browser process on SIGHUP. Defaults to `true`.
14861 |      */
14862 |     handleSIGHUP?: boolean;
14863 | 
14864 |     /**
14865 |      * Close the browser process on Ctrl-C. Defaults to `true`.
14866 |      */
14867 |     handleSIGINT?: boolean;
14868 | 
14869 |     /**
14870 |      * Close the browser process on SIGTERM. Defaults to `true`.
14871 |      */
14872 |     handleSIGTERM?: boolean;
14873 | 
14874 |     /**
14875 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
14876 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
14877 |      */
14878 |     hasTouch?: boolean;
14879 | 
14880 |     /**
14881 |      * Whether to run browser in headless mode. More details for
14882 |      * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
14883 |      * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
14884 |      * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
14885 |      * `true`.
14886 |      */
14887 |     headless?: boolean;
14888 | 
14889 |     /**
14890 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
14891 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
14892 |      */
14893 |     httpCredentials?: {
14894 |       username: string;
14895 | 
14896 |       password: string;
14897 | 
14898 |       /**
14899 |        * Restrain sending http credentials on specific origin (scheme://host:port).
14900 |        */
14901 |       origin?: string;
14902 | 
14903 |       /**
14904 |        * This option only applies to the requests sent from corresponding
14905 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
14906 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
14907 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
14908 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
14909 |        */
14910 |       send?: "unauthorized"|"always";
14911 |     };
14912 | 
14913 |     /**
14914 |      * If `true`, Playwright does not pass its own configurations args and only uses the ones from
14915 |      * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-args). If
14916 |      * an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to
14917 |      * `false`.
14918 |      */
14919 |     ignoreDefaultArgs?: boolean|Array<string>;
14920 | 
14921 |     /**
14922 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
14923 |      */
14924 |     ignoreHTTPSErrors?: boolean;
14925 | 
14926 |     /**
14927 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
14928 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
14929 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
14930 |      */
14931 |     isMobile?: boolean;
14932 | 
14933 |     /**
14934 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
14935 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
14936 |      */
14937 |     javaScriptEnabled?: boolean;
14938 | 
14939 |     /**
14940 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
14941 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
14942 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
14943 |      */
14944 |     locale?: string;
14945 | 
14946 |     /**
14947 |      * Logger sink for Playwright logging.
14948 |      */
14949 |     logger?: Logger;
14950 | 
14951 |     /**
14952 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
14953 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
14954 |      */
14955 |     offline?: boolean;
14956 | 
14957 |     /**
14958 |      * A list of permissions to grant to all pages in this context. See
14959 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
14960 |      * for more details. Defaults to none.
14961 |      */
14962 |     permissions?: Array<string>;
14963 | 
14964 |     /**
14965 |      * Network proxy settings.
14966 |      */
14967 |     proxy?: {
14968 |       /**
14969 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
14970 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
14971 |        */
14972 |       server: string;
14973 | 
14974 |       /**
14975 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
14976 |        */
14977 |       bypass?: string;
14978 | 
14979 |       /**
14980 |        * Optional username to use if HTTP proxy requires authentication.
14981 |        */
14982 |       username?: string;
14983 | 
14984 |       /**
14985 |        * Optional password to use if HTTP proxy requires authentication.
14986 |        */
14987 |       password?: string;
14988 |     };
14989 | 
14990 |     /**
14991 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
14992 |      * If not specified, the HAR is not recorded. Make sure to await
14993 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
14994 |      * the HAR to be saved.
14995 |      */
14996 |     recordHar?: {
14997 |       /**
14998 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
14999 |        * `content` policy instead.
15000 |        */
15001 |       omitContent?: boolean;
15002 | 
15003 |       /**
15004 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
15005 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
15006 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
15007 |        * files and to `embed` for all other file extensions.
15008 |        */
15009 |       content?: "omit"|"embed"|"attach";
15010 | 
15011 |       /**
15012 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
15013 |        * default.
15014 |        */
15015 |       path: string;
15016 | 
15017 |       /**
15018 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
15019 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
15020 |        */
15021 |       mode?: "full"|"minimal";
15022 | 
15023 |       /**
15024 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
15025 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
15026 |        * options was provided and the passed URL is a path, it gets merged via the
15027 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
15028 |        */
15029 |       urlFilter?: string|RegExp;
15030 |     };
15031 | 
15032 |     /**
15033 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
15034 |      * Make sure to await
15035 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
15036 |      * videos to be saved.
15037 |      */
15038 |     recordVideo?: {
15039 |       /**
15040 |        * Path to the directory to put videos into.
15041 |        */
15042 |       dir: string;
15043 | 
15044 |       /**
15045 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
15046 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
15047 |        * each page will be scaled down if necessary to fit the specified size.
15048 |        */
15049 |       size?: {
15050 |         /**
15051 |          * Video frame width.
15052 |          */
15053 |         width: number;
15054 | 
15055 |         /**
15056 |          * Video frame height.
15057 |          */
15058 |         height: number;
15059 |       };
15060 |     };
15061 | 
15062 |     /**
15063 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
15064 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
15065 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
15066 |      */
15067 |     reducedMotion?: null|"reduce"|"no-preference";
15068 | 
15069 |     /**
15070 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
15071 |      * [`viewport`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-viewport)
15072 |      * is set.
15073 |      */
15074 |     screen?: {
15075 |       /**
15076 |        * page width in pixels.
15077 |        */
15078 |       width: number;
15079 | 
15080 |       /**
15081 |        * page height in pixels.
15082 |        */
15083 |       height: number;
15084 |     };
15085 | 
15086 |     /**
15087 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
15088 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
15089 |      *   registered.
15090 |      * - `'block'`: Playwright will block all registration of Service Workers.
15091 |      */
15092 |     serviceWorkers?: "allow"|"block";
15093 | 
15094 |     /**
15095 |      * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
15096 |      * on.
15097 |      */
15098 |     slowMo?: number;
15099 | 
15100 |     /**
15101 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
15102 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
15103 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
15104 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
15105 |      */
15106 |     strictSelectors?: boolean;
15107 | 
15108 |     /**
15109 |      * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
15110 |      * to disable timeout.
15111 |      */
15112 |     timeout?: number;
15113 | 
15114 |     /**
15115 |      * Changes the timezone of the context. See
15116 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
15117 |      * for a list of supported timezone IDs. Defaults to the system timezone.
15118 |      */
15119 |     timezoneId?: string;
15120 | 
15121 |     /**
15122 |      * If specified, traces are saved into this directory.
15123 |      */
15124 |     tracesDir?: string;
15125 | 
15126 |     /**
15127 |      * Specific user agent to use in this context.
15128 |      */
15129 |     userAgent?: string;
15130 | 
15131 |     /**
15132 |      * @deprecated Use
15133 |      * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
15134 |      * instead.
15135 |      */
15136 |     videoSize?: {
15137 |       /**
15138 |        * Video frame width.
15139 |        */
15140 |       width: number;
15141 | 
15142 |       /**
15143 |        * Video frame height.
15144 |        */
15145 |       height: number;
15146 |     };
15147 | 
15148 |     /**
15149 |      * @deprecated Use
15150 |      * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
15151 |      * instead.
15152 |      */
15153 |     videosPath?: string;
15154 | 
15155 |     /**
15156 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
15157 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
15158 |      *
15159 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
15160 |      * by the operating system. It makes the execution of the tests non-deterministic.
15161 |      *
15162 |      */
15163 |     viewport?: null|{
15164 |       /**
15165 |        * page width in pixels.
15166 |        */
15167 |       width: number;
15168 | 
15169 |       /**
15170 |        * page height in pixels.
15171 |        */
15172 |       height: number;
15173 |     };
15174 |   }): Promise<BrowserContext>;
15175 | 
15176 |   /**
15177 |    * Returns the browser app instance. You can connect to it via
15178 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect),
15179 |    * which requires the major/minor client/server version to match (1.2.3 → is compatible with 1.2.x).
15180 |    *
15181 |    * **Usage**
15182 |    *
15183 |    * Launches browser server that client can connect to. An example of launching a browser executable and connecting to
15184 |    * it later:
15185 |    *
15186 |    * ```js
15187 |    * const { chromium } = require('playwright');  // Or 'webkit' or 'firefox'.
15188 |    *
15189 |    * (async () => {
15190 |    *   const browserServer = await chromium.launchServer();
15191 |    *   const wsEndpoint = browserServer.wsEndpoint();
15192 |    *   // Use web socket endpoint later to establish a connection.
15193 |    *   const browser = await chromium.connect(wsEndpoint);
15194 |    *   // Close browser instance.
15195 |    *   await browserServer.close();
15196 |    * })();
15197 |    * ```
15198 |    *
15199 |    * @param options
15200 |    */
15201 |   launchServer(options?: {
15202 |     /**
15203 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
15204 |      *
15205 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
15206 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
15207 |      */
15208 |     args?: Array<string>;
15209 | 
15210 |     /**
15211 |      * Browser distribution channel.
15212 |      *
15213 |      * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#opt-in-to-new-headless-mode).
15214 |      *
15215 |      * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
15216 |      * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
15217 |      */
15218 |     channel?: string;
15219 | 
15220 |     /**
15221 |      * Enable Chromium sandboxing. Defaults to `false`.
15222 |      */
15223 |     chromiumSandbox?: boolean;
15224 | 
15225 |     /**
15226 |      * **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
15227 |      * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-headless) option
15228 |      * will be set `false`.
15229 |      * @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
15230 |      */
15231 |     devtools?: boolean;
15232 | 
15233 |     /**
15234 |      * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
15235 |      * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
15236 |      * created in is closed.
15237 |      */
15238 |     downloadsPath?: string;
15239 | 
15240 |     /**
15241 |      * Specify environment variables that will be visible to the browser. Defaults to `process.env`.
15242 |      */
15243 |     env?: { [key: string]: string|number|boolean; };
15244 | 
15245 |     /**
15246 |      * Path to a browser executable to run instead of the bundled one. If
15247 |      * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-executable-path)
15248 |      * is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
15249 |      * with the bundled Chromium, Firefox or WebKit, use at your own risk.
15250 |      */
15251 |     executablePath?: string;
15252 | 
15253 |     /**
15254 |      * Firefox user preferences. Learn more about the Firefox user preferences at
15255 |      * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
15256 |      */
15257 |     firefoxUserPrefs?: { [key: string]: string|number|boolean; };
15258 | 
15259 |     /**
15260 |      * Close the browser process on SIGHUP. Defaults to `true`.
15261 |      */
15262 |     handleSIGHUP?: boolean;
15263 | 
15264 |     /**
15265 |      * Close the browser process on Ctrl-C. Defaults to `true`.
15266 |      */
15267 |     handleSIGINT?: boolean;
15268 | 
15269 |     /**
15270 |      * Close the browser process on SIGTERM. Defaults to `true`.
15271 |      */
15272 |     handleSIGTERM?: boolean;
15273 | 
15274 |     /**
15275 |      * Whether to run browser in headless mode. More details for
15276 |      * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
15277 |      * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
15278 |      * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
15279 |      * `true`.
15280 |      */
15281 |     headless?: boolean;
15282 | 
15283 |     /**
15284 |      * Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the
15285 |      * unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider
15286 |      * hardening it with picking a specific interface.
15287 |      */
15288 |     host?: string;
15289 | 
15290 |     /**
15291 |      * If `true`, Playwright does not pass its own configurations args and only uses the ones from
15292 |      * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-args). If an array is
15293 |      * given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
15294 |      */
15295 |     ignoreDefaultArgs?: boolean|Array<string>;
15296 | 
15297 |     /**
15298 |      * Logger sink for Playwright logging.
15299 |      */
15300 |     logger?: Logger;
15301 | 
15302 |     /**
15303 |      * Port to use for the web socket. Defaults to 0 that picks any available port.
15304 |      */
15305 |     port?: number;
15306 | 
15307 |     /**
15308 |      * Network proxy settings.
15309 |      */
15310 |     proxy?: {
15311 |       /**
15312 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
15313 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
15314 |        */
15315 |       server: string;
15316 | 
15317 |       /**
15318 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
15319 |        */
15320 |       bypass?: string;
15321 | 
15322 |       /**
15323 |        * Optional username to use if HTTP proxy requires authentication.
15324 |        */
15325 |       username?: string;
15326 | 
15327 |       /**
15328 |        * Optional password to use if HTTP proxy requires authentication.
15329 |        */
15330 |       password?: string;
15331 |     };
15332 | 
15333 |     /**
15334 |      * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
15335 |      * to disable timeout.
15336 |      */
15337 |     timeout?: number;
15338 | 
15339 |     /**
15340 |      * If specified, traces are saved into this directory.
15341 |      */
15342 |     tracesDir?: string;
15343 | 
15344 |     /**
15345 |      * Path at which to serve the Browser Server. For security, this defaults to an unguessable string.
15346 |      *
15347 |      * **NOTE** Any process or web page (including those running in Playwright) with knowledge of the `wsPath` can take
15348 |      * control of the OS user. For this reason, you should use an unguessable token when using this option.
15349 |      *
15350 |      */
15351 |     wsPath?: string;
15352 |   }): Promise<BrowserServer>;
15353 | 
15354 |   /**
15355 |    * Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`.
15356 |    */
15357 |   name(): string;
15358 | }
15359 | 
15360 | /**
15361 |  * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol:
15362 |  * - protocol methods can be called with `session.send` method.
15363 |  * - protocol events can be subscribed to with `session.on` method.
15364 |  *
15365 |  * Useful links:
15366 |  * - Documentation on DevTools Protocol can be found here:
15367 |  *   [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).
15368 |  * - Getting Started with DevTools Protocol:
15369 |  *   https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md
15370 |  *
15371 |  * ```js
15372 |  * const client = await page.context().newCDPSession(page);
15373 |  * await client.send('Animation.enable');
15374 |  * client.on('Animation.animationCreated', () => console.log('Animation created!'));
15375 |  * const response = await client.send('Animation.getPlaybackRate');
15376 |  * console.log('playback rate is ' + response.playbackRate);
15377 |  * await client.send('Animation.setPlaybackRate', {
15378 |  *   playbackRate: response.playbackRate / 2
15379 |  * });
15380 |  * ```
15381 |  *
15382 |  */
15383 | export interface CDPSession {
15384 |   on: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15385 |   addListener: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15386 |   off: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15387 |   removeListener: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15388 |   once: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15389 |   /**
15390 |    * @param method Protocol method name.
15391 |    * @param params Optional method parameters.
15392 |    */
15393 |   send<T extends keyof Protocol.CommandParameters>(
15394 |     method: T,
15395 |     params?: Protocol.CommandParameters[T]
15396 |   ): Promise<Protocol.CommandReturnValues[T]>;
15397 |   /**
15398 |    * Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be
15399 |    * used to send messages.
15400 |    */
15401 |   detach(): Promise<void>;
15402 | }
15403 | 
15404 | /**
15405 |  * Whenever a [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) route is set up with
15406 |  * [page.routeWebSocket(url, handler)](https://playwright.dev/docs/api/class-page#page-route-web-socket) or
15407 |  * [browserContext.routeWebSocket(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-web-socket),
15408 |  * the `WebSocketRoute` object allows to handle the WebSocket, like an actual server would do.
15409 |  *
15410 |  * **Mocking**
15411 |  *
15412 |  * By default, the routed WebSocket will not connect to the server. This way, you can mock entire communcation over
15413 |  * the WebSocket. Here is an example that responds to a `"request"` with a `"response"`.
15414 |  *
15415 |  * ```js
15416 |  * await page.routeWebSocket('wss://example.com/ws', ws => {
15417 |  *   ws.onMessage(message => {
15418 |  *     if (message === 'request')
15419 |  *       ws.send('response');
15420 |  *   });
15421 |  * });
15422 |  * ```
15423 |  *
15424 |  * Since we do not call
15425 |  * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15426 |  * inside the WebSocket route handler, Playwright assumes that WebSocket will be mocked, and opens the WebSocket
15427 |  * inside the page automatically.
15428 |  *
15429 |  * Here is another example that handles JSON messages:
15430 |  *
15431 |  * ```js
15432 |  * await page.routeWebSocket('wss://example.com/ws', ws => {
15433 |  *   ws.onMessage(message => {
15434 |  *     const json = JSON.parse(message);
15435 |  *     if (json.request === 'question')
15436 |  *       ws.send(JSON.stringify({ response: 'answer' }));
15437 |  *   });
15438 |  * });
15439 |  * ```
15440 |  *
15441 |  * **Intercepting**
15442 |  *
15443 |  * Alternatively, you may want to connect to the actual server, but intercept messages in-between and modify or block
15444 |  * them. Calling
15445 |  * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15446 |  * returns a server-side `WebSocketRoute` instance that you can send messages to, or handle incoming messages.
15447 |  *
15448 |  * Below is an example that modifies some messages sent by the page to the server. Messages sent from the server to
15449 |  * the page are left intact, relying on the default forwarding.
15450 |  *
15451 |  * ```js
15452 |  * await page.routeWebSocket('/ws', ws => {
15453 |  *   const server = ws.connectToServer();
15454 |  *   ws.onMessage(message => {
15455 |  *     if (message === 'request')
15456 |  *       server.send('request2');
15457 |  *     else
15458 |  *       server.send(message);
15459 |  *   });
15460 |  * });
15461 |  * ```
15462 |  *
15463 |  * After connecting to the server, all **messages are forwarded** between the page and the server by default.
15464 |  *
15465 |  * However, if you call
15466 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15467 |  * on the original route, messages from the page to the server **will not be forwarded** anymore, but should instead
15468 |  * be handled by the
15469 |  * [`handler`](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message-option-handler).
15470 |  *
15471 |  * Similarly, calling
15472 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15473 |  * on the server-side WebSocket will **stop forwarding messages** from the server to the page, and
15474 |  * [`handler`](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message-option-handler) should
15475 |  * take care of them.
15476 |  *
15477 |  * The following example blocks some messages in both directions. Since it calls
15478 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15479 |  * in both directions, there is no automatic forwarding at all.
15480 |  *
15481 |  * ```js
15482 |  * await page.routeWebSocket('/ws', ws => {
15483 |  *   const server = ws.connectToServer();
15484 |  *   ws.onMessage(message => {
15485 |  *     if (message !== 'blocked-from-the-page')
15486 |  *       server.send(message);
15487 |  *   });
15488 |  *   server.onMessage(message => {
15489 |  *     if (message !== 'blocked-from-the-server')
15490 |  *       ws.send(message);
15491 |  *   });
15492 |  * });
15493 |  * ```
15494 |  *
15495 |  */
15496 | export interface WebSocketRoute {
15497 |   /**
15498 |    * This method allows to handle messages that are sent by the WebSocket, either from the page or from the server.
15499 |    *
15500 |    * When called on the original WebSocket route, this method handles messages sent from the page. You can handle this
15501 |    * messages by responding to them with
15502 |    * [webSocketRoute.send(message)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-send),
15503 |    * forwarding them to the server-side connection returned by
15504 |    * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15505 |    * or do something else.
15506 |    *
15507 |    * Once this method is called, messages are not automatically forwarded to the server or to the page - you should do
15508 |    * that manually by calling
15509 |    * [webSocketRoute.send(message)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-send). See
15510 |    * examples at the top for more details.
15511 |    *
15512 |    * Calling this method again will override the handler with a new one.
15513 |    * @param handler Function that will handle messages.
15514 |    */
15515 |   onMessage(handler: (message: string | Buffer) => any): void;
15516 |   /**
15517 |    * Allows to handle [`WebSocket.close`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close).
15518 |    *
15519 |    * By default, closing one side of the connection, either in the page or on the server, will close the other side.
15520 |    * However, when
15521 |    * [webSocketRoute.onClose(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-close)
15522 |    * handler is set up, the default forwarding of closure is disabled, and handler should take care of it.
15523 |    * @param handler Function that will handle WebSocket closure. Received an optional
15524 |    * [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional
15525 |    * [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
15526 |    */
15527 |   onClose(handler: (code: number | undefined, reason: string | undefined) => any): void;
15528 |   /**
15529 |    * Closes one side of the WebSocket connection.
15530 |    * @param options
15531 |    */
15532 |   close(options?: {
15533 |     /**
15534 |      * Optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code).
15535 |      */
15536 |     code?: number;
15537 | 
15538 |     /**
15539 |      * Optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
15540 |      */
15541 |     reason?: string;
15542 |   }): Promise<void>;
15543 | 
15544 |   /**
15545 |    * By default, routed WebSocket does not connect to the server, so you can mock entire WebSocket communication. This
15546 |    * method connects to the actual WebSocket server, and returns the server-side
15547 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) instance, giving the ability to send and
15548 |    * receive messages from the server.
15549 |    *
15550 |    * Once connected to the server:
15551 |    * - Messages received from the server will be **automatically forwarded** to the WebSocket in the page, unless
15552 |    *   [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15553 |    *   is called on the server-side `WebSocketRoute`.
15554 |    * - Messages sent by the [`WebSocket.send()`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send) call
15555 |    *   in the page will be **automatically forwarded** to the server, unless
15556 |    *   [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15557 |    *   is called on the original `WebSocketRoute`.
15558 |    *
15559 |    * See examples at the top for more details.
15560 |    */
15561 |   connectToServer(): WebSocketRoute;
15562 | 
15563 |   /**
15564 |    * Sends a message to the WebSocket. When called on the original WebSocket, sends the message to the page. When called
15565 |    * on the result of
15566 |    * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server),
15567 |    * sends the message to the server. See examples at the top for more details.
15568 |    * @param message Message to send.
15569 |    */
15570 |   send(message: string|Buffer): void;
15571 | 
15572 |   /**
15573 |    * URL of the WebSocket created in the page.
15574 |    */
15575 |   url(): string;
15576 | 
15577 |   [Symbol.asyncDispose](): Promise<void>;
15578 | }
15579 | 
15580 | type DeviceDescriptor = {
15581 |   viewport: ViewportSize;
15582 |   userAgent: string;
15583 |   deviceScaleFactor: number;
15584 |   isMobile: boolean;
15585 |   hasTouch: boolean;
15586 |   defaultBrowserType: 'chromium' | 'firefox' | 'webkit';
15587 | };
15588 | 
15589 | export namespace errors {
15590 | 
15591 | /**
15592 |  * - extends: [Error]
15593 |  *
15594 |  * TimeoutError is emitted whenever certain operations are terminated due to timeout, e.g.
15595 |  * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) or
15596 |  * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch).
15597 |  *
15598 |  * ```js
15599 |  * const playwright = require('playwright');
15600 |  *
15601 |  * (async () => {
15602 |  *   const browser = await playwright.chromium.launch();
15603 |  *   const context = await browser.newContext();
15604 |  *   const page = await context.newPage();
15605 |  *   try {
15606 |  *     await page.locator('text=Foo').click({
15607 |  *       timeout: 100,
15608 |  *     });
15609 |  *   } catch (error) {
15610 |  *     if (error instanceof playwright.errors.TimeoutError)
15611 |  *       console.log('Timeout!');
15612 |  *   }
15613 |  *   await browser.close();
15614 |  * })();
15615 |  * ```
15616 |  *
15617 |  */
15618 | class TimeoutError extends Error {
15619 | }
15620 | 
15621 | }
15622 | 
15623 | /**
15624 |  * The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is
15625 |  * used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or
15626 |  * [switches](https://en.wikipedia.org/wiki/Switch_access).
15627 |  *
15628 |  * Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that
15629 |  * might have wildly different output.
15630 |  *
15631 |  * Rendering engines of Chromium, Firefox and WebKit have a concept of "accessibility tree", which is then translated
15632 |  * into different platform-specific APIs. Accessibility namespace gives access to this Accessibility Tree.
15633 |  *
15634 |  * Most of the accessibility tree gets filtered out when converting from internal browser AX Tree to Platform-specific
15635 |  * AX-Tree or by assistive technologies themselves. By default, Playwright tries to approximate this filtering,
15636 |  * exposing only the "interesting" nodes of the tree.
15637 |  */
15638 | export interface Accessibility {
15639 |   /**
15640 |    * Captures the current state of the accessibility tree. The returned object represents the root accessible node of
15641 |    * the page.
15642 |    *
15643 |    * **NOTE** The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen
15644 |    * readers. Playwright will discard them as well for an easier to process tree, unless
15645 |    * [`interestingOnly`](https://playwright.dev/docs/api/class-accessibility#accessibility-snapshot-option-interesting-only)
15646 |    * is set to `false`.
15647 |    *
15648 |    * **Usage**
15649 |    *
15650 |    * An example of dumping the entire accessibility tree:
15651 |    *
15652 |    * ```js
15653 |    * const snapshot = await page.accessibility.snapshot();
15654 |    * console.log(snapshot);
15655 |    * ```
15656 |    *
15657 |    * An example of logging the focused node's name:
15658 |    *
15659 |    * ```js
15660 |    * const snapshot = await page.accessibility.snapshot();
15661 |    * const node = findFocusedNode(snapshot);
15662 |    * console.log(node && node.name);
15663 |    *
15664 |    * function findFocusedNode(node) {
15665 |    *   if (node.focused)
15666 |    *     return node;
15667 |    *   for (const child of node.children || []) {
15668 |    *     const foundNode = findFocusedNode(child);
15669 |    *     if (foundNode)
15670 |    *       return foundNode;
15671 |    *   }
15672 |    *   return null;
15673 |    * }
15674 |    * ```
15675 |    *
15676 |    * @deprecated This method is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test
15677 |    * page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with
15678 |    * Axe.
15679 |    * @param options
15680 |    */
15681 |   snapshot(options?: AccessibilitySnapshotOptions): Promise<null|AccessibilityNode>;
15682 | 
15683 | }
15684 | 
15685 | type AccessibilityNode = {
15686 |   role: string;
15687 |   name: string;
15688 |   value?: string|number;
15689 |   description?: string;
15690 |   keyshortcuts?: string;
15691 |   roledescription?: string;
15692 |   valuetext?: string;
15693 |   disabled?: boolean;
15694 |   expanded?: boolean;
15695 |   focused?: boolean;
15696 |   modal?: boolean;
15697 |   multiline?: boolean;
15698 |   multiselectable?: boolean;
15699 |   readonly?: boolean;
15700 |   required?: boolean;
15701 |   selected?: boolean;
15702 |   checked?: boolean|"mixed";
15703 |   pressed?: boolean|"mixed";
15704 |   level?: number;
15705 |   valuemin?: number;
15706 |   valuemax?: number;
15707 |   autocomplete?: string;
15708 |   haspopup?: string;
15709 |   invalid?: string;
15710 |   orientation?: string;
15711 |   children?: AccessibilityNode[];
15712 | }
15713 | 
15714 | export const devices: Devices;
15715 | 
15716 | //@ts-ignore this will be any if electron is not installed
15717 | type ElectronType = typeof import('electron');
15718 | 
15719 | /**
15720 |  * Electron application representation. You can use
15721 |  * [electron.launch([options])](https://playwright.dev/docs/api/class-electron#electron-launch) to obtain the
15722 |  * application instance. This instance you can control main electron process as well as work with Electron windows:
15723 |  *
15724 |  * ```js
15725 |  * const { _electron: electron } = require('playwright');
15726 |  *
15727 |  * (async () => {
15728 |  *   // Launch Electron app.
15729 |  *   const electronApp = await electron.launch({ args: ['main.js'] });
15730 |  *
15731 |  *   // Evaluation expression in the Electron context.
15732 |  *   const appPath = await electronApp.evaluate(async ({ app }) => {
15733 |  *     // This runs in the main Electron process, parameter here is always
15734 |  *     // the result of the require('electron') in the main app script.
15735 |  *     return app.getAppPath();
15736 |  *   });
15737 |  *   console.log(appPath);
15738 |  *
15739 |  *   // Get the first window that the app opens, wait if necessary.
15740 |  *   const window = await electronApp.firstWindow();
15741 |  *   // Print the title.
15742 |  *   console.log(await window.title());
15743 |  *   // Capture a screenshot.
15744 |  *   await window.screenshot({ path: 'intro.png' });
15745 |  *   // Direct Electron console to Node terminal.
15746 |  *   window.on('console', console.log);
15747 |  *   // Click button.
15748 |  *   await window.click('text=Click me');
15749 |  *   // Exit app.
15750 |  *   await electronApp.close();
15751 |  * })();
15752 |  * ```
15753 |  *
15754 |  */
15755 | export interface ElectronApplication {
15756 |   /**
15757 |    * Returns the return value of
15758 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15759 |    *
15760 |    * If the function passed to the
15761 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15762 |    * returns a [Promise], then
15763 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15764 |    * would wait for the promise to resolve and return its value.
15765 |    *
15766 |    * If the function passed to the
15767 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15768 |    * returns a non-[Serializable] value, then
15769 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15770 |    * returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
15771 |    * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
15772 |    * @param pageFunction Function to be evaluated in the main Electron process.
15773 |    * @param arg Optional argument to pass to
15774 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15775 |    */
15776 |   evaluate<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<R>;
15777 |   /**
15778 |    * Returns the return value of
15779 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15780 |    *
15781 |    * If the function passed to the
15782 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15783 |    * returns a [Promise], then
15784 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15785 |    * would wait for the promise to resolve and return its value.
15786 |    *
15787 |    * If the function passed to the
15788 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15789 |    * returns a non-[Serializable] value, then
15790 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15791 |    * returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
15792 |    * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
15793 |    * @param pageFunction Function to be evaluated in the main Electron process.
15794 |    * @param arg Optional argument to pass to
15795 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15796 |    */
15797 |   evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
15798 | 
15799 |   /**
15800 |    * Returns the return value of
15801 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
15802 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15803 |    *
15804 |    * The only difference between
15805 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15806 |    * and
15807 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15808 |    * is that
15809 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15810 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15811 |    *
15812 |    * If the function passed to the
15813 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15814 |    * returns a [Promise], then
15815 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15816 |    * would wait for the promise to resolve and return its value.
15817 |    * @param pageFunction Function to be evaluated in the main Electron process.
15818 |    * @param arg Optional argument to pass to
15819 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
15820 |    */
15821 |   evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
15822 |   /**
15823 |    * Returns the return value of
15824 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
15825 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15826 |    *
15827 |    * The only difference between
15828 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15829 |    * and
15830 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15831 |    * is that
15832 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15833 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15834 |    *
15835 |    * If the function passed to the
15836 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15837 |    * returns a [Promise], then
15838 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15839 |    * would wait for the promise to resolve and return its value.
15840 |    * @param pageFunction Function to be evaluated in the main Electron process.
15841 |    * @param arg Optional argument to pass to
15842 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
15843 |    */
15844 |   evaluateHandle<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<SmartHandle<R>>;
15845 |   /**
15846 |    * This event is issued when the application process has been terminated.
15847 |    */
15848 |   on(event: 'close', listener: () => any): this;
15849 | 
15850 |   /**
15851 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
15852 |    * `console.dir`.
15853 |    *
15854 |    * The arguments passed into `console.log` are available on the
15855 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
15856 |    *
15857 |    * **Usage**
15858 |    *
15859 |    * ```js
15860 |    * electronApp.on('console', async msg => {
15861 |    *   const values = [];
15862 |    *   for (const arg of msg.args())
15863 |    *     values.push(await arg.jsonValue());
15864 |    *   console.log(...values);
15865 |    * });
15866 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
15867 |    * ```
15868 |    *
15869 |    */
15870 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15871 | 
15872 |   /**
15873 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
15874 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
15875 |    */
15876 |   on(event: 'window', listener: (page: Page) => any): this;
15877 | 
15878 |   /**
15879 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15880 |    */
15881 |   once(event: 'close', listener: () => any): this;
15882 | 
15883 |   /**
15884 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15885 |    */
15886 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15887 | 
15888 |   /**
15889 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15890 |    */
15891 |   once(event: 'window', listener: (page: Page) => any): this;
15892 | 
15893 |   /**
15894 |    * This event is issued when the application process has been terminated.
15895 |    */
15896 |   addListener(event: 'close', listener: () => any): this;
15897 | 
15898 |   /**
15899 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
15900 |    * `console.dir`.
15901 |    *
15902 |    * The arguments passed into `console.log` are available on the
15903 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
15904 |    *
15905 |    * **Usage**
15906 |    *
15907 |    * ```js
15908 |    * electronApp.on('console', async msg => {
15909 |    *   const values = [];
15910 |    *   for (const arg of msg.args())
15911 |    *     values.push(await arg.jsonValue());
15912 |    *   console.log(...values);
15913 |    * });
15914 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
15915 |    * ```
15916 |    *
15917 |    */
15918 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15919 | 
15920 |   /**
15921 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
15922 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
15923 |    */
15924 |   addListener(event: 'window', listener: (page: Page) => any): this;
15925 | 
15926 |   /**
15927 |    * Removes an event listener added by `on` or `addListener`.
15928 |    */
15929 |   removeListener(event: 'close', listener: () => any): this;
15930 | 
15931 |   /**
15932 |    * Removes an event listener added by `on` or `addListener`.
15933 |    */
15934 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15935 | 
15936 |   /**
15937 |    * Removes an event listener added by `on` or `addListener`.
15938 |    */
15939 |   removeListener(event: 'window', listener: (page: Page) => any): this;
15940 | 
15941 |   /**
15942 |    * Removes an event listener added by `on` or `addListener`.
15943 |    */
15944 |   off(event: 'close', listener: () => any): this;
15945 | 
15946 |   /**
15947 |    * Removes an event listener added by `on` or `addListener`.
15948 |    */
15949 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15950 | 
15951 |   /**
15952 |    * Removes an event listener added by `on` or `addListener`.
15953 |    */
15954 |   off(event: 'window', listener: (page: Page) => any): this;
15955 | 
15956 |   /**
15957 |    * This event is issued when the application process has been terminated.
15958 |    */
15959 |   prependListener(event: 'close', listener: () => any): this;
15960 | 
15961 |   /**
15962 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
15963 |    * `console.dir`.
15964 |    *
15965 |    * The arguments passed into `console.log` are available on the
15966 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
15967 |    *
15968 |    * **Usage**
15969 |    *
15970 |    * ```js
15971 |    * electronApp.on('console', async msg => {
15972 |    *   const values = [];
15973 |    *   for (const arg of msg.args())
15974 |    *     values.push(await arg.jsonValue());
15975 |    *   console.log(...values);
15976 |    * });
15977 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
15978 |    * ```
15979 |    *
15980 |    */
15981 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15982 | 
15983 |   /**
15984 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
15985 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
15986 |    */
15987 |   prependListener(event: 'window', listener: (page: Page) => any): this;
15988 | 
15989 |   /**
15990 |    * Returns the BrowserWindow object that corresponds to the given Playwright page.
15991 |    * @param page Page to retrieve the window for.
15992 |    */
15993 |   browserWindow(page: Page): Promise<JSHandle>;
15994 | 
15995 |   /**
15996 |    * Closes Electron application.
15997 |    */
15998 |   close(): Promise<void>;
15999 | 
16000 |   /**
16001 |    * This method returns browser context that can be used for setting up context-wide routing, etc.
16002 |    */
16003 |   context(): BrowserContext;
16004 | 
16005 |   /**
16006 |    * Convenience method that waits for the first application window to be opened.
16007 |    *
16008 |    * **Usage**
16009 |    *
16010 |    * ```js
16011 |    * const electronApp = await electron.launch({
16012 |    *   args: ['main.js']
16013 |    * });
16014 |    * const window = await electronApp.firstWindow();
16015 |    * // ...
16016 |    * ```
16017 |    *
16018 |    * @param options
16019 |    */
16020 |   firstWindow(options?: {
16021 |     /**
16022 |      * Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
16023 |      * default value can be changed by using the
16024 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout).
16025 |      */
16026 |     timeout?: number;
16027 |   }): Promise<Page>;
16028 | 
16029 |   /**
16030 |    * Returns the main process for this Electron Application.
16031 |    */
16032 |   process(): ChildProcess;
16033 | 
16034 |   /**
16035 |    * This event is issued when the application process has been terminated.
16036 |    */
16037 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: () => boolean | Promise<boolean>, timeout?: number } | (() => boolean | Promise<boolean>)): Promise<void>;
16038 | 
16039 |   /**
16040 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
16041 |    * `console.dir`.
16042 |    *
16043 |    * The arguments passed into `console.log` are available on the
16044 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
16045 |    *
16046 |    * **Usage**
16047 |    *
16048 |    * ```js
16049 |    * electronApp.on('console', async msg => {
16050 |    *   const values = [];
16051 |    *   for (const arg of msg.args())
16052 |    *     values.push(await arg.jsonValue());
16053 |    *   console.log(...values);
16054 |    * });
16055 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
16056 |    * ```
16057 |    *
16058 |    */
16059 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
16060 | 
16061 |   /**
16062 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
16063 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
16064 |    */
16065 |   waitForEvent(event: 'window', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
16066 | 
16067 | 
16068 |   /**
16069 |    * Convenience method that returns all the opened windows.
16070 |    */
16071 |   windows(): Array<Page>;
16072 | 
16073 |   [Symbol.asyncDispose](): Promise<void>;
16074 | }
16075 | 
16076 | export type AndroidElementInfo = {
16077 |   clazz: string;
16078 |   desc: string;
16079 |   res: string;
16080 |   pkg: string;
16081 |   text: string;
16082 |   bounds: { x: number, y: number, width: number, height: number };
16083 |   checkable: boolean;
16084 |   checked: boolean;
16085 |   clickable: boolean;
16086 |   enabled: boolean;
16087 |   focusable: boolean;
16088 |   focused: boolean;
16089 |   longClickable: boolean;
16090 |   scrollable: boolean;
16091 |   selected: boolean;
16092 | };
16093 | 
16094 | export type AndroidSelector = {
16095 |   checkable?: boolean,
16096 |   checked?: boolean,
16097 |   clazz?: string | RegExp,
16098 |   clickable?: boolean,
16099 |   depth?: number,
16100 |   desc?: string | RegExp,
16101 |   enabled?: boolean,
16102 |   focusable?: boolean,
16103 |   focused?: boolean,
16104 |   hasChild?: { selector: AndroidSelector },
16105 |   hasDescendant?: { selector: AndroidSelector, maxDepth?: number },
16106 |   longClickable?: boolean,
16107 |   pkg?: string | RegExp,
16108 |   res?: string | RegExp,
16109 |   scrollable?: boolean,
16110 |   selected?: boolean,
16111 |   text?: string | RegExp,
16112 | };
16113 | 
16114 | export type AndroidKey =
16115 |   'Unknown' |
16116 |   'SoftLeft' | 'SoftRight' |
16117 |   'Home' |
16118 |   'Back' |
16119 |   'Call' | 'EndCall' |
16120 |   '0' |  '1' |  '2' |  '3' |  '4' |  '5' |  '6' |  '7' |  '8' |  '9' |
16121 |   'Star' | 'Pound' | '*' | '#' |
16122 |   'DialUp' | 'DialDown' | 'DialLeft' | 'DialRight' | 'DialCenter' |
16123 |   'VolumeUp' | 'VolumeDown' |
16124 |   'ChannelUp' | 'ChannelDown' |
16125 |   'Power' |
16126 |   'Camera' |
16127 |   'Clear' |
16128 |   'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' |
16129 |   'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' |
16130 |   'Comma' | ',' |
16131 |   'Period' | '.' |
16132 |   'AltLeft' | 'AltRight' |
16133 |   'ShiftLeft' | 'ShiftRight' |
16134 |   'Tab' | '\t' |
16135 |   'Space' | ' ' |
16136 |   'Sym' |
16137 |   'Explorer' |
16138 |   'Envelop' |
16139 |   'Enter' | '\n' |
16140 |   'Del' |
16141 |   'Grave' |
16142 |   'Minus' | '-' |
16143 |   'Equals' | '=' |
16144 |   'LeftBracket' | '(' |
16145 |   'RightBracket' | ')' |
16146 |   'Backslash' | '\\' |
16147 |   'Semicolon' | ';' |
16148 |   'Apostrophe' | '`' |
16149 |   'Slash' | '/' |
16150 |   'At' | '@' |
16151 |   'Num' |
16152 |   'HeadsetHook' |
16153 |   'Focus' |
16154 |   'Plus' | '+' |
16155 |   'Menu' |
16156 |   'Notification' |
16157 |   'Search' |
16158 |   'RecentApps' |
16159 |   'AppSwitch' |
16160 |   'Assist' |
16161 |   'Cut' |
16162 |   'Copy' |
16163 |   'Paste';
16164 | 
16165 | export const _electron: Electron;
16166 | export const _android: Android;
16167 | export const _bidiChromium: BrowserType;
16168 | export const _bidiFirefox: BrowserType;
16169 | 
16170 | // This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
16171 | export {};
16172 | 
16173 | 
16174 | /**
16175 |  * Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android
16176 |  * WebView.
16177 |  *
16178 |  * *Requirements*
16179 |  * - Android device or AVD Emulator.
16180 |  * - [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device.
16181 |  *   Typically running `adb devices` is all you need to do.
16182 |  * - [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the
16183 |  *   device
16184 |  * - "Enable command line on non-rooted devices" enabled in `chrome://flags`.
16185 |  *
16186 |  * *Known limitations*
16187 |  * - Raw USB operation is not yet supported, so you need ADB.
16188 |  * - Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help.
16189 |  * - We didn't run all the tests against the device, so not everything works.
16190 |  *
16191 |  * *How to run*
16192 |  *
16193 |  * An example of the Android automation script would be:
16194 |  *
16195 |  * ```js
16196 |  * const { _android: android } = require('playwright');
16197 |  *
16198 |  * (async () => {
16199 |  *   // Connect to the device.
16200 |  *   const [device] = await android.devices();
16201 |  *   console.log(`Model: ${device.model()}`);
16202 |  *   console.log(`Serial: ${device.serial()}`);
16203 |  *   // Take screenshot of the whole device.
16204 |  *   await device.screenshot({ path: 'device.png' });
16205 |  *
16206 |  *   {
16207 |  *     // --------------------- WebView -----------------------
16208 |  *
16209 |  *     // Launch an application with WebView.
16210 |  *     await device.shell('am force-stop org.chromium.webview_shell');
16211 |  *     await device.shell('am start org.chromium.webview_shell/.WebViewBrowserActivity');
16212 |  *     // Get the WebView.
16213 |  *     const webview = await device.webView({ pkg: 'org.chromium.webview_shell' });
16214 |  *
16215 |  *     // Fill the input box.
16216 |  *     await device.fill({
16217 |  *       res: 'org.chromium.webview_shell:id/url_field',
16218 |  *     }, 'github.com/microsoft/playwright');
16219 |  *     await device.press({
16220 |  *       res: 'org.chromium.webview_shell:id/url_field',
16221 |  *     }, 'Enter');
16222 |  *
16223 |  *     // Work with WebView's page as usual.
16224 |  *     const page = await webview.page();
16225 |  *     await page.waitForNavigation({ url: /.*microsoft\/playwright.*\/ });
16226 |  *     console.log(await page.title());
16227 |  *   }
16228 |  *
16229 |  *   {
16230 |  *     // --------------------- Browser -----------------------
16231 |  *
16232 |  *     // Launch Chrome browser.
16233 |  *     await device.shell('am force-stop com.android.chrome');
16234 |  *     const context = await device.launchBrowser();
16235 |  *
16236 |  *     // Use BrowserContext as usual.
16237 |  *     const page = await context.newPage();
16238 |  *     await page.goto('https://webkit.org/');
16239 |  *     console.log(await page.evaluate(() => window.location.href));
16240 |  *     await page.screenshot({ path: 'page.png' });
16241 |  *
16242 |  *     await context.close();
16243 |  *   }
16244 |  *
16245 |  *   // Close the device.
16246 |  *   await device.close();
16247 |  * })();
16248 |  * ```
16249 |  *
16250 |  */
16251 | export interface Android {
16252 |   /**
16253 |    * This methods attaches Playwright to an existing Android device. Use
16254 |    * [android.launchServer([options])](https://playwright.dev/docs/api/class-android#android-launch-server) to launch a
16255 |    * new Android server instance.
16256 |    * @param wsEndpoint A browser websocket endpoint to connect to.
16257 |    * @param options
16258 |    */
16259 |   connect(wsEndpoint: string, options?: {
16260 |     /**
16261 |      * Additional HTTP headers to be sent with web socket connect request. Optional.
16262 |      */
16263 |     headers?: { [key: string]: string; };
16264 | 
16265 |     /**
16266 |      * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
16267 |      * on. Defaults to `0`.
16268 |      */
16269 |     slowMo?: number;
16270 | 
16271 |     /**
16272 |      * Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass
16273 |      * `0` to disable timeout.
16274 |      */
16275 |     timeout?: number;
16276 |   }): Promise<AndroidDevice>;
16277 | 
16278 |   /**
16279 |    * Returns the list of detected Android devices.
16280 |    * @param options
16281 |    */
16282 |   devices(options?: {
16283 |     /**
16284 |      * Optional host to establish ADB server connection. Default to `127.0.0.1`.
16285 |      */
16286 |     host?: string;
16287 | 
16288 |     /**
16289 |      * Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
16290 |      */
16291 |     omitDriverInstall?: boolean;
16292 | 
16293 |     /**
16294 |      * Optional port to establish ADB server connection. Default to `5037`.
16295 |      */
16296 |     port?: number;
16297 |   }): Promise<Array<AndroidDevice>>;
16298 | 
16299 |   /**
16300 |    * Launches Playwright Android server that clients can connect to. See the following example:
16301 |    *
16302 |    * **Usage**
16303 |    *
16304 |    * Server Side:
16305 |    *
16306 |    * ```js
16307 |    * const { _android } = require('playwright');
16308 |    *
16309 |    * (async () => {
16310 |    *   const browserServer = await _android.launchServer({
16311 |    *     // If you have multiple devices connected and want to use a specific one.
16312 |    *     // deviceSerialNumber: '<deviceSerialNumber>',
16313 |    *   });
16314 |    *   const wsEndpoint = browserServer.wsEndpoint();
16315 |    *   console.log(wsEndpoint);
16316 |    * })();
16317 |    * ```
16318 |    *
16319 |    * Client Side:
16320 |    *
16321 |    * ```js
16322 |    * const { _android } = require('playwright');
16323 |    *
16324 |    * (async () => {
16325 |    *   const device = await _android.connect('<wsEndpoint>');
16326 |    *
16327 |    *   console.log(device.model());
16328 |    *   console.log(device.serial());
16329 |    *   await device.shell('am force-stop com.android.chrome');
16330 |    *   const context = await device.launchBrowser();
16331 |    *
16332 |    *   const page = await context.newPage();
16333 |    *   await page.goto('https://webkit.org/');
16334 |    *   console.log(await page.evaluate(() => window.location.href));
16335 |    *   await page.screenshot({ path: 'page-chrome-1.png' });
16336 |    *
16337 |    *   await context.close();
16338 |    * })();
16339 |    * ```
16340 |    *
16341 |    * @param options
16342 |    */
16343 |   launchServer(options?: {
16344 |     /**
16345 |      * Optional host to establish ADB server connection. Default to `127.0.0.1`.
16346 |      */
16347 |     adbHost?: string;
16348 | 
16349 |     /**
16350 |      * Optional port to establish ADB server connection. Default to `5037`.
16351 |      */
16352 |     adbPort?: number;
16353 | 
16354 |     /**
16355 |      * Optional device serial number to launch the browser on. If not specified, it will throw if multiple devices are
16356 |      * connected.
16357 |      */
16358 |     deviceSerialNumber?: string;
16359 | 
16360 |     /**
16361 |      * Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the
16362 |      * unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider
16363 |      * hardening it with picking a specific interface.
16364 |      */
16365 |     host?: string;
16366 | 
16367 |     /**
16368 |      * Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
16369 |      */
16370 |     omitDriverInstall?: boolean;
16371 | 
16372 |     /**
16373 |      * Port to use for the web socket. Defaults to 0 that picks any available port.
16374 |      */
16375 |     port?: number;
16376 | 
16377 |     /**
16378 |      * Path at which to serve the Android Server. For security, this defaults to an unguessable string.
16379 |      *
16380 |      * **NOTE** Any process or web page (including those running in Playwright) with knowledge of the `wsPath` can take
16381 |      * control of the OS user. For this reason, you should use an unguessable token when using this option.
16382 |      *
16383 |      */
16384 |     wsPath?: string;
16385 |   }): Promise<BrowserServer>;
16386 | 
16387 |   /**
16388 |    * This setting will change the default maximum time for all the methods accepting
16389 |    * [`timeout`](https://playwright.dev/docs/api/class-android#android-set-default-timeout-option-timeout) option.
16390 |    * @param timeout Maximum time in milliseconds
16391 |    */
16392 |   setDefaultTimeout(timeout: number): void;
16393 | }
16394 | 
16395 | /**
16396 |  * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice) represents a connected device, either real
16397 |  * hardware or emulated. Devices can be obtained using
16398 |  * [android.devices([options])](https://playwright.dev/docs/api/class-android#android-devices).
16399 |  */
16400 | export interface AndroidDevice {
16401 |   /**
16402 |    * Emitted when the device connection gets closed.
16403 |    */
16404 |   on(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16405 | 
16406 |   /**
16407 |    * Emitted when a new WebView instance is detected.
16408 |    */
16409 |   on(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16410 | 
16411 |   /**
16412 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
16413 |    */
16414 |   once(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16415 | 
16416 |   /**
16417 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
16418 |    */
16419 |   once(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16420 | 
16421 |   /**
16422 |    * Emitted when the device connection gets closed.
16423 |    */
16424 |   addListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16425 | 
16426 |   /**
16427 |    * Emitted when a new WebView instance is detected.
16428 |    */
16429 |   addListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16430 | 
16431 |   /**
16432 |    * Removes an event listener added by `on` or `addListener`.
16433 |    */
16434 |   removeListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16435 | 
16436 |   /**
16437 |    * Removes an event listener added by `on` or `addListener`.
16438 |    */
16439 |   removeListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16440 | 
16441 |   /**
16442 |    * Removes an event listener added by `on` or `addListener`.
16443 |    */
16444 |   off(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16445 | 
16446 |   /**
16447 |    * Removes an event listener added by `on` or `addListener`.
16448 |    */
16449 |   off(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16450 | 
16451 |   /**
16452 |    * Emitted when the device connection gets closed.
16453 |    */
16454 |   prependListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16455 | 
16456 |   /**
16457 |    * Emitted when a new WebView instance is detected.
16458 |    */
16459 |   prependListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16460 | 
16461 |   /**
16462 |    * Disconnects from the device.
16463 |    */
16464 |   close(): Promise<void>;
16465 | 
16466 |   /**
16467 |    * Drags the widget defined by
16468 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-selector) towards
16469 |    * [`dest`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-dest) point.
16470 |    * @param selector Selector to drag.
16471 |    * @param dest Point to drag to.
16472 |    * @param options
16473 |    */
16474 |   drag(selector: AndroidSelector, dest: {
16475 |     x: number;
16476 | 
16477 |     y: number;
16478 |   }, options?: {
16479 |     /**
16480 |      * Optional speed of the drag in pixels per second.
16481 |      */
16482 |     speed?: number;
16483 | 
16484 |     /**
16485 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16486 |      * by using the
16487 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16488 |      * method.
16489 |      */
16490 |     timeout?: number;
16491 |   }): Promise<void>;
16492 | 
16493 |   /**
16494 |    * Fills the specific
16495 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-selector) input box
16496 |    * with [`text`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-text).
16497 |    * @param selector Selector to fill.
16498 |    * @param text Text to be filled in the input box.
16499 |    * @param options
16500 |    */
16501 |   fill(selector: AndroidSelector, text: string, options?: {
16502 |     /**
16503 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16504 |      * by using the
16505 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16506 |      * method.
16507 |      */
16508 |     timeout?: number;
16509 |   }): Promise<void>;
16510 | 
16511 |   /**
16512 |    * Flings the widget defined by
16513 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-selector) in  the
16514 |    * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-direction).
16515 |    * @param selector Selector to fling.
16516 |    * @param direction Fling direction.
16517 |    * @param options
16518 |    */
16519 |   fling(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", options?: {
16520 |     /**
16521 |      * Optional speed of the fling in pixels per second.
16522 |      */
16523 |     speed?: number;
16524 | 
16525 |     /**
16526 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16527 |      * by using the
16528 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16529 |      * method.
16530 |      */
16531 |     timeout?: number;
16532 |   }): Promise<void>;
16533 | 
16534 |   /**
16535 |    * Returns information about a widget defined by
16536 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-info-option-selector).
16537 |    * @param selector Selector to return information about.
16538 |    */
16539 |   info(selector: AndroidSelector): Promise<AndroidElementInfo>;
16540 | 
16541 |   /**
16542 |    * Installs an apk on the device.
16543 |    * @param file Either a path to the apk file, or apk file content.
16544 |    * @param options
16545 |    */
16546 |   installApk(file: string|Buffer, options?: {
16547 |     /**
16548 |      * Optional arguments to pass to the `shell:cmd package install` call. Defaults to `-r -t -S`.
16549 |      */
16550 |     args?: Array<string>;
16551 |   }): Promise<void>;
16552 | 
16553 |   /**
16554 |    * Launches Chrome browser on the device, and returns its persistent context.
16555 |    * @param options
16556 |    */
16557 |   launchBrowser(options?: {
16558 |     /**
16559 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
16560 |      */
16561 |     acceptDownloads?: boolean;
16562 | 
16563 |     /**
16564 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
16565 |      *
16566 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
16567 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
16568 |      */
16569 |     args?: Array<string>;
16570 | 
16571 |     /**
16572 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
16573 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
16574 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
16575 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
16576 |      * or
16577 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
16578 |      * it takes the base URL in consideration by using the
16579 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
16580 |      * Unset by default. Examples:
16581 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
16582 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
16583 |      *   `http://localhost:3000/foo/bar.html`
16584 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
16585 |      *   `http://localhost:3000/bar.html`
16586 |      */
16587 |     baseURL?: string;
16588 | 
16589 |     /**
16590 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
16591 |      */
16592 |     bypassCSP?: boolean;
16593 | 
16594 |     /**
16595 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
16596 |      * media feature, supported values are `'light'` and `'dark'`. See
16597 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16598 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
16599 |      */
16600 |     colorScheme?: null|"light"|"dark"|"no-preference";
16601 | 
16602 |     /**
16603 |      * Optional package name to launch instead of default Chrome for Android.
16604 |      */
16605 |     command?: string;
16606 | 
16607 |     /**
16608 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
16609 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
16610 |      */
16611 |     deviceScaleFactor?: number;
16612 | 
16613 |     /**
16614 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
16615 |      */
16616 |     extraHTTPHeaders?: { [key: string]: string; };
16617 | 
16618 |     /**
16619 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
16620 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16621 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
16622 |      */
16623 |     forcedColors?: null|"active"|"none";
16624 | 
16625 |     geolocation?: {
16626 |       /**
16627 |        * Latitude between -90 and 90.
16628 |        */
16629 |       latitude: number;
16630 | 
16631 |       /**
16632 |        * Longitude between -180 and 180.
16633 |        */
16634 |       longitude: number;
16635 | 
16636 |       /**
16637 |        * Non-negative accuracy value. Defaults to `0`.
16638 |        */
16639 |       accuracy?: number;
16640 |     };
16641 | 
16642 |     /**
16643 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
16644 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
16645 |      */
16646 |     hasTouch?: boolean;
16647 | 
16648 |     /**
16649 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
16650 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
16651 |      */
16652 |     httpCredentials?: {
16653 |       username: string;
16654 | 
16655 |       password: string;
16656 | 
16657 |       /**
16658 |        * Restrain sending http credentials on specific origin (scheme://host:port).
16659 |        */
16660 |       origin?: string;
16661 | 
16662 |       /**
16663 |        * This option only applies to the requests sent from corresponding
16664 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
16665 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
16666 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
16667 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
16668 |        */
16669 |       send?: "unauthorized"|"always";
16670 |     };
16671 | 
16672 |     /**
16673 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
16674 |      */
16675 |     ignoreHTTPSErrors?: boolean;
16676 | 
16677 |     /**
16678 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
16679 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
16680 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
16681 |      */
16682 |     isMobile?: boolean;
16683 | 
16684 |     /**
16685 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
16686 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
16687 |      */
16688 |     javaScriptEnabled?: boolean;
16689 | 
16690 |     /**
16691 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
16692 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
16693 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
16694 |      */
16695 |     locale?: string;
16696 | 
16697 |     /**
16698 |      * Logger sink for Playwright logging.
16699 |      */
16700 |     logger?: Logger;
16701 | 
16702 |     /**
16703 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
16704 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
16705 |      */
16706 |     offline?: boolean;
16707 | 
16708 |     /**
16709 |      * A list of permissions to grant to all pages in this context. See
16710 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
16711 |      * for more details. Defaults to none.
16712 |      */
16713 |     permissions?: Array<string>;
16714 | 
16715 |     /**
16716 |      * Network proxy settings.
16717 |      */
16718 |     proxy?: {
16719 |       /**
16720 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
16721 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
16722 |        */
16723 |       server: string;
16724 | 
16725 |       /**
16726 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
16727 |        */
16728 |       bypass?: string;
16729 | 
16730 |       /**
16731 |        * Optional username to use if HTTP proxy requires authentication.
16732 |        */
16733 |       username?: string;
16734 | 
16735 |       /**
16736 |        * Optional password to use if HTTP proxy requires authentication.
16737 |        */
16738 |       password?: string;
16739 |     };
16740 | 
16741 |     /**
16742 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
16743 |      * If not specified, the HAR is not recorded. Make sure to await
16744 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
16745 |      * the HAR to be saved.
16746 |      */
16747 |     recordHar?: {
16748 |       /**
16749 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
16750 |        * `content` policy instead.
16751 |        */
16752 |       omitContent?: boolean;
16753 | 
16754 |       /**
16755 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
16756 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
16757 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
16758 |        * files and to `embed` for all other file extensions.
16759 |        */
16760 |       content?: "omit"|"embed"|"attach";
16761 | 
16762 |       /**
16763 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
16764 |        * default.
16765 |        */
16766 |       path: string;
16767 | 
16768 |       /**
16769 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
16770 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
16771 |        */
16772 |       mode?: "full"|"minimal";
16773 | 
16774 |       /**
16775 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
16776 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
16777 |        * options was provided and the passed URL is a path, it gets merged via the
16778 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
16779 |        */
16780 |       urlFilter?: string|RegExp;
16781 |     };
16782 | 
16783 |     /**
16784 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
16785 |      * Make sure to await
16786 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
16787 |      * videos to be saved.
16788 |      */
16789 |     recordVideo?: {
16790 |       /**
16791 |        * Path to the directory to put videos into.
16792 |        */
16793 |       dir: string;
16794 | 
16795 |       /**
16796 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
16797 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
16798 |        * each page will be scaled down if necessary to fit the specified size.
16799 |        */
16800 |       size?: {
16801 |         /**
16802 |          * Video frame width.
16803 |          */
16804 |         width: number;
16805 | 
16806 |         /**
16807 |          * Video frame height.
16808 |          */
16809 |         height: number;
16810 |       };
16811 |     };
16812 | 
16813 |     /**
16814 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
16815 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16816 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
16817 |      */
16818 |     reducedMotion?: null|"reduce"|"no-preference";
16819 | 
16820 |     /**
16821 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
16822 |      * [`viewport`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-viewport) is
16823 |      * set.
16824 |      */
16825 |     screen?: {
16826 |       /**
16827 |        * page width in pixels.
16828 |        */
16829 |       width: number;
16830 | 
16831 |       /**
16832 |        * page height in pixels.
16833 |        */
16834 |       height: number;
16835 |     };
16836 | 
16837 |     /**
16838 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
16839 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
16840 |      *   registered.
16841 |      * - `'block'`: Playwright will block all registration of Service Workers.
16842 |      */
16843 |     serviceWorkers?: "allow"|"block";
16844 | 
16845 |     /**
16846 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
16847 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
16848 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
16849 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
16850 |      */
16851 |     strictSelectors?: boolean;
16852 | 
16853 |     /**
16854 |      * Changes the timezone of the context. See
16855 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
16856 |      * for a list of supported timezone IDs. Defaults to the system timezone.
16857 |      */
16858 |     timezoneId?: string;
16859 | 
16860 |     /**
16861 |      * Specific user agent to use in this context.
16862 |      */
16863 |     userAgent?: string;
16864 | 
16865 |     /**
16866 |      * @deprecated Use
16867 |      * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
16868 |      * instead.
16869 |      */
16870 |     videoSize?: {
16871 |       /**
16872 |        * Video frame width.
16873 |        */
16874 |       width: number;
16875 | 
16876 |       /**
16877 |        * Video frame height.
16878 |        */
16879 |       height: number;
16880 |     };
16881 | 
16882 |     /**
16883 |      * @deprecated Use
16884 |      * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
16885 |      * instead.
16886 |      */
16887 |     videosPath?: string;
16888 | 
16889 |     /**
16890 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
16891 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
16892 |      *
16893 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
16894 |      * by the operating system. It makes the execution of the tests non-deterministic.
16895 |      *
16896 |      */
16897 |     viewport?: null|{
16898 |       /**
16899 |        * page width in pixels.
16900 |        */
16901 |       width: number;
16902 | 
16903 |       /**
16904 |        * page height in pixels.
16905 |        */
16906 |       height: number;
16907 |     };
16908 |   }): Promise<BrowserContext>;
16909 | 
16910 |   /**
16911 |    * Performs a long tap on the widget defined by
16912 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-long-tap-option-selector).
16913 |    * @param selector Selector to tap on.
16914 |    * @param options
16915 |    */
16916 |   longTap(selector: AndroidSelector, options?: {
16917 |     /**
16918 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16919 |      * by using the
16920 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16921 |      * method.
16922 |      */
16923 |     timeout?: number;
16924 |   }): Promise<void>;
16925 | 
16926 |   /**
16927 |    * Device model.
16928 |    */
16929 |   model(): string;
16930 | 
16931 |   /**
16932 |    * Launches a process in the shell on the device and returns a socket to communicate with the launched process.
16933 |    * @param command Shell command to execute.
16934 |    */
16935 |   open(command: string): Promise<AndroidSocket>;
16936 | 
16937 |   /**
16938 |    * Pinches the widget defined by
16939 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-close-option-selector) in the
16940 |    * closing direction.
16941 |    * @param selector Selector to pinch close.
16942 |    * @param percent The size of the pinch as a percentage of the widget's size.
16943 |    * @param options
16944 |    */
16945 |   pinchClose(selector: AndroidSelector, percent: number, options?: {
16946 |     /**
16947 |      * Optional speed of the pinch in pixels per second.
16948 |      */
16949 |     speed?: number;
16950 | 
16951 |     /**
16952 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16953 |      * by using the
16954 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16955 |      * method.
16956 |      */
16957 |     timeout?: number;
16958 |   }): Promise<void>;
16959 | 
16960 |   /**
16961 |    * Pinches the widget defined by
16962 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-open-option-selector) in the
16963 |    * open direction.
16964 |    * @param selector Selector to pinch open.
16965 |    * @param percent The size of the pinch as a percentage of the widget's size.
16966 |    * @param options
16967 |    */
16968 |   pinchOpen(selector: AndroidSelector, percent: number, options?: {
16969 |     /**
16970 |      * Optional speed of the pinch in pixels per second.
16971 |      */
16972 |     speed?: number;
16973 | 
16974 |     /**
16975 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16976 |      * by using the
16977 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16978 |      * method.
16979 |      */
16980 |     timeout?: number;
16981 |   }): Promise<void>;
16982 | 
16983 |   /**
16984 |    * Presses the specific [`key`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-key)
16985 |    * in the widget defined by
16986 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-selector).
16987 |    * @param selector Selector to press the key in.
16988 |    * @param key The key to press.
16989 |    * @param options
16990 |    */
16991 |   press(selector: AndroidSelector, key: AndroidKey, options?: {
16992 |     /**
16993 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16994 |      * by using the
16995 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16996 |      * method.
16997 |      */
16998 |     timeout?: number;
16999 |   }): Promise<void>;
17000 | 
17001 |   /**
17002 |    * Copies a file to the device.
17003 |    * @param file Either a path to the file, or file content.
17004 |    * @param path Path to the file on the device.
17005 |    * @param options
17006 |    */
17007 |   push(file: string|Buffer, path: string, options?: {
17008 |     /**
17009 |      * Optional file mode, defaults to `644` (`rw-r--r--`).
17010 |      */
17011 |     mode?: number;
17012 |   }): Promise<void>;
17013 | 
17014 |   /**
17015 |    * Returns the buffer with the captured screenshot of the device.
17016 |    * @param options
17017 |    */
17018 |   screenshot(options?: {
17019 |     /**
17020 |      * The file path to save the image to. If
17021 |      * [`path`](https://playwright.dev/docs/api/class-androiddevice#android-device-screenshot-option-path) is a relative
17022 |      * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
17023 |      * saved to the disk.
17024 |      */
17025 |     path?: string;
17026 |   }): Promise<Buffer>;
17027 | 
17028 |   /**
17029 |    * Scrolls the widget defined by
17030 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-selector) in  the
17031 |    * specified
17032 |    * [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-direction).
17033 |    * @param selector Selector to scroll.
17034 |    * @param direction Scroll direction.
17035 |    * @param percent Distance to scroll as a percentage of the widget's size.
17036 |    * @param options
17037 |    */
17038 |   scroll(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", percent: number, options?: {
17039 |     /**
17040 |      * Optional speed of the scroll in pixels per second.
17041 |      */
17042 |     speed?: number;
17043 | 
17044 |     /**
17045 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17046 |      * by using the
17047 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17048 |      * method.
17049 |      */
17050 |     timeout?: number;
17051 |   }): Promise<void>;
17052 | 
17053 |   /**
17054 |    * Device serial number.
17055 |    */
17056 |   serial(): string;
17057 | 
17058 |   /**
17059 |    * This setting will change the default maximum time for all the methods accepting
17060 |    * [`timeout`](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout-option-timeout)
17061 |    * option.
17062 |    * @param timeout Maximum time in milliseconds
17063 |    */
17064 |   setDefaultTimeout(timeout: number): void;
17065 | 
17066 |   /**
17067 |    * Executes a shell command on the device and returns its output.
17068 |    * @param command Shell command to execute.
17069 |    */
17070 |   shell(command: string): Promise<Buffer>;
17071 | 
17072 |   /**
17073 |    * Swipes the widget defined by
17074 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-selector) in  the
17075 |    * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-direction).
17076 |    * @param selector Selector to swipe.
17077 |    * @param direction Swipe direction.
17078 |    * @param percent Distance to swipe as a percentage of the widget's size.
17079 |    * @param options
17080 |    */
17081 |   swipe(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", percent: number, options?: {
17082 |     /**
17083 |      * Optional speed of the swipe in pixels per second.
17084 |      */
17085 |     speed?: number;
17086 | 
17087 |     /**
17088 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17089 |      * by using the
17090 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17091 |      * method.
17092 |      */
17093 |     timeout?: number;
17094 |   }): Promise<void>;
17095 | 
17096 |   /**
17097 |    * Taps on the widget defined by
17098 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-tap-option-selector).
17099 |    * @param selector Selector to tap on.
17100 |    * @param options
17101 |    */
17102 |   tap(selector: AndroidSelector, options?: {
17103 |     /**
17104 |      * Optional duration of the tap in milliseconds.
17105 |      */
17106 |     duration?: number;
17107 | 
17108 |     /**
17109 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17110 |      * by using the
17111 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17112 |      * method.
17113 |      */
17114 |     timeout?: number;
17115 |   }): Promise<void>;
17116 | 
17117 |   /**
17118 |    * Waits for the specific
17119 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-selector) to either
17120 |    * appear or disappear, depending on the
17121 |    * [`state`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-state).
17122 |    * @param selector Selector to wait for.
17123 |    * @param options
17124 |    */
17125 |   wait(selector: AndroidSelector, options?: {
17126 |     /**
17127 |      * Optional state. Can be either:
17128 |      * - default - wait for element to be present.
17129 |      * - `'gone'` - wait for element to not be present.
17130 |      */
17131 |     state?: "gone";
17132 | 
17133 |     /**
17134 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17135 |      * by using the
17136 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17137 |      * method.
17138 |      */
17139 |     timeout?: number;
17140 |   }): Promise<void>;
17141 | 
17142 |   /**
17143 |    * Emitted when the device connection gets closed.
17144 |    */
17145 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (androidDevice: AndroidDevice) => boolean | Promise<boolean>, timeout?: number } | ((androidDevice: AndroidDevice) => boolean | Promise<boolean>)): Promise<AndroidDevice>;
17146 | 
17147 |   /**
17148 |    * Emitted when a new WebView instance is detected.
17149 |    */
17150 |   waitForEvent(event: 'webview', optionsOrPredicate?: { predicate?: (androidWebView: AndroidWebView) => boolean | Promise<boolean>, timeout?: number } | ((androidWebView: AndroidWebView) => boolean | Promise<boolean>)): Promise<AndroidWebView>;
17151 | 
17152 | 
17153 |   /**
17154 |    * This method waits until [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) matching the
17155 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector) is opened
17156 |    * and returns it. If there is already an open [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview)
17157 |    * matching the
17158 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector), returns
17159 |    * immediately.
17160 |    * @param selector
17161 |    * @param options
17162 |    */
17163 |   webView(selector: {
17164 |     /**
17165 |      * Optional Package identifier.
17166 |      */
17167 |     pkg?: string;
17168 | 
17169 |     /**
17170 |      * Optional webview socket name.
17171 |      */
17172 |     socketName?: string;
17173 |   }, options?: {
17174 |     /**
17175 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17176 |      * by using the
17177 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17178 |      * method.
17179 |      */
17180 |     timeout?: number;
17181 |   }): Promise<AndroidWebView>;
17182 | 
17183 |   /**
17184 |    * Currently open WebViews.
17185 |    */
17186 |   webViews(): Array<AndroidWebView>;
17187 | 
17188 |   input: AndroidInput;
17189 | 
17190 |   [Symbol.asyncDispose](): Promise<void>;
17191 | }
17192 | 
17193 | export interface AndroidInput {
17194 |   /**
17195 |    * Performs a drag between [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-from)
17196 |    * and [`to`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-to) points.
17197 |    * @param from The start point of the drag.
17198 |    * @param to The end point of the drag.
17199 |    * @param steps The number of steps in the drag. Each step takes 5 milliseconds to complete.
17200 |    */
17201 |   drag(from: {
17202 |     x: number;
17203 | 
17204 |     y: number;
17205 |   }, to: {
17206 |     x: number;
17207 | 
17208 |     y: number;
17209 |   }, steps: number): Promise<void>;
17210 | 
17211 |   /**
17212 |    * Presses the [`key`](https://playwright.dev/docs/api/class-androidinput#android-input-press-option-key).
17213 |    * @param key Key to press.
17214 |    */
17215 |   press(key: AndroidKey): Promise<void>;
17216 | 
17217 |   /**
17218 |    * Swipes following the path defined by
17219 |    * [`segments`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-segments).
17220 |    * @param from The point to start swiping from.
17221 |    * @param segments Points following the [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-from)
17222 |    * point in the swipe gesture.
17223 |    * @param steps The number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second
17224 |    * per each segment.
17225 |    */
17226 |   swipe(from: {
17227 |     x: number;
17228 | 
17229 |     y: number;
17230 |   }, segments: ReadonlyArray<{
17231 |     x: number;
17232 | 
17233 |     y: number;
17234 |   }>, steps: number): Promise<void>;
17235 | 
17236 |   /**
17237 |    * Taps at the specified [`point`](https://playwright.dev/docs/api/class-androidinput#android-input-tap-option-point).
17238 |    * @param point The point to tap at.
17239 |    */
17240 |   tap(point: {
17241 |     x: number;
17242 | 
17243 |     y: number;
17244 |   }): Promise<void>;
17245 | 
17246 |   /**
17247 |    * Types [`text`](https://playwright.dev/docs/api/class-androidinput#android-input-type-option-text) into currently
17248 |    * focused widget.
17249 |    * @param text Text to type.
17250 |    */
17251 |   type(text: string): Promise<void>;
17252 | }
17253 | 
17254 | /**
17255 |  * [AndroidSocket](https://playwright.dev/docs/api/class-androidsocket) is a way to communicate with a process
17256 |  * launched on the [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). Use
17257 |  * [androidDevice.open(command)](https://playwright.dev/docs/api/class-androiddevice#android-device-open) to open a
17258 |  * socket.
17259 |  */
17260 | export interface AndroidSocket {
17261 |   /**
17262 |    * Emitted when the socket is closed.
17263 |    */
17264 |   on(event: 'close', listener: () => any): this;
17265 | 
17266 |   /**
17267 |    * Emitted when data is available to read from the socket.
17268 |    */
17269 |   on(event: 'data', listener: (buffer: Buffer) => any): this;
17270 | 
17271 |   /**
17272 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17273 |    */
17274 |   once(event: 'close', listener: () => any): this;
17275 | 
17276 |   /**
17277 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17278 |    */
17279 |   once(event: 'data', listener: (buffer: Buffer) => any): this;
17280 | 
17281 |   /**
17282 |    * Emitted when the socket is closed.
17283 |    */
17284 |   addListener(event: 'close', listener: () => any): this;
17285 | 
17286 |   /**
17287 |    * Emitted when data is available to read from the socket.
17288 |    */
17289 |   addListener(event: 'data', listener: (buffer: Buffer) => any): this;
17290 | 
17291 |   /**
17292 |    * Removes an event listener added by `on` or `addListener`.
17293 |    */
17294 |   removeListener(event: 'close', listener: () => any): this;
17295 | 
17296 |   /**
17297 |    * Removes an event listener added by `on` or `addListener`.
17298 |    */
17299 |   removeListener(event: 'data', listener: (buffer: Buffer) => any): this;
17300 | 
17301 |   /**
17302 |    * Removes an event listener added by `on` or `addListener`.
17303 |    */
17304 |   off(event: 'close', listener: () => any): this;
17305 | 
17306 |   /**
17307 |    * Removes an event listener added by `on` or `addListener`.
17308 |    */
17309 |   off(event: 'data', listener: (buffer: Buffer) => any): this;
17310 | 
17311 |   /**
17312 |    * Emitted when the socket is closed.
17313 |    */
17314 |   prependListener(event: 'close', listener: () => any): this;
17315 | 
17316 |   /**
17317 |    * Emitted when data is available to read from the socket.
17318 |    */
17319 |   prependListener(event: 'data', listener: (buffer: Buffer) => any): this;
17320 | 
17321 |   /**
17322 |    * Closes the socket.
17323 |    */
17324 |   close(): Promise<void>;
17325 | 
17326 |   /**
17327 |    * Writes some [`data`](https://playwright.dev/docs/api/class-androidsocket#android-socket-write-option-data) to the
17328 |    * socket.
17329 |    * @param data Data to write.
17330 |    */
17331 |   write(data: Buffer): Promise<void>;
17332 | 
17333 |   [Symbol.asyncDispose](): Promise<void>;
17334 | }
17335 | 
17336 | /**
17337 |  * [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) represents a WebView open on the
17338 |  * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). WebView is usually obtained using
17339 |  * [androidDevice.webView(selector[, options])](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view).
17340 |  */
17341 | export interface AndroidWebView {
17342 |   /**
17343 |    * Emitted when the WebView is closed.
17344 |    */
17345 |   on(event: 'close', listener: () => any): this;
17346 | 
17347 |   /**
17348 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17349 |    */
17350 |   once(event: 'close', listener: () => any): this;
17351 | 
17352 |   /**
17353 |    * Emitted when the WebView is closed.
17354 |    */
17355 |   addListener(event: 'close', listener: () => any): this;
17356 | 
17357 |   /**
17358 |    * Removes an event listener added by `on` or `addListener`.
17359 |    */
17360 |   removeListener(event: 'close', listener: () => any): this;
17361 | 
17362 |   /**
17363 |    * Removes an event listener added by `on` or `addListener`.
17364 |    */
17365 |   off(event: 'close', listener: () => any): this;
17366 | 
17367 |   /**
17368 |    * Emitted when the WebView is closed.
17369 |    */
17370 |   prependListener(event: 'close', listener: () => any): this;
17371 | 
17372 |   /**
17373 |    * Connects to the WebView and returns a regular Playwright [Page](https://playwright.dev/docs/api/class-page) to
17374 |    * interact with.
17375 |    */
17376 |   page(): Promise<Page>;
17377 | 
17378 |   /**
17379 |    * WebView process PID.
17380 |    */
17381 |   pid(): number;
17382 | 
17383 |   /**
17384 |    * WebView package identifier.
17385 |    */
17386 |   pkg(): string;
17387 | }
17388 | 
17389 | /**
17390 |  * Exposes API that can be used for the Web API testing. This class is used for creating
17391 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which in turn can be used for
17392 |  * sending web requests. An instance of this class can be obtained via
17393 |  * [playwright.request](https://playwright.dev/docs/api/class-playwright#playwright-request). For more information see
17394 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
17395 |  */
17396 | export interface APIRequest {
17397 |   /**
17398 |    * Creates new instances of [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
17399 |    * @param options
17400 |    */
17401 |   newContext(options?: {
17402 |     /**
17403 |      * Methods like
17404 |      * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
17405 |      * take the base URL into consideration by using the
17406 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
17407 |      * Examples:
17408 |      * - baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
17409 |      * - baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in
17410 |      *   `http://localhost:3000/foo/bar.html`
17411 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
17412 |      *   `http://localhost:3000/bar.html`
17413 |      */
17414 |     baseURL?: string;
17415 | 
17416 |     /**
17417 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
17418 |      *
17419 |      * **Details**
17420 |      *
17421 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
17422 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
17423 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
17424 |      * with an exact match to the request origin that the certificate is valid for.
17425 |      *
17426 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
17427 |      * work by replacing `localhost` with `local.playwright`.
17428 |      *
17429 |      */
17430 |     clientCertificates?: Array<{
17431 |       /**
17432 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
17433 |        */
17434 |       origin: string;
17435 | 
17436 |       /**
17437 |        * Path to the file with the certificate in PEM format.
17438 |        */
17439 |       certPath?: string;
17440 | 
17441 |       /**
17442 |        * Direct value of the certificate in PEM format.
17443 |        */
17444 |       cert?: Buffer;
17445 | 
17446 |       /**
17447 |        * Path to the file with the private key in PEM format.
17448 |        */
17449 |       keyPath?: string;
17450 | 
17451 |       /**
17452 |        * Direct value of the private key in PEM format.
17453 |        */
17454 |       key?: Buffer;
17455 | 
17456 |       /**
17457 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
17458 |        */
17459 |       pfxPath?: string;
17460 | 
17461 |       /**
17462 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
17463 |        */
17464 |       pfx?: Buffer;
17465 | 
17466 |       /**
17467 |        * Passphrase for the private key (PEM or PFX).
17468 |        */
17469 |       passphrase?: string;
17470 |     }>;
17471 | 
17472 |     /**
17473 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
17474 |      */
17475 |     extraHTTPHeaders?: { [key: string]: string; };
17476 | 
17477 |     /**
17478 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
17479 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
17480 |      */
17481 |     httpCredentials?: {
17482 |       username: string;
17483 | 
17484 |       password: string;
17485 | 
17486 |       /**
17487 |        * Restrain sending http credentials on specific origin (scheme://host:port).
17488 |        */
17489 |       origin?: string;
17490 | 
17491 |       /**
17492 |        * This option only applies to the requests sent from corresponding
17493 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
17494 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
17495 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
17496 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
17497 |        */
17498 |       send?: "unauthorized"|"always";
17499 |     };
17500 | 
17501 |     /**
17502 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17503 |      */
17504 |     ignoreHTTPSErrors?: boolean;
17505 | 
17506 |     /**
17507 |      * Network proxy settings.
17508 |      */
17509 |     proxy?: {
17510 |       /**
17511 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
17512 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
17513 |        */
17514 |       server: string;
17515 | 
17516 |       /**
17517 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
17518 |        */
17519 |       bypass?: string;
17520 | 
17521 |       /**
17522 |        * Optional username to use if HTTP proxy requires authentication.
17523 |        */
17524 |       username?: string;
17525 | 
17526 |       /**
17527 |        * Optional password to use if HTTP proxy requires authentication.
17528 |        */
17529 |       password?: string;
17530 |     };
17531 | 
17532 |     /**
17533 |      * Populates context with given storage state. This option can be used to initialize context with logged-in
17534 |      * information obtained via
17535 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)
17536 |      * or
17537 |      * [apiRequestContext.storageState([options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state).
17538 |      * Either a path to the file with saved storage, or the value returned by one of
17539 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)
17540 |      * or
17541 |      * [apiRequestContext.storageState([options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state)
17542 |      * methods.
17543 |      */
17544 |     storageState?: string|{
17545 |       cookies: Array<{
17546 |         name: string;
17547 | 
17548 |         value: string;
17549 | 
17550 |         domain: string;
17551 | 
17552 |         path: string;
17553 | 
17554 |         /**
17555 |          * Unix time in seconds.
17556 |          */
17557 |         expires: number;
17558 | 
17559 |         httpOnly: boolean;
17560 | 
17561 |         secure: boolean;
17562 | 
17563 |         sameSite: "Strict"|"Lax"|"None";
17564 |       }>;
17565 | 
17566 |       origins: Array<{
17567 |         origin: string;
17568 | 
17569 |         localStorage: Array<{
17570 |           name: string;
17571 | 
17572 |           value: string;
17573 |         }>;
17574 |       }>;
17575 |     };
17576 | 
17577 |     /**
17578 |      * Maximum time in milliseconds to wait for the response. Defaults to `30000` (30 seconds). Pass `0` to disable
17579 |      * timeout.
17580 |      */
17581 |     timeout?: number;
17582 | 
17583 |     /**
17584 |      * Specific user agent to use in this context.
17585 |      */
17586 |     userAgent?: string;
17587 |   }): Promise<APIRequestContext>;
17588 | }
17589 | 
17590 | /**
17591 |  * This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services,
17592 |  * prepare environment or the service to your e2e test.
17593 |  *
17594 |  * Each Playwright browser context has associated with it
17595 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which shares cookie storage
17596 |  * with the browser context and can be accessed via
17597 |  * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) or
17598 |  * [page.request](https://playwright.dev/docs/api/class-page#page-request). It is also possible to create a new
17599 |  * APIRequestContext instance manually by calling
17600 |  * [apiRequest.newContext([options])](https://playwright.dev/docs/api/class-apirequest#api-request-new-context).
17601 |  *
17602 |  * **Cookie management**
17603 |  *
17604 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) returned by
17605 |  * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) and
17606 |  * [page.request](https://playwright.dev/docs/api/class-page#page-request) shares cookie storage with the
17607 |  * corresponding [BrowserContext](https://playwright.dev/docs/api/class-browsercontext). Each API request will have
17608 |  * `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie`
17609 |  * header it will automatically update [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) cookies
17610 |  * and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will
17611 |  * be logged in and vice versa.
17612 |  *
17613 |  * If you want API requests to not interfere with the browser cookies you should create a new
17614 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) by calling
17615 |  * [apiRequest.newContext([options])](https://playwright.dev/docs/api/class-apirequest#api-request-new-context). Such
17616 |  * `APIRequestContext` object will have its own isolated cookie storage.
17617 |  */
17618 | export interface APIRequestContext {
17619 |   /**
17620 |    * Sends HTTP(S) [DELETE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request and returns its
17621 |    * response. The method will populate request cookies from the context and update context cookies from the response.
17622 |    * The method will automatically follow redirects.
17623 |    * @param url Target URL.
17624 |    * @param options
17625 |    */
17626 |   delete(url: string, options?: {
17627 |     /**
17628 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17629 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17630 |      * header will be set to `application/octet-stream` if not explicitly set.
17631 |      */
17632 |     data?: string|Buffer|Serializable;
17633 | 
17634 |     /**
17635 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17636 |      * codes.
17637 |      */
17638 |     failOnStatusCode?: boolean;
17639 | 
17640 |     /**
17641 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17642 |      * as this request body. If this parameter is specified `content-type` header will be set to
17643 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17644 |      */
17645 |     form?: { [key: string]: string|number|boolean; }|FormData;
17646 | 
17647 |     /**
17648 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17649 |      * it.
17650 |      */
17651 |     headers?: { [key: string]: string; };
17652 | 
17653 |     /**
17654 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17655 |      */
17656 |     ignoreHTTPSErrors?: boolean;
17657 | 
17658 |     /**
17659 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17660 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17661 |      */
17662 |     maxRedirects?: number;
17663 | 
17664 |     /**
17665 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
17666 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
17667 |      */
17668 |     maxRetries?: number;
17669 | 
17670 |     /**
17671 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
17672 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
17673 |      * explicitly provided. File values can be passed either as
17674 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
17675 |      * name, mime-type and its content.
17676 |      */
17677 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
17678 |       /**
17679 |        * File name
17680 |        */
17681 |       name: string;
17682 | 
17683 |       /**
17684 |        * File type
17685 |        */
17686 |       mimeType: string;
17687 | 
17688 |       /**
17689 |        * File content
17690 |        */
17691 |       buffer: Buffer;
17692 |     }; };
17693 | 
17694 |     /**
17695 |      * Query parameters to be sent with the URL.
17696 |      */
17697 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17698 | 
17699 |     /**
17700 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17701 |      */
17702 |     timeout?: number;
17703 |   }): Promise<APIResponse>;
17704 | 
17705 |   /**
17706 |    * All responses returned by
17707 |    * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
17708 |    * and similar methods are stored in the memory, so that you can later call
17709 |    * [apiResponse.body()](https://playwright.dev/docs/api/class-apiresponse#api-response-body).This method discards all
17710 |    * its resources, calling any method on disposed
17711 |    * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) will throw an exception.
17712 |    * @param options
17713 |    */
17714 |   dispose(options?: {
17715 |     /**
17716 |      * The reason to be reported to the operations interrupted by the context disposal.
17717 |      */
17718 |     reason?: string;
17719 |   }): Promise<void>;
17720 | 
17721 |   /**
17722 |    * Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and
17723 |    * update context cookies from the response. The method will automatically follow redirects.
17724 |    *
17725 |    * **Usage**
17726 |    *
17727 |    * JSON objects can be passed directly to the request:
17728 |    *
17729 |    * ```js
17730 |    * await request.fetch('https://example.com/api/createBook', {
17731 |    *   method: 'post',
17732 |    *   data: {
17733 |    *     title: 'Book Title',
17734 |    *     author: 'John Doe',
17735 |    *   }
17736 |    * });
17737 |    * ```
17738 |    *
17739 |    * The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
17740 |    * encoding, by specifiying the `multipart` parameter:
17741 |    *
17742 |    * ```js
17743 |    * const form = new FormData();
17744 |    * form.set('name', 'John');
17745 |    * form.append('name', 'Doe');
17746 |    * // Send two file fields with the same name.
17747 |    * form.append('file', new File(['console.log(2024);'], 'f1.js', { type: 'text/javascript' }));
17748 |    * form.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));
17749 |    * await request.fetch('https://example.com/api/uploadForm', {
17750 |    *   multipart: form
17751 |    * });
17752 |    * ```
17753 |    *
17754 |    * @param urlOrRequest Target URL or Request to get all parameters from.
17755 |    * @param options
17756 |    */
17757 |   fetch(urlOrRequest: string|Request, options?: {
17758 |     /**
17759 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17760 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17761 |      * header will be set to `application/octet-stream` if not explicitly set.
17762 |      */
17763 |     data?: string|Buffer|Serializable;
17764 | 
17765 |     /**
17766 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17767 |      * codes.
17768 |      */
17769 |     failOnStatusCode?: boolean;
17770 | 
17771 |     /**
17772 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17773 |      * as this request body. If this parameter is specified `content-type` header will be set to
17774 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17775 |      */
17776 |     form?: { [key: string]: string|number|boolean; }|FormData;
17777 | 
17778 |     /**
17779 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17780 |      * it.
17781 |      */
17782 |     headers?: { [key: string]: string; };
17783 | 
17784 |     /**
17785 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17786 |      */
17787 |     ignoreHTTPSErrors?: boolean;
17788 | 
17789 |     /**
17790 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17791 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17792 |      */
17793 |     maxRedirects?: number;
17794 | 
17795 |     /**
17796 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
17797 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
17798 |      */
17799 |     maxRetries?: number;
17800 | 
17801 |     /**
17802 |      * If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or
17803 |      * [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)). If not specified, GET method is used.
17804 |      */
17805 |     method?: string;
17806 | 
17807 |     /**
17808 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
17809 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
17810 |      * explicitly provided. File values can be passed either as
17811 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
17812 |      * name, mime-type and its content.
17813 |      */
17814 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
17815 |       /**
17816 |        * File name
17817 |        */
17818 |       name: string;
17819 | 
17820 |       /**
17821 |        * File type
17822 |        */
17823 |       mimeType: string;
17824 | 
17825 |       /**
17826 |        * File content
17827 |        */
17828 |       buffer: Buffer;
17829 |     }; };
17830 | 
17831 |     /**
17832 |      * Query parameters to be sent with the URL.
17833 |      */
17834 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17835 | 
17836 |     /**
17837 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17838 |      */
17839 |     timeout?: number;
17840 |   }): Promise<APIResponse>;
17841 | 
17842 |   /**
17843 |    * Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request and returns its
17844 |    * response. The method will populate request cookies from the context and update context cookies from the response.
17845 |    * The method will automatically follow redirects.
17846 |    *
17847 |    * **Usage**
17848 |    *
17849 |    * Request parameters can be configured with `params` option, they will be serialized into the URL search parameters:
17850 |    *
17851 |    * ```js
17852 |    * // Passing params as object
17853 |    * await request.get('https://example.com/api/getText', {
17854 |    *   params: {
17855 |    *     'isbn': '1234',
17856 |    *     'page': 23,
17857 |    *   }
17858 |    * });
17859 |    *
17860 |    * // Passing params as URLSearchParams
17861 |    * const searchParams = new URLSearchParams();
17862 |    * searchParams.set('isbn', '1234');
17863 |    * searchParams.append('page', 23);
17864 |    * searchParams.append('page', 24);
17865 |    * await request.get('https://example.com/api/getText', { params: searchParams });
17866 |    *
17867 |    * // Passing params as string
17868 |    * const queryString = 'isbn=1234&page=23&page=24';
17869 |    * await request.get('https://example.com/api/getText', { params: queryString });
17870 |    * ```
17871 |    *
17872 |    * @param url Target URL.
17873 |    * @param options
17874 |    */
17875 |   get(url: string, options?: {
17876 |     /**
17877 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17878 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17879 |      * header will be set to `application/octet-stream` if not explicitly set.
17880 |      */
17881 |     data?: string|Buffer|Serializable;
17882 | 
17883 |     /**
17884 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17885 |      * codes.
17886 |      */
17887 |     failOnStatusCode?: boolean;
17888 | 
17889 |     /**
17890 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17891 |      * as this request body. If this parameter is specified `content-type` header will be set to
17892 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17893 |      */
17894 |     form?: { [key: string]: string|number|boolean; }|FormData;
17895 | 
17896 |     /**
17897 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17898 |      * it.
17899 |      */
17900 |     headers?: { [key: string]: string; };
17901 | 
17902 |     /**
17903 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17904 |      */
17905 |     ignoreHTTPSErrors?: boolean;
17906 | 
17907 |     /**
17908 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17909 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17910 |      */
17911 |     maxRedirects?: number;
17912 | 
17913 |     /**
17914 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
17915 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
17916 |      */
17917 |     maxRetries?: number;
17918 | 
17919 |     /**
17920 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
17921 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
17922 |      * explicitly provided. File values can be passed either as
17923 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
17924 |      * name, mime-type and its content.
17925 |      */
17926 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
17927 |       /**
17928 |        * File name
17929 |        */
17930 |       name: string;
17931 | 
17932 |       /**
17933 |        * File type
17934 |        */
17935 |       mimeType: string;
17936 | 
17937 |       /**
17938 |        * File content
17939 |        */
17940 |       buffer: Buffer;
17941 |     }; };
17942 | 
17943 |     /**
17944 |      * Query parameters to be sent with the URL.
17945 |      */
17946 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17947 | 
17948 |     /**
17949 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17950 |      */
17951 |     timeout?: number;
17952 |   }): Promise<APIResponse>;
17953 | 
17954 |   /**
17955 |    * Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) request and returns its
17956 |    * response. The method will populate request cookies from the context and update context cookies from the response.
17957 |    * The method will automatically follow redirects.
17958 |    * @param url Target URL.
17959 |    * @param options
17960 |    */
17961 |   head(url: string, options?: {
17962 |     /**
17963 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17964 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17965 |      * header will be set to `application/octet-stream` if not explicitly set.
17966 |      */
17967 |     data?: string|Buffer|Serializable;
17968 | 
17969 |     /**
17970 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17971 |      * codes.
17972 |      */
17973 |     failOnStatusCode?: boolean;
17974 | 
17975 |     /**
17976 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17977 |      * as this request body. If this parameter is specified `content-type` header will be set to
17978 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17979 |      */
17980 |     form?: { [key: string]: string|number|boolean; }|FormData;
17981 | 
17982 |     /**
17983 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17984 |      * it.
17985 |      */
17986 |     headers?: { [key: string]: string; };
17987 | 
17988 |     /**
17989 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17990 |      */
17991 |     ignoreHTTPSErrors?: boolean;
17992 | 
17993 |     /**
17994 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17995 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17996 |      */
17997 |     maxRedirects?: number;
17998 | 
17999 |     /**
18000 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18001 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18002 |      */
18003 |     maxRetries?: number;
18004 | 
18005 |     /**
18006 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18007 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18008 |      * explicitly provided. File values can be passed either as
18009 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18010 |      * name, mime-type and its content.
18011 |      */
18012 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18013 |       /**
18014 |        * File name
18015 |        */
18016 |       name: string;
18017 | 
18018 |       /**
18019 |        * File type
18020 |        */
18021 |       mimeType: string;
18022 | 
18023 |       /**
18024 |        * File content
18025 |        */
18026 |       buffer: Buffer;
18027 |     }; };
18028 | 
18029 |     /**
18030 |      * Query parameters to be sent with the URL.
18031 |      */
18032 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18033 | 
18034 |     /**
18035 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18036 |      */
18037 |     timeout?: number;
18038 |   }): Promise<APIResponse>;
18039 | 
18040 |   /**
18041 |    * Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) request and returns its
18042 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18043 |    * The method will automatically follow redirects.
18044 |    * @param url Target URL.
18045 |    * @param options
18046 |    */
18047 |   patch(url: string, options?: {
18048 |     /**
18049 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18050 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18051 |      * header will be set to `application/octet-stream` if not explicitly set.
18052 |      */
18053 |     data?: string|Buffer|Serializable;
18054 | 
18055 |     /**
18056 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18057 |      * codes.
18058 |      */
18059 |     failOnStatusCode?: boolean;
18060 | 
18061 |     /**
18062 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18063 |      * as this request body. If this parameter is specified `content-type` header will be set to
18064 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18065 |      */
18066 |     form?: { [key: string]: string|number|boolean; }|FormData;
18067 | 
18068 |     /**
18069 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18070 |      * it.
18071 |      */
18072 |     headers?: { [key: string]: string; };
18073 | 
18074 |     /**
18075 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18076 |      */
18077 |     ignoreHTTPSErrors?: boolean;
18078 | 
18079 |     /**
18080 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18081 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18082 |      */
18083 |     maxRedirects?: number;
18084 | 
18085 |     /**
18086 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18087 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18088 |      */
18089 |     maxRetries?: number;
18090 | 
18091 |     /**
18092 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18093 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18094 |      * explicitly provided. File values can be passed either as
18095 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18096 |      * name, mime-type and its content.
18097 |      */
18098 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18099 |       /**
18100 |        * File name
18101 |        */
18102 |       name: string;
18103 | 
18104 |       /**
18105 |        * File type
18106 |        */
18107 |       mimeType: string;
18108 | 
18109 |       /**
18110 |        * File content
18111 |        */
18112 |       buffer: Buffer;
18113 |     }; };
18114 | 
18115 |     /**
18116 |      * Query parameters to be sent with the URL.
18117 |      */
18118 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18119 | 
18120 |     /**
18121 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18122 |      */
18123 |     timeout?: number;
18124 |   }): Promise<APIResponse>;
18125 | 
18126 |   /**
18127 |    * Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request and returns its
18128 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18129 |    * The method will automatically follow redirects.
18130 |    *
18131 |    * **Usage**
18132 |    *
18133 |    * JSON objects can be passed directly to the request:
18134 |    *
18135 |    * ```js
18136 |    * await request.post('https://example.com/api/createBook', {
18137 |    *   data: {
18138 |    *     title: 'Book Title',
18139 |    *     author: 'John Doe',
18140 |    *   }
18141 |    * });
18142 |    * ```
18143 |    *
18144 |    * To send form data to the server use `form` option. Its value will be encoded into the request body with
18145 |    * `application/x-www-form-urlencoded` encoding (see below how to use `multipart/form-data` form encoding to send
18146 |    * files):
18147 |    *
18148 |    * ```js
18149 |    * await request.post('https://example.com/api/findBook', {
18150 |    *   form: {
18151 |    *     title: 'Book Title',
18152 |    *     author: 'John Doe',
18153 |    *   }
18154 |    * });
18155 |    * ```
18156 |    *
18157 |    * The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
18158 |    * encoding. Use [FormData] to construct request body and pass it to the request as `multipart` parameter:
18159 |    *
18160 |    * ```js
18161 |    * const form = new FormData();
18162 |    * form.set('name', 'John');
18163 |    * form.append('name', 'Doe');
18164 |    * // Send two file fields with the same name.
18165 |    * form.append('file', new File(['console.log(2024);'], 'f1.js', { type: 'text/javascript' }));
18166 |    * form.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));
18167 |    * await request.post('https://example.com/api/uploadForm', {
18168 |    *   multipart: form
18169 |    * });
18170 |    * ```
18171 |    *
18172 |    * @param url Target URL.
18173 |    * @param options
18174 |    */
18175 |   post(url: string, options?: {
18176 |     /**
18177 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18178 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18179 |      * header will be set to `application/octet-stream` if not explicitly set.
18180 |      */
18181 |     data?: string|Buffer|Serializable;
18182 | 
18183 |     /**
18184 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18185 |      * codes.
18186 |      */
18187 |     failOnStatusCode?: boolean;
18188 | 
18189 |     /**
18190 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18191 |      * as this request body. If this parameter is specified `content-type` header will be set to
18192 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18193 |      */
18194 |     form?: { [key: string]: string|number|boolean; }|FormData;
18195 | 
18196 |     /**
18197 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18198 |      * it.
18199 |      */
18200 |     headers?: { [key: string]: string; };
18201 | 
18202 |     /**
18203 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18204 |      */
18205 |     ignoreHTTPSErrors?: boolean;
18206 | 
18207 |     /**
18208 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18209 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18210 |      */
18211 |     maxRedirects?: number;
18212 | 
18213 |     /**
18214 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18215 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18216 |      */
18217 |     maxRetries?: number;
18218 | 
18219 |     /**
18220 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18221 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18222 |      * explicitly provided. File values can be passed either as
18223 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18224 |      * name, mime-type and its content.
18225 |      */
18226 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18227 |       /**
18228 |        * File name
18229 |        */
18230 |       name: string;
18231 | 
18232 |       /**
18233 |        * File type
18234 |        */
18235 |       mimeType: string;
18236 | 
18237 |       /**
18238 |        * File content
18239 |        */
18240 |       buffer: Buffer;
18241 |     }; };
18242 | 
18243 |     /**
18244 |      * Query parameters to be sent with the URL.
18245 |      */
18246 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18247 | 
18248 |     /**
18249 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18250 |      */
18251 |     timeout?: number;
18252 |   }): Promise<APIResponse>;
18253 | 
18254 |   /**
18255 |    * Sends HTTP(S) [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) request and returns its
18256 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18257 |    * The method will automatically follow redirects.
18258 |    * @param url Target URL.
18259 |    * @param options
18260 |    */
18261 |   put(url: string, options?: {
18262 |     /**
18263 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18264 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18265 |      * header will be set to `application/octet-stream` if not explicitly set.
18266 |      */
18267 |     data?: string|Buffer|Serializable;
18268 | 
18269 |     /**
18270 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18271 |      * codes.
18272 |      */
18273 |     failOnStatusCode?: boolean;
18274 | 
18275 |     /**
18276 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18277 |      * as this request body. If this parameter is specified `content-type` header will be set to
18278 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18279 |      */
18280 |     form?: { [key: string]: string|number|boolean; }|FormData;
18281 | 
18282 |     /**
18283 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18284 |      * it.
18285 |      */
18286 |     headers?: { [key: string]: string; };
18287 | 
18288 |     /**
18289 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18290 |      */
18291 |     ignoreHTTPSErrors?: boolean;
18292 | 
18293 |     /**
18294 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18295 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18296 |      */
18297 |     maxRedirects?: number;
18298 | 
18299 |     /**
18300 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18301 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18302 |      */
18303 |     maxRetries?: number;
18304 | 
18305 |     /**
18306 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18307 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18308 |      * explicitly provided. File values can be passed either as
18309 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18310 |      * name, mime-type and its content.
18311 |      */
18312 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18313 |       /**
18314 |        * File name
18315 |        */
18316 |       name: string;
18317 | 
18318 |       /**
18319 |        * File type
18320 |        */
18321 |       mimeType: string;
18322 | 
18323 |       /**
18324 |        * File content
18325 |        */
18326 |       buffer: Buffer;
18327 |     }; };
18328 | 
18329 |     /**
18330 |      * Query parameters to be sent with the URL.
18331 |      */
18332 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18333 | 
18334 |     /**
18335 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18336 |      */
18337 |     timeout?: number;
18338 |   }): Promise<APIResponse>;
18339 | 
18340 |   /**
18341 |    * Returns storage state for this request context, contains current cookies and local storage snapshot if it was
18342 |    * passed to the constructor.
18343 |    * @param options
18344 |    */
18345 |   storageState(options?: {
18346 |     /**
18347 |      * The file path to save the storage state to. If
18348 |      * [`path`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state-option-path) is
18349 |      * a relative path, then it is resolved relative to current working directory. If no path is provided, storage state
18350 |      * is still returned, but won't be saved to the disk.
18351 |      */
18352 |     path?: string;
18353 |   }): Promise<{
18354 |     cookies: Array<{
18355 |       name: string;
18356 | 
18357 |       value: string;
18358 | 
18359 |       domain: string;
18360 | 
18361 |       path: string;
18362 | 
18363 |       /**
18364 |        * Unix time in seconds.
18365 |        */
18366 |       expires: number;
18367 | 
18368 |       httpOnly: boolean;
18369 | 
18370 |       secure: boolean;
18371 | 
18372 |       sameSite: "Strict"|"Lax"|"None";
18373 |     }>;
18374 | 
18375 |     origins: Array<{
18376 |       origin: string;
18377 | 
18378 |       localStorage: Array<{
18379 |         name: string;
18380 | 
18381 |         value: string;
18382 |       }>;
18383 |     }>;
18384 |   }>;
18385 | 
18386 |   [Symbol.asyncDispose](): Promise<void>;
18387 | }
18388 | 
18389 | /**
18390 |  * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) class represents responses returned by
18391 |  * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
18392 |  * and similar methods.
18393 |  */
18394 | export interface APIResponse {
18395 |   /**
18396 |    * Returns the buffer with response body.
18397 |    */
18398 |   body(): Promise<Buffer>;
18399 | 
18400 |   /**
18401 |    * Disposes the body of this response. If not called then the body will stay in memory until the context closes.
18402 |    */
18403 |   dispose(): Promise<void>;
18404 | 
18405 |   /**
18406 |    * An object with all the response HTTP headers associated with this response.
18407 |    */
18408 |   headers(): { [key: string]: string; };
18409 | 
18410 |   /**
18411 |    * An array with all the response HTTP headers associated with this response. Header names are not lower-cased.
18412 |    * Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
18413 |    */
18414 |   headersArray(): Array<{
18415 |     /**
18416 |      * Name of the header.
18417 |      */
18418 |     name: string;
18419 | 
18420 |     /**
18421 |      * Value of the header.
18422 |      */
18423 |     value: string;
18424 |   }>;
18425 | 
18426 |   /**
18427 |    * Returns the JSON representation of response body.
18428 |    *
18429 |    * This method will throw if the response body is not parsable via `JSON.parse`.
18430 |    */
18431 |   json(): Promise<Serializable>;
18432 | 
18433 |   /**
18434 |    * Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
18435 |    */
18436 |   ok(): boolean;
18437 | 
18438 |   /**
18439 |    * Contains the status code of the response (e.g., 200 for a success).
18440 |    */
18441 |   status(): number;
18442 | 
18443 |   /**
18444 |    * Contains the status text of the response (e.g. usually an "OK" for a success).
18445 |    */
18446 |   statusText(): string;
18447 | 
18448 |   /**
18449 |    * Returns the text representation of response body.
18450 |    */
18451 |   text(): Promise<string>;
18452 | 
18453 |   /**
18454 |    * Contains the URL of the response.
18455 |    */
18456 |   url(): string;
18457 | 
18458 |   [Symbol.asyncDispose](): Promise<void>;
18459 | }
18460 | 
18461 | export interface BrowserServer {
18462 |   /**
18463 |    * Emitted when the browser server closes.
18464 |    */
18465 |   on(event: 'close', listener: () => any): this;
18466 | 
18467 |   /**
18468 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
18469 |    */
18470 |   once(event: 'close', listener: () => any): this;
18471 | 
18472 |   /**
18473 |    * Emitted when the browser server closes.
18474 |    */
18475 |   addListener(event: 'close', listener: () => any): this;
18476 | 
18477 |   /**
18478 |    * Removes an event listener added by `on` or `addListener`.
18479 |    */
18480 |   removeListener(event: 'close', listener: () => any): this;
18481 | 
18482 |   /**
18483 |    * Removes an event listener added by `on` or `addListener`.
18484 |    */
18485 |   off(event: 'close', listener: () => any): this;
18486 | 
18487 |   /**
18488 |    * Emitted when the browser server closes.
18489 |    */
18490 |   prependListener(event: 'close', listener: () => any): this;
18491 | 
18492 |   /**
18493 |    * Closes the browser gracefully and makes sure the process is terminated.
18494 |    */
18495 |   close(): Promise<void>;
18496 | 
18497 |   /**
18498 |    * Kills the browser process and waits for the process to exit.
18499 |    */
18500 |   kill(): Promise<void>;
18501 | 
18502 |   /**
18503 |    * Spawned browser application process.
18504 |    */
18505 |   process(): ChildProcess;
18506 | 
18507 |   /**
18508 |    * Browser websocket url.
18509 |    *
18510 |    * Browser websocket endpoint which can be used as an argument to
18511 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect)
18512 |    * to establish connection to the browser.
18513 |    *
18514 |    * Note that if the listen `host` option in `launchServer` options is not specified, localhost will be output anyway,
18515 |    * even if the actual listening address is an unspecified address.
18516 |    */
18517 |   wsEndpoint(): string;
18518 | 
18519 |   [Symbol.asyncDispose](): Promise<void>;
18520 | }
18521 | 
18522 | /**
18523 |  * Accurately simulating time-dependent behavior is essential for verifying the correctness of applications. Learn
18524 |  * more about [clock emulation](https://playwright.dev/docs/clock).
18525 |  *
18526 |  * Note that clock is installed for the entire [BrowserContext](https://playwright.dev/docs/api/class-browsercontext),
18527 |  * so the time in all the pages and iframes is controlled by the same clock.
18528 |  */
18529 | export interface Clock {
18530 |   /**
18531 |    * Advance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user
18532 |    * closing the laptop lid for a while and reopening it later, after given time.
18533 |    *
18534 |    * **Usage**
18535 |    *
18536 |    * ```js
18537 |    * await page.clock.fastForward(1000);
18538 |    * await page.clock.fastForward('30:00');
18539 |    * ```
18540 |    *
18541 |    * @param ticks Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
18542 |    * "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
18543 |    */
18544 |   fastForward(ticks: number|string): Promise<void>;
18545 | 
18546 |   /**
18547 |    * Install fake implementations for the following time-related functions:
18548 |    * - `Date`
18549 |    * - `setTimeout`
18550 |    * - `clearTimeout`
18551 |    * - `setInterval`
18552 |    * - `clearInterval`
18553 |    * - `requestAnimationFrame`
18554 |    * - `cancelAnimationFrame`
18555 |    * - `requestIdleCallback`
18556 |    * - `cancelIdleCallback`
18557 |    * - `performance`
18558 |    *
18559 |    * Fake timers are used to manually control the flow of time in tests. They allow you to advance time, fire timers,
18560 |    * and control the behavior of time-dependent functions. See
18561 |    * [clock.runFor(ticks)](https://playwright.dev/docs/api/class-clock#clock-run-for) and
18562 |    * [clock.fastForward(ticks)](https://playwright.dev/docs/api/class-clock#clock-fast-forward) for more information.
18563 |    * @param options
18564 |    */
18565 |   install(options?: {
18566 |     /**
18567 |      * Time to initialize with, current system time by default.
18568 |      */
18569 |     time?: number|string|Date;
18570 |   }): Promise<void>;
18571 | 
18572 |   /**
18573 |    * Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired
18574 |    * unless [clock.runFor(ticks)](https://playwright.dev/docs/api/class-clock#clock-run-for),
18575 |    * [clock.fastForward(ticks)](https://playwright.dev/docs/api/class-clock#clock-fast-forward),
18576 |    * [clock.pauseAt(time)](https://playwright.dev/docs/api/class-clock#clock-pause-at) or
18577 |    * [clock.resume()](https://playwright.dev/docs/api/class-clock#clock-resume) is called.
18578 |    *
18579 |    * Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it
18580 |    * at the specified time and pausing.
18581 |    *
18582 |    * **Usage**
18583 |    *
18584 |    * ```js
18585 |    * await page.clock.pauseAt(new Date('2020-02-02'));
18586 |    * await page.clock.pauseAt('2020-02-02');
18587 |    * ```
18588 |    *
18589 |    * @param time Time to pause at.
18590 |    */
18591 |   pauseAt(time: number|string|Date): Promise<void>;
18592 | 
18593 |   /**
18594 |    * Resumes timers. Once this method is called, time resumes flowing, timers are fired as usual.
18595 |    */
18596 |   resume(): Promise<void>;
18597 | 
18598 |   /**
18599 |    * Advance the clock, firing all the time-related callbacks.
18600 |    *
18601 |    * **Usage**
18602 |    *
18603 |    * ```js
18604 |    * await page.clock.runFor(1000);
18605 |    * await page.clock.runFor('30:00');
18606 |    * ```
18607 |    *
18608 |    * @param ticks Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
18609 |    * "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
18610 |    */
18611 |   runFor(ticks: number|string): Promise<void>;
18612 | 
18613 |   /**
18614 |    * Makes `Date.now` and `new Date()` return fixed fake time at all times, keeps all the timers running.
18615 |    *
18616 |    * Use this method for simple scenarios where you only need to test with a predefined time. For more advanced
18617 |    * scenarios, use [clock.install([options])](https://playwright.dev/docs/api/class-clock#clock-install) instead. Read
18618 |    * docs on [clock emulation](https://playwright.dev/docs/clock) to learn more.
18619 |    *
18620 |    * **Usage**
18621 |    *
18622 |    * ```js
18623 |    * await page.clock.setFixedTime(Date.now());
18624 |    * await page.clock.setFixedTime(new Date('2020-02-02'));
18625 |    * await page.clock.setFixedTime('2020-02-02');
18626 |    * ```
18627 |    *
18628 |    * @param time Time to be set in milliseconds.
18629 |    */
18630 |   setFixedTime(time: number|string|Date): Promise<void>;
18631 | 
18632 |   /**
18633 |    * Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for
18634 |    * example switching from summer to winter time, or changing time zones.
18635 |    *
18636 |    * **Usage**
18637 |    *
18638 |    * ```js
18639 |    * await page.clock.setSystemTime(Date.now());
18640 |    * await page.clock.setSystemTime(new Date('2020-02-02'));
18641 |    * await page.clock.setSystemTime('2020-02-02');
18642 |    * ```
18643 |    *
18644 |    * @param time Time to be set in milliseconds.
18645 |    */
18646 |   setSystemTime(time: number|string|Date): Promise<void>;
18647 | }
18648 | 
18649 | /**
18650 |  * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) objects are dispatched by page via the
18651 |  * [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console) event. For each console message
18652 |  * logged in the page there will be corresponding event in the Playwright context.
18653 |  *
18654 |  * ```js
18655 |  * // Listen for all console logs
18656 |  * page.on('console', msg => console.log(msg.text()));
18657 |  *
18658 |  * // Listen for all console events and handle errors
18659 |  * page.on('console', msg => {
18660 |  *   if (msg.type() === 'error')
18661 |  *     console.log(`Error text: "${msg.text()}"`);
18662 |  * });
18663 |  *
18664 |  * // Get the next console log
18665 |  * const msgPromise = page.waitForEvent('console');
18666 |  * await page.evaluate(() => {
18667 |  *   console.log('hello', 42, { foo: 'bar' });  // Issue console.log inside the page
18668 |  * });
18669 |  * const msg = await msgPromise;
18670 |  *
18671 |  * // Deconstruct console log arguments
18672 |  * await msg.args()[0].jsonValue(); // hello
18673 |  * await msg.args()[1].jsonValue(); // 42
18674 |  * ```
18675 |  *
18676 |  */
18677 | export interface ConsoleMessage {
18678 |   /**
18679 |    * List of arguments passed to a `console` function call. See also
18680 |    * [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console).
18681 |    */
18682 |   args(): Array<JSHandle>;
18683 | 
18684 |   location(): {
18685 |     /**
18686 |      * URL of the resource.
18687 |      */
18688 |     url: string;
18689 | 
18690 |     /**
18691 |      * 0-based line number in the resource.
18692 |      */
18693 |     lineNumber: number;
18694 | 
18695 |     /**
18696 |      * 0-based column number in the resource.
18697 |      */
18698 |     columnNumber: number;
18699 |   };
18700 | 
18701 |   /**
18702 |    * The page that produced this console message, if any.
18703 |    */
18704 |   page(): null|Page;
18705 | 
18706 |   /**
18707 |    * The text of the console message.
18708 |    */
18709 |   text(): string;
18710 | 
18711 |   /**
18712 |    * One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
18713 |    * `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`,
18714 |    * `'profileEnd'`, `'count'`, `'timeEnd'`.
18715 |    */
18716 |   type(): string;
18717 | }
18718 | 
18719 | /**
18720 |  * Coverage gathers information about parts of JavaScript and CSS that were used by the page.
18721 |  *
18722 |  * An example of using JavaScript coverage to produce Istanbul report for page load:
18723 |  *
18724 |  * **NOTE** Coverage APIs are only supported on Chromium-based browsers.
18725 |  *
18726 |  * ```js
18727 |  * const { chromium } = require('playwright');
18728 |  * const v8toIstanbul = require('v8-to-istanbul');
18729 |  *
18730 |  * (async () => {
18731 |  *   const browser = await chromium.launch();
18732 |  *   const page = await browser.newPage();
18733 |  *   await page.coverage.startJSCoverage();
18734 |  *   await page.goto('https://chromium.org');
18735 |  *   const coverage = await page.coverage.stopJSCoverage();
18736 |  *   for (const entry of coverage) {
18737 |  *     const converter = v8toIstanbul('', 0, { source: entry.source });
18738 |  *     await converter.load();
18739 |  *     converter.applyCoverage(entry.functions);
18740 |  *     console.log(JSON.stringify(converter.toIstanbul()));
18741 |  *   }
18742 |  *   await browser.close();
18743 |  * })();
18744 |  * ```
18745 |  *
18746 |  */
18747 | export interface Coverage {
18748 |   /**
18749 |    * Returns coverage is started
18750 |    * @param options
18751 |    */
18752 |   startCSSCoverage(options?: {
18753 |     /**
18754 |      * Whether to reset coverage on every navigation. Defaults to `true`.
18755 |      */
18756 |     resetOnNavigation?: boolean;
18757 |   }): Promise<void>;
18758 | 
18759 |   /**
18760 |    * Returns coverage is started
18761 |    *
18762 |    * **NOTE** Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically
18763 |    * created on the page using `eval` or `new Function`. If
18764 |    * [`reportAnonymousScripts`](https://playwright.dev/docs/api/class-coverage#coverage-start-js-coverage-option-report-anonymous-scripts)
18765 |    * is set to `true`, anonymous scripts will have `__playwright_evaluation_script__` as their URL.
18766 |    *
18767 |    * @param options
18768 |    */
18769 |   startJSCoverage(options?: {
18770 |     /**
18771 |      * Whether anonymous scripts generated by the page should be reported. Defaults to `false`.
18772 |      */
18773 |     reportAnonymousScripts?: boolean;
18774 | 
18775 |     /**
18776 |      * Whether to reset coverage on every navigation. Defaults to `true`.
18777 |      */
18778 |     resetOnNavigation?: boolean;
18779 |   }): Promise<void>;
18780 | 
18781 |   /**
18782 |    * Returns the array of coverage reports for all stylesheets
18783 |    *
18784 |    * **NOTE** CSS Coverage doesn't include dynamically injected style tags without sourceURLs.
18785 |    *
18786 |    */
18787 |   stopCSSCoverage(): Promise<Array<{
18788 |     /**
18789 |      * StyleSheet URL
18790 |      */
18791 |     url: string;
18792 | 
18793 |     /**
18794 |      * StyleSheet content, if available.
18795 |      */
18796 |     text?: string;
18797 | 
18798 |     /**
18799 |      * StyleSheet ranges that were used. Ranges are sorted and non-overlapping.
18800 |      */
18801 |     ranges: Array<{
18802 |       /**
18803 |        * A start offset in text, inclusive
18804 |        */
18805 |       start: number;
18806 | 
18807 |       /**
18808 |        * An end offset in text, exclusive
18809 |        */
18810 |       end: number;
18811 |     }>;
18812 |   }>>;
18813 | 
18814 |   /**
18815 |    * Returns the array of coverage reports for all scripts
18816 |    *
18817 |    * **NOTE** JavaScript Coverage doesn't include anonymous scripts by default. However, scripts with sourceURLs are
18818 |    * reported.
18819 |    *
18820 |    */
18821 |   stopJSCoverage(): Promise<Array<{
18822 |     /**
18823 |      * Script URL
18824 |      */
18825 |     url: string;
18826 | 
18827 |     /**
18828 |      * Script ID
18829 |      */
18830 |     scriptId: string;
18831 | 
18832 |     /**
18833 |      * Script content, if applicable.
18834 |      */
18835 |     source?: string;
18836 | 
18837 |     /**
18838 |      * V8-specific coverage format.
18839 |      */
18840 |     functions: Array<{
18841 |       functionName: string;
18842 | 
18843 |       isBlockCoverage: boolean;
18844 | 
18845 |       ranges: Array<{
18846 |         count: number;
18847 | 
18848 |         startOffset: number;
18849 | 
18850 |         endOffset: number;
18851 |       }>;
18852 |     }>;
18853 |   }>>;
18854 | }
18855 | 
18856 | /**
18857 |  * [Dialog](https://playwright.dev/docs/api/class-dialog) objects are dispatched by page via the
18858 |  * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
18859 |  *
18860 |  * An example of using `Dialog` class:
18861 |  *
18862 |  * ```js
18863 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
18864 |  *
18865 |  * (async () => {
18866 |  *   const browser = await chromium.launch();
18867 |  *   const page = await browser.newPage();
18868 |  *   page.on('dialog', async dialog => {
18869 |  *     console.log(dialog.message());
18870 |  *     await dialog.dismiss();
18871 |  *   });
18872 |  *   await page.evaluate(() => alert('1'));
18873 |  *   await browser.close();
18874 |  * })();
18875 |  * ```
18876 |  *
18877 |  * **NOTE** Dialogs are dismissed automatically, unless there is a
18878 |  * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listener. When listener is
18879 |  * present, it **must** either
18880 |  * [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
18881 |  * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
18882 |  * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
18883 |  * dialog, and actions like click will never finish.
18884 |  *
18885 |  */
18886 | export interface Dialog {
18887 |   /**
18888 |    * Returns when the dialog has been accepted.
18889 |    * @param promptText A text to enter in prompt. Does not cause any effects if the dialog's `type` is not prompt. Optional.
18890 |    */
18891 |   accept(promptText?: string): Promise<void>;
18892 | 
18893 |   /**
18894 |    * If dialog is prompt, returns default prompt value. Otherwise, returns empty string.
18895 |    */
18896 |   defaultValue(): string;
18897 | 
18898 |   /**
18899 |    * Returns when the dialog has been dismissed.
18900 |    */
18901 |   dismiss(): Promise<void>;
18902 | 
18903 |   /**
18904 |    * A message displayed in the dialog.
18905 |    */
18906 |   message(): string;
18907 | 
18908 |   /**
18909 |    * The page that initiated this dialog, if available.
18910 |    */
18911 |   page(): null|Page;
18912 | 
18913 |   /**
18914 |    * Returns dialog's type, can be one of `alert`, `beforeunload`, `confirm` or `prompt`.
18915 |    */
18916 |   type(): string;
18917 | }
18918 | 
18919 | /**
18920 |  * [Download](https://playwright.dev/docs/api/class-download) objects are dispatched by page via the
18921 |  * [page.on('download')](https://playwright.dev/docs/api/class-page#page-event-download) event.
18922 |  *
18923 |  * All the downloaded files belonging to the browser context are deleted when the browser context is closed.
18924 |  *
18925 |  * Download event is emitted once the download starts. Download path becomes available once download completes.
18926 |  *
18927 |  * ```js
18928 |  * // Start waiting for download before clicking. Note no await.
18929 |  * const downloadPromise = page.waitForEvent('download');
18930 |  * await page.getByText('Download file').click();
18931 |  * const download = await downloadPromise;
18932 |  *
18933 |  * // Wait for the download process to complete and save the downloaded file somewhere.
18934 |  * await download.saveAs('/path/to/save/at/' + download.suggestedFilename());
18935 |  * ```
18936 |  *
18937 |  */
18938 | export interface Download {
18939 |   /**
18940 |    * Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
18941 |    * `download.failure()` would resolve to `'canceled'`.
18942 |    */
18943 |   cancel(): Promise<void>;
18944 | 
18945 |   /**
18946 |    * Returns a readable stream for a successful download, or throws for a failed/canceled download.
18947 |    */
18948 |   createReadStream(): Promise<Readable>;
18949 | 
18950 |   /**
18951 |    * Deletes the downloaded file. Will wait for the download to finish if necessary.
18952 |    */
18953 |   delete(): Promise<void>;
18954 | 
18955 |   /**
18956 |    * Returns download error if any. Will wait for the download to finish if necessary.
18957 |    */
18958 |   failure(): Promise<null|string>;
18959 | 
18960 |   /**
18961 |    * Get the page that the download belongs to.
18962 |    */
18963 |   page(): Page;
18964 | 
18965 |   /**
18966 |    * Returns path to the downloaded file for a successful download, or throws for a failed/canceled download. The method
18967 |    * will wait for the download to finish if necessary. The method throws when connected remotely.
18968 |    *
18969 |    * Note that the download's file name is a random GUID, use
18970 |    * [download.suggestedFilename()](https://playwright.dev/docs/api/class-download#download-suggested-filename) to get
18971 |    * suggested file name.
18972 |    */
18973 |   path(): Promise<string>;
18974 | 
18975 |   /**
18976 |    * Copy the download to a user-specified path. It is safe to call this method while the download is still in progress.
18977 |    * Will wait for the download to finish if necessary.
18978 |    *
18979 |    * **Usage**
18980 |    *
18981 |    * ```js
18982 |    * await download.saveAs('/path/to/save/at/' + download.suggestedFilename());
18983 |    * ```
18984 |    *
18985 |    * @param path Path where the download should be copied.
18986 |    */
18987 |   saveAs(path: string): Promise<void>;
18988 | 
18989 |   /**
18990 |    * Returns suggested filename for this download. It is typically computed by the browser from the
18991 |    * [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) response
18992 |    * header or the `download` attribute. See the spec on [whatwg](https://html.spec.whatwg.org/#downloading-resources).
18993 |    * Different browsers can use different logic for computing it.
18994 |    */
18995 |   suggestedFilename(): string;
18996 | 
18997 |   /**
18998 |    * Returns downloaded url.
18999 |    */
19000 |   url(): string;
19001 | }
19002 | 
19003 | /**
19004 |  * Playwright has **experimental** support for Electron automation. You can access electron namespace via:
19005 |  *
19006 |  * ```js
19007 |  * const { _electron } = require('playwright');
19008 |  * ```
19009 |  *
19010 |  * An example of the Electron automation script would be:
19011 |  *
19012 |  * ```js
19013 |  * const { _electron: electron } = require('playwright');
19014 |  *
19015 |  * (async () => {
19016 |  *   // Launch Electron app.
19017 |  *   const electronApp = await electron.launch({ args: ['main.js'] });
19018 |  *
19019 |  *   // Evaluation expression in the Electron context.
19020 |  *   const appPath = await electronApp.evaluate(async ({ app }) => {
19021 |  *     // This runs in the main Electron process, parameter here is always
19022 |  *     // the result of the require('electron') in the main app script.
19023 |  *     return app.getAppPath();
19024 |  *   });
19025 |  *   console.log(appPath);
19026 |  *
19027 |  *   // Get the first window that the app opens, wait if necessary.
19028 |  *   const window = await electronApp.firstWindow();
19029 |  *   // Print the title.
19030 |  *   console.log(await window.title());
19031 |  *   // Capture a screenshot.
19032 |  *   await window.screenshot({ path: 'intro.png' });
19033 |  *   // Direct Electron console to Node terminal.
19034 |  *   window.on('console', console.log);
19035 |  *   // Click button.
19036 |  *   await window.click('text=Click me');
19037 |  *   // Exit app.
19038 |  *   await electronApp.close();
19039 |  * })();
19040 |  * ```
19041 |  *
19042 |  * **Supported Electron versions are:**
19043 |  * - v12.2.0+
19044 |  * - v13.4.0+
19045 |  * - v14+
19046 |  *
19047 |  * **Known issues:**
19048 |  *
19049 |  * If you are not able to launch Electron and it will end up in timeouts during launch, try the following:
19050 |  * - Ensure that `nodeCliInspect`
19051 |  *   ([FuseV1Options.EnableNodeCliInspectArguments](https://www.electronjs.org/docs/latest/tutorial/fuses#nodecliinspect))
19052 |  *   fuse is **not** set to `false`.
19053 |  */
19054 | export interface Electron {
19055 |   /**
19056 |    * Launches electron application specified with the
19057 |    * [`executablePath`](https://playwright.dev/docs/api/class-electron#electron-launch-option-executable-path).
19058 |    * @param options
19059 |    */
19060 |   launch(options?: {
19061 |     /**
19062 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
19063 |      */
19064 |     acceptDownloads?: boolean;
19065 | 
19066 |     /**
19067 |      * Additional arguments to pass to the application when launching. You typically pass the main script name here.
19068 |      */
19069 |     args?: Array<string>;
19070 | 
19071 |     /**
19072 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
19073 |      */
19074 |     bypassCSP?: boolean;
19075 | 
19076 |     /**
19077 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
19078 |      * media feature, supported values are `'light'` and `'dark'`. See
19079 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
19080 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
19081 |      */
19082 |     colorScheme?: null|"light"|"dark"|"no-preference";
19083 | 
19084 |     /**
19085 |      * Current working directory to launch application from.
19086 |      */
19087 |     cwd?: string;
19088 | 
19089 |     /**
19090 |      * Specifies environment variables that will be visible to Electron. Defaults to `process.env`.
19091 |      */
19092 |     env?: { [key: string]: string; };
19093 | 
19094 |     /**
19095 |      * Launches given Electron application. If not specified, launches the default Electron executable installed in this
19096 |      * package, located at `node_modules/.bin/electron`.
19097 |      */
19098 |     executablePath?: string;
19099 | 
19100 |     /**
19101 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
19102 |      */
19103 |     extraHTTPHeaders?: { [key: string]: string; };
19104 | 
19105 |     geolocation?: {
19106 |       /**
19107 |        * Latitude between -90 and 90.
19108 |        */
19109 |       latitude: number;
19110 | 
19111 |       /**
19112 |        * Longitude between -180 and 180.
19113 |        */
19114 |       longitude: number;
19115 | 
19116 |       /**
19117 |        * Non-negative accuracy value. Defaults to `0`.
19118 |        */
19119 |       accuracy?: number;
19120 |     };
19121 | 
19122 |     /**
19123 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
19124 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
19125 |      */
19126 |     httpCredentials?: {
19127 |       username: string;
19128 | 
19129 |       password: string;
19130 | 
19131 |       /**
19132 |        * Restrain sending http credentials on specific origin (scheme://host:port).
19133 |        */
19134 |       origin?: string;
19135 | 
19136 |       /**
19137 |        * This option only applies to the requests sent from corresponding
19138 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
19139 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
19140 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
19141 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
19142 |        */
19143 |       send?: "unauthorized"|"always";
19144 |     };
19145 | 
19146 |     /**
19147 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
19148 |      */
19149 |     ignoreHTTPSErrors?: boolean;
19150 | 
19151 |     /**
19152 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
19153 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
19154 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
19155 |      */
19156 |     locale?: string;
19157 | 
19158 |     /**
19159 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
19160 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
19161 |      */
19162 |     offline?: boolean;
19163 | 
19164 |     /**
19165 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
19166 |      * If not specified, the HAR is not recorded. Make sure to await
19167 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
19168 |      * the HAR to be saved.
19169 |      */
19170 |     recordHar?: {
19171 |       /**
19172 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
19173 |        * `content` policy instead.
19174 |        */
19175 |       omitContent?: boolean;
19176 | 
19177 |       /**
19178 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
19179 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
19180 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
19181 |        * files and to `embed` for all other file extensions.
19182 |        */
19183 |       content?: "omit"|"embed"|"attach";
19184 | 
19185 |       /**
19186 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
19187 |        * default.
19188 |        */
19189 |       path: string;
19190 | 
19191 |       /**
19192 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
19193 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
19194 |        */
19195 |       mode?: "full"|"minimal";
19196 | 
19197 |       /**
19198 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
19199 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
19200 |        * options was provided and the passed URL is a path, it gets merged via the
19201 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
19202 |        */
19203 |       urlFilter?: string|RegExp;
19204 |     };
19205 | 
19206 |     /**
19207 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
19208 |      * Make sure to await
19209 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
19210 |      * videos to be saved.
19211 |      */
19212 |     recordVideo?: {
19213 |       /**
19214 |        * Path to the directory to put videos into.
19215 |        */
19216 |       dir: string;
19217 | 
19218 |       /**
19219 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
19220 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
19221 |        * each page will be scaled down if necessary to fit the specified size.
19222 |        */
19223 |       size?: {
19224 |         /**
19225 |          * Video frame width.
19226 |          */
19227 |         width: number;
19228 | 
19229 |         /**
19230 |          * Video frame height.
19231 |          */
19232 |         height: number;
19233 |       };
19234 |     };
19235 | 
19236 |     /**
19237 |      * Maximum time in milliseconds to wait for the application to start. Defaults to `30000` (30 seconds). Pass `0` to
19238 |      * disable timeout.
19239 |      */
19240 |     timeout?: number;
19241 | 
19242 |     /**
19243 |      * Changes the timezone of the context. See
19244 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
19245 |      * for a list of supported timezone IDs. Defaults to the system timezone.
19246 |      */
19247 |     timezoneId?: string;
19248 | 
19249 |     /**
19250 |      * If specified, traces are saved into this directory.
19251 |      */
19252 |     tracesDir?: string;
19253 |   }): Promise<ElectronApplication>;
19254 | }
19255 | 
19256 | /**
19257 |  * [FileChooser](https://playwright.dev/docs/api/class-filechooser) objects are dispatched by the page in the
19258 |  * [page.on('filechooser')](https://playwright.dev/docs/api/class-page#page-event-file-chooser) event.
19259 |  *
19260 |  * ```js
19261 |  * // Start waiting for file chooser before clicking. Note no await.
19262 |  * const fileChooserPromise = page.waitForEvent('filechooser');
19263 |  * await page.getByText('Upload file').click();
19264 |  * const fileChooser = await fileChooserPromise;
19265 |  * await fileChooser.setFiles(path.join(__dirname, 'myfile.pdf'));
19266 |  * ```
19267 |  *
19268 |  */
19269 | export interface FileChooser {
19270 |   /**
19271 |    * Returns input element associated with this file chooser.
19272 |    */
19273 |   element(): ElementHandle;
19274 | 
19275 |   /**
19276 |    * Returns whether this file chooser accepts multiple files.
19277 |    */
19278 |   isMultiple(): boolean;
19279 | 
19280 |   /**
19281 |    * Returns page this file chooser belongs to.
19282 |    */
19283 |   page(): Page;
19284 | 
19285 |   /**
19286 |    * Sets the value of the file input this chooser is associated with. If some of the `filePaths` are relative paths,
19287 |    * then they are resolved relative to the current working directory. For empty array, clears the selected files.
19288 |    * @param files
19289 |    * @param options
19290 |    */
19291 |   setFiles(files: string|ReadonlyArray<string>|{
19292 |     /**
19293 |      * File name
19294 |      */
19295 |     name: string;
19296 | 
19297 |     /**
19298 |      * File type
19299 |      */
19300 |     mimeType: string;
19301 | 
19302 |     /**
19303 |      * File content
19304 |      */
19305 |     buffer: Buffer;
19306 |   }|ReadonlyArray<{
19307 |     /**
19308 |      * File name
19309 |      */
19310 |     name: string;
19311 | 
19312 |     /**
19313 |      * File type
19314 |      */
19315 |     mimeType: string;
19316 | 
19317 |     /**
19318 |      * File content
19319 |      */
19320 |     buffer: Buffer;
19321 |   }>, options?: {
19322 |     /**
19323 |      * This option has no effect.
19324 |      * @deprecated This option has no effect.
19325 |      */
19326 |     noWaitAfter?: boolean;
19327 | 
19328 |     /**
19329 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
19330 |      * option in the config, or by using the
19331 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19332 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
19333 |      */
19334 |     timeout?: number;
19335 |   }): Promise<void>;
19336 | }
19337 | 
19338 | /**
19339 |  * FrameLocator represents a view to the `iframe` on the page. It captures the logic sufficient to retrieve the
19340 |  * `iframe` and locate elements in that iframe. FrameLocator can be created with either
19341 |  * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame),
19342 |  * [page.frameLocator(selector)](https://playwright.dev/docs/api/class-page#page-frame-locator) or
19343 |  * [locator.frameLocator(selector)](https://playwright.dev/docs/api/class-locator#locator-frame-locator) method.
19344 |  *
19345 |  * ```js
19346 |  * const locator = page.locator('#my-frame').contentFrame().getByText('Submit');
19347 |  * await locator.click();
19348 |  * ```
19349 |  *
19350 |  * **Strictness**
19351 |  *
19352 |  * Frame locators are strict. This means that all operations on frame locators will throw if more than one element
19353 |  * matches a given selector.
19354 |  *
19355 |  * ```js
19356 |  * // Throws if there are several frames in DOM:
19357 |  * await page.locator('.result-frame').contentFrame().getByRole('button').click();
19358 |  *
19359 |  * // Works because we explicitly tell locator to pick the first frame:
19360 |  * await page.locator('.result-frame').contentFrame().first().getByRole('button').click();
19361 |  * ```
19362 |  *
19363 |  * **Converting Locator to FrameLocator**
19364 |  *
19365 |  * If you have a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to an `iframe` it can be
19366 |  * converted to [FrameLocator](https://playwright.dev/docs/api/class-framelocator) using
19367 |  * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
19368 |  *
19369 |  * **Converting FrameLocator to Locator**
19370 |  *
19371 |  * If you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object it can be converted to
19372 |  * [Locator](https://playwright.dev/docs/api/class-locator) pointing to the same `iframe` using
19373 |  * [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
19374 |  */
19375 | export interface FrameLocator {
19376 |   /**
19377 |    * Returns locator to the first matching frame.
19378 |    * @deprecated Use [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first) followed by
19379 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19380 |    */
19381 |   first(): FrameLocator;
19382 | 
19383 |   /**
19384 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
19385 |    * in that iframe.
19386 |    * @param selector A selector to use when resolving DOM element.
19387 |    */
19388 |   frameLocator(selector: string): FrameLocator;
19389 | 
19390 |   /**
19391 |    * Allows locating elements by their alt text.
19392 |    *
19393 |    * **Usage**
19394 |    *
19395 |    * For example, this method will find the image by alt text "Playwright logo":
19396 |    *
19397 |    * ```html
19398 |    * <img alt='Playwright logo'>
19399 |    * ```
19400 |    *
19401 |    * ```js
19402 |    * await page.getByAltText('Playwright logo').click();
19403 |    * ```
19404 |    *
19405 |    * @param text Text to locate the element for.
19406 |    * @param options
19407 |    */
19408 |   getByAltText(text: string|RegExp, options?: {
19409 |     /**
19410 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19411 |      * regular expression. Note that exact match still trims whitespace.
19412 |      */
19413 |     exact?: boolean;
19414 |   }): Locator;
19415 | 
19416 |   /**
19417 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
19418 |    * `aria-label` attribute.
19419 |    *
19420 |    * **Usage**
19421 |    *
19422 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
19423 |    *
19424 |    * ```html
19425 |    * <input aria-label="Username">
19426 |    * <label for="password-input">Password:</label>
19427 |    * <input id="password-input">
19428 |    * ```
19429 |    *
19430 |    * ```js
19431 |    * await page.getByLabel('Username').fill('john');
19432 |    * await page.getByLabel('Password').fill('secret');
19433 |    * ```
19434 |    *
19435 |    * @param text Text to locate the element for.
19436 |    * @param options
19437 |    */
19438 |   getByLabel(text: string|RegExp, options?: {
19439 |     /**
19440 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19441 |      * regular expression. Note that exact match still trims whitespace.
19442 |      */
19443 |     exact?: boolean;
19444 |   }): Locator;
19445 | 
19446 |   /**
19447 |    * Allows locating input elements by the placeholder text.
19448 |    *
19449 |    * **Usage**
19450 |    *
19451 |    * For example, consider the following DOM structure.
19452 |    *
19453 |    * ```html
19454 |    * <input type="email" placeholder="name@example.com" />
19455 |    * ```
19456 |    *
19457 |    * You can fill the input after locating it by the placeholder text:
19458 |    *
19459 |    * ```js
19460 |    * await page
19461 |    *     .getByPlaceholder('name@example.com')
19462 |    *     .fill('playwright@microsoft.com');
19463 |    * ```
19464 |    *
19465 |    * @param text Text to locate the element for.
19466 |    * @param options
19467 |    */
19468 |   getByPlaceholder(text: string|RegExp, options?: {
19469 |     /**
19470 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19471 |      * regular expression. Note that exact match still trims whitespace.
19472 |      */
19473 |     exact?: boolean;
19474 |   }): Locator;
19475 | 
19476 |   /**
19477 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
19478 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
19479 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
19480 |    *
19481 |    * **Usage**
19482 |    *
19483 |    * Consider the following DOM structure.
19484 |    *
19485 |    * ```html
19486 |    * <h3>Sign up</h3>
19487 |    * <label>
19488 |    *   <input type="checkbox" /> Subscribe
19489 |    * </label>
19490 |    * <br/>
19491 |    * <button>Submit</button>
19492 |    * ```
19493 |    *
19494 |    * You can locate each element by it's implicit role:
19495 |    *
19496 |    * ```js
19497 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
19498 |    *
19499 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
19500 |    *
19501 |    * await page.getByRole('button', { name: /submit/i }).click();
19502 |    * ```
19503 |    *
19504 |    * **Details**
19505 |    *
19506 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
19507 |    * about the ARIA guidelines.
19508 |    *
19509 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
19510 |    * that is recognized by the role selector. You can find all the
19511 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
19512 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
19513 |    * @param role Required aria role.
19514 |    * @param options
19515 |    */
19516 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
19517 |     /**
19518 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
19519 |      *
19520 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
19521 |      */
19522 |     checked?: boolean;
19523 | 
19524 |     /**
19525 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
19526 |      *
19527 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
19528 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
19529 |      *
19530 |      */
19531 |     disabled?: boolean;
19532 | 
19533 |     /**
19534 |      * Whether [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is
19535 |      * matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when
19536 |      * [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is a regular
19537 |      * expression. Note that exact match still trims whitespace.
19538 |      */
19539 |     exact?: boolean;
19540 | 
19541 |     /**
19542 |      * An attribute that is usually set by `aria-expanded`.
19543 |      *
19544 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
19545 |      */
19546 |     expanded?: boolean;
19547 | 
19548 |     /**
19549 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
19550 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
19551 |      *
19552 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
19553 |      */
19554 |     includeHidden?: boolean;
19555 | 
19556 |     /**
19557 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
19558 |      * for `<h1>-<h6>` elements.
19559 |      *
19560 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
19561 |      */
19562 |     level?: number;
19563 | 
19564 |     /**
19565 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
19566 |      * case-insensitive and searches for a substring, use
19567 |      * [`exact`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-exact) to control
19568 |      * this behavior.
19569 |      *
19570 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
19571 |      */
19572 |     name?: string|RegExp;
19573 | 
19574 |     /**
19575 |      * An attribute that is usually set by `aria-pressed`.
19576 |      *
19577 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
19578 |      */
19579 |     pressed?: boolean;
19580 | 
19581 |     /**
19582 |      * An attribute that is usually set by `aria-selected`.
19583 |      *
19584 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
19585 |      */
19586 |     selected?: boolean;
19587 |   }): Locator;
19588 | 
19589 |   /**
19590 |    * Locate element by the test id.
19591 |    *
19592 |    * **Usage**
19593 |    *
19594 |    * Consider the following DOM structure.
19595 |    *
19596 |    * ```html
19597 |    * <button data-testid="directions">Itinéraire</button>
19598 |    * ```
19599 |    *
19600 |    * You can locate the element by it's test id:
19601 |    *
19602 |    * ```js
19603 |    * await page.getByTestId('directions').click();
19604 |    * ```
19605 |    *
19606 |    * **Details**
19607 |    *
19608 |    * By default, the `data-testid` attribute is used as a test id. Use
19609 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
19610 |    * to configure a different test id attribute if necessary.
19611 |    *
19612 |    * ```js
19613 |    * // Set custom test id attribute from @playwright/test config:
19614 |    * import { defineConfig } from '@playwright/test';
19615 |    *
19616 |    * export default defineConfig({
19617 |    *   use: {
19618 |    *     testIdAttribute: 'data-pw'
19619 |    *   },
19620 |    * });
19621 |    * ```
19622 |    *
19623 |    * @param testId Id to locate the element by.
19624 |    */
19625 |   getByTestId(testId: string|RegExp): Locator;
19626 | 
19627 |   /**
19628 |    * Allows locating elements that contain given text.
19629 |    *
19630 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
19631 |    * match by another criteria, like an accessible role, and then filter by the text content.
19632 |    *
19633 |    * **Usage**
19634 |    *
19635 |    * Consider the following DOM structure:
19636 |    *
19637 |    * ```html
19638 |    * <div>Hello <span>world</span></div>
19639 |    * <div>Hello</div>
19640 |    * ```
19641 |    *
19642 |    * You can locate by text substring, exact string, or a regular expression:
19643 |    *
19644 |    * ```js
19645 |    * // Matches <span>
19646 |    * page.getByText('world');
19647 |    *
19648 |    * // Matches first <div>
19649 |    * page.getByText('Hello world');
19650 |    *
19651 |    * // Matches second <div>
19652 |    * page.getByText('Hello', { exact: true });
19653 |    *
19654 |    * // Matches both <div>s
19655 |    * page.getByText(/Hello/);
19656 |    *
19657 |    * // Matches second <div>
19658 |    * page.getByText(/^hello$/i);
19659 |    * ```
19660 |    *
19661 |    * **Details**
19662 |    *
19663 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
19664 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
19665 |    *
19666 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
19667 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
19668 |    * @param text Text to locate the element for.
19669 |    * @param options
19670 |    */
19671 |   getByText(text: string|RegExp, options?: {
19672 |     /**
19673 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19674 |      * regular expression. Note that exact match still trims whitespace.
19675 |      */
19676 |     exact?: boolean;
19677 |   }): Locator;
19678 | 
19679 |   /**
19680 |    * Allows locating elements by their title attribute.
19681 |    *
19682 |    * **Usage**
19683 |    *
19684 |    * Consider the following DOM structure.
19685 |    *
19686 |    * ```html
19687 |    * <span title='Issues count'>25 issues</span>
19688 |    * ```
19689 |    *
19690 |    * You can check the issues count after locating it by the title text:
19691 |    *
19692 |    * ```js
19693 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
19694 |    * ```
19695 |    *
19696 |    * @param text Text to locate the element for.
19697 |    * @param options
19698 |    */
19699 |   getByTitle(text: string|RegExp, options?: {
19700 |     /**
19701 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19702 |      * regular expression. Note that exact match still trims whitespace.
19703 |      */
19704 |     exact?: boolean;
19705 |   }): Locator;
19706 | 
19707 |   /**
19708 |    * Returns locator to the last matching frame.
19709 |    * @deprecated Use [locator.last()](https://playwright.dev/docs/api/class-locator#locator-last) followed by
19710 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19711 |    */
19712 |   last(): FrameLocator;
19713 | 
19714 |   /**
19715 |    * The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
19716 |    * options, similar to [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter)
19717 |    * method.
19718 |    *
19719 |    * [Learn more about locators](https://playwright.dev/docs/locators).
19720 |    * @param selectorOrLocator A selector or locator to use when resolving DOM element.
19721 |    * @param options
19722 |    */
19723 |   locator(selectorOrLocator: string|Locator, options?: {
19724 |     /**
19725 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
19726 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
19727 |      *
19728 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
19729 |      * the document root. For example, you can find `content` that has `div` in
19730 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
19731 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
19732 |      *
19733 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
19734 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
19735 |      */
19736 |     has?: Locator;
19737 | 
19738 |     /**
19739 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
19740 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
19741 |      *
19742 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
19743 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
19744 |      */
19745 |     hasNot?: Locator;
19746 | 
19747 |     /**
19748 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
19749 |      * When passed a [string], matching is case-insensitive and searches for a substring.
19750 |      */
19751 |     hasNotText?: string|RegExp;
19752 | 
19753 |     /**
19754 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
19755 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
19756 |      * `<article><div>Playwright</div></article>`.
19757 |      */
19758 |     hasText?: string|RegExp;
19759 |   }): Locator;
19760 | 
19761 |   /**
19762 |    * Returns locator to the n-th matching frame. It's zero based, `nth(0)` selects the first frame.
19763 |    * @deprecated Use [locator.nth(index)](https://playwright.dev/docs/api/class-locator#locator-nth) followed by
19764 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19765 |    * @param index
19766 |    */
19767 |   nth(index: number): FrameLocator;
19768 | 
19769 |   /**
19770 |    * Returns a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to the same `iframe` as this
19771 |    * frame locator.
19772 |    *
19773 |    * Useful when you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object obtained
19774 |    * somewhere, and later on would like to interact with the `iframe` element.
19775 |    *
19776 |    * For a reverse operation, use
19777 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
19778 |    *
19779 |    * **Usage**
19780 |    *
19781 |    * ```js
19782 |    * const frameLocator = page.locator('iframe[name="embedded"]').contentFrame();
19783 |    * // ...
19784 |    * const locator = frameLocator.owner();
19785 |    * await expect(locator).toBeVisible();
19786 |    * ```
19787 |    *
19788 |    */
19789 |   owner(): Locator;
19790 | }
19791 | 
19792 | /**
19793 |  * Keyboard provides an api for managing a virtual keyboard. The high level api is
19794 |  * [keyboard.type(text[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-type), which takes raw
19795 |  * characters and generates proper `keydown`, `keypress`/`input`, and `keyup` events on your page.
19796 |  *
19797 |  * For finer control, you can use [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down),
19798 |  * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up), and
19799 |  * [keyboard.insertText(text)](https://playwright.dev/docs/api/class-keyboard#keyboard-insert-text) to manually fire
19800 |  * events as if they were generated from a real keyboard.
19801 |  *
19802 |  * An example of holding down `Shift` in order to select and delete some text:
19803 |  *
19804 |  * ```js
19805 |  * await page.keyboard.type('Hello World!');
19806 |  * await page.keyboard.press('ArrowLeft');
19807 |  *
19808 |  * await page.keyboard.down('Shift');
19809 |  * for (let i = 0; i < ' World'.length; i++)
19810 |  *   await page.keyboard.press('ArrowLeft');
19811 |  * await page.keyboard.up('Shift');
19812 |  *
19813 |  * await page.keyboard.press('Backspace');
19814 |  * // Result text will end up saying 'Hello!'
19815 |  * ```
19816 |  *
19817 |  * An example of pressing uppercase `A`
19818 |  *
19819 |  * ```js
19820 |  * await page.keyboard.press('Shift+KeyA');
19821 |  * // or
19822 |  * await page.keyboard.press('Shift+A');
19823 |  * ```
19824 |  *
19825 |  * An example to trigger select-all with the keyboard
19826 |  *
19827 |  * ```js
19828 |  * await page.keyboard.press('ControlOrMeta+A');
19829 |  * ```
19830 |  *
19831 |  */
19832 | export interface Keyboard {
19833 |   /**
19834 |    * Dispatches a `keydown` event.
19835 |    *
19836 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) can specify the intended
19837 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
19838 |    * to generate the text for. A superset of the
19839 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) values can be found
19840 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
19841 |    *
19842 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
19843 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
19844 |    * etc.
19845 |    *
19846 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
19847 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
19848 |    *
19849 |    * Holding down `Shift` will type the text that corresponds to the
19850 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) in the upper case.
19851 |    *
19852 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a single character, it is
19853 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
19854 |    *
19855 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a modifier key, `Shift`,
19856 |    * `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that modifier active. To release the modifier
19857 |    * key, use [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
19858 |    *
19859 |    * After the key is pressed once, subsequent calls to
19860 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) will have
19861 |    * [repeat](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat) set to true. To release the key,
19862 |    * use [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
19863 |    *
19864 |    * **NOTE** Modifier keys DO influence `keyboard.down`. Holding down `Shift` will type the text in upper case.
19865 |    *
19866 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
19867 |    */
19868 |   down(key: string): Promise<void>;
19869 | 
19870 |   /**
19871 |    * Dispatches only `input` event, does not emit the `keydown`, `keyup` or `keypress` events.
19872 |    *
19873 |    * **Usage**
19874 |    *
19875 |    * ```js
19876 |    * page.keyboard.insertText('嗨');
19877 |    * ```
19878 |    *
19879 |    * **NOTE** Modifier keys DO NOT effect `keyboard.insertText`. Holding down `Shift` will not type the text in upper
19880 |    * case.
19881 |    *
19882 |    * @param text Sets input to the specified text value.
19883 |    */
19884 |   insertText(text: string): Promise<void>;
19885 | 
19886 |   /**
19887 |    * **NOTE** In most cases, you should use
19888 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press) instead.
19889 |    *
19890 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) can specify the intended
19891 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
19892 |    * to generate the text for. A superset of the
19893 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) values can be found
19894 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
19895 |    *
19896 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
19897 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
19898 |    * etc.
19899 |    *
19900 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
19901 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
19902 |    *
19903 |    * Holding down `Shift` will type the text that corresponds to the
19904 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) in the upper case.
19905 |    *
19906 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) is a single character, it is
19907 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
19908 |    *
19909 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
19910 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
19911 |    *
19912 |    * **Usage**
19913 |    *
19914 |    * ```js
19915 |    * const page = await browser.newPage();
19916 |    * await page.goto('https://keycode.info');
19917 |    * await page.keyboard.press('A');
19918 |    * await page.screenshot({ path: 'A.png' });
19919 |    * await page.keyboard.press('ArrowLeft');
19920 |    * await page.screenshot({ path: 'ArrowLeft.png' });
19921 |    * await page.keyboard.press('Shift+O');
19922 |    * await page.screenshot({ path: 'O.png' });
19923 |    * await browser.close();
19924 |    * ```
19925 |    *
19926 |    * Shortcut for [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
19927 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
19928 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
19929 |    * @param options
19930 |    */
19931 |   press(key: string, options?: {
19932 |     /**
19933 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
19934 |      */
19935 |     delay?: number;
19936 |   }): Promise<void>;
19937 | 
19938 |   /**
19939 |    * **NOTE** In most cases, you should use
19940 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
19941 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
19942 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
19943 |    *
19944 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text.
19945 |    *
19946 |    * To press a special key, like `Control` or `ArrowDown`, use
19947 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
19948 |    *
19949 |    * **Usage**
19950 |    *
19951 |    * ```js
19952 |    * await page.keyboard.type('Hello'); // Types instantly
19953 |    * await page.keyboard.type('World', { delay: 100 }); // Types slower, like a user
19954 |    * ```
19955 |    *
19956 |    * **NOTE** Modifier keys DO NOT effect `keyboard.type`. Holding down `Shift` will not type the text in upper case.
19957 |    *
19958 |    * **NOTE** For characters that are not on a US keyboard, only an `input` event will be sent.
19959 |    *
19960 |    * @param text A text to type into a focused element.
19961 |    * @param options
19962 |    */
19963 |   type(text: string, options?: {
19964 |     /**
19965 |      * Time to wait between key presses in milliseconds. Defaults to 0.
19966 |      */
19967 |     delay?: number;
19968 |   }): Promise<void>;
19969 | 
19970 |   /**
19971 |    * Dispatches a `keyup` event.
19972 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
19973 |    */
19974 |   up(key: string): Promise<void>;
19975 | }
19976 | 
19977 | /**
19978 |  * Playwright generates a lot of logs and they are accessible via the pluggable logger sink.
19979 |  *
19980 |  * ```js
19981 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
19982 |  *
19983 |  * (async () => {
19984 |  *   const browser = await chromium.launch({
19985 |  *     logger: {
19986 |  *       isEnabled: (name, severity) => name === 'api',
19987 |  *       log: (name, severity, message, args) => console.log(`${name} ${message}`)
19988 |  *     }
19989 |  *   });
19990 |  *   // ...
19991 |  * })();
19992 |  * ```
19993 |  *
19994 |  */
19995 | export interface Logger {
19996 |   /**
19997 |    * Determines whether sink is interested in the logger with the given name and severity.
19998 |    * @param name logger name
19999 |    * @param severity
20000 |    */
20001 |   isEnabled(name: string, severity: "verbose"|"info"|"warning"|"error"): boolean;
20002 | 
20003 |   /**
20004 |    * @param name logger name
20005 |    * @param severity
20006 |    * @param message log message format
20007 |    * @param args message arguments
20008 |    * @param hints optional formatting hints
20009 |    */
20010 |   log(name: string, severity: "verbose"|"info"|"warning"|"error", message: string|Error, args: ReadonlyArray<Object>, hints: {
20011 |     /**
20012 |      * Optional preferred logger color.
20013 |      */
20014 |     color?: string;
20015 |   }): void;
20016 | }
20017 | 
20018 | /**
20019 |  * The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
20020 |  *
20021 |  * Every `page` object has its own Mouse, accessible with
20022 |  * [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse).
20023 |  *
20024 |  * ```js
20025 |  * // Using ‘page.mouse’ to trace a 100x100 square.
20026 |  * await page.mouse.move(0, 0);
20027 |  * await page.mouse.down();
20028 |  * await page.mouse.move(0, 100);
20029 |  * await page.mouse.move(100, 100);
20030 |  * await page.mouse.move(100, 0);
20031 |  * await page.mouse.move(0, 0);
20032 |  * await page.mouse.up();
20033 |  * ```
20034 |  *
20035 |  */
20036 | export interface Mouse {
20037 |   /**
20038 |    * Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
20039 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
20040 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
20041 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20042 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20043 |    * @param options
20044 |    */
20045 |   click(x: number, y: number, options?: {
20046 |     /**
20047 |      * Defaults to `left`.
20048 |      */
20049 |     button?: "left"|"right"|"middle";
20050 | 
20051 |     /**
20052 |      * defaults to 1. See [UIEvent.detail].
20053 |      */
20054 |     clickCount?: number;
20055 | 
20056 |     /**
20057 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
20058 |      */
20059 |     delay?: number;
20060 |   }): Promise<void>;
20061 | 
20062 |   /**
20063 |    * Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
20064 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
20065 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up),
20066 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down) and
20067 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
20068 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20069 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20070 |    * @param options
20071 |    */
20072 |   dblclick(x: number, y: number, options?: {
20073 |     /**
20074 |      * Defaults to `left`.
20075 |      */
20076 |     button?: "left"|"right"|"middle";
20077 | 
20078 |     /**
20079 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
20080 |      */
20081 |     delay?: number;
20082 |   }): Promise<void>;
20083 | 
20084 |   /**
20085 |    * Dispatches a `mousedown` event.
20086 |    * @param options
20087 |    */
20088 |   down(options?: {
20089 |     /**
20090 |      * Defaults to `left`.
20091 |      */
20092 |     button?: "left"|"right"|"middle";
20093 | 
20094 |     /**
20095 |      * defaults to 1. See [UIEvent.detail].
20096 |      */
20097 |     clickCount?: number;
20098 |   }): Promise<void>;
20099 | 
20100 |   /**
20101 |    * Dispatches a `mousemove` event.
20102 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20103 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20104 |    * @param options
20105 |    */
20106 |   move(x: number, y: number, options?: {
20107 |     /**
20108 |      * Defaults to 1. Sends intermediate `mousemove` events.
20109 |      */
20110 |     steps?: number;
20111 |   }): Promise<void>;
20112 | 
20113 |   /**
20114 |    * Dispatches a `mouseup` event.
20115 |    * @param options
20116 |    */
20117 |   up(options?: {
20118 |     /**
20119 |      * Defaults to `left`.
20120 |      */
20121 |     button?: "left"|"right"|"middle";
20122 | 
20123 |     /**
20124 |      * defaults to 1. See [UIEvent.detail].
20125 |      */
20126 |     clickCount?: number;
20127 |   }): Promise<void>;
20128 | 
20129 |   /**
20130 |    * Dispatches a `wheel` event. This method is usually used to manually scroll the page. See
20131 |    * [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
20132 |    *
20133 |    * **NOTE** Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling
20134 |    * to finish before returning.
20135 |    *
20136 |    * @param deltaX Pixels to scroll horizontally.
20137 |    * @param deltaY Pixels to scroll vertically.
20138 |    */
20139 |   wheel(deltaX: number, deltaY: number): Promise<void>;
20140 | }
20141 | 
20142 | /**
20143 |  * This object can be used to launch or connect to Chromium, returning instances of
20144 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20145 |  */
20146 | export const chromium: BrowserType;
20147 | 
20148 | /**
20149 |  * This object can be used to launch or connect to Firefox, returning instances of
20150 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20151 |  */
20152 | export const firefox: BrowserType;
20153 | 
20154 | /**
20155 |  * Exposes API that can be used for the Web API testing.
20156 |  */
20157 | export const request: APIRequest;
20158 | 
20159 | /**
20160 |  * Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/docs/extensibility) for more
20161 |  * information.
20162 |  */
20163 | export const selectors: Selectors;
20164 | 
20165 | /**
20166 |  * This object can be used to launch or connect to WebKit, returning instances of
20167 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20168 |  */
20169 | export const webkit: BrowserType;
20170 | 
20171 | /**
20172 |  * Whenever the page sends a request for a network resource the following sequence of events are emitted by
20173 |  * [Page](https://playwright.dev/docs/api/class-page):
20174 |  * - [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) emitted when the request is
20175 |  *   issued by the page.
20176 |  * - [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response) emitted when/if the
20177 |  *   response status and headers are received for the request.
20178 |  * - [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) emitted
20179 |  *   when the response body is downloaded and the request is complete.
20180 |  *
20181 |  * If request fails at some point, then instead of `'requestfinished'` event (and possibly instead of 'response'
20182 |  * event), the  [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed) event
20183 |  * is emitted.
20184 |  *
20185 |  * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
20186 |  * will complete with `'requestfinished'` event.
20187 |  *
20188 |  * If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a
20189 |  * new request is  issued to a redirected url.
20190 |  */
20191 | export interface Request {
20192 |   /**
20193 |    * An object with all the request HTTP headers associated with this request. The header names are lower-cased.
20194 |    */
20195 |   allHeaders(): Promise<{ [key: string]: string; }>;
20196 | 
20197 |   /**
20198 |    * The method returns `null` unless this request has failed, as reported by `requestfailed` event.
20199 |    *
20200 |    * **Usage**
20201 |    *
20202 |    * Example of logging of all the failed requests:
20203 |    *
20204 |    * ```js
20205 |    * page.on('requestfailed', request => {
20206 |    *   console.log(request.url() + ' ' + request.failure().errorText);
20207 |    * });
20208 |    * ```
20209 |    *
20210 |    */
20211 |   failure(): null|{
20212 |     /**
20213 |      * Human-readable error message, e.g. `'net::ERR_FAILED'`.
20214 |      */
20215 |     errorText: string;
20216 |   };
20217 | 
20218 |   /**
20219 |    * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this request.
20220 |    *
20221 |    * **Usage**
20222 |    *
20223 |    * ```js
20224 |    * const frameUrl = request.frame().url();
20225 |    * ```
20226 |    *
20227 |    * **Details**
20228 |    *
20229 |    * Note that in some cases the frame is not available, and this method will throw.
20230 |    * - When request originates in the Service Worker. You can use `request.serviceWorker()` to check that.
20231 |    * - When navigation request is issued before the corresponding frame is created. You can use
20232 |    *   [request.isNavigationRequest()](https://playwright.dev/docs/api/class-request#request-is-navigation-request) to
20233 |    *   check that.
20234 |    *
20235 |    * Here is an example that handles all the cases:
20236 |    *
20237 |    * ```js
20238 |    * if (request.serviceWorker())
20239 |    *   console.log(`request ${request.url()} from a service worker`);
20240 |    * else if (request.isNavigationRequest())
20241 |    *   console.log(`request ${request.url()} is a navigation request`);
20242 |    * else
20243 |    *   console.log(`request ${request.url()} from a frame ${request.frame().url()}`);
20244 |    * ```
20245 |    *
20246 |    */
20247 |   frame(): Frame;
20248 | 
20249 |   /**
20250 |    * An object with the request HTTP headers. The header names are lower-cased. Note that this method does not return
20251 |    * security-related headers, including cookie-related ones. You can use
20252 |    * [request.allHeaders()](https://playwright.dev/docs/api/class-request#request-all-headers) for complete list of
20253 |    * headers that include `cookie` information.
20254 |    */
20255 |   headers(): { [key: string]: string; };
20256 | 
20257 |   /**
20258 |    * An array with all the request HTTP headers associated with this request. Unlike
20259 |    * [request.allHeaders()](https://playwright.dev/docs/api/class-request#request-all-headers), header names are NOT
20260 |    * lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
20261 |    */
20262 |   headersArray(): Promise<Array<{
20263 |     /**
20264 |      * Name of the header.
20265 |      */
20266 |     name: string;
20267 | 
20268 |     /**
20269 |      * Value of the header.
20270 |      */
20271 |     value: string;
20272 |   }>>;
20273 | 
20274 |   /**
20275 |    * Returns the value of the header matching the name. The name is case-insensitive.
20276 |    * @param name Name of the header.
20277 |    */
20278 |   headerValue(name: string): Promise<null|string>;
20279 | 
20280 |   /**
20281 |    * Whether this request is driving frame's navigation.
20282 |    *
20283 |    * Some navigation requests are issued before the corresponding frame is created, and therefore do not have
20284 |    * [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.
20285 |    */
20286 |   isNavigationRequest(): boolean;
20287 | 
20288 |   /**
20289 |    * Request's method (GET, POST, etc.)
20290 |    */
20291 |   method(): string;
20292 | 
20293 |   /**
20294 |    * Request's post body, if any.
20295 |    */
20296 |   postData(): null|string;
20297 | 
20298 |   /**
20299 |    * Request's post body in a binary form, if any.
20300 |    */
20301 |   postDataBuffer(): null|Buffer;
20302 | 
20303 |   /**
20304 |    * Returns parsed request's body for `form-urlencoded` and JSON as a fallback if any.
20305 |    *
20306 |    * When the response is `application/x-www-form-urlencoded` then a key/value object of the values will be returned.
20307 |    * Otherwise it will be parsed as JSON.
20308 |    */
20309 |   postDataJSON(): null|Serializable;
20310 | 
20311 |   /**
20312 |    * Request that was redirected by the server to this one, if any.
20313 |    *
20314 |    * When the server responds with a redirect, Playwright creates a new
20315 |    * [Request](https://playwright.dev/docs/api/class-request) object. The two requests are connected by
20316 |    * `redirectedFrom()` and `redirectedTo()` methods. When multiple server redirects has happened, it is possible to
20317 |    * construct the whole redirect chain by repeatedly calling `redirectedFrom()`.
20318 |    *
20319 |    * **Usage**
20320 |    *
20321 |    * For example, if the website `http://example.com` redirects to `https://example.com`:
20322 |    *
20323 |    * ```js
20324 |    * const response = await page.goto('http://example.com');
20325 |    * console.log(response.request().redirectedFrom().url()); // 'http://example.com'
20326 |    * ```
20327 |    *
20328 |    * If the website `https://google.com` has no redirects:
20329 |    *
20330 |    * ```js
20331 |    * const response = await page.goto('https://google.com');
20332 |    * console.log(response.request().redirectedFrom()); // null
20333 |    * ```
20334 |    *
20335 |    */
20336 |   redirectedFrom(): null|Request;
20337 | 
20338 |   /**
20339 |    * New request issued by the browser if the server responded with redirect.
20340 |    *
20341 |    * **Usage**
20342 |    *
20343 |    * This method is the opposite of
20344 |    * [request.redirectedFrom()](https://playwright.dev/docs/api/class-request#request-redirected-from):
20345 |    *
20346 |    * ```js
20347 |    * console.log(request.redirectedFrom().redirectedTo() === request); // true
20348 |    * ```
20349 |    *
20350 |    */
20351 |   redirectedTo(): null|Request;
20352 | 
20353 |   /**
20354 |    * Contains the request's resource type as it was perceived by the rendering engine. ResourceType will be one of the
20355 |    * following: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`,
20356 |    * `eventsource`, `websocket`, `manifest`, `other`.
20357 |    */
20358 |   resourceType(): string;
20359 | 
20360 |   /**
20361 |    * Returns the matching [Response](https://playwright.dev/docs/api/class-response) object, or `null` if the response
20362 |    * was not received due to error.
20363 |    */
20364 |   response(): Promise<null|Response>;
20365 | 
20366 |   /**
20367 |    * The Service [Worker](https://playwright.dev/docs/api/class-worker) that is performing the request.
20368 |    *
20369 |    * **Details**
20370 |    *
20371 |    * This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
20372 |    *
20373 |    * Requests originated in a Service Worker do not have a
20374 |    * [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.
20375 |    */
20376 |   serviceWorker(): null|Worker;
20377 | 
20378 |   /**
20379 |    * Returns resource size information for given request.
20380 |    */
20381 |   sizes(): Promise<{
20382 |     /**
20383 |      * Size of the request body (POST data payload) in bytes. Set to 0 if there was no body.
20384 |      */
20385 |     requestBodySize: number;
20386 | 
20387 |     /**
20388 |      * Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the
20389 |      * body.
20390 |      */
20391 |     requestHeadersSize: number;
20392 | 
20393 |     /**
20394 |      * Size of the received response body (encoded) in bytes.
20395 |      */
20396 |     responseBodySize: number;
20397 | 
20398 |     /**
20399 |      * Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the
20400 |      * body.
20401 |      */
20402 |     responseHeadersSize: number;
20403 |   }>;
20404 | 
20405 |   /**
20406 |    * Returns resource timing information for given request. Most of the timing values become available upon the
20407 |    * response, `responseEnd` becomes available when request finishes. Find more information at
20408 |    * [Resource Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming).
20409 |    *
20410 |    * **Usage**
20411 |    *
20412 |    * ```js
20413 |    * const requestFinishedPromise = page.waitForEvent('requestfinished');
20414 |    * await page.goto('http://example.com');
20415 |    * const request = await requestFinishedPromise;
20416 |    * console.log(request.timing());
20417 |    * ```
20418 |    *
20419 |    */
20420 |   timing(): {
20421 |     /**
20422 |      * Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC
20423 |      */
20424 |     startTime: number;
20425 | 
20426 |     /**
20427 |      * Time immediately before the browser starts the domain name lookup for the resource. The value is given in
20428 |      * milliseconds relative to `startTime`, -1 if not available.
20429 |      */
20430 |     domainLookupStart: number;
20431 | 
20432 |     /**
20433 |      * Time immediately after the browser starts the domain name lookup for the resource. The value is given in
20434 |      * milliseconds relative to `startTime`, -1 if not available.
20435 |      */
20436 |     domainLookupEnd: number;
20437 | 
20438 |     /**
20439 |      * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20440 |      * The value is given in milliseconds relative to `startTime`, -1 if not available.
20441 |      */
20442 |     connectStart: number;
20443 | 
20444 |     /**
20445 |      * Time immediately before the browser starts the handshake process to secure the current connection. The value is
20446 |      * given in milliseconds relative to `startTime`, -1 if not available.
20447 |      */
20448 |     secureConnectionStart: number;
20449 | 
20450 |     /**
20451 |      * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20452 |      * The value is given in milliseconds relative to `startTime`, -1 if not available.
20453 |      */
20454 |     connectEnd: number;
20455 | 
20456 |     /**
20457 |      * Time immediately before the browser starts requesting the resource from the server, cache, or local resource. The
20458 |      * value is given in milliseconds relative to `startTime`, -1 if not available.
20459 |      */
20460 |     requestStart: number;
20461 | 
20462 |     /**
20463 |      * Time immediately after the browser receives the first byte of the response from the server, cache, or local
20464 |      * resource. The value is given in milliseconds relative to `startTime`, -1 if not available.
20465 |      */
20466 |     responseStart: number;
20467 | 
20468 |     /**
20469 |      * Time immediately after the browser receives the last byte of the resource or immediately before the transport
20470 |      * connection is closed, whichever comes first. The value is given in milliseconds relative to `startTime`, -1 if not
20471 |      * available.
20472 |      */
20473 |     responseEnd: number;
20474 |   };
20475 | 
20476 |   /**
20477 |    * URL of the request.
20478 |    */
20479 |   url(): string;
20480 | }
20481 | 
20482 | /**
20483 |  * [Response](https://playwright.dev/docs/api/class-response) class represents responses which are received by page.
20484 |  */
20485 | export interface Response {
20486 |   /**
20487 |    * An object with all the response HTTP headers associated with this response.
20488 |    */
20489 |   allHeaders(): Promise<{ [key: string]: string; }>;
20490 | 
20491 |   /**
20492 |    * Returns the buffer with response body.
20493 |    */
20494 |   body(): Promise<Buffer>;
20495 | 
20496 |   /**
20497 |    * Waits for this response to finish, returns always `null`.
20498 |    */
20499 |   finished(): Promise<null|Error>;
20500 | 
20501 |   /**
20502 |    * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this response.
20503 |    */
20504 |   frame(): Frame;
20505 | 
20506 |   /**
20507 |    * Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via
20508 |    * [FetchEvent.respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)).
20509 |    */
20510 |   fromServiceWorker(): boolean;
20511 | 
20512 |   /**
20513 |    * An object with the response HTTP headers. The header names are lower-cased. Note that this method does not return
20514 |    * security-related headers, including cookie-related ones. You can use
20515 |    * [response.allHeaders()](https://playwright.dev/docs/api/class-response#response-all-headers) for complete list of
20516 |    * headers that include `cookie` information.
20517 |    */
20518 |   headers(): { [key: string]: string; };
20519 | 
20520 |   /**
20521 |    * An array with all the request HTTP headers associated with this response. Unlike
20522 |    * [response.allHeaders()](https://playwright.dev/docs/api/class-response#response-all-headers), header names are NOT
20523 |    * lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
20524 |    */
20525 |   headersArray(): Promise<Array<{
20526 |     /**
20527 |      * Name of the header.
20528 |      */
20529 |     name: string;
20530 | 
20531 |     /**
20532 |      * Value of the header.
20533 |      */
20534 |     value: string;
20535 |   }>>;
20536 | 
20537 |   /**
20538 |    * Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same
20539 |    * name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is
20540 |    * used. If no headers are found, `null` is returned.
20541 |    * @param name Name of the header.
20542 |    */
20543 |   headerValue(name: string): Promise<null|string>;
20544 | 
20545 |   /**
20546 |    * Returns all values of the headers matching the name, for example `set-cookie`. The name is case-insensitive.
20547 |    * @param name Name of the header.
20548 |    */
20549 |   headerValues(name: string): Promise<Array<string>>;
20550 | 
20551 |   /**
20552 |    * Returns the JSON representation of response body.
20553 |    *
20554 |    * This method will throw if the response body is not parsable via `JSON.parse`.
20555 |    */
20556 |   json(): Promise<Serializable>;
20557 | 
20558 |   /**
20559 |    * Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
20560 |    */
20561 |   ok(): boolean;
20562 | 
20563 |   /**
20564 |    * Returns the matching [Request](https://playwright.dev/docs/api/class-request) object.
20565 |    */
20566 |   request(): Request;
20567 | 
20568 |   /**
20569 |    * Returns SSL and other security information.
20570 |    */
20571 |   securityDetails(): Promise<null|{
20572 |     /**
20573 |      * Common Name component of the Issuer field. from the certificate. This should only be used for informational
20574 |      * purposes. Optional.
20575 |      */
20576 |     issuer?: string;
20577 | 
20578 |     /**
20579 |      * The specific TLS protocol used. (e.g. `TLS 1.3`). Optional.
20580 |      */
20581 |     protocol?: string;
20582 | 
20583 |     /**
20584 |      * Common Name component of the Subject field from the certificate. This should only be used for informational
20585 |      * purposes. Optional.
20586 |      */
20587 |     subjectName?: string;
20588 | 
20589 |     /**
20590 |      * Unix timestamp (in seconds) specifying when this cert becomes valid. Optional.
20591 |      */
20592 |     validFrom?: number;
20593 | 
20594 |     /**
20595 |      * Unix timestamp (in seconds) specifying when this cert becomes invalid. Optional.
20596 |      */
20597 |     validTo?: number;
20598 |   }>;
20599 | 
20600 |   /**
20601 |    * Returns the IP address and port of the server.
20602 |    */
20603 |   serverAddr(): Promise<null|{
20604 |     /**
20605 |      * IPv4 or IPV6 address of the server.
20606 |      */
20607 |     ipAddress: string;
20608 | 
20609 |     port: number;
20610 |   }>;
20611 | 
20612 |   /**
20613 |    * Contains the status code of the response (e.g., 200 for a success).
20614 |    */
20615 |   status(): number;
20616 | 
20617 |   /**
20618 |    * Contains the status text of the response (e.g. usually an "OK" for a success).
20619 |    */
20620 |   statusText(): string;
20621 | 
20622 |   /**
20623 |    * Returns the text representation of response body.
20624 |    */
20625 |   text(): Promise<string>;
20626 | 
20627 |   /**
20628 |    * Contains the URL of the response.
20629 |    */
20630 |   url(): string;
20631 | }
20632 | 
20633 | /**
20634 |  * Whenever a network route is set up with
20635 |  * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
20636 |  * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route),
20637 |  * the `Route` object allows to handle the route.
20638 |  *
20639 |  * Learn more about [networking](https://playwright.dev/docs/network).
20640 |  */
20641 | export interface Route {
20642 |   /**
20643 |    * Aborts the route's request.
20644 |    * @param errorCode Optional error code. Defaults to `failed`, could be one of the following:
20645 |    * - `'aborted'` - An operation was aborted (due to user action)
20646 |    * - `'accessdenied'` - Permission to access a resource, other than the network, was denied
20647 |    * - `'addressunreachable'` - The IP address is unreachable. This usually means that there is no route to the
20648 |    * specified host or network.
20649 |    * - `'blockedbyclient'` - The client chose to block the request.
20650 |    * - `'blockedbyresponse'` - The request failed because the response was delivered along with requirements which are
20651 |    * not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance).
20652 |    * - `'connectionaborted'` - A connection timed out as a result of not receiving an ACK for data sent.
20653 |    * - `'connectionclosed'` - A connection was closed (corresponding to a TCP FIN).
20654 |    * - `'connectionfailed'` - A connection attempt failed.
20655 |    * - `'connectionrefused'` - A connection attempt was refused.
20656 |    * - `'connectionreset'` - A connection was reset (corresponding to a TCP RST).
20657 |    * - `'internetdisconnected'` - The Internet connection has been lost.
20658 |    * - `'namenotresolved'` - The host name could not be resolved.
20659 |    * - `'timedout'` - An operation timed out.
20660 |    * - `'failed'` - A generic failure occurred.
20661 |    */
20662 |   abort(errorCode?: string): Promise<void>;
20663 | 
20664 |   /**
20665 |    * Sends route's request to the network with optional overrides.
20666 |    *
20667 |    * **Usage**
20668 |    *
20669 |    * ```js
20670 |    * await page.route('**\/*', async (route, request) => {
20671 |    *   // Override headers
20672 |    *   const headers = {
20673 |    *     ...request.headers(),
20674 |    *     foo: 'foo-value', // set "foo" header
20675 |    *     bar: undefined, // remove "bar" header
20676 |    *   };
20677 |    *   await route.continue({ headers });
20678 |    * });
20679 |    * ```
20680 |    *
20681 |    * **Details**
20682 |    *
20683 |    * The [`headers`](https://playwright.dev/docs/api/class-route#route-continue-option-headers) option applies to both
20684 |    * the routed request and any redirects it initiates. However,
20685 |    * [`url`](https://playwright.dev/docs/api/class-route#route-continue-option-url),
20686 |    * [`method`](https://playwright.dev/docs/api/class-route#route-continue-option-method), and
20687 |    * [`postData`](https://playwright.dev/docs/api/class-route#route-continue-option-post-data) only apply to the
20688 |    * original request and are not carried over to redirected requests.
20689 |    *
20690 |    * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) will immediately send the
20691 |    * request to the network, other matching handlers won't be invoked. Use
20692 |    * [route.fallback([options])](https://playwright.dev/docs/api/class-route#route-fallback) If you want next matching
20693 |    * handler in the chain to be invoked.
20694 |    * @param options
20695 |    */
20696 |   continue(options?: {
20697 |     /**
20698 |      * If set changes the request HTTP headers. Header values will be converted to a string.
20699 |      */
20700 |     headers?: { [key: string]: string; };
20701 | 
20702 |     /**
20703 |      * If set changes the request method (e.g. GET or POST).
20704 |      */
20705 |     method?: string;
20706 | 
20707 |     /**
20708 |      * If set changes the post data of request.
20709 |      */
20710 |     postData?: string|Buffer|Serializable;
20711 | 
20712 |     /**
20713 |      * If set changes the request URL. New URL must have same protocol as original one.
20714 |      */
20715 |     url?: string;
20716 |   }): Promise<void>;
20717 | 
20718 |   /**
20719 |    * Continues route's request with optional overrides. The method is similar to
20720 |    * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) with the difference that
20721 |    * other matching handlers will be invoked before sending the request.
20722 |    *
20723 |    * **Usage**
20724 |    *
20725 |    * When several routes match the given pattern, they run in the order opposite to their registration. That way the
20726 |    * last registered route can always override all the previous ones. In the example below, request will be handled by
20727 |    * the bottom-most handler first, then it'll fall back to the previous one and in the end will be aborted by the first
20728 |    * registered route.
20729 |    *
20730 |    * ```js
20731 |    * await page.route('**\/*', async route => {
20732 |    *   // Runs last.
20733 |    *   await route.abort();
20734 |    * });
20735 |    * await page.route('**\/*', async route => {
20736 |    *   // Runs second.
20737 |    *   await route.fallback();
20738 |    * });
20739 |    * await page.route('**\/*', async route => {
20740 |    *   // Runs first.
20741 |    *   await route.fallback();
20742 |    * });
20743 |    * ```
20744 |    *
20745 |    * Registering multiple routes is useful when you want separate handlers to handle different kinds of requests, for
20746 |    * example API calls vs page resources or GET requests vs POST requests as in the example below.
20747 |    *
20748 |    * ```js
20749 |    * // Handle GET requests.
20750 |    * await page.route('**\/*', async route => {
20751 |    *   if (route.request().method() !== 'GET') {
20752 |    *     await route.fallback();
20753 |    *     return;
20754 |    *   }
20755 |    *   // Handling GET only.
20756 |    *   // ...
20757 |    * });
20758 |    *
20759 |    * // Handle POST requests.
20760 |    * await page.route('**\/*', async route => {
20761 |    *   if (route.request().method() !== 'POST') {
20762 |    *     await route.fallback();
20763 |    *     return;
20764 |    *   }
20765 |    *   // Handling POST only.
20766 |    *   // ...
20767 |    * });
20768 |    * ```
20769 |    *
20770 |    * One can also modify request while falling back to the subsequent handler, that way intermediate route handler can
20771 |    * modify url, method, headers and postData of the request.
20772 |    *
20773 |    * ```js
20774 |    * await page.route('**\/*', async (route, request) => {
20775 |    *   // Override headers
20776 |    *   const headers = {
20777 |    *     ...request.headers(),
20778 |    *     foo: 'foo-value', // set "foo" header
20779 |    *     bar: undefined, // remove "bar" header
20780 |    *   };
20781 |    *   await route.fallback({ headers });
20782 |    * });
20783 |    * ```
20784 |    *
20785 |    * Use [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) to immediately send the
20786 |    * request to the network, other matching handlers won't be invoked in that case.
20787 |    * @param options
20788 |    */
20789 |   fallback(options?: {
20790 |     /**
20791 |      * If set changes the request HTTP headers. Header values will be converted to a string.
20792 |      */
20793 |     headers?: { [key: string]: string; };
20794 | 
20795 |     /**
20796 |      * If set changes the request method (e.g. GET or POST).
20797 |      */
20798 |     method?: string;
20799 | 
20800 |     /**
20801 |      * If set changes the post data of request.
20802 |      */
20803 |     postData?: string|Buffer|Serializable;
20804 | 
20805 |     /**
20806 |      * If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the
20807 |      * route matching, all the routes are matched using the original request URL.
20808 |      */
20809 |     url?: string;
20810 |   }): Promise<void>;
20811 | 
20812 |   /**
20813 |    * Performs the request and fetches result without fulfilling it, so that the response could be modified and then
20814 |    * fulfilled.
20815 |    *
20816 |    * **Usage**
20817 |    *
20818 |    * ```js
20819 |    * await page.route('https://dog.ceo/api/breeds/list/all', async route => {
20820 |    *   const response = await route.fetch();
20821 |    *   const json = await response.json();
20822 |    *   json.message['big_red_dog'] = [];
20823 |    *   await route.fulfill({ response, json });
20824 |    * });
20825 |    * ```
20826 |    *
20827 |    * **Details**
20828 |    *
20829 |    * Note that [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) option will apply to
20830 |    * the fetched request as well as any redirects initiated by it. If you want to only apply
20831 |    * [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) to the original request, but
20832 |    * not to redirects, look into [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue)
20833 |    * instead.
20834 |    * @param options
20835 |    */
20836 |   fetch(options?: {
20837 |     /**
20838 |      * If set changes the request HTTP headers. Header values will be converted to a string.
20839 |      */
20840 |     headers?: { [key: string]: string; };
20841 | 
20842 |     /**
20843 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
20844 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
20845 |      */
20846 |     maxRedirects?: number;
20847 | 
20848 |     /**
20849 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
20850 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
20851 |      */
20852 |     maxRetries?: number;
20853 | 
20854 |     /**
20855 |      * If set changes the request method (e.g. GET or POST).
20856 |      */
20857 |     method?: string;
20858 | 
20859 |     /**
20860 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
20861 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
20862 |      * header will be set to `application/octet-stream` if not explicitly set.
20863 |      */
20864 |     postData?: string|Buffer|Serializable;
20865 | 
20866 |     /**
20867 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
20868 |      */
20869 |     timeout?: number;
20870 | 
20871 |     /**
20872 |      * If set changes the request URL. New URL must have same protocol as original one.
20873 |      */
20874 |     url?: string;
20875 |   }): Promise<APIResponse>;
20876 | 
20877 |   /**
20878 |    * Fulfills route's request with given response.
20879 |    *
20880 |    * **Usage**
20881 |    *
20882 |    * An example of fulfilling all requests with 404 responses:
20883 |    *
20884 |    * ```js
20885 |    * await page.route('**\/*', async route => {
20886 |    *   await route.fulfill({
20887 |    *     status: 404,
20888 |    *     contentType: 'text/plain',
20889 |    *     body: 'Not Found!'
20890 |    *   });
20891 |    * });
20892 |    * ```
20893 |    *
20894 |    * An example of serving static file:
20895 |    *
20896 |    * ```js
20897 |    * await page.route('**\/xhr_endpoint', route => route.fulfill({ path: 'mock_data.json' }));
20898 |    * ```
20899 |    *
20900 |    * @param options
20901 |    */
20902 |   fulfill(options?: {
20903 |     /**
20904 |      * Response body.
20905 |      */
20906 |     body?: string|Buffer;
20907 | 
20908 |     /**
20909 |      * If set, equals to setting `Content-Type` response header.
20910 |      */
20911 |     contentType?: string;
20912 | 
20913 |     /**
20914 |      * Response headers. Header values will be converted to a string.
20915 |      */
20916 |     headers?: { [key: string]: string; };
20917 | 
20918 |     /**
20919 |      * JSON response. This method will set the content type to `application/json` if not set.
20920 |      */
20921 |     json?: Serializable;
20922 | 
20923 |     /**
20924 |      * File path to respond with. The content type will be inferred from file extension. If `path` is a relative path,
20925 |      * then it is resolved relative to the current working directory.
20926 |      */
20927 |     path?: string;
20928 | 
20929 |     /**
20930 |      * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) to fulfill route's request with. Individual fields
20931 |      * of the response (such as headers) can be overridden using fulfill options.
20932 |      */
20933 |     response?: APIResponse;
20934 | 
20935 |     /**
20936 |      * Response status code, defaults to `200`.
20937 |      */
20938 |     status?: number;
20939 |   }): Promise<void>;
20940 | 
20941 |   /**
20942 |    * A request to be routed.
20943 |    */
20944 |   request(): Request;
20945 | }
20946 | 
20947 | /**
20948 |  * Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/docs/extensibility) for more
20949 |  * information.
20950 |  */
20951 | export interface Selectors {
20952 |   /**
20953 |    * Selectors must be registered before creating the page.
20954 |    *
20955 |    * **Usage**
20956 |    *
20957 |    * An example of registering selector engine that queries elements based on a tag name:
20958 |    *
20959 |    * ```js
20960 |    * const { selectors, firefox } = require('@playwright/test');  // Or 'chromium' or 'webkit'.
20961 |    *
20962 |    * (async () => {
20963 |    *   // Must be a function that evaluates to a selector engine instance.
20964 |    *   const createTagNameEngine = () => ({
20965 |    *     // Returns the first element matching given selector in the root's subtree.
20966 |    *     query(root, selector) {
20967 |    *       return root.querySelector(selector);
20968 |    *     },
20969 |    *
20970 |    *     // Returns all elements matching given selector in the root's subtree.
20971 |    *     queryAll(root, selector) {
20972 |    *       return Array.from(root.querySelectorAll(selector));
20973 |    *     }
20974 |    *   });
20975 |    *
20976 |    *   // Register the engine. Selectors will be prefixed with "tag=".
20977 |    *   await selectors.register('tag', createTagNameEngine);
20978 |    *
20979 |    *   const browser = await firefox.launch();
20980 |    *   const page = await browser.newPage();
20981 |    *   await page.setContent(`<div><button>Click me</button></div>`);
20982 |    *
20983 |    *   // Use the selector prefixed with its name.
20984 |    *   const button = page.locator('tag=button');
20985 |    *   // We can combine it with built-in locators.
20986 |    *   await page.locator('tag=div').getByText('Click me').click();
20987 |    *   // Can use it in any methods supporting selectors.
20988 |    *   const buttonCount = await page.locator('tag=button').count();
20989 |    *
20990 |    *   await browser.close();
20991 |    * })();
20992 |    * ```
20993 |    *
20994 |    * @param name Name that is used in selectors as a prefix, e.g. `{name: 'foo'}` enables `foo=myselectorbody` selectors. May only
20995 |    * contain `[a-zA-Z0-9_]` characters.
20996 |    * @param script Script that evaluates to a selector engine instance. The script is evaluated in the page context.
20997 |    * @param options
20998 |    */
20999 |   register(name: string, script: Function|string|{
21000 |     /**
21001 |      * Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working
21002 |      * directory. Optional.
21003 |      */
21004 |     path?: string;
21005 | 
21006 |     /**
21007 |      * Raw script content. Optional.
21008 |      */
21009 |     content?: string;
21010 |   }, options?: {
21011 |     /**
21012 |      * Whether to run this selector engine in isolated JavaScript environment. This environment has access to the same
21013 |      * DOM, but not any JavaScript objects from the frame's scripts. Defaults to `false`. Note that running as a content
21014 |      * script is not guaranteed when this engine is used together with other registered engines.
21015 |      */
21016 |     contentScript?: boolean;
21017 |   }): Promise<void>;
21018 | 
21019 |   /**
21020 |    * Defines custom attribute name to be used in
21021 |    * [page.getByTestId(testId)](https://playwright.dev/docs/api/class-page#page-get-by-test-id). `data-testid` is used
21022 |    * by default.
21023 |    * @param attributeName Test id attribute name.
21024 |    */
21025 |   setTestIdAttribute(attributeName: string): void;
21026 | }
21027 | 
21028 | /**
21029 |  * The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on
21030 |  * the touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
21031 |  */
21032 | export interface Touchscreen {
21033 |   /**
21034 |    * Dispatches a `touchstart` and `touchend` event with a single touch at the position
21035 |    * ([`x`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-x),[`y`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-y)).
21036 |    *
21037 |    * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
21038 |    * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
21039 |    * browser context is false.
21040 |    *
21041 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
21042 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
21043 |    */
21044 |   tap(x: number, y: number): Promise<void>;
21045 | }
21046 | 
21047 | /**
21048 |  * API for collecting and saving Playwright traces. Playwright traces can be opened in
21049 |  * [Trace Viewer](https://playwright.dev/docs/trace-viewer) after Playwright script runs.
21050 |  *
21051 |  * Start recording a trace before performing actions. At the end, stop tracing and save it to a file.
21052 |  *
21053 |  * ```js
21054 |  * const browser = await chromium.launch();
21055 |  * const context = await browser.newContext();
21056 |  * await context.tracing.start({ screenshots: true, snapshots: true });
21057 |  * const page = await context.newPage();
21058 |  * await page.goto('https://playwright.dev');
21059 |  * await context.tracing.stop({ path: 'trace.zip' });
21060 |  * ```
21061 |  *
21062 |  */
21063 | export interface Tracing {
21064 |   /**
21065 |    * **NOTE** Use `test.step` instead when available.
21066 |    *
21067 |    * Creates a new group within the trace, assigning any subsequent API calls to this group, until
21068 |    * [tracing.groupEnd()](https://playwright.dev/docs/api/class-tracing#tracing-group-end) is called. Groups can be
21069 |    * nested and will be visible in the trace viewer.
21070 |    *
21071 |    * **Usage**
21072 |    *
21073 |    * ```js
21074 |    * // use test.step instead
21075 |    * await test.step('Log in', async () => {
21076 |    *   // ...
21077 |    * });
21078 |    * ```
21079 |    *
21080 |    * @param name Group name shown in the trace viewer.
21081 |    * @param options
21082 |    */
21083 |   group(name: string, options?: {
21084 |     /**
21085 |      * Specifies a custom location for the group to be shown in the trace viewer. Defaults to the location of the
21086 |      * [tracing.group(name[, options])](https://playwright.dev/docs/api/class-tracing#tracing-group) call.
21087 |      */
21088 |     location?: {
21089 |       file: string;
21090 | 
21091 |       line?: number;
21092 | 
21093 |       column?: number;
21094 |     };
21095 |   }): Promise<void>;
21096 | 
21097 |   /**
21098 |    * Closes the last group created by
21099 |    * [tracing.group(name[, options])](https://playwright.dev/docs/api/class-tracing#tracing-group).
21100 |    */
21101 |   groupEnd(): Promise<void>;
21102 | 
21103 |   /**
21104 |    * Start tracing.
21105 |    *
21106 |    * **Usage**
21107 |    *
21108 |    * ```js
21109 |    * await context.tracing.start({ screenshots: true, snapshots: true });
21110 |    * const page = await context.newPage();
21111 |    * await page.goto('https://playwright.dev');
21112 |    * await context.tracing.stop({ path: 'trace.zip' });
21113 |    * ```
21114 |    *
21115 |    * @param options
21116 |    */
21117 |   start(options?: {
21118 |     /**
21119 |      * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
21120 |      * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
21121 |      * specified in
21122 |      * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
21123 |      * the final trace zip file name, you need to pass `path` option to
21124 |      * [tracing.stop([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop) instead.
21125 |      */
21126 |     name?: string;
21127 | 
21128 |     /**
21129 |      * Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
21130 |      */
21131 |     screenshots?: boolean;
21132 | 
21133 |     /**
21134 |      * If this option is true tracing will
21135 |      * - capture DOM snapshot on every action
21136 |      * - record network activity
21137 |      */
21138 |     snapshots?: boolean;
21139 | 
21140 |     /**
21141 |      * Whether to include source files for trace actions.
21142 |      */
21143 |     sources?: boolean;
21144 | 
21145 |     /**
21146 |      * Trace name to be shown in the Trace Viewer.
21147 |      */
21148 |     title?: string;
21149 |   }): Promise<void>;
21150 | 
21151 |   /**
21152 |    * Start a new trace chunk. If you'd like to record multiple traces on the same
21153 |    * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), use
21154 |    * [tracing.start([options])](https://playwright.dev/docs/api/class-tracing#tracing-start) once, and then create
21155 |    * multiple trace chunks with
21156 |    * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) and
21157 |    * [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk).
21158 |    *
21159 |    * **Usage**
21160 |    *
21161 |    * ```js
21162 |    * await context.tracing.start({ screenshots: true, snapshots: true });
21163 |    * const page = await context.newPage();
21164 |    * await page.goto('https://playwright.dev');
21165 |    *
21166 |    * await context.tracing.startChunk();
21167 |    * await page.getByText('Get Started').click();
21168 |    * // Everything between startChunk and stopChunk will be recorded in the trace.
21169 |    * await context.tracing.stopChunk({ path: 'trace1.zip' });
21170 |    *
21171 |    * await context.tracing.startChunk();
21172 |    * await page.goto('http://example.com');
21173 |    * // Save a second trace file with different actions.
21174 |    * await context.tracing.stopChunk({ path: 'trace2.zip' });
21175 |    * ```
21176 |    *
21177 |    * @param options
21178 |    */
21179 |   startChunk(options?: {
21180 |     /**
21181 |      * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
21182 |      * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
21183 |      * specified in
21184 |      * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
21185 |      * the final trace zip file name, you need to pass `path` option to
21186 |      * [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk) instead.
21187 |      */
21188 |     name?: string;
21189 | 
21190 |     /**
21191 |      * Trace name to be shown in the Trace Viewer.
21192 |      */
21193 |     title?: string;
21194 |   }): Promise<void>;
21195 | 
21196 |   /**
21197 |    * Stop tracing.
21198 |    * @param options
21199 |    */
21200 |   stop(options?: {
21201 |     /**
21202 |      * Export trace into the file with the given path.
21203 |      */
21204 |     path?: string;
21205 |   }): Promise<void>;
21206 | 
21207 |   /**
21208 |    * Stop the trace chunk. See
21209 |    * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) for more details
21210 |    * about multiple trace chunks.
21211 |    * @param options
21212 |    */
21213 |   stopChunk(options?: {
21214 |     /**
21215 |      * Export trace collected since the last
21216 |      * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) call into the
21217 |      * file with the given path.
21218 |      */
21219 |     path?: string;
21220 |   }): Promise<void>;
21221 | }
21222 | 
21223 | /**
21224 |  * When browser context is created with the `recordVideo` option, each page has a video object associated with it.
21225 |  *
21226 |  * ```js
21227 |  * console.log(await page.video().path());
21228 |  * ```
21229 |  *
21230 |  */
21231 | export interface Video {
21232 |   /**
21233 |    * Deletes the video file. Will wait for the video to finish if necessary.
21234 |    */
21235 |   delete(): Promise<void>;
21236 | 
21237 |   /**
21238 |    * Returns the file system path this video will be recorded to. The video is guaranteed to be written to the
21239 |    * filesystem upon closing the browser context. This method throws when connected remotely.
21240 |    */
21241 |   path(): Promise<string>;
21242 | 
21243 |   /**
21244 |    * Saves the video to a user-specified path. It is safe to call this method while the video is still in progress, or
21245 |    * after the page has closed. This method waits until the page is closed and the video is fully saved.
21246 |    * @param path Path where the video should be saved.
21247 |    */
21248 |   saveAs(path: string): Promise<void>;
21249 | }
21250 | 
21251 | /**
21252 |  * [WebError](https://playwright.dev/docs/api/class-weberror) class represents an unhandled exception thrown in the
21253 |  * page. It is dispatched via the
21254 |  * [browserContext.on('weberror')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-web-error)
21255 |  * event.
21256 |  *
21257 |  * ```js
21258 |  * // Log all uncaught errors to the terminal
21259 |  * context.on('weberror', webError => {
21260 |  *   console.log(`Uncaught exception: "${webError.error()}"`);
21261 |  * });
21262 |  *
21263 |  * // Navigate to a page with an exception.
21264 |  * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
21265 |  * ```
21266 |  *
21267 |  */
21268 | export interface WebError {
21269 |   /**
21270 |    * Unhandled error that was thrown.
21271 |    */
21272 |   error(): Error;
21273 | 
21274 |   /**
21275 |    * The page that produced this unhandled exception, if any.
21276 |    */
21277 |   page(): null|Page;
21278 | }
21279 | 
21280 | /**
21281 |  * The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents websocket connections in the
21282 |  * page.
21283 |  */
21284 | export interface WebSocket {
21285 |   /**
21286 |    * Fired when the websocket closes.
21287 |    */
21288 |   on(event: 'close', listener: (webSocket: WebSocket) => any): this;
21289 | 
21290 |   /**
21291 |    * Fired when the websocket receives a frame.
21292 |    */
21293 |   on(event: 'framereceived', listener: (data: {
21294 |     /**
21295 |      * frame payload
21296 |      */
21297 |     payload: string|Buffer;
21298 |   }) => any): this;
21299 | 
21300 |   /**
21301 |    * Fired when the websocket sends a frame.
21302 |    */
21303 |   on(event: 'framesent', listener: (data: {
21304 |     /**
21305 |      * frame payload
21306 |      */
21307 |     payload: string|Buffer;
21308 |   }) => any): this;
21309 | 
21310 |   /**
21311 |    * Fired when the websocket has an error.
21312 |    */
21313 |   on(event: 'socketerror', listener: (string: string) => any): this;
21314 | 
21315 |   /**
21316 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21317 |    */
21318 |   once(event: 'close', listener: (webSocket: WebSocket) => any): this;
21319 | 
21320 |   /**
21321 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21322 |    */
21323 |   once(event: 'framereceived', listener: (data: {
21324 |     /**
21325 |      * frame payload
21326 |      */
21327 |     payload: string|Buffer;
21328 |   }) => any): this;
21329 | 
21330 |   /**
21331 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21332 |    */
21333 |   once(event: 'framesent', listener: (data: {
21334 |     /**
21335 |      * frame payload
21336 |      */
21337 |     payload: string|Buffer;
21338 |   }) => any): this;
21339 | 
21340 |   /**
21341 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21342 |    */
21343 |   once(event: 'socketerror', listener: (string: string) => any): this;
21344 | 
21345 |   /**
21346 |    * Fired when the websocket closes.
21347 |    */
21348 |   addListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21349 | 
21350 |   /**
21351 |    * Fired when the websocket receives a frame.
21352 |    */
21353 |   addListener(event: 'framereceived', listener: (data: {
21354 |     /**
21355 |      * frame payload
21356 |      */
21357 |     payload: string|Buffer;
21358 |   }) => any): this;
21359 | 
21360 |   /**
21361 |    * Fired when the websocket sends a frame.
21362 |    */
21363 |   addListener(event: 'framesent', listener: (data: {
21364 |     /**
21365 |      * frame payload
21366 |      */
21367 |     payload: string|Buffer;
21368 |   }) => any): this;
21369 | 
21370 |   /**
21371 |    * Fired when the websocket has an error.
21372 |    */
21373 |   addListener(event: 'socketerror', listener: (string: string) => any): this;
21374 | 
21375 |   /**
21376 |    * Removes an event listener added by `on` or `addListener`.
21377 |    */
21378 |   removeListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21379 | 
21380 |   /**
21381 |    * Removes an event listener added by `on` or `addListener`.
21382 |    */
21383 |   removeListener(event: 'framereceived', listener: (data: {
21384 |     /**
21385 |      * frame payload
21386 |      */
21387 |     payload: string|Buffer;
21388 |   }) => any): this;
21389 | 
21390 |   /**
21391 |    * Removes an event listener added by `on` or `addListener`.
21392 |    */
21393 |   removeListener(event: 'framesent', listener: (data: {
21394 |     /**
21395 |      * frame payload
21396 |      */
21397 |     payload: string|Buffer;
21398 |   }) => any): this;
21399 | 
21400 |   /**
21401 |    * Removes an event listener added by `on` or `addListener`.
21402 |    */
21403 |   removeListener(event: 'socketerror', listener: (string: string) => any): this;
21404 | 
21405 |   /**
21406 |    * Removes an event listener added by `on` or `addListener`.
21407 |    */
21408 |   off(event: 'close', listener: (webSocket: WebSocket) => any): this;
21409 | 
21410 |   /**
21411 |    * Removes an event listener added by `on` or `addListener`.
21412 |    */
21413 |   off(event: 'framereceived', listener: (data: {
21414 |     /**
21415 |      * frame payload
21416 |      */
21417 |     payload: string|Buffer;
21418 |   }) => any): this;
21419 | 
21420 |   /**
21421 |    * Removes an event listener added by `on` or `addListener`.
21422 |    */
21423 |   off(event: 'framesent', listener: (data: {
21424 |     /**
21425 |      * frame payload
21426 |      */
21427 |     payload: string|Buffer;
21428 |   }) => any): this;
21429 | 
21430 |   /**
21431 |    * Removes an event listener added by `on` or `addListener`.
21432 |    */
21433 |   off(event: 'socketerror', listener: (string: string) => any): this;
21434 | 
21435 |   /**
21436 |    * Fired when the websocket closes.
21437 |    */
21438 |   prependListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21439 | 
21440 |   /**
21441 |    * Fired when the websocket receives a frame.
21442 |    */
21443 |   prependListener(event: 'framereceived', listener: (data: {
21444 |     /**
21445 |      * frame payload
21446 |      */
21447 |     payload: string|Buffer;
21448 |   }) => any): this;
21449 | 
21450 |   /**
21451 |    * Fired when the websocket sends a frame.
21452 |    */
21453 |   prependListener(event: 'framesent', listener: (data: {
21454 |     /**
21455 |      * frame payload
21456 |      */
21457 |     payload: string|Buffer;
21458 |   }) => any): this;
21459 | 
21460 |   /**
21461 |    * Fired when the websocket has an error.
21462 |    */
21463 |   prependListener(event: 'socketerror', listener: (string: string) => any): this;
21464 | 
21465 |   /**
21466 |    * Indicates that the web socket has been closed.
21467 |    */
21468 |   isClosed(): boolean;
21469 | 
21470 |   /**
21471 |    * Contains the URL of the WebSocket.
21472 |    */
21473 |   url(): string;
21474 | 
21475 |   /**
21476 |    * Fired when the websocket closes.
21477 |    */
21478 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
21479 | 
21480 |   /**
21481 |    * Fired when the websocket receives a frame.
21482 |    */
21483 |   waitForEvent(event: 'framereceived', optionsOrPredicate?: { predicate?: (data: {
21484 |     /**
21485 |      * frame payload
21486 |      */
21487 |     payload: string|Buffer;
21488 |   }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
21489 |     /**
21490 |      * frame payload
21491 |      */
21492 |     payload: string|Buffer;
21493 |   }) => boolean | Promise<boolean>)): Promise<{
21494 |     /**
21495 |      * frame payload
21496 |      */
21497 |     payload: string|Buffer;
21498 |   }>;
21499 | 
21500 |   /**
21501 |    * Fired when the websocket sends a frame.
21502 |    */
21503 |   waitForEvent(event: 'framesent', optionsOrPredicate?: { predicate?: (data: {
21504 |     /**
21505 |      * frame payload
21506 |      */
21507 |     payload: string|Buffer;
21508 |   }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
21509 |     /**
21510 |      * frame payload
21511 |      */
21512 |     payload: string|Buffer;
21513 |   }) => boolean | Promise<boolean>)): Promise<{
21514 |     /**
21515 |      * frame payload
21516 |      */
21517 |     payload: string|Buffer;
21518 |   }>;
21519 | 
21520 |   /**
21521 |    * Fired when the websocket has an error.
21522 |    */
21523 |   waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: string) => boolean | Promise<boolean>, timeout?: number } | ((string: string) => boolean | Promise<boolean>)): Promise<string>;
21524 | 
21525 | }
21526 | 
21527 | interface AccessibilitySnapshotOptions {
21528 |   /**
21529 |    * Prune uninteresting nodes from the tree. Defaults to `true`.
21530 |    */
21531 |   interestingOnly?: boolean;
21532 | 
21533 |   /**
21534 |    * The root DOM element for the snapshot. Defaults to the whole page.
21535 |    */
21536 |   root?: ElementHandle;
21537 | }
21538 | 
21539 | export interface LaunchOptions {
21540 |   /**
21541 |    * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
21542 |    *
21543 |    * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
21544 |    * [here](https://peter.sh/experiments/chromium-command-line-switches/).
21545 |    */
21546 |   args?: Array<string>;
21547 | 
21548 |   /**
21549 |    * Browser distribution channel.
21550 |    *
21551 |    * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#opt-in-to-new-headless-mode).
21552 |    *
21553 |    * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
21554 |    * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
21555 |    */
21556 |   channel?: string;
21557 | 
21558 |   /**
21559 |    * Enable Chromium sandboxing. Defaults to `false`.
21560 |    */
21561 |   chromiumSandbox?: boolean;
21562 | 
21563 |   /**
21564 |    * **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
21565 |    * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-headless) option will be
21566 |    * set `false`.
21567 |    * @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
21568 |    */
21569 |   devtools?: boolean;
21570 | 
21571 |   /**
21572 |    * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
21573 |    * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
21574 |    * created in is closed.
21575 |    */
21576 |   downloadsPath?: string;
21577 | 
21578 |   /**
21579 |    * Specify environment variables that will be visible to the browser. Defaults to `process.env`.
21580 |    */
21581 |   env?: { [key: string]: string|number|boolean; };
21582 | 
21583 |   /**
21584 |    * Path to a browser executable to run instead of the bundled one. If
21585 |    * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path) is
21586 |    * a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
21587 |    * with the bundled Chromium, Firefox or WebKit, use at your own risk.
21588 |    */
21589 |   executablePath?: string;
21590 | 
21591 |   /**
21592 |    * Firefox user preferences. Learn more about the Firefox user preferences at
21593 |    * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
21594 |    */
21595 |   firefoxUserPrefs?: { [key: string]: string|number|boolean; };
21596 | 
21597 |   /**
21598 |    * Close the browser process on SIGHUP. Defaults to `true`.
21599 |    */
21600 |   handleSIGHUP?: boolean;
21601 | 
21602 |   /**
21603 |    * Close the browser process on Ctrl-C. Defaults to `true`.
21604 |    */
21605 |   handleSIGINT?: boolean;
21606 | 
21607 |   /**
21608 |    * Close the browser process on SIGTERM. Defaults to `true`.
21609 |    */
21610 |   handleSIGTERM?: boolean;
21611 | 
21612 |   /**
21613 |    * Whether to run browser in headless mode. More details for
21614 |    * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
21615 |    * [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
21616 |    * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
21617 |    * `true`.
21618 |    */
21619 |   headless?: boolean;
21620 | 
21621 |   /**
21622 |    * If `true`, Playwright does not pass its own configurations args and only uses the ones from
21623 |    * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-args). If an array is given,
21624 |    * then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
21625 |    */
21626 |   ignoreDefaultArgs?: boolean|Array<string>;
21627 | 
21628 |   /**
21629 |    * Logger sink for Playwright logging.
21630 |    */
21631 |   logger?: Logger;
21632 | 
21633 |   /**
21634 |    * Network proxy settings.
21635 |    */
21636 |   proxy?: {
21637 |     /**
21638 |      * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
21639 |      * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
21640 |      */
21641 |     server: string;
21642 | 
21643 |     /**
21644 |      * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
21645 |      */
21646 |     bypass?: string;
21647 | 
21648 |     /**
21649 |      * Optional username to use if HTTP proxy requires authentication.
21650 |      */
21651 |     username?: string;
21652 | 
21653 |     /**
21654 |      * Optional password to use if HTTP proxy requires authentication.
21655 |      */
21656 |     password?: string;
21657 |   };
21658 | 
21659 |   /**
21660 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21661 |    * on.
21662 |    */
21663 |   slowMo?: number;
21664 | 
21665 |   /**
21666 |    * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
21667 |    * to disable timeout.
21668 |    */
21669 |   timeout?: number;
21670 | 
21671 |   /**
21672 |    * If specified, traces are saved into this directory.
21673 |    */
21674 |   tracesDir?: string;
21675 | }
21676 | 
21677 | export interface ConnectOverCDPOptions {
21678 |   /**
21679 |    * Deprecated, use the first argument instead. Optional.
21680 |    */
21681 |   endpointURL?: string;
21682 | 
21683 |   /**
21684 |    * Additional HTTP headers to be sent with connect request. Optional.
21685 |    */
21686 |   headers?: { [key: string]: string; };
21687 | 
21688 |   /**
21689 |    * Logger sink for Playwright logging. Optional.
21690 |    */
21691 |   logger?: Logger;
21692 | 
21693 |   /**
21694 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21695 |    * on. Defaults to 0.
21696 |    */
21697 |   slowMo?: number;
21698 | 
21699 |   /**
21700 |    * Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass
21701 |    * `0` to disable timeout.
21702 |    */
21703 |   timeout?: number;
21704 | }
21705 | 
21706 | export interface ConnectOptions {
21707 |   /**
21708 |    * This option exposes network available on the connecting client to the browser being connected to. Consists of a
21709 |    * list of rules separated by comma.
21710 |    *
21711 |    * Available rules:
21712 |    * 1. Hostname pattern, for example: `example.com`, `*.org:99`, `x.*.y.com`, `*foo.org`.
21713 |    * 1. IP literal, for example: `127.0.0.1`, `0.0.0.0:99`, `[::1]`, `[0:0::1]:99`.
21714 |    * 1. `<loopback>` that matches local loopback interfaces: `localhost`, `*.localhost`, `127.0.0.1`, `[::1]`.
21715 |    *
21716 |    * Some common examples:
21717 |    * 1. `"*"` to expose all network.
21718 |    * 1. `"<loopback>"` to expose localhost network.
21719 |    * 1. `"*.test.internal-domain,*.staging.internal-domain,<loopback>"` to expose test/staging deployments and
21720 |    *    localhost.
21721 |    */
21722 |   exposeNetwork?: string;
21723 | 
21724 |   /**
21725 |    * Additional HTTP headers to be sent with web socket connect request. Optional.
21726 |    */
21727 |   headers?: { [key: string]: string; };
21728 | 
21729 |   /**
21730 |    * Logger sink for Playwright logging. Optional.
21731 |    */
21732 |   logger?: Logger;
21733 | 
21734 |   /**
21735 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21736 |    * on. Defaults to 0.
21737 |    */
21738 |   slowMo?: number;
21739 | 
21740 |   /**
21741 |    * Maximum time in milliseconds to wait for the connection to be established. Defaults to `0` (no timeout).
21742 |    */
21743 |   timeout?: number;
21744 | }
21745 | 
21746 | export interface LocatorScreenshotOptions {
21747 |   /**
21748 |    * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
21749 |    * treatment depending on their duration:
21750 |    * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
21751 |    * - infinite animations are canceled to initial state, and then played over after the screenshot.
21752 |    *
21753 |    * Defaults to `"allow"` that leaves animations untouched.
21754 |    */
21755 |   animations?: "disabled"|"allow";
21756 | 
21757 |   /**
21758 |    * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
21759 |    * changed.  Defaults to `"hide"`.
21760 |    */
21761 |   caret?: "hide"|"initial";
21762 | 
21763 |   /**
21764 |    * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
21765 |    * box `#FF00FF` (customized by
21766 |    * [`maskColor`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-mask-color)) that completely
21767 |    * covers its bounding box.
21768 |    */
21769 |   mask?: Array<Locator>;
21770 | 
21771 |   /**
21772 |    * Specify the color of the overlay box for masked elements, in
21773 |    * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
21774 |    */
21775 |   maskColor?: string;
21776 | 
21777 |   /**
21778 |    * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
21779 |    * Defaults to `false`.
21780 |    */
21781 |   omitBackground?: boolean;
21782 | 
21783 |   /**
21784 |    * The file path to save the image to. The screenshot type will be inferred from file extension. If
21785 |    * [`path`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-path) is a relative path, then it
21786 |    * is resolved relative to the current working directory. If no path is provided, the image won't be saved to the
21787 |    * disk.
21788 |    */
21789 |   path?: string;
21790 | 
21791 |   /**
21792 |    * The quality of the image, between 0-100. Not applicable to `png` images.
21793 |    */
21794 |   quality?: number;
21795 | 
21796 |   /**
21797 |    * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
21798 |    * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
21799 |    * screenshots of high-dpi devices will be twice as large or even larger.
21800 |    *
21801 |    * Defaults to `"device"`.
21802 |    */
21803 |   scale?: "css"|"device";
21804 | 
21805 |   /**
21806 |    * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
21807 |    * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
21808 |    * the Shadow DOM and applies to the inner frames.
21809 |    */
21810 |   style?: string;
21811 | 
21812 |   /**
21813 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
21814 |    * option in the config, or by using the
21815 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
21816 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
21817 |    */
21818 |   timeout?: number;
21819 | 
21820 |   /**
21821 |    * Specify screenshot type, defaults to `png`.
21822 |    */
21823 |   type?: "png"|"jpeg";
21824 | }
21825 | 
21826 | interface ElementHandleWaitForSelectorOptions {
21827 |   /**
21828 |    * Defaults to `'visible'`. Can be either:
21829 |    * - `'attached'` - wait for element to be present in DOM.
21830 |    * - `'detached'` - wait for element to not be present in DOM.
21831 |    * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
21832 |    *   without any content or with `display:none` has an empty bounding box and is not considered visible.
21833 |    * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
21834 |    *   `visibility:hidden`. This is opposite to the `'visible'` option.
21835 |    */
21836 |   state?: "attached"|"detached"|"visible"|"hidden";
21837 | 
21838 |   /**
21839 |    * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
21840 |    * element, the call throws an exception.
21841 |    */
21842 |   strict?: boolean;
21843 | 
21844 |   /**
21845 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
21846 |    * option in the config, or by using the
21847 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
21848 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
21849 |    */
21850 |   timeout?: number;
21851 | }
21852 | 
21853 | export interface BrowserContextOptions {
21854 |   /**
21855 |    * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
21856 |    */
21857 |   acceptDownloads?: boolean;
21858 | 
21859 |   /**
21860 |    * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
21861 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
21862 |    * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
21863 |    * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
21864 |    * or
21865 |    * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
21866 |    * it takes the base URL in consideration by using the
21867 |    * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
21868 |    * Unset by default. Examples:
21869 |    * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
21870 |    * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
21871 |    *   `http://localhost:3000/foo/bar.html`
21872 |    * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
21873 |    *   `http://localhost:3000/bar.html`
21874 |    */
21875 |   baseURL?: string;
21876 | 
21877 |   /**
21878 |    * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
21879 |    */
21880 |   bypassCSP?: boolean;
21881 | 
21882 |   /**
21883 |    * TLS Client Authentication allows the server to request a client certificate and verify it.
21884 |    *
21885 |    * **Details**
21886 |    *
21887 |    * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
21888 |    * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
21889 |    * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
21890 |    * with an exact match to the request origin that the certificate is valid for.
21891 |    *
21892 |    * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
21893 |    * work by replacing `localhost` with `local.playwright`.
21894 |    *
21895 |    */
21896 |   clientCertificates?: Array<{
21897 |     /**
21898 |      * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
21899 |      */
21900 |     origin: string;
21901 | 
21902 |     /**
21903 |      * Path to the file with the certificate in PEM format.
21904 |      */
21905 |     certPath?: string;
21906 | 
21907 |     /**
21908 |      * Direct value of the certificate in PEM format.
21909 |      */
21910 |     cert?: Buffer;
21911 | 
21912 |     /**
21913 |      * Path to the file with the private key in PEM format.
21914 |      */
21915 |     keyPath?: string;
21916 | 
21917 |     /**
21918 |      * Direct value of the private key in PEM format.
21919 |      */
21920 |     key?: Buffer;
21921 | 
21922 |     /**
21923 |      * Path to the PFX or PKCS12 encoded private key and certificate chain.
21924 |      */
21925 |     pfxPath?: string;
21926 | 
21927 |     /**
21928 |      * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
21929 |      */
21930 |     pfx?: Buffer;
21931 | 
21932 |     /**
21933 |      * Passphrase for the private key (PEM or PFX).
21934 |      */
21935 |     passphrase?: string;
21936 |   }>;
21937 | 
21938 |   /**
21939 |    * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
21940 |    * media feature, supported values are `'light'` and `'dark'`. See
21941 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
21942 |    * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
21943 |    */
21944 |   colorScheme?: null|"light"|"dark"|"no-preference";
21945 | 
21946 |   /**
21947 |    * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
21948 |    * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
21949 |    */
21950 |   deviceScaleFactor?: number;
21951 | 
21952 |   /**
21953 |    * An object containing additional HTTP headers to be sent with every request. Defaults to none.
21954 |    */
21955 |   extraHTTPHeaders?: { [key: string]: string; };
21956 | 
21957 |   /**
21958 |    * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
21959 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
21960 |    * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
21961 |    */
21962 |   forcedColors?: null|"active"|"none";
21963 | 
21964 |   geolocation?: Geolocation;
21965 | 
21966 |   /**
21967 |    * Specifies if viewport supports touch events. Defaults to false. Learn more about
21968 |    * [mobile emulation](https://playwright.dev/docs/emulation#devices).
21969 |    */
21970 |   hasTouch?: boolean;
21971 | 
21972 |   /**
21973 |    * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
21974 |    * origin is specified, the username and password are sent to any servers upon unauthorized responses.
21975 |    */
21976 |   httpCredentials?: HTTPCredentials;
21977 | 
21978 |   /**
21979 |    * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
21980 |    */
21981 |   ignoreHTTPSErrors?: boolean;
21982 | 
21983 |   /**
21984 |    * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
21985 |    * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
21986 |    * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
21987 |    */
21988 |   isMobile?: boolean;
21989 | 
21990 |   /**
21991 |    * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
21992 |    * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
21993 |    */
21994 |   javaScriptEnabled?: boolean;
21995 | 
21996 |   /**
21997 |    * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
21998 |    * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
21999 |    * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
22000 |    */
22001 |   locale?: string;
22002 | 
22003 |   /**
22004 |    * Logger sink for Playwright logging.
22005 |    */
22006 |   logger?: Logger;
22007 | 
22008 |   /**
22009 |    * Whether to emulate network being offline. Defaults to `false`. Learn more about
22010 |    * [network emulation](https://playwright.dev/docs/emulation#offline).
22011 |    */
22012 |   offline?: boolean;
22013 | 
22014 |   /**
22015 |    * A list of permissions to grant to all pages in this context. See
22016 |    * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
22017 |    * for more details. Defaults to none.
22018 |    */
22019 |   permissions?: Array<string>;
22020 | 
22021 |   /**
22022 |    * Network proxy settings to use with this context. Defaults to none.
22023 |    */
22024 |   proxy?: {
22025 |     /**
22026 |      * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
22027 |      * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
22028 |      */
22029 |     server: string;
22030 | 
22031 |     /**
22032 |      * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
22033 |      */
22034 |     bypass?: string;
22035 | 
22036 |     /**
22037 |      * Optional username to use if HTTP proxy requires authentication.
22038 |      */
22039 |     username?: string;
22040 | 
22041 |     /**
22042 |      * Optional password to use if HTTP proxy requires authentication.
22043 |      */
22044 |     password?: string;
22045 |   };
22046 | 
22047 |   /**
22048 |    * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
22049 |    * If not specified, the HAR is not recorded. Make sure to await
22050 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
22051 |    * the HAR to be saved.
22052 |    */
22053 |   recordHar?: {
22054 |     /**
22055 |      * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
22056 |      * `content` policy instead.
22057 |      */
22058 |     omitContent?: boolean;
22059 | 
22060 |     /**
22061 |      * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
22062 |      * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
22063 |      * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
22064 |      * files and to `embed` for all other file extensions.
22065 |      */
22066 |     content?: "omit"|"embed"|"attach";
22067 | 
22068 |     /**
22069 |      * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
22070 |      * default.
22071 |      */
22072 |     path: string;
22073 | 
22074 |     /**
22075 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
22076 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
22077 |      */
22078 |     mode?: "full"|"minimal";
22079 | 
22080 |     /**
22081 |      * A glob or regex pattern to filter requests that are stored in the HAR. When a
22082 |      * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
22083 |      * options was provided and the passed URL is a path, it gets merged via the
22084 |      * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
22085 |      */
22086 |     urlFilter?: string|RegExp;
22087 |   };
22088 | 
22089 |   /**
22090 |    * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
22091 |    * Make sure to await
22092 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
22093 |    * videos to be saved.
22094 |    */
22095 |   recordVideo?: {
22096 |     /**
22097 |      * Path to the directory to put videos into.
22098 |      */
22099 |     dir: string;
22100 | 
22101 |     /**
22102 |      * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
22103 |      * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
22104 |      * each page will be scaled down if necessary to fit the specified size.
22105 |      */
22106 |     size?: {
22107 |       /**
22108 |        * Video frame width.
22109 |        */
22110 |       width: number;
22111 | 
22112 |       /**
22113 |        * Video frame height.
22114 |        */
22115 |       height: number;
22116 |     };
22117 |   };
22118 | 
22119 |   /**
22120 |    * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
22121 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
22122 |    * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
22123 |    */
22124 |   reducedMotion?: null|"reduce"|"no-preference";
22125 | 
22126 |   /**
22127 |    * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
22128 |    * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-viewport) is set.
22129 |    */
22130 |   screen?: {
22131 |     /**
22132 |      * page width in pixels.
22133 |      */
22134 |     width: number;
22135 | 
22136 |     /**
22137 |      * page height in pixels.
22138 |      */
22139 |     height: number;
22140 |   };
22141 | 
22142 |   /**
22143 |    * Whether to allow sites to register Service workers. Defaults to `'allow'`.
22144 |    * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
22145 |    *   registered.
22146 |    * - `'block'`: Playwright will block all registration of Service Workers.
22147 |    */
22148 |   serviceWorkers?: "allow"|"block";
22149 | 
22150 |   /**
22151 |    * Learn more about [storage state and auth](https://playwright.dev/docs/auth).
22152 |    *
22153 |    * Populates context with given storage state. This option can be used to initialize context with logged-in
22154 |    * information obtained via
22155 |    * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state).
22156 |    */
22157 |   storageState?: string|{
22158 |     /**
22159 |      * Cookies to set for context
22160 |      */
22161 |     cookies: Array<{
22162 |       name: string;
22163 | 
22164 |       value: string;
22165 | 
22166 |       /**
22167 |        * Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like
22168 |        * this: ".example.com"
22169 |        */
22170 |       domain: string;
22171 | 
22172 |       /**
22173 |        * Domain and path are required
22174 |        */
22175 |       path: string;
22176 | 
22177 |       /**
22178 |        * Unix time in seconds.
22179 |        */
22180 |       expires: number;
22181 | 
22182 |       httpOnly: boolean;
22183 | 
22184 |       secure: boolean;
22185 | 
22186 |       /**
22187 |        * sameSite flag
22188 |        */
22189 |       sameSite: "Strict"|"Lax"|"None";
22190 |     }>;
22191 | 
22192 |     /**
22193 |      * localStorage to set for context
22194 |      */
22195 |     origins: Array<{
22196 |       origin: string;
22197 | 
22198 |       localStorage: Array<{
22199 |         name: string;
22200 | 
22201 |         value: string;
22202 |       }>;
22203 |     }>;
22204 |   };
22205 | 
22206 |   /**
22207 |    * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
22208 |    * selectors that imply single target DOM element will throw when more than one element matches the selector. This
22209 |    * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
22210 |    * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
22211 |    */
22212 |   strictSelectors?: boolean;
22213 | 
22214 |   /**
22215 |    * Changes the timezone of the context. See
22216 |    * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
22217 |    * for a list of supported timezone IDs. Defaults to the system timezone.
22218 |    */
22219 |   timezoneId?: string;
22220 | 
22221 |   /**
22222 |    * Specific user agent to use in this context.
22223 |    */
22224 |   userAgent?: string;
22225 | 
22226 |   /**
22227 |    * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
22228 |    */
22229 |   videoSize?: {
22230 |     /**
22231 |      * Video frame width.
22232 |      */
22233 |     width: number;
22234 | 
22235 |     /**
22236 |      * Video frame height.
22237 |      */
22238 |     height: number;
22239 |   };
22240 | 
22241 |   /**
22242 |    * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
22243 |    */
22244 |   videosPath?: string;
22245 | 
22246 |   /**
22247 |    * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
22248 |    * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
22249 |    *
22250 |    * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
22251 |    * by the operating system. It makes the execution of the tests non-deterministic.
22252 |    *
22253 |    */
22254 |   viewport?: null|ViewportSize;
22255 | }
22256 | 
22257 | export interface ViewportSize {
22258 |   /**
22259 |    * page width in pixels.
22260 |    */
22261 |   width: number;
22262 | 
22263 |   /**
22264 |    * page height in pixels.
22265 |    */
22266 |   height: number;
22267 | }
22268 | 
22269 | export interface HTTPCredentials {
22270 |   username: string;
22271 | 
22272 |   password: string;
22273 | 
22274 |   /**
22275 |    * Restrain sending http credentials on specific origin (scheme://host:port).
22276 |    */
22277 |   origin?: string;
22278 | 
22279 |   /**
22280 |    * This option only applies to the requests sent from corresponding
22281 |    * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
22282 |    * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
22283 |    * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
22284 |    * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
22285 |    */
22286 |   send?: "unauthorized"|"always";
22287 | }
22288 | 
22289 | export interface Geolocation {
22290 |   /**
22291 |    * Latitude between -90 and 90.
22292 |    */
22293 |   latitude: number;
22294 | 
22295 |   /**
22296 |    * Longitude between -180 and 180.
22297 |    */
22298 |   longitude: number;
22299 | 
22300 |   /**
22301 |    * Non-negative accuracy value. Defaults to `0`.
22302 |    */
22303 |   accuracy?: number;
22304 | }
22305 | 
22306 | export interface Cookie {
22307 |   name: string;
22308 | 
22309 |   value: string;
22310 | 
22311 |   domain: string;
22312 | 
22313 |   path: string;
22314 | 
22315 |   /**
22316 |    * Unix time in seconds.
22317 |    */
22318 |   expires: number;
22319 | 
22320 |   httpOnly: boolean;
22321 | 
22322 |   secure: boolean;
22323 | 
22324 |   sameSite: "Strict"|"Lax"|"None";
22325 | }
22326 | 
22327 | interface PageWaitForSelectorOptions {
22328 |   /**
22329 |    * Defaults to `'visible'`. Can be either:
22330 |    * - `'attached'` - wait for element to be present in DOM.
22331 |    * - `'detached'` - wait for element to not be present in DOM.
22332 |    * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
22333 |    *   without any content or with `display:none` has an empty bounding box and is not considered visible.
22334 |    * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
22335 |    *   `visibility:hidden`. This is opposite to the `'visible'` option.
22336 |    */
22337 |   state?: "attached"|"detached"|"visible"|"hidden";
22338 | 
22339 |   /**
22340 |    * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
22341 |    * element, the call throws an exception.
22342 |    */
22343 |   strict?: boolean;
22344 | 
22345 |   /**
22346 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22347 |    * option in the config, or by using the
22348 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22349 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22350 |    */
22351 |   timeout?: number;
22352 | }
22353 | 
22354 | interface PageWaitForFunctionOptions {
22355 |   /**
22356 |    * If [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is `'raf'`, then
22357 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) is constantly
22358 |    * executed in `requestAnimationFrame` callback. If
22359 |    * [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is a number, then it
22360 |    * is treated as an interval in milliseconds at which the function would be executed. Defaults to `raf`.
22361 |    */
22362 |   polling?: number|"raf";
22363 | 
22364 |   /**
22365 |    * Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
22366 |    * `actionTimeout` option in the config, or by using the
22367 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22368 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22369 |    */
22370 |   timeout?: number;
22371 | }
22372 | 
22373 | export interface PageScreenshotOptions {
22374 |   /**
22375 |    * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
22376 |    * treatment depending on their duration:
22377 |    * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
22378 |    * - infinite animations are canceled to initial state, and then played over after the screenshot.
22379 |    *
22380 |    * Defaults to `"allow"` that leaves animations untouched.
22381 |    */
22382 |   animations?: "disabled"|"allow";
22383 | 
22384 |   /**
22385 |    * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
22386 |    * changed.  Defaults to `"hide"`.
22387 |    */
22388 |   caret?: "hide"|"initial";
22389 | 
22390 |   /**
22391 |    * An object which specifies clipping of the resulting image.
22392 |    */
22393 |   clip?: {
22394 |     /**
22395 |      * x-coordinate of top-left corner of clip area
22396 |      */
22397 |     x: number;
22398 | 
22399 |     /**
22400 |      * y-coordinate of top-left corner of clip area
22401 |      */
22402 |     y: number;
22403 | 
22404 |     /**
22405 |      * width of clipping area
22406 |      */
22407 |     width: number;
22408 | 
22409 |     /**
22410 |      * height of clipping area
22411 |      */
22412 |     height: number;
22413 |   };
22414 | 
22415 |   /**
22416 |    * When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
22417 |    * `false`.
22418 |    */
22419 |   fullPage?: boolean;
22420 | 
22421 |   /**
22422 |    * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
22423 |    * box `#FF00FF` (customized by
22424 |    * [`maskColor`](https://playwright.dev/docs/api/class-page#page-screenshot-option-mask-color)) that completely covers
22425 |    * its bounding box.
22426 |    */
22427 |   mask?: Array<Locator>;
22428 | 
22429 |   /**
22430 |    * Specify the color of the overlay box for masked elements, in
22431 |    * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
22432 |    */
22433 |   maskColor?: string;
22434 | 
22435 |   /**
22436 |    * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
22437 |    * Defaults to `false`.
22438 |    */
22439 |   omitBackground?: boolean;
22440 | 
22441 |   /**
22442 |    * The file path to save the image to. The screenshot type will be inferred from file extension. If
22443 |    * [`path`](https://playwright.dev/docs/api/class-page#page-screenshot-option-path) is a relative path, then it is
22444 |    * resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk.
22445 |    */
22446 |   path?: string;
22447 | 
22448 |   /**
22449 |    * The quality of the image, between 0-100. Not applicable to `png` images.
22450 |    */
22451 |   quality?: number;
22452 | 
22453 |   /**
22454 |    * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
22455 |    * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
22456 |    * screenshots of high-dpi devices will be twice as large or even larger.
22457 |    *
22458 |    * Defaults to `"device"`.
22459 |    */
22460 |   scale?: "css"|"device";
22461 | 
22462 |   /**
22463 |    * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
22464 |    * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
22465 |    * the Shadow DOM and applies to the inner frames.
22466 |    */
22467 |   style?: string;
22468 | 
22469 |   /**
22470 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22471 |    * option in the config, or by using the
22472 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22473 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22474 |    */
22475 |   timeout?: number;
22476 | 
22477 |   /**
22478 |    * Specify screenshot type, defaults to `png`.
22479 |    */
22480 |   type?: "png"|"jpeg";
22481 | }
22482 | 
22483 | type Devices = {
22484 |   "Blackberry PlayBook": DeviceDescriptor;
22485 |   "Blackberry PlayBook landscape": DeviceDescriptor;
22486 |   "BlackBerry Z30": DeviceDescriptor;
22487 |   "BlackBerry Z30 landscape": DeviceDescriptor;
22488 |   "Galaxy Note 3": DeviceDescriptor;
22489 |   "Galaxy Note 3 landscape": DeviceDescriptor;
22490 |   "Galaxy Note II": DeviceDescriptor;
22491 |   "Galaxy Note II landscape": DeviceDescriptor;
22492 |   "Galaxy S III": DeviceDescriptor;
22493 |   "Galaxy S III landscape": DeviceDescriptor;
22494 |   "Galaxy S5": DeviceDescriptor;
22495 |   "Galaxy S5 landscape": DeviceDescriptor;
22496 |   "Galaxy S8": DeviceDescriptor;
22497 |   "Galaxy S8 landscape": DeviceDescriptor;
22498 |   "Galaxy S9+": DeviceDescriptor;
22499 |   "Galaxy S9+ landscape": DeviceDescriptor;
22500 |   "Galaxy Tab S4": DeviceDescriptor;
22501 |   "Galaxy Tab S4 landscape": DeviceDescriptor;
22502 |   "iPad (gen 5)": DeviceDescriptor;
22503 |   "iPad (gen 5) landscape": DeviceDescriptor;
22504 |   "iPad (gen 6)": DeviceDescriptor;
22505 |   "iPad (gen 6) landscape": DeviceDescriptor;
22506 |   "iPad (gen 7)": DeviceDescriptor;
22507 |   "iPad (gen 7) landscape": DeviceDescriptor;
22508 |   "iPad Mini": DeviceDescriptor;
22509 |   "iPad Mini landscape": DeviceDescriptor;
22510 |   "iPad Pro 11": DeviceDescriptor;
22511 |   "iPad Pro 11 landscape": DeviceDescriptor;
22512 |   "iPhone 6": DeviceDescriptor;
22513 |   "iPhone 6 landscape": DeviceDescriptor;
22514 |   "iPhone 6 Plus": DeviceDescriptor;
22515 |   "iPhone 6 Plus landscape": DeviceDescriptor;
22516 |   "iPhone 7": DeviceDescriptor;
22517 |   "iPhone 7 landscape": DeviceDescriptor;
22518 |   "iPhone 7 Plus": DeviceDescriptor;
22519 |   "iPhone 7 Plus landscape": DeviceDescriptor;
22520 |   "iPhone 8": DeviceDescriptor;
22521 |   "iPhone 8 landscape": DeviceDescriptor;
22522 |   "iPhone 8 Plus": DeviceDescriptor;
22523 |   "iPhone 8 Plus landscape": DeviceDescriptor;
22524 |   "iPhone SE": DeviceDescriptor;
22525 |   "iPhone SE landscape": DeviceDescriptor;
22526 |   "iPhone X": DeviceDescriptor;
22527 |   "iPhone X landscape": DeviceDescriptor;
22528 |   "iPhone XR": DeviceDescriptor;
22529 |   "iPhone XR landscape": DeviceDescriptor;
22530 |   "iPhone 11": DeviceDescriptor;
22531 |   "iPhone 11 landscape": DeviceDescriptor;
22532 |   "iPhone 11 Pro": DeviceDescriptor;
22533 |   "iPhone 11 Pro landscape": DeviceDescriptor;
22534 |   "iPhone 11 Pro Max": DeviceDescriptor;
22535 |   "iPhone 11 Pro Max landscape": DeviceDescriptor;
22536 |   "iPhone 12": DeviceDescriptor;
22537 |   "iPhone 12 landscape": DeviceDescriptor;
22538 |   "iPhone 12 Pro": DeviceDescriptor;
22539 |   "iPhone 12 Pro landscape": DeviceDescriptor;
22540 |   "iPhone 12 Pro Max": DeviceDescriptor;
22541 |   "iPhone 12 Pro Max landscape": DeviceDescriptor;
22542 |   "iPhone 12 Mini": DeviceDescriptor;
22543 |   "iPhone 12 Mini landscape": DeviceDescriptor;
22544 |   "iPhone 13": DeviceDescriptor;
22545 |   "iPhone 13 landscape": DeviceDescriptor;
22546 |   "iPhone 13 Pro": DeviceDescriptor;
22547 |   "iPhone 13 Pro landscape": DeviceDescriptor;
22548 |   "iPhone 13 Pro Max": DeviceDescriptor;
22549 |   "iPhone 13 Pro Max landscape": DeviceDescriptor;
22550 |   "iPhone 13 Mini": DeviceDescriptor;
22551 |   "iPhone 13 Mini landscape": DeviceDescriptor;
22552 |   "iPhone 14": DeviceDescriptor;
22553 |   "iPhone 14 landscape": DeviceDescriptor;
22554 |   "iPhone 14 Plus": DeviceDescriptor;
22555 |   "iPhone 14 Plus landscape": DeviceDescriptor;
22556 |   "iPhone 14 Pro": DeviceDescriptor;
22557 |   "iPhone 14 Pro landscape": DeviceDescriptor;
22558 |   "iPhone 14 Pro Max": DeviceDescriptor;
22559 |   "iPhone 14 Pro Max landscape": DeviceDescriptor;
22560 |   "iPhone 15": DeviceDescriptor;
22561 |   "iPhone 15 landscape": DeviceDescriptor;
22562 |   "iPhone 15 Plus": DeviceDescriptor;
22563 |   "iPhone 15 Plus landscape": DeviceDescriptor;
22564 |   "iPhone 15 Pro": DeviceDescriptor;
22565 |   "iPhone 15 Pro landscape": DeviceDescriptor;
22566 |   "iPhone 15 Pro Max": DeviceDescriptor;
22567 |   "iPhone 15 Pro Max landscape": DeviceDescriptor;
22568 |   "Kindle Fire HDX": DeviceDescriptor;
22569 |   "Kindle Fire HDX landscape": DeviceDescriptor;
22570 |   "LG Optimus L70": DeviceDescriptor;
22571 |   "LG Optimus L70 landscape": DeviceDescriptor;
22572 |   "Microsoft Lumia 550": DeviceDescriptor;
22573 |   "Microsoft Lumia 550 landscape": DeviceDescriptor;
22574 |   "Microsoft Lumia 950": DeviceDescriptor;
22575 |   "Microsoft Lumia 950 landscape": DeviceDescriptor;
22576 |   "Nexus 10": DeviceDescriptor;
22577 |   "Nexus 10 landscape": DeviceDescriptor;
22578 |   "Nexus 4": DeviceDescriptor;
22579 |   "Nexus 4 landscape": DeviceDescriptor;
22580 |   "Nexus 5": DeviceDescriptor;
22581 |   "Nexus 5 landscape": DeviceDescriptor;
22582 |   "Nexus 5X": DeviceDescriptor;
22583 |   "Nexus 5X landscape": DeviceDescriptor;
22584 |   "Nexus 6": DeviceDescriptor;
22585 |   "Nexus 6 landscape": DeviceDescriptor;
22586 |   "Nexus 6P": DeviceDescriptor;
22587 |   "Nexus 6P landscape": DeviceDescriptor;
22588 |   "Nexus 7": DeviceDescriptor;
22589 |   "Nexus 7 landscape": DeviceDescriptor;
22590 |   "Nokia Lumia 520": DeviceDescriptor;
22591 |   "Nokia Lumia 520 landscape": DeviceDescriptor;
22592 |   "Nokia N9": DeviceDescriptor;
22593 |   "Nokia N9 landscape": DeviceDescriptor;
22594 |   "Pixel 2": DeviceDescriptor;
22595 |   "Pixel 2 landscape": DeviceDescriptor;
22596 |   "Pixel 2 XL": DeviceDescriptor;
22597 |   "Pixel 2 XL landscape": DeviceDescriptor;
22598 |   "Pixel 3": DeviceDescriptor;
22599 |   "Pixel 3 landscape": DeviceDescriptor;
22600 |   "Pixel 4": DeviceDescriptor;
22601 |   "Pixel 4 landscape": DeviceDescriptor;
22602 |   "Pixel 4a (5G)": DeviceDescriptor;
22603 |   "Pixel 4a (5G) landscape": DeviceDescriptor;
22604 |   "Pixel 5": DeviceDescriptor;
22605 |   "Pixel 5 landscape": DeviceDescriptor;
22606 |   "Pixel 7": DeviceDescriptor;
22607 |   "Pixel 7 landscape": DeviceDescriptor;
22608 |   "Moto G4": DeviceDescriptor;
22609 |   "Moto G4 landscape": DeviceDescriptor;
22610 |   "Desktop Chrome HiDPI": DeviceDescriptor;
22611 |   "Desktop Edge HiDPI": DeviceDescriptor;
22612 |   "Desktop Firefox HiDPI": DeviceDescriptor;
22613 |   "Desktop Safari": DeviceDescriptor;
22614 |   "Desktop Chrome": DeviceDescriptor;
22615 |   "Desktop Edge": DeviceDescriptor;
22616 |   "Desktop Firefox": DeviceDescriptor;
22617 |   [key: string]: DeviceDescriptor;
22618 | }
22619 | 
22620 | export interface ChromiumBrowserContext extends BrowserContext { }
22621 | export interface ChromiumBrowser extends Browser { }
22622 | export interface FirefoxBrowser extends Browser { }
22623 | export interface WebKitBrowser extends Browser { }
22624 | export interface ChromiumCoverage extends Coverage { }


------------------------------------------------------------
[9] اسم الملف: protocol.d.ts
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/types/protocol.d.ts
------------------------------------------------------------
0001 | // This is generated from /utils/protocol-types-generator/index.js
0002 | type binary = string;
0003 | export module Protocol {
0004 |   export module Accessibility {
0005 |     /**
0006 |      * Unique accessibility node identifier.
0007 |      */
0008 |     export type AXNodeId = string;
0009 |     /**
0010 |      * Enum of possible property types.
0011 |      */
0012 |     export type AXValueType = "boolean"|"tristate"|"booleanOrUndefined"|"idref"|"idrefList"|"integer"|"node"|"nodeList"|"number"|"string"|"computedString"|"token"|"tokenList"|"domRelation"|"role"|"internalRole"|"valueUndefined";
0013 |     /**
0014 |      * Enum of possible property sources.
0015 |      */
0016 |     export type AXValueSourceType = "attribute"|"implicit"|"style"|"contents"|"placeholder"|"relatedElement";
0017 |     /**
0018 |      * Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
0019 |      */
0020 |     export type AXValueNativeSourceType = "description"|"figcaption"|"label"|"labelfor"|"labelwrapped"|"legend"|"rubyannotation"|"tablecaption"|"title"|"other";
0021 |     /**
0022 |      * A single source for a computed AX property.
0023 |      */
0024 |     export interface AXValueSource {
0025 |       /**
0026 |        * What type of source this is.
0027 |        */
0028 |       type: AXValueSourceType;
0029 |       /**
0030 |        * The value of this property source.
0031 |        */
0032 |       value?: AXValue;
0033 |       /**
0034 |        * The name of the relevant attribute, if any.
0035 |        */
0036 |       attribute?: string;
0037 |       /**
0038 |        * The value of the relevant attribute, if any.
0039 |        */
0040 |       attributeValue?: AXValue;
0041 |       /**
0042 |        * Whether this source is superseded by a higher priority source.
0043 |        */
0044 |       superseded?: boolean;
0045 |       /**
0046 |        * The native markup source for this value, e.g. a `<label>` element.
0047 |        */
0048 |       nativeSource?: AXValueNativeSourceType;
0049 |       /**
0050 |        * The value, such as a node or node list, of the native source.
0051 |        */
0052 |       nativeSourceValue?: AXValue;
0053 |       /**
0054 |        * Whether the value for this property is invalid.
0055 |        */
0056 |       invalid?: boolean;
0057 |       /**
0058 |        * Reason for the value being invalid, if it is.
0059 |        */
0060 |       invalidReason?: string;
0061 |     }
0062 |     export interface AXRelatedNode {
0063 |       /**
0064 |        * The BackendNodeId of the related DOM node.
0065 |        */
0066 |       backendDOMNodeId: DOM.BackendNodeId;
0067 |       /**
0068 |        * The IDRef value provided, if any.
0069 |        */
0070 |       idref?: string;
0071 |       /**
0072 |        * The text alternative of this node in the current context.
0073 |        */
0074 |       text?: string;
0075 |     }
0076 |     export interface AXProperty {
0077 |       /**
0078 |        * The name of this property.
0079 |        */
0080 |       name: AXPropertyName;
0081 |       /**
0082 |        * The value of this property.
0083 |        */
0084 |       value: AXValue;
0085 |     }
0086 |     /**
0087 |      * A single computed AX property.
0088 |      */
0089 |     export interface AXValue {
0090 |       /**
0091 |        * The type of this value.
0092 |        */
0093 |       type: AXValueType;
0094 |       /**
0095 |        * The computed value of this property.
0096 |        */
0097 |       value?: any;
0098 |       /**
0099 |        * One or more related nodes, if applicable.
0100 |        */
0101 |       relatedNodes?: AXRelatedNode[];
0102 |       /**
0103 |        * The sources which contributed to the computation of this property.
0104 |        */
0105 |       sources?: AXValueSource[];
0106 |     }
0107 |     /**
0108 |      * Values of AXProperty name:
0109 | - from 'busy' to 'roledescription': states which apply to every AX node
0110 | - from 'live' to 'root': attributes which apply to nodes in live regions
0111 | - from 'autocomplete' to 'valuetext': attributes which apply to widgets
0112 | - from 'checked' to 'selected': states which apply to widgets
0113 | - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
0114 |      */
0115 |     export type AXPropertyName = "busy"|"disabled"|"editable"|"focusable"|"focused"|"hidden"|"hiddenRoot"|"invalid"|"keyshortcuts"|"settable"|"roledescription"|"live"|"atomic"|"relevant"|"root"|"autocomplete"|"hasPopup"|"level"|"multiselectable"|"orientation"|"multiline"|"readonly"|"required"|"valuemin"|"valuemax"|"valuetext"|"checked"|"expanded"|"modal"|"pressed"|"selected"|"activedescendant"|"controls"|"describedby"|"details"|"errormessage"|"flowto"|"labelledby"|"owns"|"url";
0116 |     /**
0117 |      * A node in the accessibility tree.
0118 |      */
0119 |     export interface AXNode {
0120 |       /**
0121 |        * Unique identifier for this node.
0122 |        */
0123 |       nodeId: AXNodeId;
0124 |       /**
0125 |        * Whether this node is ignored for accessibility
0126 |        */
0127 |       ignored: boolean;
0128 |       /**
0129 |        * Collection of reasons why this node is hidden.
0130 |        */
0131 |       ignoredReasons?: AXProperty[];
0132 |       /**
0133 |        * This `Node`'s role, whether explicit or implicit.
0134 |        */
0135 |       role?: AXValue;
0136 |       /**
0137 |        * This `Node`'s Chrome raw role.
0138 |        */
0139 |       chromeRole?: AXValue;
0140 |       /**
0141 |        * The accessible name for this `Node`.
0142 |        */
0143 |       name?: AXValue;
0144 |       /**
0145 |        * The accessible description for this `Node`.
0146 |        */
0147 |       description?: AXValue;
0148 |       /**
0149 |        * The value for this `Node`.
0150 |        */
0151 |       value?: AXValue;
0152 |       /**
0153 |        * All other properties
0154 |        */
0155 |       properties?: AXProperty[];
0156 |       /**
0157 |        * ID for this node's parent.
0158 |        */
0159 |       parentId?: AXNodeId;
0160 |       /**
0161 |        * IDs for each of this node's child nodes.
0162 |        */
0163 |       childIds?: AXNodeId[];
0164 |       /**
0165 |        * The backend ID for the associated DOM node, if any.
0166 |        */
0167 |       backendDOMNodeId?: DOM.BackendNodeId;
0168 |       /**
0169 |        * The frame ID for the frame associated with this nodes document.
0170 |        */
0171 |       frameId?: Page.FrameId;
0172 |     }
0173 | 
0174 |     /**
0175 |      * The loadComplete event mirrors the load complete event sent by the browser to assistive
0176 | technology when the web page has finished loading.
0177 |      */
0178 |     export type loadCompletePayload = {
0179 |       /**
0180 |        * New document root node.
0181 |        */
0182 |       root: AXNode;
0183 |     }
0184 |     /**
0185 |      * The nodesUpdated event is sent every time a previously requested node has changed the in tree.
0186 |      */
0187 |     export type nodesUpdatedPayload = {
0188 |       /**
0189 |        * Updated node data.
0190 |        */
0191 |       nodes: AXNode[];
0192 |     }
0193 | 
0194 |     /**
0195 |      * Disables the accessibility domain.
0196 |      */
0197 |     export type disableParameters = {
0198 |     }
0199 |     export type disableReturnValue = {
0200 |     }
0201 |     /**
0202 |      * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
0203 | This turns on accessibility for the page, which can impact performance until accessibility is disabled.
0204 |      */
0205 |     export type enableParameters = {
0206 |     }
0207 |     export type enableReturnValue = {
0208 |     }
0209 |     /**
0210 |      * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
0211 |      */
0212 |     export type getPartialAXTreeParameters = {
0213 |       /**
0214 |        * Identifier of the node to get the partial accessibility tree for.
0215 |        */
0216 |       nodeId?: DOM.NodeId;
0217 |       /**
0218 |        * Identifier of the backend node to get the partial accessibility tree for.
0219 |        */
0220 |       backendNodeId?: DOM.BackendNodeId;
0221 |       /**
0222 |        * JavaScript object id of the node wrapper to get the partial accessibility tree for.
0223 |        */
0224 |       objectId?: Runtime.RemoteObjectId;
0225 |       /**
0226 |        * Whether to fetch this node's ancestors, siblings and children. Defaults to true.
0227 |        */
0228 |       fetchRelatives?: boolean;
0229 |     }
0230 |     export type getPartialAXTreeReturnValue = {
0231 |       /**
0232 |        * The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
0233 | children, if requested.
0234 |        */
0235 |       nodes: AXNode[];
0236 |     }
0237 |     /**
0238 |      * Fetches the entire accessibility tree for the root Document
0239 |      */
0240 |     export type getFullAXTreeParameters = {
0241 |       /**
0242 |        * The maximum depth at which descendants of the root node should be retrieved.
0243 | If omitted, the full tree is returned.
0244 |        */
0245 |       depth?: number;
0246 |       /**
0247 |        * The frame for whose document the AX tree should be retrieved.
0248 | If omitted, the root frame is used.
0249 |        */
0250 |       frameId?: Page.FrameId;
0251 |     }
0252 |     export type getFullAXTreeReturnValue = {
0253 |       nodes: AXNode[];
0254 |     }
0255 |     /**
0256 |      * Fetches the root node.
0257 | Requires `enable()` to have been called previously.
0258 |      */
0259 |     export type getRootAXNodeParameters = {
0260 |       /**
0261 |        * The frame in whose document the node resides.
0262 | If omitted, the root frame is used.
0263 |        */
0264 |       frameId?: Page.FrameId;
0265 |     }
0266 |     export type getRootAXNodeReturnValue = {
0267 |       node: AXNode;
0268 |     }
0269 |     /**
0270 |      * Fetches a node and all ancestors up to and including the root.
0271 | Requires `enable()` to have been called previously.
0272 |      */
0273 |     export type getAXNodeAndAncestorsParameters = {
0274 |       /**
0275 |        * Identifier of the node to get.
0276 |        */
0277 |       nodeId?: DOM.NodeId;
0278 |       /**
0279 |        * Identifier of the backend node to get.
0280 |        */
0281 |       backendNodeId?: DOM.BackendNodeId;
0282 |       /**
0283 |        * JavaScript object id of the node wrapper to get.
0284 |        */
0285 |       objectId?: Runtime.RemoteObjectId;
0286 |     }
0287 |     export type getAXNodeAndAncestorsReturnValue = {
0288 |       nodes: AXNode[];
0289 |     }
0290 |     /**
0291 |      * Fetches a particular accessibility node by AXNodeId.
0292 | Requires `enable()` to have been called previously.
0293 |      */
0294 |     export type getChildAXNodesParameters = {
0295 |       id: AXNodeId;
0296 |       /**
0297 |        * The frame in whose document the node resides.
0298 | If omitted, the root frame is used.
0299 |        */
0300 |       frameId?: Page.FrameId;
0301 |     }
0302 |     export type getChildAXNodesReturnValue = {
0303 |       nodes: AXNode[];
0304 |     }
0305 |     /**
0306 |      * Query a DOM node's accessibility subtree for accessible name and role.
0307 | This command computes the name and role for all nodes in the subtree, including those that are
0308 | ignored for accessibility, and returns those that match the specified name and role. If no DOM
0309 | node is specified, or the DOM node does not exist, the command returns an error. If neither
0310 | `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
0311 |      */
0312 |     export type queryAXTreeParameters = {
0313 |       /**
0314 |        * Identifier of the node for the root to query.
0315 |        */
0316 |       nodeId?: DOM.NodeId;
0317 |       /**
0318 |        * Identifier of the backend node for the root to query.
0319 |        */
0320 |       backendNodeId?: DOM.BackendNodeId;
0321 |       /**
0322 |        * JavaScript object id of the node wrapper for the root to query.
0323 |        */
0324 |       objectId?: Runtime.RemoteObjectId;
0325 |       /**
0326 |        * Find nodes with this computed name.
0327 |        */
0328 |       accessibleName?: string;
0329 |       /**
0330 |        * Find nodes with this computed role.
0331 |        */
0332 |       role?: string;
0333 |     }
0334 |     export type queryAXTreeReturnValue = {
0335 |       /**
0336 |        * A list of `Accessibility.AXNode` matching the specified attributes,
0337 | including nodes that are ignored for accessibility.
0338 |        */
0339 |       nodes: AXNode[];
0340 |     }
0341 |   }
0342 | 
0343 |   export module Animation {
0344 |     /**
0345 |      * Animation instance.
0346 |      */
0347 |     export interface Animation {
0348 |       /**
0349 |        * `Animation`'s id.
0350 |        */
0351 |       id: string;
0352 |       /**
0353 |        * `Animation`'s name.
0354 |        */
0355 |       name: string;
0356 |       /**
0357 |        * `Animation`'s internal paused state.
0358 |        */
0359 |       pausedState: boolean;
0360 |       /**
0361 |        * `Animation`'s play state.
0362 |        */
0363 |       playState: string;
0364 |       /**
0365 |        * `Animation`'s playback rate.
0366 |        */
0367 |       playbackRate: number;
0368 |       /**
0369 |        * `Animation`'s start time.
0370 | Milliseconds for time based animations and
0371 | percentage [0 - 100] for scroll driven animations
0372 | (i.e. when viewOrScrollTimeline exists).
0373 |        */
0374 |       startTime: number;
0375 |       /**
0376 |        * `Animation`'s current time.
0377 |        */
0378 |       currentTime: number;
0379 |       /**
0380 |        * Animation type of `Animation`.
0381 |        */
0382 |       type: "CSSTransition"|"CSSAnimation"|"WebAnimation";
0383 |       /**
0384 |        * `Animation`'s source animation node.
0385 |        */
0386 |       source?: AnimationEffect;
0387 |       /**
0388 |        * A unique ID for `Animation` representing the sources that triggered this CSS
0389 | animation/transition.
0390 |        */
0391 |       cssId?: string;
0392 |       /**
0393 |        * View or scroll timeline
0394 |        */
0395 |       viewOrScrollTimeline?: ViewOrScrollTimeline;
0396 |     }
0397 |     /**
0398 |      * Timeline instance
0399 |      */
0400 |     export interface ViewOrScrollTimeline {
0401 |       /**
0402 |        * Scroll container node
0403 |        */
0404 |       sourceNodeId?: DOM.BackendNodeId;
0405 |       /**
0406 |        * Represents the starting scroll position of the timeline
0407 | as a length offset in pixels from scroll origin.
0408 |        */
0409 |       startOffset?: number;
0410 |       /**
0411 |        * Represents the ending scroll position of the timeline
0412 | as a length offset in pixels from scroll origin.
0413 |        */
0414 |       endOffset?: number;
0415 |       /**
0416 |        * The element whose principal box's visibility in the
0417 | scrollport defined the progress of the timeline.
0418 | Does not exist for animations with ScrollTimeline
0419 |        */
0420 |       subjectNodeId?: DOM.BackendNodeId;
0421 |       /**
0422 |        * Orientation of the scroll
0423 |        */
0424 |       axis: DOM.ScrollOrientation;
0425 |     }
0426 |     /**
0427 |      * AnimationEffect instance
0428 |      */
0429 |     export interface AnimationEffect {
0430 |       /**
0431 |        * `AnimationEffect`'s delay.
0432 |        */
0433 |       delay: number;
0434 |       /**
0435 |        * `AnimationEffect`'s end delay.
0436 |        */
0437 |       endDelay: number;
0438 |       /**
0439 |        * `AnimationEffect`'s iteration start.
0440 |        */
0441 |       iterationStart: number;
0442 |       /**
0443 |        * `AnimationEffect`'s iterations.
0444 |        */
0445 |       iterations: number;
0446 |       /**
0447 |        * `AnimationEffect`'s iteration duration.
0448 | Milliseconds for time based animations and
0449 | percentage [0 - 100] for scroll driven animations
0450 | (i.e. when viewOrScrollTimeline exists).
0451 |        */
0452 |       duration: number;
0453 |       /**
0454 |        * `AnimationEffect`'s playback direction.
0455 |        */
0456 |       direction: string;
0457 |       /**
0458 |        * `AnimationEffect`'s fill mode.
0459 |        */
0460 |       fill: string;
0461 |       /**
0462 |        * `AnimationEffect`'s target node.
0463 |        */
0464 |       backendNodeId?: DOM.BackendNodeId;
0465 |       /**
0466 |        * `AnimationEffect`'s keyframes.
0467 |        */
0468 |       keyframesRule?: KeyframesRule;
0469 |       /**
0470 |        * `AnimationEffect`'s timing function.
0471 |        */
0472 |       easing: string;
0473 |     }
0474 |     /**
0475 |      * Keyframes Rule
0476 |      */
0477 |     export interface KeyframesRule {
0478 |       /**
0479 |        * CSS keyframed animation's name.
0480 |        */
0481 |       name?: string;
0482 |       /**
0483 |        * List of animation keyframes.
0484 |        */
0485 |       keyframes: KeyframeStyle[];
0486 |     }
0487 |     /**
0488 |      * Keyframe Style
0489 |      */
0490 |     export interface KeyframeStyle {
0491 |       /**
0492 |        * Keyframe's time offset.
0493 |        */
0494 |       offset: string;
0495 |       /**
0496 |        * `AnimationEffect`'s timing function.
0497 |        */
0498 |       easing: string;
0499 |     }
0500 | 
0501 |     /**
0502 |      * Event for when an animation has been cancelled.
0503 |      */
0504 |     export type animationCanceledPayload = {
0505 |       /**
0506 |        * Id of the animation that was cancelled.
0507 |        */
0508 |       id: string;
0509 |     }
0510 |     /**
0511 |      * Event for each animation that has been created.
0512 |      */
0513 |     export type animationCreatedPayload = {
0514 |       /**
0515 |        * Id of the animation that was created.
0516 |        */
0517 |       id: string;
0518 |     }
0519 |     /**
0520 |      * Event for animation that has been started.
0521 |      */
0522 |     export type animationStartedPayload = {
0523 |       /**
0524 |        * Animation that was started.
0525 |        */
0526 |       animation: Animation;
0527 |     }
0528 |     /**
0529 |      * Event for animation that has been updated.
0530 |      */
0531 |     export type animationUpdatedPayload = {
0532 |       /**
0533 |        * Animation that was updated.
0534 |        */
0535 |       animation: Animation;
0536 |     }
0537 | 
0538 |     /**
0539 |      * Disables animation domain notifications.
0540 |      */
0541 |     export type disableParameters = {
0542 |     }
0543 |     export type disableReturnValue = {
0544 |     }
0545 |     /**
0546 |      * Enables animation domain notifications.
0547 |      */
0548 |     export type enableParameters = {
0549 |     }
0550 |     export type enableReturnValue = {
0551 |     }
0552 |     /**
0553 |      * Returns the current time of the an animation.
0554 |      */
0555 |     export type getCurrentTimeParameters = {
0556 |       /**
0557 |        * Id of animation.
0558 |        */
0559 |       id: string;
0560 |     }
0561 |     export type getCurrentTimeReturnValue = {
0562 |       /**
0563 |        * Current time of the page.
0564 |        */
0565 |       currentTime: number;
0566 |     }
0567 |     /**
0568 |      * Gets the playback rate of the document timeline.
0569 |      */
0570 |     export type getPlaybackRateParameters = {
0571 |     }
0572 |     export type getPlaybackRateReturnValue = {
0573 |       /**
0574 |        * Playback rate for animations on page.
0575 |        */
0576 |       playbackRate: number;
0577 |     }
0578 |     /**
0579 |      * Releases a set of animations to no longer be manipulated.
0580 |      */
0581 |     export type releaseAnimationsParameters = {
0582 |       /**
0583 |        * List of animation ids to seek.
0584 |        */
0585 |       animations: string[];
0586 |     }
0587 |     export type releaseAnimationsReturnValue = {
0588 |     }
0589 |     /**
0590 |      * Gets the remote object of the Animation.
0591 |      */
0592 |     export type resolveAnimationParameters = {
0593 |       /**
0594 |        * Animation id.
0595 |        */
0596 |       animationId: string;
0597 |     }
0598 |     export type resolveAnimationReturnValue = {
0599 |       /**
0600 |        * Corresponding remote object.
0601 |        */
0602 |       remoteObject: Runtime.RemoteObject;
0603 |     }
0604 |     /**
0605 |      * Seek a set of animations to a particular time within each animation.
0606 |      */
0607 |     export type seekAnimationsParameters = {
0608 |       /**
0609 |        * List of animation ids to seek.
0610 |        */
0611 |       animations: string[];
0612 |       /**
0613 |        * Set the current time of each animation.
0614 |        */
0615 |       currentTime: number;
0616 |     }
0617 |     export type seekAnimationsReturnValue = {
0618 |     }
0619 |     /**
0620 |      * Sets the paused state of a set of animations.
0621 |      */
0622 |     export type setPausedParameters = {
0623 |       /**
0624 |        * Animations to set the pause state of.
0625 |        */
0626 |       animations: string[];
0627 |       /**
0628 |        * Paused state to set to.
0629 |        */
0630 |       paused: boolean;
0631 |     }
0632 |     export type setPausedReturnValue = {
0633 |     }
0634 |     /**
0635 |      * Sets the playback rate of the document timeline.
0636 |      */
0637 |     export type setPlaybackRateParameters = {
0638 |       /**
0639 |        * Playback rate for animations on page
0640 |        */
0641 |       playbackRate: number;
0642 |     }
0643 |     export type setPlaybackRateReturnValue = {
0644 |     }
0645 |     /**
0646 |      * Sets the timing of an animation node.
0647 |      */
0648 |     export type setTimingParameters = {
0649 |       /**
0650 |        * Animation id.
0651 |        */
0652 |       animationId: string;
0653 |       /**
0654 |        * Duration of the animation.
0655 |        */
0656 |       duration: number;
0657 |       /**
0658 |        * Delay of the animation.
0659 |        */
0660 |       delay: number;
0661 |     }
0662 |     export type setTimingReturnValue = {
0663 |     }
0664 |   }
0665 | 
0666 |   /**
0667 |    * Audits domain allows investigation of page violations and possible improvements.
0668 |    */
0669 |   export module Audits {
0670 |     /**
0671 |      * Information about a cookie that is affected by an inspector issue.
0672 |      */
0673 |     export interface AffectedCookie {
0674 |       /**
0675 |        * The following three properties uniquely identify a cookie
0676 |        */
0677 |       name: string;
0678 |       path: string;
0679 |       domain: string;
0680 |     }
0681 |     /**
0682 |      * Information about a request that is affected by an inspector issue.
0683 |      */
0684 |     export interface AffectedRequest {
0685 |       /**
0686 |        * The unique request id.
0687 |        */
0688 |       requestId: Network.RequestId;
0689 |       url?: string;
0690 |     }
0691 |     /**
0692 |      * Information about the frame affected by an inspector issue.
0693 |      */
0694 |     export interface AffectedFrame {
0695 |       frameId: Page.FrameId;
0696 |     }
0697 |     export type CookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"|"ExcludeSameSiteNoneInsecure"|"ExcludeSameSiteLax"|"ExcludeSameSiteStrict"|"ExcludeInvalidSameParty"|"ExcludeSamePartyCrossPartyContext"|"ExcludeDomainNonASCII"|"ExcludeThirdPartyCookieBlockedInFirstPartySet"|"ExcludeThirdPartyPhaseout";
0698 |     export type CookieWarningReason = "WarnSameSiteUnspecifiedCrossSiteContext"|"WarnSameSiteNoneInsecure"|"WarnSameSiteUnspecifiedLaxAllowUnsafe"|"WarnSameSiteStrictLaxDowngradeStrict"|"WarnSameSiteStrictCrossDowngradeStrict"|"WarnSameSiteStrictCrossDowngradeLax"|"WarnSameSiteLaxCrossDowngradeStrict"|"WarnSameSiteLaxCrossDowngradeLax"|"WarnAttributeValueExceedsMaxSize"|"WarnDomainNonASCII"|"WarnThirdPartyPhaseout"|"WarnCrossSiteRedirectDowngradeChangesInclusion"|"WarnDeprecationTrialMetadata"|"WarnThirdPartyCookieHeuristic";
0699 |     export type CookieOperation = "SetCookie"|"ReadCookie";
0700 |     /**
0701 |      * This information is currently necessary, as the front-end has a difficult
0702 | time finding a specific cookie. With this, we can convey specific error
0703 | information without the cookie.
0704 |      */
0705 |     export interface CookieIssueDetails {
0706 |       /**
0707 |        * If AffectedCookie is not set then rawCookieLine contains the raw
0708 | Set-Cookie header string. This hints at a problem where the
0709 | cookie line is syntactically or semantically malformed in a way
0710 | that no valid cookie could be created.
0711 |        */
0712 |       cookie?: AffectedCookie;
0713 |       rawCookieLine?: string;
0714 |       cookieWarningReasons: CookieWarningReason[];
0715 |       cookieExclusionReasons: CookieExclusionReason[];
0716 |       /**
0717 |        * Optionally identifies the site-for-cookies and the cookie url, which
0718 | may be used by the front-end as additional context.
0719 |        */
0720 |       operation: CookieOperation;
0721 |       siteForCookies?: string;
0722 |       cookieUrl?: string;
0723 |       request?: AffectedRequest;
0724 |     }
0725 |     export type MixedContentResolutionStatus = "MixedContentBlocked"|"MixedContentAutomaticallyUpgraded"|"MixedContentWarning";
0726 |     export type MixedContentResourceType = "AttributionSrc"|"Audio"|"Beacon"|"CSPReport"|"Download"|"EventSource"|"Favicon"|"Font"|"Form"|"Frame"|"Image"|"Import"|"JSON"|"Manifest"|"Ping"|"PluginData"|"PluginResource"|"Prefetch"|"Resource"|"Script"|"ServiceWorker"|"SharedWorker"|"SpeculationRules"|"Stylesheet"|"Track"|"Video"|"Worker"|"XMLHttpRequest"|"XSLT";
0727 |     export interface MixedContentIssueDetails {
0728 |       /**
0729 |        * The type of resource causing the mixed content issue (css, js, iframe,
0730 | form,...). Marked as optional because it is mapped to from
0731 | blink::mojom::RequestContextType, which will be replaced
0732 | by network::mojom::RequestDestination
0733 |        */
0734 |       resourceType?: MixedContentResourceType;
0735 |       /**
0736 |        * The way the mixed content issue is being resolved.
0737 |        */
0738 |       resolutionStatus: MixedContentResolutionStatus;
0739 |       /**
0740 |        * The unsafe http url causing the mixed content issue.
0741 |        */
0742 |       insecureURL: string;
0743 |       /**
0744 |        * The url responsible for the call to an unsafe url.
0745 |        */
0746 |       mainResourceURL: string;
0747 |       /**
0748 |        * The mixed content request.
0749 | Does not always exist (e.g. for unsafe form submission urls).
0750 |        */
0751 |       request?: AffectedRequest;
0752 |       /**
0753 |        * Optional because not every mixed content issue is necessarily linked to a frame.
0754 |        */
0755 |       frame?: AffectedFrame;
0756 |     }
0757 |     /**
0758 |      * Enum indicating the reason a response has been blocked. These reasons are
0759 | refinements of the net error BLOCKED_BY_RESPONSE.
0760 |      */
0761 |     export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameOriginAfterDefaultedToSameOriginByDip"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"|"CorpNotSameSite";
0762 |     /**
0763 |      * Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
0764 | code. Currently only used for COEP/COOP, but may be extended to include
0765 | some CSP errors in the future.
0766 |      */
0767 |     export interface BlockedByResponseIssueDetails {
0768 |       request: AffectedRequest;
0769 |       parentFrame?: AffectedFrame;
0770 |       blockedFrame?: AffectedFrame;
0771 |       reason: BlockedByResponseReason;
0772 |     }
0773 |     export type HeavyAdResolutionStatus = "HeavyAdBlocked"|"HeavyAdWarning";
0774 |     export type HeavyAdReason = "NetworkTotalLimit"|"CpuTotalLimit"|"CpuPeakLimit";
0775 |     export interface HeavyAdIssueDetails {
0776 |       /**
0777 |        * The resolution status, either blocking the content or warning.
0778 |        */
0779 |       resolution: HeavyAdResolutionStatus;
0780 |       /**
0781 |        * The reason the ad was blocked, total network or cpu or peak cpu.
0782 |        */
0783 |       reason: HeavyAdReason;
0784 |       /**
0785 |        * The frame that was blocked.
0786 |        */
0787 |       frame: AffectedFrame;
0788 |     }
0789 |     export type ContentSecurityPolicyViolationType = "kInlineViolation"|"kEvalViolation"|"kURLViolation"|"kTrustedTypesSinkViolation"|"kTrustedTypesPolicyViolation"|"kWasmEvalViolation";
0790 |     export interface SourceCodeLocation {
0791 |       scriptId?: Runtime.ScriptId;
0792 |       url: string;
0793 |       lineNumber: number;
0794 |       columnNumber: number;
0795 |     }
0796 |     export interface ContentSecurityPolicyIssueDetails {
0797 |       /**
0798 |        * The url not included in allowed sources.
0799 |        */
0800 |       blockedURL?: string;
0801 |       /**
0802 |        * Specific directive that is violated, causing the CSP issue.
0803 |        */
0804 |       violatedDirective: string;
0805 |       isReportOnly: boolean;
0806 |       contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType;
0807 |       frameAncestor?: AffectedFrame;
0808 |       sourceCodeLocation?: SourceCodeLocation;
0809 |       violatingNodeId?: DOM.BackendNodeId;
0810 |     }
0811 |     export type SharedArrayBufferIssueType = "TransferIssue"|"CreationIssue";
0812 |     /**
0813 |      * Details for a issue arising from an SAB being instantiated in, or
0814 | transferred to a context that is not cross-origin isolated.
0815 |      */
0816 |     export interface SharedArrayBufferIssueDetails {
0817 |       sourceCodeLocation: SourceCodeLocation;
0818 |       isWarning: boolean;
0819 |       type: SharedArrayBufferIssueType;
0820 |     }
0821 |     export interface LowTextContrastIssueDetails {
0822 |       violatingNodeId: DOM.BackendNodeId;
0823 |       violatingNodeSelector: string;
0824 |       contrastRatio: number;
0825 |       thresholdAA: number;
0826 |       thresholdAAA: number;
0827 |       fontSize: string;
0828 |       fontWeight: string;
0829 |     }
0830 |     /**
0831 |      * Details for a CORS related issue, e.g. a warning or error related to
0832 | CORS RFC1918 enforcement.
0833 |      */
0834 |     export interface CorsIssueDetails {
0835 |       corsErrorStatus: Network.CorsErrorStatus;
0836 |       isWarning: boolean;
0837 |       request: AffectedRequest;
0838 |       location?: SourceCodeLocation;
0839 |       initiatorOrigin?: string;
0840 |       resourceIPAddressSpace?: Network.IPAddressSpace;
0841 |       clientSecurityState?: Network.ClientSecurityState;
0842 |     }
0843 |     export type AttributionReportingIssueType = "PermissionPolicyDisabled"|"UntrustworthyReportingOrigin"|"InsecureContext"|"InvalidHeader"|"InvalidRegisterTriggerHeader"|"SourceAndTriggerHeaders"|"SourceIgnored"|"TriggerIgnored"|"OsSourceIgnored"|"OsTriggerIgnored"|"InvalidRegisterOsSourceHeader"|"InvalidRegisterOsTriggerHeader"|"WebAndOsHeaders"|"NoWebOrOsSupport"|"NavigationRegistrationWithoutTransientUserActivation"|"InvalidInfoHeader"|"NoRegisterSourceHeader"|"NoRegisterTriggerHeader"|"NoRegisterOsSourceHeader"|"NoRegisterOsTriggerHeader"|"NavigationRegistrationUniqueScopeAlreadySet";
0844 |     export type SharedDictionaryError = "UseErrorCrossOriginNoCorsRequest"|"UseErrorDictionaryLoadFailure"|"UseErrorMatchingDictionaryNotUsed"|"UseErrorUnexpectedContentDictionaryHeader"|"WriteErrorCossOriginNoCorsRequest"|"WriteErrorDisallowedBySettings"|"WriteErrorExpiredResponse"|"WriteErrorFeatureDisabled"|"WriteErrorInsufficientResources"|"WriteErrorInvalidMatchField"|"WriteErrorInvalidStructuredHeader"|"WriteErrorNavigationRequest"|"WriteErrorNoMatchField"|"WriteErrorNonListMatchDestField"|"WriteErrorNonSecureContext"|"WriteErrorNonStringIdField"|"WriteErrorNonStringInMatchDestList"|"WriteErrorNonStringMatchField"|"WriteErrorNonTokenTypeField"|"WriteErrorRequestAborted"|"WriteErrorShuttingDown"|"WriteErrorTooLongIdField"|"WriteErrorUnsupportedType";
0845 |     /**
0846 |      * Details for issues around "Attribution Reporting API" usage.
0847 | Explainer: https://github.com/WICG/attribution-reporting-api
0848 |      */
0849 |     export interface AttributionReportingIssueDetails {
0850 |       violationType: AttributionReportingIssueType;
0851 |       request?: AffectedRequest;
0852 |       violatingNodeId?: DOM.BackendNodeId;
0853 |       invalidParameter?: string;
0854 |     }
0855 |     /**
0856 |      * Details for issues about documents in Quirks Mode
0857 | or Limited Quirks Mode that affects page layouting.
0858 |      */
0859 |     export interface QuirksModeIssueDetails {
0860 |       /**
0861 |        * If false, it means the document's mode is "quirks"
0862 | instead of "limited-quirks".
0863 |        */
0864 |       isLimitedQuirksMode: boolean;
0865 |       documentNodeId: DOM.BackendNodeId;
0866 |       url: string;
0867 |       frameId: Page.FrameId;
0868 |       loaderId: Network.LoaderId;
0869 |     }
0870 |     export interface NavigatorUserAgentIssueDetails {
0871 |       url: string;
0872 |       location?: SourceCodeLocation;
0873 |     }
0874 |     export interface SharedDictionaryIssueDetails {
0875 |       sharedDictionaryError: SharedDictionaryError;
0876 |       request: AffectedRequest;
0877 |     }
0878 |     export type GenericIssueErrorType = "FormLabelForNameError"|"FormDuplicateIdForInputError"|"FormInputWithNoLabelError"|"FormAutocompleteAttributeEmptyError"|"FormEmptyIdAndNameAttributesForInputError"|"FormAriaLabelledByToNonExistingId"|"FormInputAssignedAutocompleteValueToIdOrNameAttributeError"|"FormLabelHasNeitherForNorNestedInput"|"FormLabelForMatchesNonExistingIdError"|"FormInputHasWrongButWellIntendedAutocompleteValueError"|"ResponseWasBlockedByORB";
0879 |     /**
0880 |      * Depending on the concrete errorType, different properties are set.
0881 |      */
0882 |     export interface GenericIssueDetails {
0883 |       /**
0884 |        * Issues with the same errorType are aggregated in the frontend.
0885 |        */
0886 |       errorType: GenericIssueErrorType;
0887 |       frameId?: Page.FrameId;
0888 |       violatingNodeId?: DOM.BackendNodeId;
0889 |       violatingNodeAttribute?: string;
0890 |       request?: AffectedRequest;
0891 |     }
0892 |     /**
0893 |      * This issue tracks information needed to print a deprecation message.
0894 | https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
0895 |      */
0896 |     export interface DeprecationIssueDetails {
0897 |       affectedFrame?: AffectedFrame;
0898 |       sourceCodeLocation: SourceCodeLocation;
0899 |       /**
0900 |        * One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
0901 |        */
0902 |       type: string;
0903 |     }
0904 |     /**
0905 |      * This issue warns about sites in the redirect chain of a finished navigation
0906 | that may be flagged as trackers and have their state cleared if they don't
0907 | receive a user interaction. Note that in this context 'site' means eTLD+1.
0908 | For example, if the URL `https://example.test:80/bounce` was in the
0909 | redirect chain, the site reported would be `example.test`.
0910 |      */
0911 |     export interface BounceTrackingIssueDetails {
0912 |       trackingSites: string[];
0913 |     }
0914 |     /**
0915 |      * This issue warns about third-party sites that are accessing cookies on the
0916 | current page, and have been permitted due to having a global metadata grant.
0917 | Note that in this context 'site' means eTLD+1. For example, if the URL
0918 | `https://example.test:80/web_page` was accessing cookies, the site reported
0919 | would be `example.test`.
0920 |      */
0921 |     export interface CookieDeprecationMetadataIssueDetails {
0922 |       allowedSites: string[];
0923 |       optOutPercentage: number;
0924 |       isOptOutTopLevel: boolean;
0925 |       operation: CookieOperation;
0926 |     }
0927 |     export type ClientHintIssueReason = "MetaTagAllowListInvalidOrigin"|"MetaTagModifiedHTML";
0928 |     export interface FederatedAuthRequestIssueDetails {
0929 |       federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason;
0930 |     }
0931 |     /**
0932 |      * Represents the failure reason when a federated authentication reason fails.
0933 | Should be updated alongside RequestIdTokenStatus in
0934 | third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
0935 | all cases except for success.
0936 |      */
0937 |     export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"IdpNotPotentiallyTrustworthy"|"DisabledInSettings"|"DisabledInFlags"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByActiveMode"|"InvalidFieldsSpecified"|"RelyingPartyOriginIsOpaque"|"TypeNotMatching";
0938 |     export interface FederatedAuthUserInfoRequestIssueDetails {
0939 |       federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason;
0940 |     }
0941 |     /**
0942 |      * Represents the failure reason when a getUserInfo() call fails.
0943 | Should be updated alongside FederatedAuthUserInfoRequestResult in
0944 | third_party/blink/public/mojom/devtools/inspector_issue.mojom.
0945 |      */
0946 |     export type FederatedAuthUserInfoRequestIssueReason = "NotSameOrigin"|"NotIframe"|"NotPotentiallyTrustworthy"|"NoApiPermission"|"NotSignedInWithIdp"|"NoAccountSharingPermission"|"InvalidConfigOrWellKnown"|"InvalidAccountsResponse"|"NoReturningUserFromFetchedAccounts";
0947 |     /**
0948 |      * This issue tracks client hints related issues. It's used to deprecate old
0949 | features, encourage the use of new ones, and provide general guidance.
0950 |      */
0951 |     export interface ClientHintIssueDetails {
0952 |       sourceCodeLocation: SourceCodeLocation;
0953 |       clientHintIssueReason: ClientHintIssueReason;
0954 |     }
0955 |     export interface FailedRequestInfo {
0956 |       /**
0957 |        * The URL that failed to load.
0958 |        */
0959 |       url: string;
0960 |       /**
0961 |        * The failure message for the failed request.
0962 |        */
0963 |       failureMessage: string;
0964 |       requestId?: Network.RequestId;
0965 |     }
0966 |     export type StyleSheetLoadingIssueReason = "LateImportRule"|"RequestFailed";
0967 |     /**
0968 |      * This issue warns when a referenced stylesheet couldn't be loaded.
0969 |      */
0970 |     export interface StylesheetLoadingIssueDetails {
0971 |       /**
0972 |        * Source code position that referenced the failing stylesheet.
0973 |        */
0974 |       sourceCodeLocation: SourceCodeLocation;
0975 |       /**
0976 |        * Reason why the stylesheet couldn't be loaded.
0977 |        */
0978 |       styleSheetLoadingIssueReason: StyleSheetLoadingIssueReason;
0979 |       /**
0980 |        * Contains additional info when the failure was due to a request.
0981 |        */
0982 |       failedRequestInfo?: FailedRequestInfo;
0983 |     }
0984 |     export type PropertyRuleIssueReason = "InvalidSyntax"|"InvalidInitialValue"|"InvalidInherits"|"InvalidName";
0985 |     /**
0986 |      * This issue warns about errors in property rules that lead to property
0987 | registrations being ignored.
0988 |      */
0989 |     export interface PropertyRuleIssueDetails {
0990 |       /**
0991 |        * Source code position of the property rule.
0992 |        */
0993 |       sourceCodeLocation: SourceCodeLocation;
0994 |       /**
0995 |        * Reason why the property rule was discarded.
0996 |        */
0997 |       propertyRuleIssueReason: PropertyRuleIssueReason;
0998 |       /**
0999 |        * The value of the property rule property that failed to parse
1000 |        */
1001 |       propertyValue?: string;
1002 |     }
1003 |     /**
1004 |      * A unique identifier for the type of issue. Each type may use one of the
1005 | optional fields in InspectorIssueDetails to convey more specific
1006 | information about the kind of issue.
1007 |      */
1008 |     export type InspectorIssueCode = "CookieIssue"|"MixedContentIssue"|"BlockedByResponseIssue"|"HeavyAdIssue"|"ContentSecurityPolicyIssue"|"SharedArrayBufferIssue"|"LowTextContrastIssue"|"CorsIssue"|"AttributionReportingIssue"|"QuirksModeIssue"|"NavigatorUserAgentIssue"|"GenericIssue"|"DeprecationIssue"|"ClientHintIssue"|"FederatedAuthRequestIssue"|"BounceTrackingIssue"|"CookieDeprecationMetadataIssue"|"StylesheetLoadingIssue"|"FederatedAuthUserInfoRequestIssue"|"PropertyRuleIssue"|"SharedDictionaryIssue";
1009 |     /**
1010 |      * This struct holds a list of optional fields with additional information
1011 | specific to the kind of issue. When adding a new issue code, please also
1012 | add a new optional field to this type.
1013 |      */
1014 |     export interface InspectorIssueDetails {
1015 |       cookieIssueDetails?: CookieIssueDetails;
1016 |       mixedContentIssueDetails?: MixedContentIssueDetails;
1017 |       blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
1018 |       heavyAdIssueDetails?: HeavyAdIssueDetails;
1019 |       contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
1020 |       sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails;
1021 |       lowTextContrastIssueDetails?: LowTextContrastIssueDetails;
1022 |       corsIssueDetails?: CorsIssueDetails;
1023 |       attributionReportingIssueDetails?: AttributionReportingIssueDetails;
1024 |       quirksModeIssueDetails?: QuirksModeIssueDetails;
1025 |       navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails;
1026 |       genericIssueDetails?: GenericIssueDetails;
1027 |       deprecationIssueDetails?: DeprecationIssueDetails;
1028 |       clientHintIssueDetails?: ClientHintIssueDetails;
1029 |       federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails;
1030 |       bounceTrackingIssueDetails?: BounceTrackingIssueDetails;
1031 |       cookieDeprecationMetadataIssueDetails?: CookieDeprecationMetadataIssueDetails;
1032 |       stylesheetLoadingIssueDetails?: StylesheetLoadingIssueDetails;
1033 |       propertyRuleIssueDetails?: PropertyRuleIssueDetails;
1034 |       federatedAuthUserInfoRequestIssueDetails?: FederatedAuthUserInfoRequestIssueDetails;
1035 |       sharedDictionaryIssueDetails?: SharedDictionaryIssueDetails;
1036 |     }
1037 |     /**
1038 |      * A unique id for a DevTools inspector issue. Allows other entities (e.g.
1039 | exceptions, CDP message, console messages, etc.) to reference an issue.
1040 |      */
1041 |     export type IssueId = string;
1042 |     /**
1043 |      * An inspector issue reported from the back-end.
1044 |      */
1045 |     export interface InspectorIssue {
1046 |       code: InspectorIssueCode;
1047 |       details: InspectorIssueDetails;
1048 |       /**
1049 |        * A unique id for this issue. May be omitted if no other entity (e.g.
1050 | exception, CDP message, etc.) is referencing this issue.
1051 |        */
1052 |       issueId?: IssueId;
1053 |     }
1054 | 
1055 |     export type issueAddedPayload = {
1056 |       issue: InspectorIssue;
1057 |     }
1058 | 
1059 |     /**
1060 |      * Returns the response body and size if it were re-encoded with the specified settings. Only
1061 | applies to images.
1062 |      */
1063 |     export type getEncodedResponseParameters = {
1064 |       /**
1065 |        * Identifier of the network request to get content for.
1066 |        */
1067 |       requestId: Network.RequestId;
1068 |       /**
1069 |        * The encoding to use.
1070 |        */
1071 |       encoding: "webp"|"jpeg"|"png";
1072 |       /**
1073 |        * The quality of the encoding (0-1). (defaults to 1)
1074 |        */
1075 |       quality?: number;
1076 |       /**
1077 |        * Whether to only return the size information (defaults to false).
1078 |        */
1079 |       sizeOnly?: boolean;
1080 |     }
1081 |     export type getEncodedResponseReturnValue = {
1082 |       /**
1083 |        * The encoded body as a base64 string. Omitted if sizeOnly is true.
1084 |        */
1085 |       body?: binary;
1086 |       /**
1087 |        * Size before re-encoding.
1088 |        */
1089 |       originalSize: number;
1090 |       /**
1091 |        * Size after re-encoding.
1092 |        */
1093 |       encodedSize: number;
1094 |     }
1095 |     /**
1096 |      * Disables issues domain, prevents further issues from being reported to the client.
1097 |      */
1098 |     export type disableParameters = {
1099 |     }
1100 |     export type disableReturnValue = {
1101 |     }
1102 |     /**
1103 |      * Enables issues domain, sends the issues collected so far to the client by means of the
1104 | `issueAdded` event.
1105 |      */
1106 |     export type enableParameters = {
1107 |     }
1108 |     export type enableReturnValue = {
1109 |     }
1110 |     /**
1111 |      * Runs the contrast check for the target page. Found issues are reported
1112 | using Audits.issueAdded event.
1113 |      */
1114 |     export type checkContrastParameters = {
1115 |       /**
1116 |        * Whether to report WCAG AAA level issues. Default is false.
1117 |        */
1118 |       reportAAA?: boolean;
1119 |     }
1120 |     export type checkContrastReturnValue = {
1121 |     }
1122 |     /**
1123 |      * Runs the form issues check for the target page. Found issues are reported
1124 | using Audits.issueAdded event.
1125 |      */
1126 |     export type checkFormsIssuesParameters = {
1127 |     }
1128 |     export type checkFormsIssuesReturnValue = {
1129 |       formIssues: GenericIssueDetails[];
1130 |     }
1131 |   }
1132 | 
1133 |   /**
1134 |    * Defines commands and events for browser extensions.
1135 |    */
1136 |   export module Extensions {
1137 |     /**
1138 |      * Storage areas.
1139 |      */
1140 |     export type StorageArea = "session"|"local"|"sync"|"managed";
1141 | 
1142 | 
1143 |     /**
1144 |      * Installs an unpacked extension from the filesystem similar to
1145 | --load-extension CLI flags. Returns extension ID once the extension
1146 | has been installed. Available if the client is connected using the
1147 | --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
1148 | flag is set.
1149 |      */
1150 |     export type loadUnpackedParameters = {
1151 |       /**
1152 |        * Absolute file path.
1153 |        */
1154 |       path: string;
1155 |     }
1156 |     export type loadUnpackedReturnValue = {
1157 |       /**
1158 |        * Extension id.
1159 |        */
1160 |       id: string;
1161 |     }
1162 |     /**
1163 |      * Gets data from extension storage in the given `storageArea`. If `keys` is
1164 | specified, these are used to filter the result.
1165 |      */
1166 |     export type getStorageItemsParameters = {
1167 |       /**
1168 |        * ID of extension.
1169 |        */
1170 |       id: string;
1171 |       /**
1172 |        * StorageArea to retrieve data from.
1173 |        */
1174 |       storageArea: StorageArea;
1175 |       /**
1176 |        * Keys to retrieve.
1177 |        */
1178 |       keys?: string[];
1179 |     }
1180 |     export type getStorageItemsReturnValue = {
1181 |       data: { [key: string]: string };
1182 |     }
1183 |     /**
1184 |      * Removes `keys` from extension storage in the given `storageArea`.
1185 |      */
1186 |     export type removeStorageItemsParameters = {
1187 |       /**
1188 |        * ID of extension.
1189 |        */
1190 |       id: string;
1191 |       /**
1192 |        * StorageArea to remove data from.
1193 |        */
1194 |       storageArea: StorageArea;
1195 |       /**
1196 |        * Keys to remove.
1197 |        */
1198 |       keys: string[];
1199 |     }
1200 |     export type removeStorageItemsReturnValue = {
1201 |     }
1202 |     /**
1203 |      * Clears extension storage in the given `storageArea`.
1204 |      */
1205 |     export type clearStorageItemsParameters = {
1206 |       /**
1207 |        * ID of extension.
1208 |        */
1209 |       id: string;
1210 |       /**
1211 |        * StorageArea to remove data from.
1212 |        */
1213 |       storageArea: StorageArea;
1214 |     }
1215 |     export type clearStorageItemsReturnValue = {
1216 |     }
1217 |     /**
1218 |      * Sets `values` in extension storage in the given `storageArea`. The provided `values`
1219 | will be merged with existing values in the storage area.
1220 |      */
1221 |     export type setStorageItemsParameters = {
1222 |       /**
1223 |        * ID of extension.
1224 |        */
1225 |       id: string;
1226 |       /**
1227 |        * StorageArea to set data in.
1228 |        */
1229 |       storageArea: StorageArea;
1230 |       /**
1231 |        * Values to set.
1232 |        */
1233 |       values: { [key: string]: string };
1234 |     }
1235 |     export type setStorageItemsReturnValue = {
1236 |     }
1237 |   }
1238 | 
1239 |   /**
1240 |    * Defines commands and events for Autofill.
1241 |    */
1242 |   export module Autofill {
1243 |     export interface CreditCard {
1244 |       /**
1245 |        * 16-digit credit card number.
1246 |        */
1247 |       number: string;
1248 |       /**
1249 |        * Name of the credit card owner.
1250 |        */
1251 |       name: string;
1252 |       /**
1253 |        * 2-digit expiry month.
1254 |        */
1255 |       expiryMonth: string;
1256 |       /**
1257 |        * 4-digit expiry year.
1258 |        */
1259 |       expiryYear: string;
1260 |       /**
1261 |        * 3-digit card verification code.
1262 |        */
1263 |       cvc: string;
1264 |     }
1265 |     export interface AddressField {
1266 |       /**
1267 |        * address field name, for example GIVEN_NAME.
1268 |        */
1269 |       name: string;
1270 |       /**
1271 |        * address field value, for example Jon Doe.
1272 |        */
1273 |       value: string;
1274 |     }
1275 |     /**
1276 |      * A list of address fields.
1277 |      */
1278 |     export interface AddressFields {
1279 |       fields: AddressField[];
1280 |     }
1281 |     export interface Address {
1282 |       /**
1283 |        * fields and values defining an address.
1284 |        */
1285 |       fields: AddressField[];
1286 |     }
1287 |     /**
1288 |      * Defines how an address can be displayed like in chrome://settings/addresses.
1289 | Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such.
1290 | The following address UI for instance:
1291 | [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]]
1292 | should allow the receiver to render:
1293 | Jon Doe
1294 | Munich 81456
1295 |      */
1296 |     export interface AddressUI {
1297 |       /**
1298 |        * A two dimension array containing the representation of values from an address profile.
1299 |        */
1300 |       addressFields: AddressFields[];
1301 |     }
1302 |     /**
1303 |      * Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
1304 |      */
1305 |     export type FillingStrategy = "autocompleteAttribute"|"autofillInferred";
1306 |     export interface FilledField {
1307 |       /**
1308 |        * The type of the field, e.g text, password etc.
1309 |        */
1310 |       htmlType: string;
1311 |       /**
1312 |        * the html id
1313 |        */
1314 |       id: string;
1315 |       /**
1316 |        * the html name
1317 |        */
1318 |       name: string;
1319 |       /**
1320 |        * the field value
1321 |        */
1322 |       value: string;
1323 |       /**
1324 |        * The actual field type, e.g FAMILY_NAME
1325 |        */
1326 |       autofillType: string;
1327 |       /**
1328 |        * The filling strategy
1329 |        */
1330 |       fillingStrategy: FillingStrategy;
1331 |       /**
1332 |        * The frame the field belongs to
1333 |        */
1334 |       frameId: Page.FrameId;
1335 |       /**
1336 |        * The form field's DOM node
1337 |        */
1338 |       fieldId: DOM.BackendNodeId;
1339 |     }
1340 | 
1341 |     /**
1342 |      * Emitted when an address form is filled.
1343 |      */
1344 |     export type addressFormFilledPayload = {
1345 |       /**
1346 |        * Information about the fields that were filled
1347 |        */
1348 |       filledFields: FilledField[];
1349 |       /**
1350 |        * An UI representation of the address used to fill the form.
1351 | Consists of a 2D array where each child represents an address/profile line.
1352 |        */
1353 |       addressUi: AddressUI;
1354 |     }
1355 | 
1356 |     /**
1357 |      * Trigger autofill on a form identified by the fieldId.
1358 | If the field and related form cannot be autofilled, returns an error.
1359 |      */
1360 |     export type triggerParameters = {
1361 |       /**
1362 |        * Identifies a field that serves as an anchor for autofill.
1363 |        */
1364 |       fieldId: DOM.BackendNodeId;
1365 |       /**
1366 |        * Identifies the frame that field belongs to.
1367 |        */
1368 |       frameId?: Page.FrameId;
1369 |       /**
1370 |        * Credit card information to fill out the form. Credit card data is not saved.
1371 |        */
1372 |       card: CreditCard;
1373 |     }
1374 |     export type triggerReturnValue = {
1375 |     }
1376 |     /**
1377 |      * Set addresses so that developers can verify their forms implementation.
1378 |      */
1379 |     export type setAddressesParameters = {
1380 |       addresses: Address[];
1381 |     }
1382 |     export type setAddressesReturnValue = {
1383 |     }
1384 |     /**
1385 |      * Disables autofill domain notifications.
1386 |      */
1387 |     export type disableParameters = {
1388 |     }
1389 |     export type disableReturnValue = {
1390 |     }
1391 |     /**
1392 |      * Enables autofill domain notifications.
1393 |      */
1394 |     export type enableParameters = {
1395 |     }
1396 |     export type enableReturnValue = {
1397 |     }
1398 |   }
1399 | 
1400 |   /**
1401 |    * Defines events for background web platform features.
1402 |    */
1403 |   export module BackgroundService {
1404 |     /**
1405 |      * The Background Service that will be associated with the commands/events.
1406 | Every Background Service operates independently, but they share the same
1407 | API.
1408 |      */
1409 |     export type ServiceName = "backgroundFetch"|"backgroundSync"|"pushMessaging"|"notifications"|"paymentHandler"|"periodicBackgroundSync";
1410 |     /**
1411 |      * A key-value pair for additional event information to pass along.
1412 |      */
1413 |     export interface EventMetadata {
1414 |       key: string;
1415 |       value: string;
1416 |     }
1417 |     export interface BackgroundServiceEvent {
1418 |       /**
1419 |        * Timestamp of the event (in seconds).
1420 |        */
1421 |       timestamp: Network.TimeSinceEpoch;
1422 |       /**
1423 |        * The origin this event belongs to.
1424 |        */
1425 |       origin: string;
1426 |       /**
1427 |        * The Service Worker ID that initiated the event.
1428 |        */
1429 |       serviceWorkerRegistrationId: ServiceWorker.RegistrationID;
1430 |       /**
1431 |        * The Background Service this event belongs to.
1432 |        */
1433 |       service: ServiceName;
1434 |       /**
1435 |        * A description of the event.
1436 |        */
1437 |       eventName: string;
1438 |       /**
1439 |        * An identifier that groups related events together.
1440 |        */
1441 |       instanceId: string;
1442 |       /**
1443 |        * A list of event-specific information.
1444 |        */
1445 |       eventMetadata: EventMetadata[];
1446 |       /**
1447 |        * Storage key this event belongs to.
1448 |        */
1449 |       storageKey: string;
1450 |     }
1451 | 
1452 |     /**
1453 |      * Called when the recording state for the service has been updated.
1454 |      */
1455 |     export type recordingStateChangedPayload = {
1456 |       isRecording: boolean;
1457 |       service: ServiceName;
1458 |     }
1459 |     /**
1460 |      * Called with all existing backgroundServiceEvents when enabled, and all new
1461 | events afterwards if enabled and recording.
1462 |      */
1463 |     export type backgroundServiceEventReceivedPayload = {
1464 |       backgroundServiceEvent: BackgroundServiceEvent;
1465 |     }
1466 | 
1467 |     /**
1468 |      * Enables event updates for the service.
1469 |      */
1470 |     export type startObservingParameters = {
1471 |       service: ServiceName;
1472 |     }
1473 |     export type startObservingReturnValue = {
1474 |     }
1475 |     /**
1476 |      * Disables event updates for the service.
1477 |      */
1478 |     export type stopObservingParameters = {
1479 |       service: ServiceName;
1480 |     }
1481 |     export type stopObservingReturnValue = {
1482 |     }
1483 |     /**
1484 |      * Set the recording state for the service.
1485 |      */
1486 |     export type setRecordingParameters = {
1487 |       shouldRecord: boolean;
1488 |       service: ServiceName;
1489 |     }
1490 |     export type setRecordingReturnValue = {
1491 |     }
1492 |     /**
1493 |      * Clears all stored data for the service.
1494 |      */
1495 |     export type clearEventsParameters = {
1496 |       service: ServiceName;
1497 |     }
1498 |     export type clearEventsReturnValue = {
1499 |     }
1500 |   }
1501 | 
1502 |   /**
1503 |    * The Browser domain defines methods and events for browser managing.
1504 |    */
1505 |   export module Browser {
1506 |     export type BrowserContextID = string;
1507 |     export type WindowID = number;
1508 |     /**
1509 |      * The state of the browser window.
1510 |      */
1511 |     export type WindowState = "normal"|"minimized"|"maximized"|"fullscreen";
1512 |     /**
1513 |      * Browser window bounds information
1514 |      */
1515 |     export interface Bounds {
1516 |       /**
1517 |        * The offset from the left edge of the screen to the window in pixels.
1518 |        */
1519 |       left?: number;
1520 |       /**
1521 |        * The offset from the top edge of the screen to the window in pixels.
1522 |        */
1523 |       top?: number;
1524 |       /**
1525 |        * The window width in pixels.
1526 |        */
1527 |       width?: number;
1528 |       /**
1529 |        * The window height in pixels.
1530 |        */
1531 |       height?: number;
1532 |       /**
1533 |        * The window state. Default to normal.
1534 |        */
1535 |       windowState?: WindowState;
1536 |     }
1537 |     export type PermissionType = "accessibilityEvents"|"audioCapture"|"backgroundSync"|"backgroundFetch"|"capturedSurfaceControl"|"clipboardReadWrite"|"clipboardSanitizedWrite"|"displayCapture"|"durableStorage"|"flash"|"geolocation"|"idleDetection"|"localFonts"|"midi"|"midiSysex"|"nfc"|"notifications"|"paymentHandler"|"periodicBackgroundSync"|"protectedMediaIdentifier"|"sensors"|"storageAccess"|"speakerSelection"|"topLevelStorageAccess"|"videoCapture"|"videoCapturePanTiltZoom"|"wakeLockScreen"|"wakeLockSystem"|"webAppInstallation"|"windowManagement";
1538 |     export type PermissionSetting = "granted"|"denied"|"prompt";
1539 |     /**
1540 |      * Definition of PermissionDescriptor defined in the Permissions API:
1541 | https://w3c.github.io/permissions/#dom-permissiondescriptor.
1542 |      */
1543 |     export interface PermissionDescriptor {
1544 |       /**
1545 |        * Name of permission.
1546 | See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
1547 |        */
1548 |       name: string;
1549 |       /**
1550 |        * For "midi" permission, may also specify sysex control.
1551 |        */
1552 |       sysex?: boolean;
1553 |       /**
1554 |        * For "push" permission, may specify userVisibleOnly.
1555 | Note that userVisibleOnly = true is the only currently supported type.
1556 |        */
1557 |       userVisibleOnly?: boolean;
1558 |       /**
1559 |        * For "clipboard" permission, may specify allowWithoutSanitization.
1560 |        */
1561 |       allowWithoutSanitization?: boolean;
1562 |       /**
1563 |        * For "fullscreen" permission, must specify allowWithoutGesture:true.
1564 |        */
1565 |       allowWithoutGesture?: boolean;
1566 |       /**
1567 |        * For "camera" permission, may specify panTiltZoom.
1568 |        */
1569 |       panTiltZoom?: boolean;
1570 |     }
1571 |     /**
1572 |      * Browser command ids used by executeBrowserCommand.
1573 |      */
1574 |     export type BrowserCommandId = "openTabSearch"|"closeTabSearch";
1575 |     /**
1576 |      * Chrome histogram bucket.
1577 |      */
1578 |     export interface Bucket {
1579 |       /**
1580 |        * Minimum value (inclusive).
1581 |        */
1582 |       low: number;
1583 |       /**
1584 |        * Maximum value (exclusive).
1585 |        */
1586 |       high: number;
1587 |       /**
1588 |        * Number of samples.
1589 |        */
1590 |       count: number;
1591 |     }
1592 |     /**
1593 |      * Chrome histogram.
1594 |      */
1595 |     export interface Histogram {
1596 |       /**
1597 |        * Name.
1598 |        */
1599 |       name: string;
1600 |       /**
1601 |        * Sum of sample values.
1602 |        */
1603 |       sum: number;
1604 |       /**
1605 |        * Total number of samples.
1606 |        */
1607 |       count: number;
1608 |       /**
1609 |        * Buckets.
1610 |        */
1611 |       buckets: Bucket[];
1612 |     }
1613 | 
1614 |     /**
1615 |      * Fired when page is about to start a download.
1616 |      */
1617 |     export type downloadWillBeginPayload = {
1618 |       /**
1619 |        * Id of the frame that caused the download to begin.
1620 |        */
1621 |       frameId: Page.FrameId;
1622 |       /**
1623 |        * Global unique identifier of the download.
1624 |        */
1625 |       guid: string;
1626 |       /**
1627 |        * URL of the resource being downloaded.
1628 |        */
1629 |       url: string;
1630 |       /**
1631 |        * Suggested file name of the resource (the actual name of the file saved on disk may differ).
1632 |        */
1633 |       suggestedFilename: string;
1634 |     }
1635 |     /**
1636 |      * Fired when download makes progress. Last call has |done| == true.
1637 |      */
1638 |     export type downloadProgressPayload = {
1639 |       /**
1640 |        * Global unique identifier of the download.
1641 |        */
1642 |       guid: string;
1643 |       /**
1644 |        * Total expected bytes to download.
1645 |        */
1646 |       totalBytes: number;
1647 |       /**
1648 |        * Total bytes received.
1649 |        */
1650 |       receivedBytes: number;
1651 |       /**
1652 |        * Download status.
1653 |        */
1654 |       state: "inProgress"|"completed"|"canceled";
1655 |     }
1656 | 
1657 |     /**
1658 |      * Set permission settings for given origin.
1659 |      */
1660 |     export type setPermissionParameters = {
1661 |       /**
1662 |        * Descriptor of permission to override.
1663 |        */
1664 |       permission: PermissionDescriptor;
1665 |       /**
1666 |        * Setting of the permission.
1667 |        */
1668 |       setting: PermissionSetting;
1669 |       /**
1670 |        * Origin the permission applies to, all origins if not specified.
1671 |        */
1672 |       origin?: string;
1673 |       /**
1674 |        * Context to override. When omitted, default browser context is used.
1675 |        */
1676 |       browserContextId?: BrowserContextID;
1677 |     }
1678 |     export type setPermissionReturnValue = {
1679 |     }
1680 |     /**
1681 |      * Grant specific permissions to the given origin and reject all others.
1682 |      */
1683 |     export type grantPermissionsParameters = {
1684 |       permissions: PermissionType[];
1685 |       /**
1686 |        * Origin the permission applies to, all origins if not specified.
1687 |        */
1688 |       origin?: string;
1689 |       /**
1690 |        * BrowserContext to override permissions. When omitted, default browser context is used.
1691 |        */
1692 |       browserContextId?: BrowserContextID;
1693 |     }
1694 |     export type grantPermissionsReturnValue = {
1695 |     }
1696 |     /**
1697 |      * Reset all permission management for all origins.
1698 |      */
1699 |     export type resetPermissionsParameters = {
1700 |       /**
1701 |        * BrowserContext to reset permissions. When omitted, default browser context is used.
1702 |        */
1703 |       browserContextId?: BrowserContextID;
1704 |     }
1705 |     export type resetPermissionsReturnValue = {
1706 |     }
1707 |     /**
1708 |      * Set the behavior when downloading a file.
1709 |      */
1710 |     export type setDownloadBehaviorParameters = {
1711 |       /**
1712 |        * Whether to allow all or deny all download requests, or use default Chrome behavior if
1713 | available (otherwise deny). |allowAndName| allows download and names files according to
1714 | their download guids.
1715 |        */
1716 |       behavior: "deny"|"allow"|"allowAndName"|"default";
1717 |       /**
1718 |        * BrowserContext to set download behavior. When omitted, default browser context is used.
1719 |        */
1720 |       browserContextId?: BrowserContextID;
1721 |       /**
1722 |        * The default path to save downloaded files to. This is required if behavior is set to 'allow'
1723 | or 'allowAndName'.
1724 |        */
1725 |       downloadPath?: string;
1726 |       /**
1727 |        * Whether to emit download events (defaults to false).
1728 |        */
1729 |       eventsEnabled?: boolean;
1730 |     }
1731 |     export type setDownloadBehaviorReturnValue = {
1732 |     }
1733 |     /**
1734 |      * Cancel a download if in progress
1735 |      */
1736 |     export type cancelDownloadParameters = {
1737 |       /**
1738 |        * Global unique identifier of the download.
1739 |        */
1740 |       guid: string;
1741 |       /**
1742 |        * BrowserContext to perform the action in. When omitted, default browser context is used.
1743 |        */
1744 |       browserContextId?: BrowserContextID;
1745 |     }
1746 |     export type cancelDownloadReturnValue = {
1747 |     }
1748 |     /**
1749 |      * Close browser gracefully.
1750 |      */
1751 |     export type closeParameters = {
1752 |     }
1753 |     export type closeReturnValue = {
1754 |     }
1755 |     /**
1756 |      * Crashes browser on the main thread.
1757 |      */
1758 |     export type crashParameters = {
1759 |     }
1760 |     export type crashReturnValue = {
1761 |     }
1762 |     /**
1763 |      * Crashes GPU process.
1764 |      */
1765 |     export type crashGpuProcessParameters = {
1766 |     }
1767 |     export type crashGpuProcessReturnValue = {
1768 |     }
1769 |     /**
1770 |      * Returns version information.
1771 |      */
1772 |     export type getVersionParameters = {
1773 |     }
1774 |     export type getVersionReturnValue = {
1775 |       /**
1776 |        * Protocol version.
1777 |        */
1778 |       protocolVersion: string;
1779 |       /**
1780 |        * Product name.
1781 |        */
1782 |       product: string;
1783 |       /**
1784 |        * Product revision.
1785 |        */
1786 |       revision: string;
1787 |       /**
1788 |        * User-Agent.
1789 |        */
1790 |       userAgent: string;
1791 |       /**
1792 |        * V8 version.
1793 |        */
1794 |       jsVersion: string;
1795 |     }
1796 |     /**
1797 |      * Returns the command line switches for the browser process if, and only if
1798 | --enable-automation is on the commandline.
1799 |      */
1800 |     export type getBrowserCommandLineParameters = {
1801 |     }
1802 |     export type getBrowserCommandLineReturnValue = {
1803 |       /**
1804 |        * Commandline parameters
1805 |        */
1806 |       arguments: string[];
1807 |     }
1808 |     /**
1809 |      * Get Chrome histograms.
1810 |      */
1811 |     export type getHistogramsParameters = {
1812 |       /**
1813 |        * Requested substring in name. Only histograms which have query as a
1814 | substring in their name are extracted. An empty or absent query returns
1815 | all histograms.
1816 |        */
1817 |       query?: string;
1818 |       /**
1819 |        * If true, retrieve delta since last delta call.
1820 |        */
1821 |       delta?: boolean;
1822 |     }
1823 |     export type getHistogramsReturnValue = {
1824 |       /**
1825 |        * Histograms.
1826 |        */
1827 |       histograms: Histogram[];
1828 |     }
1829 |     /**
1830 |      * Get a Chrome histogram by name.
1831 |      */
1832 |     export type getHistogramParameters = {
1833 |       /**
1834 |        * Requested histogram name.
1835 |        */
1836 |       name: string;
1837 |       /**
1838 |        * If true, retrieve delta since last delta call.
1839 |        */
1840 |       delta?: boolean;
1841 |     }
1842 |     export type getHistogramReturnValue = {
1843 |       /**
1844 |        * Histogram.
1845 |        */
1846 |       histogram: Histogram;
1847 |     }
1848 |     /**
1849 |      * Get position and size of the browser window.
1850 |      */
1851 |     export type getWindowBoundsParameters = {
1852 |       /**
1853 |        * Browser window id.
1854 |        */
1855 |       windowId: WindowID;
1856 |     }
1857 |     export type getWindowBoundsReturnValue = {
1858 |       /**
1859 |        * Bounds information of the window. When window state is 'minimized', the restored window
1860 | position and size are returned.
1861 |        */
1862 |       bounds: Bounds;
1863 |     }
1864 |     /**
1865 |      * Get the browser window that contains the devtools target.
1866 |      */
1867 |     export type getWindowForTargetParameters = {
1868 |       /**
1869 |        * Devtools agent host id. If called as a part of the session, associated targetId is used.
1870 |        */
1871 |       targetId?: Target.TargetID;
1872 |     }
1873 |     export type getWindowForTargetReturnValue = {
1874 |       /**
1875 |        * Browser window id.
1876 |        */
1877 |       windowId: WindowID;
1878 |       /**
1879 |        * Bounds information of the window. When window state is 'minimized', the restored window
1880 | position and size are returned.
1881 |        */
1882 |       bounds: Bounds;
1883 |     }
1884 |     /**
1885 |      * Set position and/or size of the browser window.
1886 |      */
1887 |     export type setWindowBoundsParameters = {
1888 |       /**
1889 |        * Browser window id.
1890 |        */
1891 |       windowId: WindowID;
1892 |       /**
1893 |        * New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
1894 | with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
1895 |        */
1896 |       bounds: Bounds;
1897 |     }
1898 |     export type setWindowBoundsReturnValue = {
1899 |     }
1900 |     /**
1901 |      * Set dock tile details, platform-specific.
1902 |      */
1903 |     export type setDockTileParameters = {
1904 |       badgeLabel?: string;
1905 |       /**
1906 |        * Png encoded image.
1907 |        */
1908 |       image?: binary;
1909 |     }
1910 |     export type setDockTileReturnValue = {
1911 |     }
1912 |     /**
1913 |      * Invoke custom browser commands used by telemetry.
1914 |      */
1915 |     export type executeBrowserCommandParameters = {
1916 |       commandId: BrowserCommandId;
1917 |     }
1918 |     export type executeBrowserCommandReturnValue = {
1919 |     }
1920 |     /**
1921 |      * Allows a site to use privacy sandbox features that require enrollment
1922 | without the site actually being enrolled. Only supported on page targets.
1923 |      */
1924 |     export type addPrivacySandboxEnrollmentOverrideParameters = {
1925 |       url: string;
1926 |     }
1927 |     export type addPrivacySandboxEnrollmentOverrideReturnValue = {
1928 |     }
1929 |   }
1930 | 
1931 |   /**
1932 |    * This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
1933 | have an associated `id` used in subsequent operations on the related object. Each object type has
1934 | a specific `id` structure, and those are not interchangeable between objects of different kinds.
1935 | CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
1936 | can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
1937 | subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
1938 |    */
1939 |   export module CSS {
1940 |     export type StyleSheetId = string;
1941 |     /**
1942 |      * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
1943 | stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
1944 | inspector" rules), "regular" for regular stylesheets.
1945 |      */
1946 |     export type StyleSheetOrigin = "injected"|"user-agent"|"inspector"|"regular";
1947 |     /**
1948 |      * CSS rule collection for a single pseudo style.
1949 |      */
1950 |     export interface PseudoElementMatches {
1951 |       /**
1952 |        * Pseudo element type.
1953 |        */
1954 |       pseudoType: DOM.PseudoType;
1955 |       /**
1956 |        * Pseudo element custom ident.
1957 |        */
1958 |       pseudoIdentifier?: string;
1959 |       /**
1960 |        * Matches of CSS rules applicable to the pseudo style.
1961 |        */
1962 |       matches: RuleMatch[];
1963 |     }
1964 |     /**
1965 |      * Inherited CSS rule collection from ancestor node.
1966 |      */
1967 |     export interface InheritedStyleEntry {
1968 |       /**
1969 |        * The ancestor node's inline style, if any, in the style inheritance chain.
1970 |        */
1971 |       inlineStyle?: CSSStyle;
1972 |       /**
1973 |        * Matches of CSS rules matching the ancestor node in the style inheritance chain.
1974 |        */
1975 |       matchedCSSRules: RuleMatch[];
1976 |     }
1977 |     /**
1978 |      * Inherited pseudo element matches from pseudos of an ancestor node.
1979 |      */
1980 |     export interface InheritedPseudoElementMatches {
1981 |       /**
1982 |        * Matches of pseudo styles from the pseudos of an ancestor node.
1983 |        */
1984 |       pseudoElements: PseudoElementMatches[];
1985 |     }
1986 |     /**
1987 |      * Match data for a CSS rule.
1988 |      */
1989 |     export interface RuleMatch {
1990 |       /**
1991 |        * CSS rule in the match.
1992 |        */
1993 |       rule: CSSRule;
1994 |       /**
1995 |        * Matching selector indices in the rule's selectorList selectors (0-based).
1996 |        */
1997 |       matchingSelectors: number[];
1998 |     }
1999 |     /**
2000 |      * Data for a simple selector (these are delimited by commas in a selector list).
2001 |      */
2002 |     export interface Value {
2003 |       /**
2004 |        * Value text.
2005 |        */
2006 |       text: string;
2007 |       /**
2008 |        * Value range in the underlying resource (if available).
2009 |        */
2010 |       range?: SourceRange;
2011 |       /**
2012 |        * Specificity of the selector.
2013 |        */
2014 |       specificity?: Specificity;
2015 |     }
2016 |     /**
2017 |      * Specificity:
2018 | https://drafts.csswg.org/selectors/#specificity-rules
2019 |      */
2020 |     export interface Specificity {
2021 |       /**
2022 |        * The a component, which represents the number of ID selectors.
2023 |        */
2024 |       a: number;
2025 |       /**
2026 |        * The b component, which represents the number of class selectors, attributes selectors, and
2027 | pseudo-classes.
2028 |        */
2029 |       b: number;
2030 |       /**
2031 |        * The c component, which represents the number of type selectors and pseudo-elements.
2032 |        */
2033 |       c: number;
2034 |     }
2035 |     /**
2036 |      * Selector list data.
2037 |      */
2038 |     export interface SelectorList {
2039 |       /**
2040 |        * Selectors in the list.
2041 |        */
2042 |       selectors: Value[];
2043 |       /**
2044 |        * Rule selector text.
2045 |        */
2046 |       text: string;
2047 |     }
2048 |     /**
2049 |      * CSS stylesheet metainformation.
2050 |      */
2051 |     export interface CSSStyleSheetHeader {
2052 |       /**
2053 |        * The stylesheet identifier.
2054 |        */
2055 |       styleSheetId: StyleSheetId;
2056 |       /**
2057 |        * Owner frame identifier.
2058 |        */
2059 |       frameId: Page.FrameId;
2060 |       /**
2061 |        * Stylesheet resource URL. Empty if this is a constructed stylesheet created using
2062 | new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported
2063 | as a CSS module script).
2064 |        */
2065 |       sourceURL: string;
2066 |       /**
2067 |        * URL of source map associated with the stylesheet (if any).
2068 |        */
2069 |       sourceMapURL?: string;
2070 |       /**
2071 |        * Stylesheet origin.
2072 |        */
2073 |       origin: StyleSheetOrigin;
2074 |       /**
2075 |        * Stylesheet title.
2076 |        */
2077 |       title: string;
2078 |       /**
2079 |        * The backend id for the owner node of the stylesheet.
2080 |        */
2081 |       ownerNode?: DOM.BackendNodeId;
2082 |       /**
2083 |        * Denotes whether the stylesheet is disabled.
2084 |        */
2085 |       disabled: boolean;
2086 |       /**
2087 |        * Whether the sourceURL field value comes from the sourceURL comment.
2088 |        */
2089 |       hasSourceURL?: boolean;
2090 |       /**
2091 |        * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for
2092 | document.written STYLE tags.
2093 |        */
2094 |       isInline: boolean;
2095 |       /**
2096 |        * Whether this stylesheet is mutable. Inline stylesheets become mutable
2097 | after they have been modified via CSSOM API.
2098 | `<link>` element's stylesheets become mutable only if DevTools modifies them.
2099 | Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
2100 |        */
2101 |       isMutable: boolean;
2102 |       /**
2103 |        * True if this stylesheet is created through new CSSStyleSheet() or imported as a
2104 | CSS module script.
2105 |        */
2106 |       isConstructed: boolean;
2107 |       /**
2108 |        * Line offset of the stylesheet within the resource (zero based).
2109 |        */
2110 |       startLine: number;
2111 |       /**
2112 |        * Column offset of the stylesheet within the resource (zero based).
2113 |        */
2114 |       startColumn: number;
2115 |       /**
2116 |        * Size of the content (in characters).
2117 |        */
2118 |       length: number;
2119 |       /**
2120 |        * Line offset of the end of the stylesheet within the resource (zero based).
2121 |        */
2122 |       endLine: number;
2123 |       /**
2124 |        * Column offset of the end of the stylesheet within the resource (zero based).
2125 |        */
2126 |       endColumn: number;
2127 |       /**
2128 |        * If the style sheet was loaded from a network resource, this indicates when the resource failed to load
2129 |        */
2130 |       loadingFailed?: boolean;
2131 |     }
2132 |     /**
2133 |      * CSS rule representation.
2134 |      */
2135 |     export interface CSSRule {
2136 |       /**
2137 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2138 | stylesheet rules) this rule came from.
2139 |        */
2140 |       styleSheetId?: StyleSheetId;
2141 |       /**
2142 |        * Rule selector data.
2143 |        */
2144 |       selectorList: SelectorList;
2145 |       /**
2146 |        * Array of selectors from ancestor style rules, sorted by distance from the current rule.
2147 |        */
2148 |       nestingSelectors?: string[];
2149 |       /**
2150 |        * Parent stylesheet's origin.
2151 |        */
2152 |       origin: StyleSheetOrigin;
2153 |       /**
2154 |        * Associated style declaration.
2155 |        */
2156 |       style: CSSStyle;
2157 |       /**
2158 |        * Media list array (for rules involving media queries). The array enumerates media queries
2159 | starting with the innermost one, going outwards.
2160 |        */
2161 |       media?: CSSMedia[];
2162 |       /**
2163 |        * Container query list array (for rules involving container queries).
2164 | The array enumerates container queries starting with the innermost one, going outwards.
2165 |        */
2166 |       containerQueries?: CSSContainerQuery[];
2167 |       /**
2168 |        * @supports CSS at-rule array.
2169 | The array enumerates @supports at-rules starting with the innermost one, going outwards.
2170 |        */
2171 |       supports?: CSSSupports[];
2172 |       /**
2173 |        * Cascade layer array. Contains the layer hierarchy that this rule belongs to starting
2174 | with the innermost layer and going outwards.
2175 |        */
2176 |       layers?: CSSLayer[];
2177 |       /**
2178 |        * @scope CSS at-rule array.
2179 | The array enumerates @scope at-rules starting with the innermost one, going outwards.
2180 |        */
2181 |       scopes?: CSSScope[];
2182 |       /**
2183 |        * The array keeps the types of ancestor CSSRules from the innermost going outwards.
2184 |        */
2185 |       ruleTypes?: CSSRuleType[];
2186 |     }
2187 |     /**
2188 |      * Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.
2189 | This list only contains rule types that are collected during the ancestor rule collection.
2190 |      */
2191 |     export type CSSRuleType = "MediaRule"|"SupportsRule"|"ContainerRule"|"LayerRule"|"ScopeRule"|"StyleRule";
2192 |     /**
2193 |      * CSS coverage information.
2194 |      */
2195 |     export interface RuleUsage {
2196 |       /**
2197 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2198 | stylesheet rules) this rule came from.
2199 |        */
2200 |       styleSheetId: StyleSheetId;
2201 |       /**
2202 |        * Offset of the start of the rule (including selector) from the beginning of the stylesheet.
2203 |        */
2204 |       startOffset: number;
2205 |       /**
2206 |        * Offset of the end of the rule body from the beginning of the stylesheet.
2207 |        */
2208 |       endOffset: number;
2209 |       /**
2210 |        * Indicates whether the rule was actually used by some element in the page.
2211 |        */
2212 |       used: boolean;
2213 |     }
2214 |     /**
2215 |      * Text range within a resource. All numbers are zero-based.
2216 |      */
2217 |     export interface SourceRange {
2218 |       /**
2219 |        * Start line of range.
2220 |        */
2221 |       startLine: number;
2222 |       /**
2223 |        * Start column of range (inclusive).
2224 |        */
2225 |       startColumn: number;
2226 |       /**
2227 |        * End line of range
2228 |        */
2229 |       endLine: number;
2230 |       /**
2231 |        * End column of range (exclusive).
2232 |        */
2233 |       endColumn: number;
2234 |     }
2235 |     export interface ShorthandEntry {
2236 |       /**
2237 |        * Shorthand name.
2238 |        */
2239 |       name: string;
2240 |       /**
2241 |        * Shorthand value.
2242 |        */
2243 |       value: string;
2244 |       /**
2245 |        * Whether the property has "!important" annotation (implies `false` if absent).
2246 |        */
2247 |       important?: boolean;
2248 |     }
2249 |     export interface CSSComputedStyleProperty {
2250 |       /**
2251 |        * Computed style property name.
2252 |        */
2253 |       name: string;
2254 |       /**
2255 |        * Computed style property value.
2256 |        */
2257 |       value: string;
2258 |     }
2259 |     /**
2260 |      * CSS style representation.
2261 |      */
2262 |     export interface CSSStyle {
2263 |       /**
2264 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2265 | stylesheet rules) this rule came from.
2266 |        */
2267 |       styleSheetId?: StyleSheetId;
2268 |       /**
2269 |        * CSS properties in the style.
2270 |        */
2271 |       cssProperties: CSSProperty[];
2272 |       /**
2273 |        * Computed values for all shorthands found in the style.
2274 |        */
2275 |       shorthandEntries: ShorthandEntry[];
2276 |       /**
2277 |        * Style declaration text (if available).
2278 |        */
2279 |       cssText?: string;
2280 |       /**
2281 |        * Style declaration range in the enclosing stylesheet (if available).
2282 |        */
2283 |       range?: SourceRange;
2284 |     }
2285 |     /**
2286 |      * CSS property declaration data.
2287 |      */
2288 |     export interface CSSProperty {
2289 |       /**
2290 |        * The property name.
2291 |        */
2292 |       name: string;
2293 |       /**
2294 |        * The property value.
2295 |        */
2296 |       value: string;
2297 |       /**
2298 |        * Whether the property has "!important" annotation (implies `false` if absent).
2299 |        */
2300 |       important?: boolean;
2301 |       /**
2302 |        * Whether the property is implicit (implies `false` if absent).
2303 |        */
2304 |       implicit?: boolean;
2305 |       /**
2306 |        * The full property text as specified in the style.
2307 |        */
2308 |       text?: string;
2309 |       /**
2310 |        * Whether the property is understood by the browser (implies `true` if absent).
2311 |        */
2312 |       parsedOk?: boolean;
2313 |       /**
2314 |        * Whether the property is disabled by the user (present for source-based properties only).
2315 |        */
2316 |       disabled?: boolean;
2317 |       /**
2318 |        * The entire property range in the enclosing style declaration (if available).
2319 |        */
2320 |       range?: SourceRange;
2321 |       /**
2322 |        * Parsed longhand components of this property if it is a shorthand.
2323 | This field will be empty if the given property is not a shorthand.
2324 |        */
2325 |       longhandProperties?: CSSProperty[];
2326 |     }
2327 |     /**
2328 |      * CSS media rule descriptor.
2329 |      */
2330 |     export interface CSSMedia {
2331 |       /**
2332 |        * Media query text.
2333 |        */
2334 |       text: string;
2335 |       /**
2336 |        * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if
2337 | specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked
2338 | stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline
2339 | stylesheet's STYLE tag.
2340 |        */
2341 |       source: "mediaRule"|"importRule"|"linkedSheet"|"inlineSheet";
2342 |       /**
2343 |        * URL of the document containing the media query description.
2344 |        */
2345 |       sourceURL?: string;
2346 |       /**
2347 |        * The associated rule (@media or @import) header range in the enclosing stylesheet (if
2348 | available).
2349 |        */
2350 |       range?: SourceRange;
2351 |       /**
2352 |        * Identifier of the stylesheet containing this object (if exists).
2353 |        */
2354 |       styleSheetId?: StyleSheetId;
2355 |       /**
2356 |        * Array of media queries.
2357 |        */
2358 |       mediaList?: MediaQuery[];
2359 |     }
2360 |     /**
2361 |      * Media query descriptor.
2362 |      */
2363 |     export interface MediaQuery {
2364 |       /**
2365 |        * Array of media query expressions.
2366 |        */
2367 |       expressions: MediaQueryExpression[];
2368 |       /**
2369 |        * Whether the media query condition is satisfied.
2370 |        */
2371 |       active: boolean;
2372 |     }
2373 |     /**
2374 |      * Media query expression descriptor.
2375 |      */
2376 |     export interface MediaQueryExpression {
2377 |       /**
2378 |        * Media query expression value.
2379 |        */
2380 |       value: number;
2381 |       /**
2382 |        * Media query expression units.
2383 |        */
2384 |       unit: string;
2385 |       /**
2386 |        * Media query expression feature.
2387 |        */
2388 |       feature: string;
2389 |       /**
2390 |        * The associated range of the value text in the enclosing stylesheet (if available).
2391 |        */
2392 |       valueRange?: SourceRange;
2393 |       /**
2394 |        * Computed length of media query expression (if applicable).
2395 |        */
2396 |       computedLength?: number;
2397 |     }
2398 |     /**
2399 |      * CSS container query rule descriptor.
2400 |      */
2401 |     export interface CSSContainerQuery {
2402 |       /**
2403 |        * Container query text.
2404 |        */
2405 |       text: string;
2406 |       /**
2407 |        * The associated rule header range in the enclosing stylesheet (if
2408 | available).
2409 |        */
2410 |       range?: SourceRange;
2411 |       /**
2412 |        * Identifier of the stylesheet containing this object (if exists).
2413 |        */
2414 |       styleSheetId?: StyleSheetId;
2415 |       /**
2416 |        * Optional name for the container.
2417 |        */
2418 |       name?: string;
2419 |       /**
2420 |        * Optional physical axes queried for the container.
2421 |        */
2422 |       physicalAxes?: DOM.PhysicalAxes;
2423 |       /**
2424 |        * Optional logical axes queried for the container.
2425 |        */
2426 |       logicalAxes?: DOM.LogicalAxes;
2427 |     }
2428 |     /**
2429 |      * CSS Supports at-rule descriptor.
2430 |      */
2431 |     export interface CSSSupports {
2432 |       /**
2433 |        * Supports rule text.
2434 |        */
2435 |       text: string;
2436 |       /**
2437 |        * Whether the supports condition is satisfied.
2438 |        */
2439 |       active: boolean;
2440 |       /**
2441 |        * The associated rule header range in the enclosing stylesheet (if
2442 | available).
2443 |        */
2444 |       range?: SourceRange;
2445 |       /**
2446 |        * Identifier of the stylesheet containing this object (if exists).
2447 |        */
2448 |       styleSheetId?: StyleSheetId;
2449 |     }
2450 |     /**
2451 |      * CSS Scope at-rule descriptor.
2452 |      */
2453 |     export interface CSSScope {
2454 |       /**
2455 |        * Scope rule text.
2456 |        */
2457 |       text: string;
2458 |       /**
2459 |        * The associated rule header range in the enclosing stylesheet (if
2460 | available).
2461 |        */
2462 |       range?: SourceRange;
2463 |       /**
2464 |        * Identifier of the stylesheet containing this object (if exists).
2465 |        */
2466 |       styleSheetId?: StyleSheetId;
2467 |     }
2468 |     /**
2469 |      * CSS Layer at-rule descriptor.
2470 |      */
2471 |     export interface CSSLayer {
2472 |       /**
2473 |        * Layer name.
2474 |        */
2475 |       text: string;
2476 |       /**
2477 |        * The associated rule header range in the enclosing stylesheet (if
2478 | available).
2479 |        */
2480 |       range?: SourceRange;
2481 |       /**
2482 |        * Identifier of the stylesheet containing this object (if exists).
2483 |        */
2484 |       styleSheetId?: StyleSheetId;
2485 |     }
2486 |     /**
2487 |      * CSS Layer data.
2488 |      */
2489 |     export interface CSSLayerData {
2490 |       /**
2491 |        * Layer name.
2492 |        */
2493 |       name: string;
2494 |       /**
2495 |        * Direct sub-layers
2496 |        */
2497 |       subLayers?: CSSLayerData[];
2498 |       /**
2499 |        * Layer order. The order determines the order of the layer in the cascade order.
2500 | A higher number has higher priority in the cascade order.
2501 |        */
2502 |       order: number;
2503 |     }
2504 |     /**
2505 |      * Information about amount of glyphs that were rendered with given font.
2506 |      */
2507 |     export interface PlatformFontUsage {
2508 |       /**
2509 |        * Font's family name reported by platform.
2510 |        */
2511 |       familyName: string;
2512 |       /**
2513 |        * Font's PostScript name reported by platform.
2514 |        */
2515 |       postScriptName: string;
2516 |       /**
2517 |        * Indicates if the font was downloaded or resolved locally.
2518 |        */
2519 |       isCustomFont: boolean;
2520 |       /**
2521 |        * Amount of glyphs that were rendered with this font.
2522 |        */
2523 |       glyphCount: number;
2524 |     }
2525 |     /**
2526 |      * Information about font variation axes for variable fonts
2527 |      */
2528 |     export interface FontVariationAxis {
2529 |       /**
2530 |        * The font-variation-setting tag (a.k.a. "axis tag").
2531 |        */
2532 |       tag: string;
2533 |       /**
2534 |        * Human-readable variation name in the default language (normally, "en").
2535 |        */
2536 |       name: string;
2537 |       /**
2538 |        * The minimum value (inclusive) the font supports for this tag.
2539 |        */
2540 |       minValue: number;
2541 |       /**
2542 |        * The maximum value (inclusive) the font supports for this tag.
2543 |        */
2544 |       maxValue: number;
2545 |       /**
2546 |        * The default value.
2547 |        */
2548 |       defaultValue: number;
2549 |     }
2550 |     /**
2551 |      * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
2552 | and additional information such as platformFontFamily and fontVariationAxes.
2553 |      */
2554 |     export interface FontFace {
2555 |       /**
2556 |        * The font-family.
2557 |        */
2558 |       fontFamily: string;
2559 |       /**
2560 |        * The font-style.
2561 |        */
2562 |       fontStyle: string;
2563 |       /**
2564 |        * The font-variant.
2565 |        */
2566 |       fontVariant: string;
2567 |       /**
2568 |        * The font-weight.
2569 |        */
2570 |       fontWeight: string;
2571 |       /**
2572 |        * The font-stretch.
2573 |        */
2574 |       fontStretch: string;
2575 |       /**
2576 |        * The font-display.
2577 |        */
2578 |       fontDisplay: string;
2579 |       /**
2580 |        * The unicode-range.
2581 |        */
2582 |       unicodeRange: string;
2583 |       /**
2584 |        * The src.
2585 |        */
2586 |       src: string;
2587 |       /**
2588 |        * The resolved platform font family
2589 |        */
2590 |       platformFontFamily: string;
2591 |       /**
2592 |        * Available variation settings (a.k.a. "axes").
2593 |        */
2594 |       fontVariationAxes?: FontVariationAxis[];
2595 |     }
2596 |     /**
2597 |      * CSS try rule representation.
2598 |      */
2599 |     export interface CSSTryRule {
2600 |       /**
2601 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2602 | stylesheet rules) this rule came from.
2603 |        */
2604 |       styleSheetId?: StyleSheetId;
2605 |       /**
2606 |        * Parent stylesheet's origin.
2607 |        */
2608 |       origin: StyleSheetOrigin;
2609 |       /**
2610 |        * Associated style declaration.
2611 |        */
2612 |       style: CSSStyle;
2613 |     }
2614 |     /**
2615 |      * CSS @position-try rule representation.
2616 |      */
2617 |     export interface CSSPositionTryRule {
2618 |       /**
2619 |        * The prelude dashed-ident name
2620 |        */
2621 |       name: Value;
2622 |       /**
2623 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2624 | stylesheet rules) this rule came from.
2625 |        */
2626 |       styleSheetId?: StyleSheetId;
2627 |       /**
2628 |        * Parent stylesheet's origin.
2629 |        */
2630 |       origin: StyleSheetOrigin;
2631 |       /**
2632 |        * Associated style declaration.
2633 |        */
2634 |       style: CSSStyle;
2635 |       active: boolean;
2636 |     }
2637 |     /**
2638 |      * CSS keyframes rule representation.
2639 |      */
2640 |     export interface CSSKeyframesRule {
2641 |       /**
2642 |        * Animation name.
2643 |        */
2644 |       animationName: Value;
2645 |       /**
2646 |        * List of keyframes.
2647 |        */
2648 |       keyframes: CSSKeyframeRule[];
2649 |     }
2650 |     /**
2651 |      * Representation of a custom property registration through CSS.registerProperty
2652 |      */
2653 |     export interface CSSPropertyRegistration {
2654 |       propertyName: string;
2655 |       initialValue?: Value;
2656 |       inherits: boolean;
2657 |       syntax: string;
2658 |     }
2659 |     /**
2660 |      * CSS font-palette-values rule representation.
2661 |      */
2662 |     export interface CSSFontPaletteValuesRule {
2663 |       /**
2664 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2665 | stylesheet rules) this rule came from.
2666 |        */
2667 |       styleSheetId?: StyleSheetId;
2668 |       /**
2669 |        * Parent stylesheet's origin.
2670 |        */
2671 |       origin: StyleSheetOrigin;
2672 |       /**
2673 |        * Associated font palette name.
2674 |        */
2675 |       fontPaletteName: Value;
2676 |       /**
2677 |        * Associated style declaration.
2678 |        */
2679 |       style: CSSStyle;
2680 |     }
2681 |     /**
2682 |      * CSS property at-rule representation.
2683 |      */
2684 |     export interface CSSPropertyRule {
2685 |       /**
2686 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2687 | stylesheet rules) this rule came from.
2688 |        */
2689 |       styleSheetId?: StyleSheetId;
2690 |       /**
2691 |        * Parent stylesheet's origin.
2692 |        */
2693 |       origin: StyleSheetOrigin;
2694 |       /**
2695 |        * Associated property name.
2696 |        */
2697 |       propertyName: Value;
2698 |       /**
2699 |        * Associated style declaration.
2700 |        */
2701 |       style: CSSStyle;
2702 |     }
2703 |     /**
2704 |      * CSS keyframe rule representation.
2705 |      */
2706 |     export interface CSSKeyframeRule {
2707 |       /**
2708 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2709 | stylesheet rules) this rule came from.
2710 |        */
2711 |       styleSheetId?: StyleSheetId;
2712 |       /**
2713 |        * Parent stylesheet's origin.
2714 |        */
2715 |       origin: StyleSheetOrigin;
2716 |       /**
2717 |        * Associated key text.
2718 |        */
2719 |       keyText: Value;
2720 |       /**
2721 |        * Associated style declaration.
2722 |        */
2723 |       style: CSSStyle;
2724 |     }
2725 |     /**
2726 |      * A descriptor of operation to mutate style declaration text.
2727 |      */
2728 |     export interface StyleDeclarationEdit {
2729 |       /**
2730 |        * The css style sheet identifier.
2731 |        */
2732 |       styleSheetId: StyleSheetId;
2733 |       /**
2734 |        * The range of the style text in the enclosing stylesheet.
2735 |        */
2736 |       range: SourceRange;
2737 |       /**
2738 |        * New style text.
2739 |        */
2740 |       text: string;
2741 |     }
2742 | 
2743 |     /**
2744 |      * Fires whenever a web font is updated.  A non-empty font parameter indicates a successfully loaded
2745 | web font.
2746 |      */
2747 |     export type fontsUpdatedPayload = {
2748 |       /**
2749 |        * The web font that has loaded.
2750 |        */
2751 |       font?: FontFace;
2752 |     }
2753 |     /**
2754 |      * Fires whenever a MediaQuery result changes (for example, after a browser window has been
2755 | resized.) The current implementation considers only viewport-dependent media features.
2756 |      */
2757 |     export type mediaQueryResultChangedPayload = void;
2758 |     /**
2759 |      * Fired whenever an active document stylesheet is added.
2760 |      */
2761 |     export type styleSheetAddedPayload = {
2762 |       /**
2763 |        * Added stylesheet metainfo.
2764 |        */
2765 |       header: CSSStyleSheetHeader;
2766 |     }
2767 |     /**
2768 |      * Fired whenever a stylesheet is changed as a result of the client operation.
2769 |      */
2770 |     export type styleSheetChangedPayload = {
2771 |       styleSheetId: StyleSheetId;
2772 |     }
2773 |     /**
2774 |      * Fired whenever an active document stylesheet is removed.
2775 |      */
2776 |     export type styleSheetRemovedPayload = {
2777 |       /**
2778 |        * Identifier of the removed stylesheet.
2779 |        */
2780 |       styleSheetId: StyleSheetId;
2781 |     }
2782 | 
2783 |     /**
2784 |      * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
2785 | position specified by `location`.
2786 |      */
2787 |     export type addRuleParameters = {
2788 |       /**
2789 |        * The css style sheet identifier where a new rule should be inserted.
2790 |        */
2791 |       styleSheetId: StyleSheetId;
2792 |       /**
2793 |        * The text of a new rule.
2794 |        */
2795 |       ruleText: string;
2796 |       /**
2797 |        * Text position of a new rule in the target style sheet.
2798 |        */
2799 |       location: SourceRange;
2800 |       /**
2801 |        * NodeId for the DOM node in whose context custom property declarations for registered properties should be
2802 | validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
2803 | incorrect results if the declaration contains a var() for example.
2804 |        */
2805 |       nodeForPropertySyntaxValidation?: DOM.NodeId;
2806 |     }
2807 |     export type addRuleReturnValue = {
2808 |       /**
2809 |        * The newly created rule.
2810 |        */
2811 |       rule: CSSRule;
2812 |     }
2813 |     /**
2814 |      * Returns all class names from specified stylesheet.
2815 |      */
2816 |     export type collectClassNamesParameters = {
2817 |       styleSheetId: StyleSheetId;
2818 |     }
2819 |     export type collectClassNamesReturnValue = {
2820 |       /**
2821 |        * Class name list.
2822 |        */
2823 |       classNames: string[];
2824 |     }
2825 |     /**
2826 |      * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
2827 |      */
2828 |     export type createStyleSheetParameters = {
2829 |       /**
2830 |        * Identifier of the frame where "via-inspector" stylesheet should be created.
2831 |        */
2832 |       frameId: Page.FrameId;
2833 |     }
2834 |     export type createStyleSheetReturnValue = {
2835 |       /**
2836 |        * Identifier of the created "via-inspector" stylesheet.
2837 |        */
2838 |       styleSheetId: StyleSheetId;
2839 |     }
2840 |     /**
2841 |      * Disables the CSS agent for the given page.
2842 |      */
2843 |     export type disableParameters = {
2844 |     }
2845 |     export type disableReturnValue = {
2846 |     }
2847 |     /**
2848 |      * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
2849 | enabled until the result of this command is received.
2850 |      */
2851 |     export type enableParameters = {
2852 |     }
2853 |     export type enableReturnValue = {
2854 |     }
2855 |     /**
2856 |      * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
2857 | the browser.
2858 |      */
2859 |     export type forcePseudoStateParameters = {
2860 |       /**
2861 |        * The element id for which to force the pseudo state.
2862 |        */
2863 |       nodeId: DOM.NodeId;
2864 |       /**
2865 |        * Element pseudo classes to force when computing the element's style.
2866 |        */
2867 |       forcedPseudoClasses: string[];
2868 |     }
2869 |     export type forcePseudoStateReturnValue = {
2870 |     }
2871 |     export type getBackgroundColorsParameters = {
2872 |       /**
2873 |        * Id of the node to get background colors for.
2874 |        */
2875 |       nodeId: DOM.NodeId;
2876 |     }
2877 |     export type getBackgroundColorsReturnValue = {
2878 |       /**
2879 |        * The range of background colors behind this element, if it contains any visible text. If no
2880 | visible text is present, this will be undefined. In the case of a flat background color,
2881 | this will consist of simply that color. In the case of a gradient, this will consist of each
2882 | of the color stops. For anything more complicated, this will be an empty array. Images will
2883 | be ignored (as if the image had failed to load).
2884 |        */
2885 |       backgroundColors?: string[];
2886 |       /**
2887 |        * The computed font size for this node, as a CSS computed value string (e.g. '12px').
2888 |        */
2889 |       computedFontSize?: string;
2890 |       /**
2891 |        * The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or
2892 | '100').
2893 |        */
2894 |       computedFontWeight?: string;
2895 |     }
2896 |     /**
2897 |      * Returns the computed style for a DOM node identified by `nodeId`.
2898 |      */
2899 |     export type getComputedStyleForNodeParameters = {
2900 |       nodeId: DOM.NodeId;
2901 |     }
2902 |     export type getComputedStyleForNodeReturnValue = {
2903 |       /**
2904 |        * Computed style for the specified DOM node.
2905 |        */
2906 |       computedStyle: CSSComputedStyleProperty[];
2907 |     }
2908 |     /**
2909 |      * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
2910 | attributes) for a DOM node identified by `nodeId`.
2911 |      */
2912 |     export type getInlineStylesForNodeParameters = {
2913 |       nodeId: DOM.NodeId;
2914 |     }
2915 |     export type getInlineStylesForNodeReturnValue = {
2916 |       /**
2917 |        * Inline style for the specified DOM node.
2918 |        */
2919 |       inlineStyle?: CSSStyle;
2920 |       /**
2921 |        * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
2922 |        */
2923 |       attributesStyle?: CSSStyle;
2924 |     }
2925 |     /**
2926 |      * Returns requested styles for a DOM node identified by `nodeId`.
2927 |      */
2928 |     export type getMatchedStylesForNodeParameters = {
2929 |       nodeId: DOM.NodeId;
2930 |     }
2931 |     export type getMatchedStylesForNodeReturnValue = {
2932 |       /**
2933 |        * Inline style for the specified DOM node.
2934 |        */
2935 |       inlineStyle?: CSSStyle;
2936 |       /**
2937 |        * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
2938 |        */
2939 |       attributesStyle?: CSSStyle;
2940 |       /**
2941 |        * CSS rules matching this node, from all applicable stylesheets.
2942 |        */
2943 |       matchedCSSRules?: RuleMatch[];
2944 |       /**
2945 |        * Pseudo style matches for this node.
2946 |        */
2947 |       pseudoElements?: PseudoElementMatches[];
2948 |       /**
2949 |        * A chain of inherited styles (from the immediate node parent up to the DOM tree root).
2950 |        */
2951 |       inherited?: InheritedStyleEntry[];
2952 |       /**
2953 |        * A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
2954 |        */
2955 |       inheritedPseudoElements?: InheritedPseudoElementMatches[];
2956 |       /**
2957 |        * A list of CSS keyframed animations matching this node.
2958 |        */
2959 |       cssKeyframesRules?: CSSKeyframesRule[];
2960 |       /**
2961 |        * A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
2962 |        */
2963 |       cssPositionTryRules?: CSSPositionTryRule[];
2964 |       /**
2965 |        * Index of the active fallback in the applied position-try-fallback property,
2966 | will not be set if there is no active position-try fallback.
2967 |        */
2968 |       activePositionFallbackIndex?: number;
2969 |       /**
2970 |        * A list of CSS at-property rules matching this node.
2971 |        */
2972 |       cssPropertyRules?: CSSPropertyRule[];
2973 |       /**
2974 |        * A list of CSS property registrations matching this node.
2975 |        */
2976 |       cssPropertyRegistrations?: CSSPropertyRegistration[];
2977 |       /**
2978 |        * A font-palette-values rule matching this node.
2979 |        */
2980 |       cssFontPaletteValuesRule?: CSSFontPaletteValuesRule;
2981 |       /**
2982 |        * Id of the first parent element that does not have display: contents.
2983 |        */
2984 |       parentLayoutNodeId?: DOM.NodeId;
2985 |     }
2986 |     /**
2987 |      * Returns all media queries parsed by the rendering engine.
2988 |      */
2989 |     export type getMediaQueriesParameters = {
2990 |     }
2991 |     export type getMediaQueriesReturnValue = {
2992 |       medias: CSSMedia[];
2993 |     }
2994 |     /**
2995 |      * Requests information about platform fonts which we used to render child TextNodes in the given
2996 | node.
2997 |      */
2998 |     export type getPlatformFontsForNodeParameters = {
2999 |       nodeId: DOM.NodeId;
3000 |     }
3001 |     export type getPlatformFontsForNodeReturnValue = {
3002 |       /**
3003 |        * Usage statistics for every employed platform font.
3004 |        */
3005 |       fonts: PlatformFontUsage[];
3006 |     }
3007 |     /**
3008 |      * Returns the current textual content for a stylesheet.
3009 |      */
3010 |     export type getStyleSheetTextParameters = {
3011 |       styleSheetId: StyleSheetId;
3012 |     }
3013 |     export type getStyleSheetTextReturnValue = {
3014 |       /**
3015 |        * The stylesheet text.
3016 |        */
3017 |       text: string;
3018 |     }
3019 |     /**
3020 |      * Returns all layers parsed by the rendering engine for the tree scope of a node.
3021 | Given a DOM element identified by nodeId, getLayersForNode returns the root
3022 | layer for the nearest ancestor document or shadow root. The layer root contains
3023 | the full layer tree for the tree scope and their ordering.
3024 |      */
3025 |     export type getLayersForNodeParameters = {
3026 |       nodeId: DOM.NodeId;
3027 |     }
3028 |     export type getLayersForNodeReturnValue = {
3029 |       rootLayer: CSSLayerData;
3030 |     }
3031 |     /**
3032 |      * Given a CSS selector text and a style sheet ID, getLocationForSelector
3033 | returns an array of locations of the CSS selector in the style sheet.
3034 |      */
3035 |     export type getLocationForSelectorParameters = {
3036 |       styleSheetId: StyleSheetId;
3037 |       selectorText: string;
3038 |     }
3039 |     export type getLocationForSelectorReturnValue = {
3040 |       ranges: SourceRange[];
3041 |     }
3042 |     /**
3043 |      * Starts tracking the given computed styles for updates. The specified array of properties
3044 | replaces the one previously specified. Pass empty array to disable tracking.
3045 | Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
3046 | The changes to computed style properties are only tracked for nodes pushed to the front-end
3047 | by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
3048 | to the front-end, no updates will be issued for the node.
3049 |      */
3050 |     export type trackComputedStyleUpdatesParameters = {
3051 |       propertiesToTrack: CSSComputedStyleProperty[];
3052 |     }
3053 |     export type trackComputedStyleUpdatesReturnValue = {
3054 |     }
3055 |     /**
3056 |      * Polls the next batch of computed style updates.
3057 |      */
3058 |     export type takeComputedStyleUpdatesParameters = {
3059 |     }
3060 |     export type takeComputedStyleUpdatesReturnValue = {
3061 |       /**
3062 |        * The list of node Ids that have their tracked computed styles updated.
3063 |        */
3064 |       nodeIds: DOM.NodeId[];
3065 |     }
3066 |     /**
3067 |      * Find a rule with the given active property for the given node and set the new value for this
3068 | property
3069 |      */
3070 |     export type setEffectivePropertyValueForNodeParameters = {
3071 |       /**
3072 |        * The element id for which to set property.
3073 |        */
3074 |       nodeId: DOM.NodeId;
3075 |       propertyName: string;
3076 |       value: string;
3077 |     }
3078 |     export type setEffectivePropertyValueForNodeReturnValue = {
3079 |     }
3080 |     /**
3081 |      * Modifies the property rule property name.
3082 |      */
3083 |     export type setPropertyRulePropertyNameParameters = {
3084 |       styleSheetId: StyleSheetId;
3085 |       range: SourceRange;
3086 |       propertyName: string;
3087 |     }
3088 |     export type setPropertyRulePropertyNameReturnValue = {
3089 |       /**
3090 |        * The resulting key text after modification.
3091 |        */
3092 |       propertyName: Value;
3093 |     }
3094 |     /**
3095 |      * Modifies the keyframe rule key text.
3096 |      */
3097 |     export type setKeyframeKeyParameters = {
3098 |       styleSheetId: StyleSheetId;
3099 |       range: SourceRange;
3100 |       keyText: string;
3101 |     }
3102 |     export type setKeyframeKeyReturnValue = {
3103 |       /**
3104 |        * The resulting key text after modification.
3105 |        */
3106 |       keyText: Value;
3107 |     }
3108 |     /**
3109 |      * Modifies the rule selector.
3110 |      */
3111 |     export type setMediaTextParameters = {
3112 |       styleSheetId: StyleSheetId;
3113 |       range: SourceRange;
3114 |       text: string;
3115 |     }
3116 |     export type setMediaTextReturnValue = {
3117 |       /**
3118 |        * The resulting CSS media rule after modification.
3119 |        */
3120 |       media: CSSMedia;
3121 |     }
3122 |     /**
3123 |      * Modifies the expression of a container query.
3124 |      */
3125 |     export type setContainerQueryTextParameters = {
3126 |       styleSheetId: StyleSheetId;
3127 |       range: SourceRange;
3128 |       text: string;
3129 |     }
3130 |     export type setContainerQueryTextReturnValue = {
3131 |       /**
3132 |        * The resulting CSS container query rule after modification.
3133 |        */
3134 |       containerQuery: CSSContainerQuery;
3135 |     }
3136 |     /**
3137 |      * Modifies the expression of a supports at-rule.
3138 |      */
3139 |     export type setSupportsTextParameters = {
3140 |       styleSheetId: StyleSheetId;
3141 |       range: SourceRange;
3142 |       text: string;
3143 |     }
3144 |     export type setSupportsTextReturnValue = {
3145 |       /**
3146 |        * The resulting CSS Supports rule after modification.
3147 |        */
3148 |       supports: CSSSupports;
3149 |     }
3150 |     /**
3151 |      * Modifies the expression of a scope at-rule.
3152 |      */
3153 |     export type setScopeTextParameters = {
3154 |       styleSheetId: StyleSheetId;
3155 |       range: SourceRange;
3156 |       text: string;
3157 |     }
3158 |     export type setScopeTextReturnValue = {
3159 |       /**
3160 |        * The resulting CSS Scope rule after modification.
3161 |        */
3162 |       scope: CSSScope;
3163 |     }
3164 |     /**
3165 |      * Modifies the rule selector.
3166 |      */
3167 |     export type setRuleSelectorParameters = {
3168 |       styleSheetId: StyleSheetId;
3169 |       range: SourceRange;
3170 |       selector: string;
3171 |     }
3172 |     export type setRuleSelectorReturnValue = {
3173 |       /**
3174 |        * The resulting selector list after modification.
3175 |        */
3176 |       selectorList: SelectorList;
3177 |     }
3178 |     /**
3179 |      * Sets the new stylesheet text.
3180 |      */
3181 |     export type setStyleSheetTextParameters = {
3182 |       styleSheetId: StyleSheetId;
3183 |       text: string;
3184 |     }
3185 |     export type setStyleSheetTextReturnValue = {
3186 |       /**
3187 |        * URL of source map associated with script (if any).
3188 |        */
3189 |       sourceMapURL?: string;
3190 |     }
3191 |     /**
3192 |      * Applies specified style edits one after another in the given order.
3193 |      */
3194 |     export type setStyleTextsParameters = {
3195 |       edits: StyleDeclarationEdit[];
3196 |       /**
3197 |        * NodeId for the DOM node in whose context custom property declarations for registered properties should be
3198 | validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
3199 | incorrect results if the declaration contains a var() for example.
3200 |        */
3201 |       nodeForPropertySyntaxValidation?: DOM.NodeId;
3202 |     }
3203 |     export type setStyleTextsReturnValue = {
3204 |       /**
3205 |        * The resulting styles after modification.
3206 |        */
3207 |       styles: CSSStyle[];
3208 |     }
3209 |     /**
3210 |      * Enables the selector recording.
3211 |      */
3212 |     export type startRuleUsageTrackingParameters = {
3213 |     }
3214 |     export type startRuleUsageTrackingReturnValue = {
3215 |     }
3216 |     /**
3217 |      * Stop tracking rule usage and return the list of rules that were used since last call to
3218 | `takeCoverageDelta` (or since start of coverage instrumentation).
3219 |      */
3220 |     export type stopRuleUsageTrackingParameters = {
3221 |     }
3222 |     export type stopRuleUsageTrackingReturnValue = {
3223 |       ruleUsage: RuleUsage[];
3224 |     }
3225 |     /**
3226 |      * Obtain list of rules that became used since last call to this method (or since start of coverage
3227 | instrumentation).
3228 |      */
3229 |     export type takeCoverageDeltaParameters = {
3230 |     }
3231 |     export type takeCoverageDeltaReturnValue = {
3232 |       coverage: RuleUsage[];
3233 |       /**
3234 |        * Monotonically increasing time, in seconds.
3235 |        */
3236 |       timestamp: number;
3237 |     }
3238 |     /**
3239 |      * Enables/disables rendering of local CSS fonts (enabled by default).
3240 |      */
3241 |     export type setLocalFontsEnabledParameters = {
3242 |       /**
3243 |        * Whether rendering of local fonts is enabled.
3244 |        */
3245 |       enabled: boolean;
3246 |     }
3247 |     export type setLocalFontsEnabledReturnValue = {
3248 |     }
3249 |   }
3250 | 
3251 |   export module CacheStorage {
3252 |     /**
3253 |      * Unique identifier of the Cache object.
3254 |      */
3255 |     export type CacheId = string;
3256 |     /**
3257 |      * type of HTTP response cached
3258 |      */
3259 |     export type CachedResponseType = "basic"|"cors"|"default"|"error"|"opaqueResponse"|"opaqueRedirect";
3260 |     /**
3261 |      * Data entry.
3262 |      */
3263 |     export interface DataEntry {
3264 |       /**
3265 |        * Request URL.
3266 |        */
3267 |       requestURL: string;
3268 |       /**
3269 |        * Request method.
3270 |        */
3271 |       requestMethod: string;
3272 |       /**
3273 |        * Request headers
3274 |        */
3275 |       requestHeaders: Header[];
3276 |       /**
3277 |        * Number of seconds since epoch.
3278 |        */
3279 |       responseTime: number;
3280 |       /**
3281 |        * HTTP response status code.
3282 |        */
3283 |       responseStatus: number;
3284 |       /**
3285 |        * HTTP response status text.
3286 |        */
3287 |       responseStatusText: string;
3288 |       /**
3289 |        * HTTP response type
3290 |        */
3291 |       responseType: CachedResponseType;
3292 |       /**
3293 |        * Response headers
3294 |        */
3295 |       responseHeaders: Header[];
3296 |     }
3297 |     /**
3298 |      * Cache identifier.
3299 |      */
3300 |     export interface Cache {
3301 |       /**
3302 |        * An opaque unique id of the cache.
3303 |        */
3304 |       cacheId: CacheId;
3305 |       /**
3306 |        * Security origin of the cache.
3307 |        */
3308 |       securityOrigin: string;
3309 |       /**
3310 |        * Storage key of the cache.
3311 |        */
3312 |       storageKey: string;
3313 |       /**
3314 |        * Storage bucket of the cache.
3315 |        */
3316 |       storageBucket?: Storage.StorageBucket;
3317 |       /**
3318 |        * The name of the cache.
3319 |        */
3320 |       cacheName: string;
3321 |     }
3322 |     export interface Header {
3323 |       name: string;
3324 |       value: string;
3325 |     }
3326 |     /**
3327 |      * Cached response
3328 |      */
3329 |     export interface CachedResponse {
3330 |       /**
3331 |        * Entry content, base64-encoded.
3332 |        */
3333 |       body: binary;
3334 |     }
3335 | 
3336 | 
3337 |     /**
3338 |      * Deletes a cache.
3339 |      */
3340 |     export type deleteCacheParameters = {
3341 |       /**
3342 |        * Id of cache for deletion.
3343 |        */
3344 |       cacheId: CacheId;
3345 |     }
3346 |     export type deleteCacheReturnValue = {
3347 |     }
3348 |     /**
3349 |      * Deletes a cache entry.
3350 |      */
3351 |     export type deleteEntryParameters = {
3352 |       /**
3353 |        * Id of cache where the entry will be deleted.
3354 |        */
3355 |       cacheId: CacheId;
3356 |       /**
3357 |        * URL spec of the request.
3358 |        */
3359 |       request: string;
3360 |     }
3361 |     export type deleteEntryReturnValue = {
3362 |     }
3363 |     /**
3364 |      * Requests cache names.
3365 |      */
3366 |     export type requestCacheNamesParameters = {
3367 |       /**
3368 |        * At least and at most one of securityOrigin, storageKey, storageBucket must be specified.
3369 | Security origin.
3370 |        */
3371 |       securityOrigin?: string;
3372 |       /**
3373 |        * Storage key.
3374 |        */
3375 |       storageKey?: string;
3376 |       /**
3377 |        * Storage bucket. If not specified, it uses the default bucket.
3378 |        */
3379 |       storageBucket?: Storage.StorageBucket;
3380 |     }
3381 |     export type requestCacheNamesReturnValue = {
3382 |       /**
3383 |        * Caches for the security origin.
3384 |        */
3385 |       caches: Cache[];
3386 |     }
3387 |     /**
3388 |      * Fetches cache entry.
3389 |      */
3390 |     export type requestCachedResponseParameters = {
3391 |       /**
3392 |        * Id of cache that contains the entry.
3393 |        */
3394 |       cacheId: CacheId;
3395 |       /**
3396 |        * URL spec of the request.
3397 |        */
3398 |       requestURL: string;
3399 |       /**
3400 |        * headers of the request.
3401 |        */
3402 |       requestHeaders: Header[];
3403 |     }
3404 |     export type requestCachedResponseReturnValue = {
3405 |       /**
3406 |        * Response read from the cache.
3407 |        */
3408 |       response: CachedResponse;
3409 |     }
3410 |     /**
3411 |      * Requests data from cache.
3412 |      */
3413 |     export type requestEntriesParameters = {
3414 |       /**
3415 |        * ID of cache to get entries from.
3416 |        */
3417 |       cacheId: CacheId;
3418 |       /**
3419 |        * Number of records to skip.
3420 |        */
3421 |       skipCount?: number;
3422 |       /**
3423 |        * Number of records to fetch.
3424 |        */
3425 |       pageSize?: number;
3426 |       /**
3427 |        * If present, only return the entries containing this substring in the path
3428 |        */
3429 |       pathFilter?: string;
3430 |     }
3431 |     export type requestEntriesReturnValue = {
3432 |       /**
3433 |        * Array of object store data entries.
3434 |        */
3435 |       cacheDataEntries: DataEntry[];
3436 |       /**
3437 |        * Count of returned entries from this storage. If pathFilter is empty, it
3438 | is the count of all entries from this storage.
3439 |        */
3440 |       returnCount: number;
3441 |     }
3442 |   }
3443 | 
3444 |   /**
3445 |    * A domain for interacting with Cast, Presentation API, and Remote Playback API
3446 | functionalities.
3447 |    */
3448 |   export module Cast {
3449 |     export interface Sink {
3450 |       name: string;
3451 |       id: string;
3452 |       /**
3453 |        * Text describing the current session. Present only if there is an active
3454 | session on the sink.
3455 |        */
3456 |       session?: string;
3457 |     }
3458 | 
3459 |     /**
3460 |      * This is fired whenever the list of available sinks changes. A sink is a
3461 | device or a software surface that you can cast to.
3462 |      */
3463 |     export type sinksUpdatedPayload = {
3464 |       sinks: Sink[];
3465 |     }
3466 |     /**
3467 |      * This is fired whenever the outstanding issue/error message changes.
3468 | |issueMessage| is empty if there is no issue.
3469 |      */
3470 |     export type issueUpdatedPayload = {
3471 |       issueMessage: string;
3472 |     }
3473 | 
3474 |     /**
3475 |      * Starts observing for sinks that can be used for tab mirroring, and if set,
3476 | sinks compatible with |presentationUrl| as well. When sinks are found, a
3477 | |sinksUpdated| event is fired.
3478 | Also starts observing for issue messages. When an issue is added or removed,
3479 | an |issueUpdated| event is fired.
3480 |      */
3481 |     export type enableParameters = {
3482 |       presentationUrl?: string;
3483 |     }
3484 |     export type enableReturnValue = {
3485 |     }
3486 |     /**
3487 |      * Stops observing for sinks and issues.
3488 |      */
3489 |     export type disableParameters = {
3490 |     }
3491 |     export type disableReturnValue = {
3492 |     }
3493 |     /**
3494 |      * Sets a sink to be used when the web page requests the browser to choose a
3495 | sink via Presentation API, Remote Playback API, or Cast SDK.
3496 |      */
3497 |     export type setSinkToUseParameters = {
3498 |       sinkName: string;
3499 |     }
3500 |     export type setSinkToUseReturnValue = {
3501 |     }
3502 |     /**
3503 |      * Starts mirroring the desktop to the sink.
3504 |      */
3505 |     export type startDesktopMirroringParameters = {
3506 |       sinkName: string;
3507 |     }
3508 |     export type startDesktopMirroringReturnValue = {
3509 |     }
3510 |     /**
3511 |      * Starts mirroring the tab to the sink.
3512 |      */
3513 |     export type startTabMirroringParameters = {
3514 |       sinkName: string;
3515 |     }
3516 |     export type startTabMirroringReturnValue = {
3517 |     }
3518 |     /**
3519 |      * Stops the active Cast session on the sink.
3520 |      */
3521 |     export type stopCastingParameters = {
3522 |       sinkName: string;
3523 |     }
3524 |     export type stopCastingReturnValue = {
3525 |     }
3526 |   }
3527 | 
3528 |   /**
3529 |    * This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
3530 | that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
3531 | the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
3532 | nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
3533 | and never sends the same node twice. It is client's responsibility to collect information about
3534 | the nodes that were sent to the client. Note that `iframe` owner elements will return
3535 | corresponding document elements as their child nodes.
3536 |    */
3537 |   export module DOM {
3538 |     /**
3539 |      * Unique DOM node identifier.
3540 |      */
3541 |     export type NodeId = number;
3542 |     /**
3543 |      * Unique DOM node identifier used to reference a node that may not have been pushed to the
3544 | front-end.
3545 |      */
3546 |     export type BackendNodeId = number;
3547 |     /**
3548 |      * Backend node with a friendly name.
3549 |      */
3550 |     export interface BackendNode {
3551 |       /**
3552 |        * `Node`'s nodeType.
3553 |        */
3554 |       nodeType: number;
3555 |       /**
3556 |        * `Node`'s nodeName.
3557 |        */
3558 |       nodeName: string;
3559 |       backendNodeId: BackendNodeId;
3560 |     }
3561 |     /**
3562 |      * Pseudo element type.
3563 |      */
3564 |     export type PseudoType = "first-line"|"first-letter"|"before"|"after"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-next-button"|"scroll-prev-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"select-fallback-button"|"select-fallback-button-text"|"picker";
3565 |     /**
3566 |      * Shadow root type.
3567 |      */
3568 |     export type ShadowRootType = "user-agent"|"open"|"closed";
3569 |     /**
3570 |      * Document compatibility mode.
3571 |      */
3572 |     export type CompatibilityMode = "QuirksMode"|"LimitedQuirksMode"|"NoQuirksMode";
3573 |     /**
3574 |      * ContainerSelector physical axes
3575 |      */
3576 |     export type PhysicalAxes = "Horizontal"|"Vertical"|"Both";
3577 |     /**
3578 |      * ContainerSelector logical axes
3579 |      */
3580 |     export type LogicalAxes = "Inline"|"Block"|"Both";
3581 |     /**
3582 |      * Physical scroll orientation
3583 |      */
3584 |     export type ScrollOrientation = "horizontal"|"vertical";
3585 |     /**
3586 |      * DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
3587 | DOMNode is a base node mirror type.
3588 |      */
3589 |     export interface Node {
3590 |       /**
3591 |        * Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend
3592 | will only push node with given `id` once. It is aware of all requested nodes and will only
3593 | fire DOM events for nodes known to the client.
3594 |        */
3595 |       nodeId: NodeId;
3596 |       /**
3597 |        * The id of the parent node if any.
3598 |        */
3599 |       parentId?: NodeId;
3600 |       /**
3601 |        * The BackendNodeId for this node.
3602 |        */
3603 |       backendNodeId: BackendNodeId;
3604 |       /**
3605 |        * `Node`'s nodeType.
3606 |        */
3607 |       nodeType: number;
3608 |       /**
3609 |        * `Node`'s nodeName.
3610 |        */
3611 |       nodeName: string;
3612 |       /**
3613 |        * `Node`'s localName.
3614 |        */
3615 |       localName: string;
3616 |       /**
3617 |        * `Node`'s nodeValue.
3618 |        */
3619 |       nodeValue: string;
3620 |       /**
3621 |        * Child count for `Container` nodes.
3622 |        */
3623 |       childNodeCount?: number;
3624 |       /**
3625 |        * Child nodes of this node when requested with children.
3626 |        */
3627 |       children?: Node[];
3628 |       /**
3629 |        * Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
3630 |        */
3631 |       attributes?: string[];
3632 |       /**
3633 |        * Document URL that `Document` or `FrameOwner` node points to.
3634 |        */
3635 |       documentURL?: string;
3636 |       /**
3637 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
3638 |        */
3639 |       baseURL?: string;
3640 |       /**
3641 |        * `DocumentType`'s publicId.
3642 |        */
3643 |       publicId?: string;
3644 |       /**
3645 |        * `DocumentType`'s systemId.
3646 |        */
3647 |       systemId?: string;
3648 |       /**
3649 |        * `DocumentType`'s internalSubset.
3650 |        */
3651 |       internalSubset?: string;
3652 |       /**
3653 |        * `Document`'s XML version in case of XML documents.
3654 |        */
3655 |       xmlVersion?: string;
3656 |       /**
3657 |        * `Attr`'s name.
3658 |        */
3659 |       name?: string;
3660 |       /**
3661 |        * `Attr`'s value.
3662 |        */
3663 |       value?: string;
3664 |       /**
3665 |        * Pseudo element type for this node.
3666 |        */
3667 |       pseudoType?: PseudoType;
3668 |       /**
3669 |        * Pseudo element identifier for this node. Only present if there is a
3670 | valid pseudoType.
3671 |        */
3672 |       pseudoIdentifier?: string;
3673 |       /**
3674 |        * Shadow root type.
3675 |        */
3676 |       shadowRootType?: ShadowRootType;
3677 |       /**
3678 |        * Frame ID for frame owner elements.
3679 |        */
3680 |       frameId?: Page.FrameId;
3681 |       /**
3682 |        * Content document for frame owner elements.
3683 |        */
3684 |       contentDocument?: Node;
3685 |       /**
3686 |        * Shadow root list for given element host.
3687 |        */
3688 |       shadowRoots?: Node[];
3689 |       /**
3690 |        * Content document fragment for template elements.
3691 |        */
3692 |       templateContent?: Node;
3693 |       /**
3694 |        * Pseudo elements associated with this node.
3695 |        */
3696 |       pseudoElements?: Node[];
3697 |       /**
3698 |        * Deprecated, as the HTML Imports API has been removed (crbug.com/937746).
3699 | This property used to return the imported document for the HTMLImport links.
3700 | The property is always undefined now.
3701 |        */
3702 |       importedDocument?: Node;
3703 |       /**
3704 |        * Distributed nodes for given insertion point.
3705 |        */
3706 |       distributedNodes?: BackendNode[];
3707 |       /**
3708 |        * Whether the node is SVG.
3709 |        */
3710 |       isSVG?: boolean;
3711 |       compatibilityMode?: CompatibilityMode;
3712 |       assignedSlot?: BackendNode;
3713 |       isScrollable?: boolean;
3714 |     }
3715 |     /**
3716 |      * A structure to hold the top-level node of a detached tree and an array of its retained descendants.
3717 |      */
3718 |     export interface DetachedElementInfo {
3719 |       treeNode: Node;
3720 |       retainedNodeIds: NodeId[];
3721 |     }
3722 |     /**
3723 |      * A structure holding an RGBA color.
3724 |      */
3725 |     export interface RGBA {
3726 |       /**
3727 |        * The red component, in the [0-255] range.
3728 |        */
3729 |       r: number;
3730 |       /**
3731 |        * The green component, in the [0-255] range.
3732 |        */
3733 |       g: number;
3734 |       /**
3735 |        * The blue component, in the [0-255] range.
3736 |        */
3737 |       b: number;
3738 |       /**
3739 |        * The alpha component, in the [0-1] range (default: 1).
3740 |        */
3741 |       a?: number;
3742 |     }
3743 |     /**
3744 |      * An array of quad vertices, x immediately followed by y for each point, points clock-wise.
3745 |      */
3746 |     export type Quad = number[];
3747 |     /**
3748 |      * Box model.
3749 |      */
3750 |     export interface BoxModel {
3751 |       /**
3752 |        * Content box
3753 |        */
3754 |       content: Quad;
3755 |       /**
3756 |        * Padding box
3757 |        */
3758 |       padding: Quad;
3759 |       /**
3760 |        * Border box
3761 |        */
3762 |       border: Quad;
3763 |       /**
3764 |        * Margin box
3765 |        */
3766 |       margin: Quad;
3767 |       /**
3768 |        * Node width
3769 |        */
3770 |       width: number;
3771 |       /**
3772 |        * Node height
3773 |        */
3774 |       height: number;
3775 |       /**
3776 |        * Shape outside coordinates
3777 |        */
3778 |       shapeOutside?: ShapeOutsideInfo;
3779 |     }
3780 |     /**
3781 |      * CSS Shape Outside details.
3782 |      */
3783 |     export interface ShapeOutsideInfo {
3784 |       /**
3785 |        * Shape bounds
3786 |        */
3787 |       bounds: Quad;
3788 |       /**
3789 |        * Shape coordinate details
3790 |        */
3791 |       shape: any[];
3792 |       /**
3793 |        * Margin shape bounds
3794 |        */
3795 |       marginShape: any[];
3796 |     }
3797 |     /**
3798 |      * Rectangle.
3799 |      */
3800 |     export interface Rect {
3801 |       /**
3802 |        * X coordinate
3803 |        */
3804 |       x: number;
3805 |       /**
3806 |        * Y coordinate
3807 |        */
3808 |       y: number;
3809 |       /**
3810 |        * Rectangle width
3811 |        */
3812 |       width: number;
3813 |       /**
3814 |        * Rectangle height
3815 |        */
3816 |       height: number;
3817 |     }
3818 |     export interface CSSComputedStyleProperty {
3819 |       /**
3820 |        * Computed style property name.
3821 |        */
3822 |       name: string;
3823 |       /**
3824 |        * Computed style property value.
3825 |        */
3826 |       value: string;
3827 |     }
3828 | 
3829 |     /**
3830 |      * Fired when `Element`'s attribute is modified.
3831 |      */
3832 |     export type attributeModifiedPayload = {
3833 |       /**
3834 |        * Id of the node that has changed.
3835 |        */
3836 |       nodeId: NodeId;
3837 |       /**
3838 |        * Attribute name.
3839 |        */
3840 |       name: string;
3841 |       /**
3842 |        * Attribute value.
3843 |        */
3844 |       value: string;
3845 |     }
3846 |     /**
3847 |      * Fired when `Element`'s attribute is removed.
3848 |      */
3849 |     export type attributeRemovedPayload = {
3850 |       /**
3851 |        * Id of the node that has changed.
3852 |        */
3853 |       nodeId: NodeId;
3854 |       /**
3855 |        * A ttribute name.
3856 |        */
3857 |       name: string;
3858 |     }
3859 |     /**
3860 |      * Mirrors `DOMCharacterDataModified` event.
3861 |      */
3862 |     export type characterDataModifiedPayload = {
3863 |       /**
3864 |        * Id of the node that has changed.
3865 |        */
3866 |       nodeId: NodeId;
3867 |       /**
3868 |        * New text value.
3869 |        */
3870 |       characterData: string;
3871 |     }
3872 |     /**
3873 |      * Fired when `Container`'s child node count has changed.
3874 |      */
3875 |     export type childNodeCountUpdatedPayload = {
3876 |       /**
3877 |        * Id of the node that has changed.
3878 |        */
3879 |       nodeId: NodeId;
3880 |       /**
3881 |        * New node count.
3882 |        */
3883 |       childNodeCount: number;
3884 |     }
3885 |     /**
3886 |      * Mirrors `DOMNodeInserted` event.
3887 |      */
3888 |     export type childNodeInsertedPayload = {
3889 |       /**
3890 |        * Id of the node that has changed.
3891 |        */
3892 |       parentNodeId: NodeId;
3893 |       /**
3894 |        * Id of the previous sibling.
3895 |        */
3896 |       previousNodeId: NodeId;
3897 |       /**
3898 |        * Inserted node data.
3899 |        */
3900 |       node: Node;
3901 |     }
3902 |     /**
3903 |      * Mirrors `DOMNodeRemoved` event.
3904 |      */
3905 |     export type childNodeRemovedPayload = {
3906 |       /**
3907 |        * Parent id.
3908 |        */
3909 |       parentNodeId: NodeId;
3910 |       /**
3911 |        * Id of the node that has been removed.
3912 |        */
3913 |       nodeId: NodeId;
3914 |     }
3915 |     /**
3916 |      * Called when distribution is changed.
3917 |      */
3918 |     export type distributedNodesUpdatedPayload = {
3919 |       /**
3920 |        * Insertion point where distributed nodes were updated.
3921 |        */
3922 |       insertionPointId: NodeId;
3923 |       /**
3924 |        * Distributed nodes for given insertion point.
3925 |        */
3926 |       distributedNodes: BackendNode[];
3927 |     }
3928 |     /**
3929 |      * Fired when `Document` has been totally updated. Node ids are no longer valid.
3930 |      */
3931 |     export type documentUpdatedPayload = void;
3932 |     /**
3933 |      * Fired when `Element`'s inline style is modified via a CSS property modification.
3934 |      */
3935 |     export type inlineStyleInvalidatedPayload = {
3936 |       /**
3937 |        * Ids of the nodes for which the inline styles have been invalidated.
3938 |        */
3939 |       nodeIds: NodeId[];
3940 |     }
3941 |     /**
3942 |      * Called when a pseudo element is added to an element.
3943 |      */
3944 |     export type pseudoElementAddedPayload = {
3945 |       /**
3946 |        * Pseudo element's parent element id.
3947 |        */
3948 |       parentId: NodeId;
3949 |       /**
3950 |        * The added pseudo element.
3951 |        */
3952 |       pseudoElement: Node;
3953 |     }
3954 |     /**
3955 |      * Called when top layer elements are changed.
3956 |      */
3957 |     export type topLayerElementsUpdatedPayload = void;
3958 |     /**
3959 |      * Fired when a node's scrollability state changes.
3960 |      */
3961 |     export type scrollableFlagUpdatedPayload = {
3962 |       /**
3963 |        * The id of the node.
3964 |        */
3965 |       nodeId: DOM.NodeId;
3966 |       /**
3967 |        * If the node is scrollable.
3968 |        */
3969 |       isScrollable: boolean;
3970 |     }
3971 |     /**
3972 |      * Called when a pseudo element is removed from an element.
3973 |      */
3974 |     export type pseudoElementRemovedPayload = {
3975 |       /**
3976 |        * Pseudo element's parent element id.
3977 |        */
3978 |       parentId: NodeId;
3979 |       /**
3980 |        * The removed pseudo element id.
3981 |        */
3982 |       pseudoElementId: NodeId;
3983 |     }
3984 |     /**
3985 |      * Fired when backend wants to provide client with the missing DOM structure. This happens upon
3986 | most of the calls requesting node ids.
3987 |      */
3988 |     export type setChildNodesPayload = {
3989 |       /**
3990 |        * Parent node id to populate with children.
3991 |        */
3992 |       parentId: NodeId;
3993 |       /**
3994 |        * Child nodes array.
3995 |        */
3996 |       nodes: Node[];
3997 |     }
3998 |     /**
3999 |      * Called when shadow root is popped from the element.
4000 |      */
4001 |     export type shadowRootPoppedPayload = {
4002 |       /**
4003 |        * Host element id.
4004 |        */
4005 |       hostId: NodeId;
4006 |       /**
4007 |        * Shadow root id.
4008 |        */
4009 |       rootId: NodeId;
4010 |     }
4011 |     /**
4012 |      * Called when shadow root is pushed into the element.
4013 |      */
4014 |     export type shadowRootPushedPayload = {
4015 |       /**
4016 |        * Host element id.
4017 |        */
4018 |       hostId: NodeId;
4019 |       /**
4020 |        * Shadow root.
4021 |        */
4022 |       root: Node;
4023 |     }
4024 | 
4025 |     /**
4026 |      * Collects class names for the node with given id and all of it's child nodes.
4027 |      */
4028 |     export type collectClassNamesFromSubtreeParameters = {
4029 |       /**
4030 |        * Id of the node to collect class names.
4031 |        */
4032 |       nodeId: NodeId;
4033 |     }
4034 |     export type collectClassNamesFromSubtreeReturnValue = {
4035 |       /**
4036 |        * Class name list.
4037 |        */
4038 |       classNames: string[];
4039 |     }
4040 |     /**
4041 |      * Creates a deep copy of the specified node and places it into the target container before the
4042 | given anchor.
4043 |      */
4044 |     export type copyToParameters = {
4045 |       /**
4046 |        * Id of the node to copy.
4047 |        */
4048 |       nodeId: NodeId;
4049 |       /**
4050 |        * Id of the element to drop the copy into.
4051 |        */
4052 |       targetNodeId: NodeId;
4053 |       /**
4054 |        * Drop the copy before this node (if absent, the copy becomes the last child of
4055 | `targetNodeId`).
4056 |        */
4057 |       insertBeforeNodeId?: NodeId;
4058 |     }
4059 |     export type copyToReturnValue = {
4060 |       /**
4061 |        * Id of the node clone.
4062 |        */
4063 |       nodeId: NodeId;
4064 |     }
4065 |     /**
4066 |      * Describes node given its id, does not require domain to be enabled. Does not start tracking any
4067 | objects, can be used for automation.
4068 |      */
4069 |     export type describeNodeParameters = {
4070 |       /**
4071 |        * Identifier of the node.
4072 |        */
4073 |       nodeId?: NodeId;
4074 |       /**
4075 |        * Identifier of the backend node.
4076 |        */
4077 |       backendNodeId?: BackendNodeId;
4078 |       /**
4079 |        * JavaScript object id of the node wrapper.
4080 |        */
4081 |       objectId?: Runtime.RemoteObjectId;
4082 |       /**
4083 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4084 | entire subtree or provide an integer larger than 0.
4085 |        */
4086 |       depth?: number;
4087 |       /**
4088 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4089 | (default is false).
4090 |        */
4091 |       pierce?: boolean;
4092 |     }
4093 |     export type describeNodeReturnValue = {
4094 |       /**
4095 |        * Node description.
4096 |        */
4097 |       node: Node;
4098 |     }
4099 |     /**
4100 |      * Scrolls the specified rect of the given node into view if not already visible.
4101 | Note: exactly one between nodeId, backendNodeId and objectId should be passed
4102 | to identify the node.
4103 |      */
4104 |     export type scrollIntoViewIfNeededParameters = {
4105 |       /**
4106 |        * Identifier of the node.
4107 |        */
4108 |       nodeId?: NodeId;
4109 |       /**
4110 |        * Identifier of the backend node.
4111 |        */
4112 |       backendNodeId?: BackendNodeId;
4113 |       /**
4114 |        * JavaScript object id of the node wrapper.
4115 |        */
4116 |       objectId?: Runtime.RemoteObjectId;
4117 |       /**
4118 |        * The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
4119 | When omitted, center of the node will be used, similar to Element.scrollIntoView.
4120 |        */
4121 |       rect?: Rect;
4122 |     }
4123 |     export type scrollIntoViewIfNeededReturnValue = {
4124 |     }
4125 |     /**
4126 |      * Disables DOM agent for the given page.
4127 |      */
4128 |     export type disableParameters = {
4129 |     }
4130 |     export type disableReturnValue = {
4131 |     }
4132 |     /**
4133 |      * Discards search results from the session with the given id. `getSearchResults` should no longer
4134 | be called for that search.
4135 |      */
4136 |     export type discardSearchResultsParameters = {
4137 |       /**
4138 |        * Unique search session identifier.
4139 |        */
4140 |       searchId: string;
4141 |     }
4142 |     export type discardSearchResultsReturnValue = {
4143 |     }
4144 |     /**
4145 |      * Enables DOM agent for the given page.
4146 |      */
4147 |     export type enableParameters = {
4148 |       /**
4149 |        * Whether to include whitespaces in the children array of returned Nodes.
4150 |        */
4151 |       includeWhitespace?: "none"|"all";
4152 |     }
4153 |     export type enableReturnValue = {
4154 |     }
4155 |     /**
4156 |      * Focuses the given element.
4157 |      */
4158 |     export type focusParameters = {
4159 |       /**
4160 |        * Identifier of the node.
4161 |        */
4162 |       nodeId?: NodeId;
4163 |       /**
4164 |        * Identifier of the backend node.
4165 |        */
4166 |       backendNodeId?: BackendNodeId;
4167 |       /**
4168 |        * JavaScript object id of the node wrapper.
4169 |        */
4170 |       objectId?: Runtime.RemoteObjectId;
4171 |     }
4172 |     export type focusReturnValue = {
4173 |     }
4174 |     /**
4175 |      * Returns attributes for the specified node.
4176 |      */
4177 |     export type getAttributesParameters = {
4178 |       /**
4179 |        * Id of the node to retrieve attributes for.
4180 |        */
4181 |       nodeId: NodeId;
4182 |     }
4183 |     export type getAttributesReturnValue = {
4184 |       /**
4185 |        * An interleaved array of node attribute names and values.
4186 |        */
4187 |       attributes: string[];
4188 |     }
4189 |     /**
4190 |      * Returns boxes for the given node.
4191 |      */
4192 |     export type getBoxModelParameters = {
4193 |       /**
4194 |        * Identifier of the node.
4195 |        */
4196 |       nodeId?: NodeId;
4197 |       /**
4198 |        * Identifier of the backend node.
4199 |        */
4200 |       backendNodeId?: BackendNodeId;
4201 |       /**
4202 |        * JavaScript object id of the node wrapper.
4203 |        */
4204 |       objectId?: Runtime.RemoteObjectId;
4205 |     }
4206 |     export type getBoxModelReturnValue = {
4207 |       /**
4208 |        * Box model for the node.
4209 |        */
4210 |       model: BoxModel;
4211 |     }
4212 |     /**
4213 |      * Returns quads that describe node position on the page. This method
4214 | might return multiple quads for inline nodes.
4215 |      */
4216 |     export type getContentQuadsParameters = {
4217 |       /**
4218 |        * Identifier of the node.
4219 |        */
4220 |       nodeId?: NodeId;
4221 |       /**
4222 |        * Identifier of the backend node.
4223 |        */
4224 |       backendNodeId?: BackendNodeId;
4225 |       /**
4226 |        * JavaScript object id of the node wrapper.
4227 |        */
4228 |       objectId?: Runtime.RemoteObjectId;
4229 |     }
4230 |     export type getContentQuadsReturnValue = {
4231 |       /**
4232 |        * Quads that describe node layout relative to viewport.
4233 |        */
4234 |       quads: Quad[];
4235 |     }
4236 |     /**
4237 |      * Returns the root DOM node (and optionally the subtree) to the caller.
4238 | Implicitly enables the DOM domain events for the current target.
4239 |      */
4240 |     export type getDocumentParameters = {
4241 |       /**
4242 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4243 | entire subtree or provide an integer larger than 0.
4244 |        */
4245 |       depth?: number;
4246 |       /**
4247 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4248 | (default is false).
4249 |        */
4250 |       pierce?: boolean;
4251 |     }
4252 |     export type getDocumentReturnValue = {
4253 |       /**
4254 |        * Resulting node.
4255 |        */
4256 |       root: Node;
4257 |     }
4258 |     /**
4259 |      * Returns the root DOM node (and optionally the subtree) to the caller.
4260 | Deprecated, as it is not designed to work well with the rest of the DOM agent.
4261 | Use DOMSnapshot.captureSnapshot instead.
4262 |      */
4263 |     export type getFlattenedDocumentParameters = {
4264 |       /**
4265 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4266 | entire subtree or provide an integer larger than 0.
4267 |        */
4268 |       depth?: number;
4269 |       /**
4270 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4271 | (default is false).
4272 |        */
4273 |       pierce?: boolean;
4274 |     }
4275 |     export type getFlattenedDocumentReturnValue = {
4276 |       /**
4277 |        * Resulting node.
4278 |        */
4279 |       nodes: Node[];
4280 |     }
4281 |     /**
4282 |      * Finds nodes with a given computed style in a subtree.
4283 |      */
4284 |     export type getNodesForSubtreeByStyleParameters = {
4285 |       /**
4286 |        * Node ID pointing to the root of a subtree.
4287 |        */
4288 |       nodeId: NodeId;
4289 |       /**
4290 |        * The style to filter nodes by (includes nodes if any of properties matches).
4291 |        */
4292 |       computedStyles: CSSComputedStyleProperty[];
4293 |       /**
4294 |        * Whether or not iframes and shadow roots in the same target should be traversed when returning the
4295 | results (default is false).
4296 |        */
4297 |       pierce?: boolean;
4298 |     }
4299 |     export type getNodesForSubtreeByStyleReturnValue = {
4300 |       /**
4301 |        * Resulting nodes.
4302 |        */
4303 |       nodeIds: NodeId[];
4304 |     }
4305 |     /**
4306 |      * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
4307 | either returned or not.
4308 |      */
4309 |     export type getNodeForLocationParameters = {
4310 |       /**
4311 |        * X coordinate.
4312 |        */
4313 |       x: number;
4314 |       /**
4315 |        * Y coordinate.
4316 |        */
4317 |       y: number;
4318 |       /**
4319 |        * False to skip to the nearest non-UA shadow root ancestor (default: false).
4320 |        */
4321 |       includeUserAgentShadowDOM?: boolean;
4322 |       /**
4323 |        * Whether to ignore pointer-events: none on elements and hit test them.
4324 |        */
4325 |       ignorePointerEventsNone?: boolean;
4326 |     }
4327 |     export type getNodeForLocationReturnValue = {
4328 |       /**
4329 |        * Resulting node.
4330 |        */
4331 |       backendNodeId: BackendNodeId;
4332 |       /**
4333 |        * Frame this node belongs to.
4334 |        */
4335 |       frameId: Page.FrameId;
4336 |       /**
4337 |        * Id of the node at given coordinates, only when enabled and requested document.
4338 |        */
4339 |       nodeId?: NodeId;
4340 |     }
4341 |     /**
4342 |      * Returns node's HTML markup.
4343 |      */
4344 |     export type getOuterHTMLParameters = {
4345 |       /**
4346 |        * Identifier of the node.
4347 |        */
4348 |       nodeId?: NodeId;
4349 |       /**
4350 |        * Identifier of the backend node.
4351 |        */
4352 |       backendNodeId?: BackendNodeId;
4353 |       /**
4354 |        * JavaScript object id of the node wrapper.
4355 |        */
4356 |       objectId?: Runtime.RemoteObjectId;
4357 |     }
4358 |     export type getOuterHTMLReturnValue = {
4359 |       /**
4360 |        * Outer HTML markup.
4361 |        */
4362 |       outerHTML: string;
4363 |     }
4364 |     /**
4365 |      * Returns the id of the nearest ancestor that is a relayout boundary.
4366 |      */
4367 |     export type getRelayoutBoundaryParameters = {
4368 |       /**
4369 |        * Id of the node.
4370 |        */
4371 |       nodeId: NodeId;
4372 |     }
4373 |     export type getRelayoutBoundaryReturnValue = {
4374 |       /**
4375 |        * Relayout boundary node id for the given node.
4376 |        */
4377 |       nodeId: NodeId;
4378 |     }
4379 |     /**
4380 |      * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
4381 | identifier.
4382 |      */
4383 |     export type getSearchResultsParameters = {
4384 |       /**
4385 |        * Unique search session identifier.
4386 |        */
4387 |       searchId: string;
4388 |       /**
4389 |        * Start index of the search result to be returned.
4390 |        */
4391 |       fromIndex: number;
4392 |       /**
4393 |        * End index of the search result to be returned.
4394 |        */
4395 |       toIndex: number;
4396 |     }
4397 |     export type getSearchResultsReturnValue = {
4398 |       /**
4399 |        * Ids of the search result nodes.
4400 |        */
4401 |       nodeIds: NodeId[];
4402 |     }
4403 |     /**
4404 |      * Hides any highlight.
4405 |      */
4406 |     export type hideHighlightParameters = {
4407 |     }
4408 |     export type hideHighlightReturnValue = {
4409 |     }
4410 |     /**
4411 |      * Highlights DOM node.
4412 |      */
4413 |     export type highlightNodeParameters = {
4414 |     }
4415 |     export type highlightNodeReturnValue = {
4416 |     }
4417 |     /**
4418 |      * Highlights given rectangle.
4419 |      */
4420 |     export type highlightRectParameters = {
4421 |     }
4422 |     export type highlightRectReturnValue = {
4423 |     }
4424 |     /**
4425 |      * Marks last undoable state.
4426 |      */
4427 |     export type markUndoableStateParameters = {
4428 |     }
4429 |     export type markUndoableStateReturnValue = {
4430 |     }
4431 |     /**
4432 |      * Moves node into the new container, places it before the given anchor.
4433 |      */
4434 |     export type moveToParameters = {
4435 |       /**
4436 |        * Id of the node to move.
4437 |        */
4438 |       nodeId: NodeId;
4439 |       /**
4440 |        * Id of the element to drop the moved node into.
4441 |        */
4442 |       targetNodeId: NodeId;
4443 |       /**
4444 |        * Drop node before this one (if absent, the moved node becomes the last child of
4445 | `targetNodeId`).
4446 |        */
4447 |       insertBeforeNodeId?: NodeId;
4448 |     }
4449 |     export type moveToReturnValue = {
4450 |       /**
4451 |        * New id of the moved node.
4452 |        */
4453 |       nodeId: NodeId;
4454 |     }
4455 |     /**
4456 |      * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
4457 | `cancelSearch` to end this search session.
4458 |      */
4459 |     export type performSearchParameters = {
4460 |       /**
4461 |        * Plain text or query selector or XPath search query.
4462 |        */
4463 |       query: string;
4464 |       /**
4465 |        * True to search in user agent shadow DOM.
4466 |        */
4467 |       includeUserAgentShadowDOM?: boolean;
4468 |     }
4469 |     export type performSearchReturnValue = {
4470 |       /**
4471 |        * Unique search session identifier.
4472 |        */
4473 |       searchId: string;
4474 |       /**
4475 |        * Number of search results.
4476 |        */
4477 |       resultCount: number;
4478 |     }
4479 |     /**
4480 |      * Requests that the node is sent to the caller given its path. // FIXME, use XPath
4481 |      */
4482 |     export type pushNodeByPathToFrontendParameters = {
4483 |       /**
4484 |        * Path to node in the proprietary format.
4485 |        */
4486 |       path: string;
4487 |     }
4488 |     export type pushNodeByPathToFrontendReturnValue = {
4489 |       /**
4490 |        * Id of the node for given path.
4491 |        */
4492 |       nodeId: NodeId;
4493 |     }
4494 |     /**
4495 |      * Requests that a batch of nodes is sent to the caller given their backend node ids.
4496 |      */
4497 |     export type pushNodesByBackendIdsToFrontendParameters = {
4498 |       /**
4499 |        * The array of backend node ids.
4500 |        */
4501 |       backendNodeIds: BackendNodeId[];
4502 |     }
4503 |     export type pushNodesByBackendIdsToFrontendReturnValue = {
4504 |       /**
4505 |        * The array of ids of pushed nodes that correspond to the backend ids specified in
4506 | backendNodeIds.
4507 |        */
4508 |       nodeIds: NodeId[];
4509 |     }
4510 |     /**
4511 |      * Executes `querySelector` on a given node.
4512 |      */
4513 |     export type querySelectorParameters = {
4514 |       /**
4515 |        * Id of the node to query upon.
4516 |        */
4517 |       nodeId: NodeId;
4518 |       /**
4519 |        * Selector string.
4520 |        */
4521 |       selector: string;
4522 |     }
4523 |     export type querySelectorReturnValue = {
4524 |       /**
4525 |        * Query selector result.
4526 |        */
4527 |       nodeId: NodeId;
4528 |     }
4529 |     /**
4530 |      * Executes `querySelectorAll` on a given node.
4531 |      */
4532 |     export type querySelectorAllParameters = {
4533 |       /**
4534 |        * Id of the node to query upon.
4535 |        */
4536 |       nodeId: NodeId;
4537 |       /**
4538 |        * Selector string.
4539 |        */
4540 |       selector: string;
4541 |     }
4542 |     export type querySelectorAllReturnValue = {
4543 |       /**
4544 |        * Query selector result.
4545 |        */
4546 |       nodeIds: NodeId[];
4547 |     }
4548 |     /**
4549 |      * Returns NodeIds of current top layer elements.
4550 | Top layer is rendered closest to the user within a viewport, therefore its elements always
4551 | appear on top of all other content.
4552 |      */
4553 |     export type getTopLayerElementsParameters = {
4554 |     }
4555 |     export type getTopLayerElementsReturnValue = {
4556 |       /**
4557 |        * NodeIds of top layer elements
4558 |        */
4559 |       nodeIds: NodeId[];
4560 |     }
4561 |     /**
4562 |      * Returns the NodeId of the matched element according to certain relations.
4563 |      */
4564 |     export type getElementByRelationParameters = {
4565 |       /**
4566 |        * Id of the node from which to query the relation.
4567 |        */
4568 |       nodeId: NodeId;
4569 |       /**
4570 |        * Type of relation to get.
4571 |        */
4572 |       relation: "PopoverTarget";
4573 |     }
4574 |     export type getElementByRelationReturnValue = {
4575 |       /**
4576 |        * NodeId of the element matching the queried relation.
4577 |        */
4578 |       nodeId: NodeId;
4579 |     }
4580 |     /**
4581 |      * Re-does the last undone action.
4582 |      */
4583 |     export type redoParameters = {
4584 |     }
4585 |     export type redoReturnValue = {
4586 |     }
4587 |     /**
4588 |      * Removes attribute with given name from an element with given id.
4589 |      */
4590 |     export type removeAttributeParameters = {
4591 |       /**
4592 |        * Id of the element to remove attribute from.
4593 |        */
4594 |       nodeId: NodeId;
4595 |       /**
4596 |        * Name of the attribute to remove.
4597 |        */
4598 |       name: string;
4599 |     }
4600 |     export type removeAttributeReturnValue = {
4601 |     }
4602 |     /**
4603 |      * Removes node with given id.
4604 |      */
4605 |     export type removeNodeParameters = {
4606 |       /**
4607 |        * Id of the node to remove.
4608 |        */
4609 |       nodeId: NodeId;
4610 |     }
4611 |     export type removeNodeReturnValue = {
4612 |     }
4613 |     /**
4614 |      * Requests that children of the node with given id are returned to the caller in form of
4615 | `setChildNodes` events where not only immediate children are retrieved, but all children down to
4616 | the specified depth.
4617 |      */
4618 |     export type requestChildNodesParameters = {
4619 |       /**
4620 |        * Id of the node to get children for.
4621 |        */
4622 |       nodeId: NodeId;
4623 |       /**
4624 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4625 | entire subtree or provide an integer larger than 0.
4626 |        */
4627 |       depth?: number;
4628 |       /**
4629 |        * Whether or not iframes and shadow roots should be traversed when returning the sub-tree
4630 | (default is false).
4631 |        */
4632 |       pierce?: boolean;
4633 |     }
4634 |     export type requestChildNodesReturnValue = {
4635 |     }
4636 |     /**
4637 |      * Requests that the node is sent to the caller given the JavaScript node object reference. All
4638 | nodes that form the path from the node to the root are also sent to the client as a series of
4639 | `setChildNodes` notifications.
4640 |      */
4641 |     export type requestNodeParameters = {
4642 |       /**
4643 |        * JavaScript object id to convert into node.
4644 |        */
4645 |       objectId: Runtime.RemoteObjectId;
4646 |     }
4647 |     export type requestNodeReturnValue = {
4648 |       /**
4649 |        * Node id for given object.
4650 |        */
4651 |       nodeId: NodeId;
4652 |     }
4653 |     /**
4654 |      * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
4655 |      */
4656 |     export type resolveNodeParameters = {
4657 |       /**
4658 |        * Id of the node to resolve.
4659 |        */
4660 |       nodeId?: NodeId;
4661 |       /**
4662 |        * Backend identifier of the node to resolve.
4663 |        */
4664 |       backendNodeId?: DOM.BackendNodeId;
4665 |       /**
4666 |        * Symbolic group name that can be used to release multiple objects.
4667 |        */
4668 |       objectGroup?: string;
4669 |       /**
4670 |        * Execution context in which to resolve the node.
4671 |        */
4672 |       executionContextId?: Runtime.ExecutionContextId;
4673 |     }
4674 |     export type resolveNodeReturnValue = {
4675 |       /**
4676 |        * JavaScript object wrapper for given node.
4677 |        */
4678 |       object: Runtime.RemoteObject;
4679 |     }
4680 |     /**
4681 |      * Sets attribute for an element with given id.
4682 |      */
4683 |     export type setAttributeValueParameters = {
4684 |       /**
4685 |        * Id of the element to set attribute for.
4686 |        */
4687 |       nodeId: NodeId;
4688 |       /**
4689 |        * Attribute name.
4690 |        */
4691 |       name: string;
4692 |       /**
4693 |        * Attribute value.
4694 |        */
4695 |       value: string;
4696 |     }
4697 |     export type setAttributeValueReturnValue = {
4698 |     }
4699 |     /**
4700 |      * Sets attributes on element with given id. This method is useful when user edits some existing
4701 | attribute value and types in several attribute name/value pairs.
4702 |      */
4703 |     export type setAttributesAsTextParameters = {
4704 |       /**
4705 |        * Id of the element to set attributes for.
4706 |        */
4707 |       nodeId: NodeId;
4708 |       /**
4709 |        * Text with a number of attributes. Will parse this text using HTML parser.
4710 |        */
4711 |       text: string;
4712 |       /**
4713 |        * Attribute name to replace with new attributes derived from text in case text parsed
4714 | successfully.
4715 |        */
4716 |       name?: string;
4717 |     }
4718 |     export type setAttributesAsTextReturnValue = {
4719 |     }
4720 |     /**
4721 |      * Sets files for the given file input element.
4722 |      */
4723 |     export type setFileInputFilesParameters = {
4724 |       /**
4725 |        * Array of file paths to set.
4726 |        */
4727 |       files: string[];
4728 |       /**
4729 |        * Identifier of the node.
4730 |        */
4731 |       nodeId?: NodeId;
4732 |       /**
4733 |        * Identifier of the backend node.
4734 |        */
4735 |       backendNodeId?: BackendNodeId;
4736 |       /**
4737 |        * JavaScript object id of the node wrapper.
4738 |        */
4739 |       objectId?: Runtime.RemoteObjectId;
4740 |     }
4741 |     export type setFileInputFilesReturnValue = {
4742 |     }
4743 |     /**
4744 |      * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
4745 |      */
4746 |     export type setNodeStackTracesEnabledParameters = {
4747 |       /**
4748 |        * Enable or disable.
4749 |        */
4750 |       enable: boolean;
4751 |     }
4752 |     export type setNodeStackTracesEnabledReturnValue = {
4753 |     }
4754 |     /**
4755 |      * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
4756 |      */
4757 |     export type getNodeStackTracesParameters = {
4758 |       /**
4759 |        * Id of the node to get stack traces for.
4760 |        */
4761 |       nodeId: NodeId;
4762 |     }
4763 |     export type getNodeStackTracesReturnValue = {
4764 |       /**
4765 |        * Creation stack trace, if available.
4766 |        */
4767 |       creation?: Runtime.StackTrace;
4768 |     }
4769 |     /**
4770 |      * Returns file information for the given
4771 | File wrapper.
4772 |      */
4773 |     export type getFileInfoParameters = {
4774 |       /**
4775 |        * JavaScript object id of the node wrapper.
4776 |        */
4777 |       objectId: Runtime.RemoteObjectId;
4778 |     }
4779 |     export type getFileInfoReturnValue = {
4780 |       path: string;
4781 |     }
4782 |     /**
4783 |      * Returns list of detached nodes
4784 |      */
4785 |     export type getDetachedDomNodesParameters = {
4786 |     }
4787 |     export type getDetachedDomNodesReturnValue = {
4788 |       /**
4789 |        * The list of detached nodes
4790 |        */
4791 |       detachedNodes: DetachedElementInfo[];
4792 |     }
4793 |     /**
4794 |      * Enables console to refer to the node with given id via $x (see Command Line API for more details
4795 | $x functions).
4796 |      */
4797 |     export type setInspectedNodeParameters = {
4798 |       /**
4799 |        * DOM node id to be accessible by means of $x command line API.
4800 |        */
4801 |       nodeId: NodeId;
4802 |     }
4803 |     export type setInspectedNodeReturnValue = {
4804 |     }
4805 |     /**
4806 |      * Sets node name for a node with given id.
4807 |      */
4808 |     export type setNodeNameParameters = {
4809 |       /**
4810 |        * Id of the node to set name for.
4811 |        */
4812 |       nodeId: NodeId;
4813 |       /**
4814 |        * New node's name.
4815 |        */
4816 |       name: string;
4817 |     }
4818 |     export type setNodeNameReturnValue = {
4819 |       /**
4820 |        * New node's id.
4821 |        */
4822 |       nodeId: NodeId;
4823 |     }
4824 |     /**
4825 |      * Sets node value for a node with given id.
4826 |      */
4827 |     export type setNodeValueParameters = {
4828 |       /**
4829 |        * Id of the node to set value for.
4830 |        */
4831 |       nodeId: NodeId;
4832 |       /**
4833 |        * New node's value.
4834 |        */
4835 |       value: string;
4836 |     }
4837 |     export type setNodeValueReturnValue = {
4838 |     }
4839 |     /**
4840 |      * Sets node HTML markup, returns new node id.
4841 |      */
4842 |     export type setOuterHTMLParameters = {
4843 |       /**
4844 |        * Id of the node to set markup for.
4845 |        */
4846 |       nodeId: NodeId;
4847 |       /**
4848 |        * Outer HTML markup to set.
4849 |        */
4850 |       outerHTML: string;
4851 |     }
4852 |     export type setOuterHTMLReturnValue = {
4853 |     }
4854 |     /**
4855 |      * Undoes the last performed action.
4856 |      */
4857 |     export type undoParameters = {
4858 |     }
4859 |     export type undoReturnValue = {
4860 |     }
4861 |     /**
4862 |      * Returns iframe node that owns iframe with the given domain.
4863 |      */
4864 |     export type getFrameOwnerParameters = {
4865 |       frameId: Page.FrameId;
4866 |     }
4867 |     export type getFrameOwnerReturnValue = {
4868 |       /**
4869 |        * Resulting node.
4870 |        */
4871 |       backendNodeId: BackendNodeId;
4872 |       /**
4873 |        * Id of the node at given coordinates, only when enabled and requested document.
4874 |        */
4875 |       nodeId?: NodeId;
4876 |     }
4877 |     /**
4878 |      * Returns the query container of the given node based on container query
4879 | conditions: containerName, physical, and logical axes. If no axes are
4880 | provided, the style container is returned, which is the direct parent or the
4881 | closest element with a matching container-name.
4882 |      */
4883 |     export type getContainerForNodeParameters = {
4884 |       nodeId: NodeId;
4885 |       containerName?: string;
4886 |       physicalAxes?: PhysicalAxes;
4887 |       logicalAxes?: LogicalAxes;
4888 |     }
4889 |     export type getContainerForNodeReturnValue = {
4890 |       /**
4891 |        * The container node for the given node, or null if not found.
4892 |        */
4893 |       nodeId?: NodeId;
4894 |     }
4895 |     /**
4896 |      * Returns the descendants of a container query container that have
4897 | container queries against this container.
4898 |      */
4899 |     export type getQueryingDescendantsForContainerParameters = {
4900 |       /**
4901 |        * Id of the container node to find querying descendants from.
4902 |        */
4903 |       nodeId: NodeId;
4904 |     }
4905 |     export type getQueryingDescendantsForContainerReturnValue = {
4906 |       /**
4907 |        * Descendant nodes with container queries against the given container.
4908 |        */
4909 |       nodeIds: NodeId[];
4910 |     }
4911 |     /**
4912 |      * Returns the target anchor element of the given anchor query according to
4913 | https://www.w3.org/TR/css-anchor-position-1/#target.
4914 |      */
4915 |     export type getAnchorElementParameters = {
4916 |       /**
4917 |        * Id of the positioned element from which to find the anchor.
4918 |        */
4919 |       nodeId: NodeId;
4920 |       /**
4921 |        * An optional anchor specifier, as defined in
4922 | https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
4923 | If not provided, it will return the implicit anchor element for
4924 | the given positioned element.
4925 |        */
4926 |       anchorSpecifier?: string;
4927 |     }
4928 |     export type getAnchorElementReturnValue = {
4929 |       /**
4930 |        * The anchor element of the given anchor query.
4931 |        */
4932 |       nodeId: NodeId;
4933 |     }
4934 |   }
4935 | 
4936 |   /**
4937 |    * DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript
4938 | execution will stop on these operations as if there was a regular breakpoint set.
4939 |    */
4940 |   export module DOMDebugger {
4941 |     /**
4942 |      * DOM breakpoint type.
4943 |      */
4944 |     export type DOMBreakpointType = "subtree-modified"|"attribute-modified"|"node-removed";
4945 |     /**
4946 |      * CSP Violation type.
4947 |      */
4948 |     export type CSPViolationType = "trustedtype-sink-violation"|"trustedtype-policy-violation";
4949 |     /**
4950 |      * Object event listener.
4951 |      */
4952 |     export interface EventListener {
4953 |       /**
4954 |        * `EventListener`'s type.
4955 |        */
4956 |       type: string;
4957 |       /**
4958 |        * `EventListener`'s useCapture.
4959 |        */
4960 |       useCapture: boolean;
4961 |       /**
4962 |        * `EventListener`'s passive flag.
4963 |        */
4964 |       passive: boolean;
4965 |       /**
4966 |        * `EventListener`'s once flag.
4967 |        */
4968 |       once: boolean;
4969 |       /**
4970 |        * Script id of the handler code.
4971 |        */
4972 |       scriptId: Runtime.ScriptId;
4973 |       /**
4974 |        * Line number in the script (0-based).
4975 |        */
4976 |       lineNumber: number;
4977 |       /**
4978 |        * Column number in the script (0-based).
4979 |        */
4980 |       columnNumber: number;
4981 |       /**
4982 |        * Event handler function value.
4983 |        */
4984 |       handler?: Runtime.RemoteObject;
4985 |       /**
4986 |        * Event original handler function value.
4987 |        */
4988 |       originalHandler?: Runtime.RemoteObject;
4989 |       /**
4990 |        * Node the listener is added to (if any).
4991 |        */
4992 |       backendNodeId?: DOM.BackendNodeId;
4993 |     }
4994 | 
4995 | 
4996 |     /**
4997 |      * Returns event listeners of the given object.
4998 |      */
4999 |     export type getEventListenersParameters = {
5000 |       /**
5001 |        * Identifier of the object to return listeners for.
5002 |        */
5003 |       objectId: Runtime.RemoteObjectId;
5004 |       /**
5005 |        * The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
5006 | entire subtree or provide an integer larger than 0.
5007 |        */
5008 |       depth?: number;
5009 |       /**
5010 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
5011 | (default is false). Reports listeners for all contexts if pierce is enabled.
5012 |        */
5013 |       pierce?: boolean;
5014 |     }
5015 |     export type getEventListenersReturnValue = {
5016 |       /**
5017 |        * Array of relevant listeners.
5018 |        */
5019 |       listeners: EventListener[];
5020 |     }
5021 |     /**
5022 |      * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
5023 |      */
5024 |     export type removeDOMBreakpointParameters = {
5025 |       /**
5026 |        * Identifier of the node to remove breakpoint from.
5027 |        */
5028 |       nodeId: DOM.NodeId;
5029 |       /**
5030 |        * Type of the breakpoint to remove.
5031 |        */
5032 |       type: DOMBreakpointType;
5033 |     }
5034 |     export type removeDOMBreakpointReturnValue = {
5035 |     }
5036 |     /**
5037 |      * Removes breakpoint on particular DOM event.
5038 |      */
5039 |     export type removeEventListenerBreakpointParameters = {
5040 |       /**
5041 |        * Event name.
5042 |        */
5043 |       eventName: string;
5044 |       /**
5045 |        * EventTarget interface name.
5046 |        */
5047 |       targetName?: string;
5048 |     }
5049 |     export type removeEventListenerBreakpointReturnValue = {
5050 |     }
5051 |     /**
5052 |      * Removes breakpoint on particular native event.
5053 |      */
5054 |     export type removeInstrumentationBreakpointParameters = {
5055 |       /**
5056 |        * Instrumentation name to stop on.
5057 |        */
5058 |       eventName: string;
5059 |     }
5060 |     export type removeInstrumentationBreakpointReturnValue = {
5061 |     }
5062 |     /**
5063 |      * Removes breakpoint from XMLHttpRequest.
5064 |      */
5065 |     export type removeXHRBreakpointParameters = {
5066 |       /**
5067 |        * Resource URL substring.
5068 |        */
5069 |       url: string;
5070 |     }
5071 |     export type removeXHRBreakpointReturnValue = {
5072 |     }
5073 |     /**
5074 |      * Sets breakpoint on particular CSP violations.
5075 |      */
5076 |     export type setBreakOnCSPViolationParameters = {
5077 |       /**
5078 |        * CSP Violations to stop upon.
5079 |        */
5080 |       violationTypes: CSPViolationType[];
5081 |     }
5082 |     export type setBreakOnCSPViolationReturnValue = {
5083 |     }
5084 |     /**
5085 |      * Sets breakpoint on particular operation with DOM.
5086 |      */
5087 |     export type setDOMBreakpointParameters = {
5088 |       /**
5089 |        * Identifier of the node to set breakpoint on.
5090 |        */
5091 |       nodeId: DOM.NodeId;
5092 |       /**
5093 |        * Type of the operation to stop upon.
5094 |        */
5095 |       type: DOMBreakpointType;
5096 |     }
5097 |     export type setDOMBreakpointReturnValue = {
5098 |     }
5099 |     /**
5100 |      * Sets breakpoint on particular DOM event.
5101 |      */
5102 |     export type setEventListenerBreakpointParameters = {
5103 |       /**
5104 |        * DOM Event name to stop on (any DOM event will do).
5105 |        */
5106 |       eventName: string;
5107 |       /**
5108 |        * EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any
5109 | EventTarget.
5110 |        */
5111 |       targetName?: string;
5112 |     }
5113 |     export type setEventListenerBreakpointReturnValue = {
5114 |     }
5115 |     /**
5116 |      * Sets breakpoint on particular native event.
5117 |      */
5118 |     export type setInstrumentationBreakpointParameters = {
5119 |       /**
5120 |        * Instrumentation name to stop on.
5121 |        */
5122 |       eventName: string;
5123 |     }
5124 |     export type setInstrumentationBreakpointReturnValue = {
5125 |     }
5126 |     /**
5127 |      * Sets breakpoint on XMLHttpRequest.
5128 |      */
5129 |     export type setXHRBreakpointParameters = {
5130 |       /**
5131 |        * Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
5132 |        */
5133 |       url: string;
5134 |     }
5135 |     export type setXHRBreakpointReturnValue = {
5136 |     }
5137 |   }
5138 | 
5139 |   /**
5140 |    * EventBreakpoints permits setting JavaScript breakpoints on operations and events
5141 | occurring in native code invoked from JavaScript. Once breakpoint is hit, it is
5142 | reported through Debugger domain, similarly to regular breakpoints being hit.
5143 |    */
5144 |   export module EventBreakpoints {
5145 | 
5146 | 
5147 |     /**
5148 |      * Sets breakpoint on particular native event.
5149 |      */
5150 |     export type setInstrumentationBreakpointParameters = {
5151 |       /**
5152 |        * Instrumentation name to stop on.
5153 |        */
5154 |       eventName: string;
5155 |     }
5156 |     export type setInstrumentationBreakpointReturnValue = {
5157 |     }
5158 |     /**
5159 |      * Removes breakpoint on particular native event.
5160 |      */
5161 |     export type removeInstrumentationBreakpointParameters = {
5162 |       /**
5163 |        * Instrumentation name to stop on.
5164 |        */
5165 |       eventName: string;
5166 |     }
5167 |     export type removeInstrumentationBreakpointReturnValue = {
5168 |     }
5169 |     /**
5170 |      * Removes all breakpoints
5171 |      */
5172 |     export type disableParameters = {
5173 |     }
5174 |     export type disableReturnValue = {
5175 |     }
5176 |   }
5177 | 
5178 |   /**
5179 |    * This domain facilitates obtaining document snapshots with DOM, layout, and style information.
5180 |    */
5181 |   export module DOMSnapshot {
5182 |     /**
5183 |      * A Node in the DOM tree.
5184 |      */
5185 |     export interface DOMNode {
5186 |       /**
5187 |        * `Node`'s nodeType.
5188 |        */
5189 |       nodeType: number;
5190 |       /**
5191 |        * `Node`'s nodeName.
5192 |        */
5193 |       nodeName: string;
5194 |       /**
5195 |        * `Node`'s nodeValue.
5196 |        */
5197 |       nodeValue: string;
5198 |       /**
5199 |        * Only set for textarea elements, contains the text value.
5200 |        */
5201 |       textValue?: string;
5202 |       /**
5203 |        * Only set for input elements, contains the input's associated text value.
5204 |        */
5205 |       inputValue?: string;
5206 |       /**
5207 |        * Only set for radio and checkbox input elements, indicates if the element has been checked
5208 |        */
5209 |       inputChecked?: boolean;
5210 |       /**
5211 |        * Only set for option elements, indicates if the element has been selected
5212 |        */
5213 |       optionSelected?: boolean;
5214 |       /**
5215 |        * `Node`'s id, corresponds to DOM.Node.backendNodeId.
5216 |        */
5217 |       backendNodeId: DOM.BackendNodeId;
5218 |       /**
5219 |        * The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if
5220 | any.
5221 |        */
5222 |       childNodeIndexes?: number[];
5223 |       /**
5224 |        * Attributes of an `Element` node.
5225 |        */
5226 |       attributes?: NameValue[];
5227 |       /**
5228 |        * Indexes of pseudo elements associated with this node in the `domNodes` array returned by
5229 | `getSnapshot`, if any.
5230 |        */
5231 |       pseudoElementIndexes?: number[];
5232 |       /**
5233 |        * The index of the node's related layout tree node in the `layoutTreeNodes` array returned by
5234 | `getSnapshot`, if any.
5235 |        */
5236 |       layoutNodeIndex?: number;
5237 |       /**
5238 |        * Document URL that `Document` or `FrameOwner` node points to.
5239 |        */
5240 |       documentURL?: string;
5241 |       /**
5242 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
5243 |        */
5244 |       baseURL?: string;
5245 |       /**
5246 |        * Only set for documents, contains the document's content language.
5247 |        */
5248 |       contentLanguage?: string;
5249 |       /**
5250 |        * Only set for documents, contains the document's character set encoding.
5251 |        */
5252 |       documentEncoding?: string;
5253 |       /**
5254 |        * `DocumentType` node's publicId.
5255 |        */
5256 |       publicId?: string;
5257 |       /**
5258 |        * `DocumentType` node's systemId.
5259 |        */
5260 |       systemId?: string;
5261 |       /**
5262 |        * Frame ID for frame owner elements and also for the document node.
5263 |        */
5264 |       frameId?: Page.FrameId;
5265 |       /**
5266 |        * The index of a frame owner element's content document in the `domNodes` array returned by
5267 | `getSnapshot`, if any.
5268 |        */
5269 |       contentDocumentIndex?: number;
5270 |       /**
5271 |        * Type of a pseudo element node.
5272 |        */
5273 |       pseudoType?: DOM.PseudoType;
5274 |       /**
5275 |        * Shadow root type.
5276 |        */
5277 |       shadowRootType?: DOM.ShadowRootType;
5278 |       /**
5279 |        * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
5280 | event listeners attached via JavaScript as well as anchor tags that naturally navigate when
5281 | clicked.
5282 |        */
5283 |       isClickable?: boolean;
5284 |       /**
5285 |        * Details of the node's event listeners, if any.
5286 |        */
5287 |       eventListeners?: DOMDebugger.EventListener[];
5288 |       /**
5289 |        * The selected url for nodes with a srcset attribute.
5290 |        */
5291 |       currentSourceURL?: string;
5292 |       /**
5293 |        * The url of the script (if any) that generates this node.
5294 |        */
5295 |       originURL?: string;
5296 |       /**
5297 |        * Scroll offsets, set when this node is a Document.
5298 |        */
5299 |       scrollOffsetX?: number;
5300 |       scrollOffsetY?: number;
5301 |     }
5302 |     /**
5303 |      * Details of post layout rendered text positions. The exact layout should not be regarded as
5304 | stable and may change between versions.
5305 |      */
5306 |     export interface InlineTextBox {
5307 |       /**
5308 |        * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
5309 |        */
5310 |       boundingBox: DOM.Rect;
5311 |       /**
5312 |        * The starting index in characters, for this post layout textbox substring. Characters that
5313 | would be represented as a surrogate pair in UTF-16 have length 2.
5314 |        */
5315 |       startCharacterIndex: number;
5316 |       /**
5317 |        * The number of characters in this post layout textbox substring. Characters that would be
5318 | represented as a surrogate pair in UTF-16 have length 2.
5319 |        */
5320 |       numCharacters: number;
5321 |     }
5322 |     /**
5323 |      * Details of an element in the DOM tree with a LayoutObject.
5324 |      */
5325 |     export interface LayoutTreeNode {
5326 |       /**
5327 |        * The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
5328 |        */
5329 |       domNodeIndex: number;
5330 |       /**
5331 |        * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
5332 |        */
5333 |       boundingBox: DOM.Rect;
5334 |       /**
5335 |        * Contents of the LayoutText, if any.
5336 |        */
5337 |       layoutText?: string;
5338 |       /**
5339 |        * The post-layout inline text nodes, if any.
5340 |        */
5341 |       inlineTextNodes?: InlineTextBox[];
5342 |       /**
5343 |        * Index into the `computedStyles` array returned by `getSnapshot`.
5344 |        */
5345 |       styleIndex?: number;
5346 |       /**
5347 |        * Global paint order index, which is determined by the stacking order of the nodes. Nodes
5348 | that are painted together will have the same index. Only provided if includePaintOrder in
5349 | getSnapshot was true.
5350 |        */
5351 |       paintOrder?: number;
5352 |       /**
5353 |        * Set to true to indicate the element begins a new stacking context.
5354 |        */
5355 |       isStackingContext?: boolean;
5356 |     }
5357 |     /**
5358 |      * A subset of the full ComputedStyle as defined by the request whitelist.
5359 |      */
5360 |     export interface ComputedStyle {
5361 |       /**
5362 |        * Name/value pairs of computed style properties.
5363 |        */
5364 |       properties: NameValue[];
5365 |     }
5366 |     /**
5367 |      * A name/value pair.
5368 |      */
5369 |     export interface NameValue {
5370 |       /**
5371 |        * Attribute/property name.
5372 |        */
5373 |       name: string;
5374 |       /**
5375 |        * Attribute/property value.
5376 |        */
5377 |       value: string;
5378 |     }
5379 |     /**
5380 |      * Index of the string in the strings table.
5381 |      */
5382 |     export type StringIndex = number;
5383 |     /**
5384 |      * Index of the string in the strings table.
5385 |      */
5386 |     export type ArrayOfStrings = StringIndex[];
5387 |     /**
5388 |      * Data that is only present on rare nodes.
5389 |      */
5390 |     export interface RareStringData {
5391 |       index: number[];
5392 |       value: StringIndex[];
5393 |     }
5394 |     export interface RareBooleanData {
5395 |       index: number[];
5396 |     }
5397 |     export interface RareIntegerData {
5398 |       index: number[];
5399 |       value: number[];
5400 |     }
5401 |     export type Rectangle = number[];
5402 |     /**
5403 |      * Document snapshot.
5404 |      */
5405 |     export interface DocumentSnapshot {
5406 |       /**
5407 |        * Document URL that `Document` or `FrameOwner` node points to.
5408 |        */
5409 |       documentURL: StringIndex;
5410 |       /**
5411 |        * Document title.
5412 |        */
5413 |       title: StringIndex;
5414 |       /**
5415 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
5416 |        */
5417 |       baseURL: StringIndex;
5418 |       /**
5419 |        * Contains the document's content language.
5420 |        */
5421 |       contentLanguage: StringIndex;
5422 |       /**
5423 |        * Contains the document's character set encoding.
5424 |        */
5425 |       encodingName: StringIndex;
5426 |       /**
5427 |        * `DocumentType` node's publicId.
5428 |        */
5429 |       publicId: StringIndex;
5430 |       /**
5431 |        * `DocumentType` node's systemId.
5432 |        */
5433 |       systemId: StringIndex;
5434 |       /**
5435 |        * Frame ID for frame owner elements and also for the document node.
5436 |        */
5437 |       frameId: StringIndex;
5438 |       /**
5439 |        * A table with dom nodes.
5440 |        */
5441 |       nodes: NodeTreeSnapshot;
5442 |       /**
5443 |        * The nodes in the layout tree.
5444 |        */
5445 |       layout: LayoutTreeSnapshot;
5446 |       /**
5447 |        * The post-layout inline text nodes.
5448 |        */
5449 |       textBoxes: TextBoxSnapshot;
5450 |       /**
5451 |        * Horizontal scroll offset.
5452 |        */
5453 |       scrollOffsetX?: number;
5454 |       /**
5455 |        * Vertical scroll offset.
5456 |        */
5457 |       scrollOffsetY?: number;
5458 |       /**
5459 |        * Document content width.
5460 |        */
5461 |       contentWidth?: number;
5462 |       /**
5463 |        * Document content height.
5464 |        */
5465 |       contentHeight?: number;
5466 |     }
5467 |     /**
5468 |      * Table containing nodes.
5469 |      */
5470 |     export interface NodeTreeSnapshot {
5471 |       /**
5472 |        * Parent node index.
5473 |        */
5474 |       parentIndex?: number[];
5475 |       /**
5476 |        * `Node`'s nodeType.
5477 |        */
5478 |       nodeType?: number[];
5479 |       /**
5480 |        * Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
5481 |        */
5482 |       shadowRootType?: RareStringData;
5483 |       /**
5484 |        * `Node`'s nodeName.
5485 |        */
5486 |       nodeName?: StringIndex[];
5487 |       /**
5488 |        * `Node`'s nodeValue.
5489 |        */
5490 |       nodeValue?: StringIndex[];
5491 |       /**
5492 |        * `Node`'s id, corresponds to DOM.Node.backendNodeId.
5493 |        */
5494 |       backendNodeId?: DOM.BackendNodeId[];
5495 |       /**
5496 |        * Attributes of an `Element` node. Flatten name, value pairs.
5497 |        */
5498 |       attributes?: ArrayOfStrings[];
5499 |       /**
5500 |        * Only set for textarea elements, contains the text value.
5501 |        */
5502 |       textValue?: RareStringData;
5503 |       /**
5504 |        * Only set for input elements, contains the input's associated text value.
5505 |        */
5506 |       inputValue?: RareStringData;
5507 |       /**
5508 |        * Only set for radio and checkbox input elements, indicates if the element has been checked
5509 |        */
5510 |       inputChecked?: RareBooleanData;
5511 |       /**
5512 |        * Only set for option elements, indicates if the element has been selected
5513 |        */
5514 |       optionSelected?: RareBooleanData;
5515 |       /**
5516 |        * The index of the document in the list of the snapshot documents.
5517 |        */
5518 |       contentDocumentIndex?: RareIntegerData;
5519 |       /**
5520 |        * Type of a pseudo element node.
5521 |        */
5522 |       pseudoType?: RareStringData;
5523 |       /**
5524 |        * Pseudo element identifier for this node. Only present if there is a
5525 | valid pseudoType.
5526 |        */
5527 |       pseudoIdentifier?: RareStringData;
5528 |       /**
5529 |        * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
5530 | event listeners attached via JavaScript as well as anchor tags that naturally navigate when
5531 | clicked.
5532 |        */
5533 |       isClickable?: RareBooleanData;
5534 |       /**
5535 |        * The selected url for nodes with a srcset attribute.
5536 |        */
5537 |       currentSourceURL?: RareStringData;
5538 |       /**
5539 |        * The url of the script (if any) that generates this node.
5540 |        */
5541 |       originURL?: RareStringData;
5542 |     }
5543 |     /**
5544 |      * Table of details of an element in the DOM tree with a LayoutObject.
5545 |      */
5546 |     export interface LayoutTreeSnapshot {
5547 |       /**
5548 |        * Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
5549 |        */
5550 |       nodeIndex: number[];
5551 |       /**
5552 |        * Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
5553 |        */
5554 |       styles: ArrayOfStrings[];
5555 |       /**
5556 |        * The absolute position bounding box.
5557 |        */
5558 |       bounds: Rectangle[];
5559 |       /**
5560 |        * Contents of the LayoutText, if any.
5561 |        */
5562 |       text: StringIndex[];
5563 |       /**
5564 |        * Stacking context information.
5565 |        */
5566 |       stackingContexts: RareBooleanData;
5567 |       /**
5568 |        * Global paint order index, which is determined by the stacking order of the nodes. Nodes
5569 | that are painted together will have the same index. Only provided if includePaintOrder in
5570 | captureSnapshot was true.
5571 |        */
5572 |       paintOrders?: number[];
5573 |       /**
5574 |        * The offset rect of nodes. Only available when includeDOMRects is set to true
5575 |        */
5576 |       offsetRects?: Rectangle[];
5577 |       /**
5578 |        * The scroll rect of nodes. Only available when includeDOMRects is set to true
5579 |        */
5580 |       scrollRects?: Rectangle[];
5581 |       /**
5582 |        * The client rect of nodes. Only available when includeDOMRects is set to true
5583 |        */
5584 |       clientRects?: Rectangle[];
5585 |       /**
5586 |        * The list of background colors that are blended with colors of overlapping elements.
5587 |        */
5588 |       blendedBackgroundColors?: StringIndex[];
5589 |       /**
5590 |        * The list of computed text opacities.
5591 |        */
5592 |       textColorOpacities?: number[];
5593 |     }
5594 |     /**
5595 |      * Table of details of the post layout rendered text positions. The exact layout should not be regarded as
5596 | stable and may change between versions.
5597 |      */
5598 |     export interface TextBoxSnapshot {
5599 |       /**
5600 |        * Index of the layout tree node that owns this box collection.
5601 |        */
5602 |       layoutIndex: number[];
5603 |       /**
5604 |        * The absolute position bounding box.
5605 |        */
5606 |       bounds: Rectangle[];
5607 |       /**
5608 |        * The starting index in characters, for this post layout textbox substring. Characters that
5609 | would be represented as a surrogate pair in UTF-16 have length 2.
5610 |        */
5611 |       start: number[];
5612 |       /**
5613 |        * The number of characters in this post layout textbox substring. Characters that would be
5614 | represented as a surrogate pair in UTF-16 have length 2.
5615 |        */
5616 |       length: number[];
5617 |     }
5618 | 
5619 | 
5620 |     /**
5621 |      * Disables DOM snapshot agent for the given page.
5622 |      */
5623 |     export type disableParameters = {
5624 |     }
5625 |     export type disableReturnValue = {
5626 |     }
5627 |     /**
5628 |      * Enables DOM snapshot agent for the given page.
5629 |      */
5630 |     export type enableParameters = {
5631 |     }
5632 |     export type enableReturnValue = {
5633 |     }
5634 |     /**
5635 |      * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
5636 | template contents, and imported documents) in a flattened array, as well as layout and
5637 | white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
5638 | flattened.
5639 |      */
5640 |     export type getSnapshotParameters = {
5641 |       /**
5642 |        * Whitelist of computed styles to return.
5643 |        */
5644 |       computedStyleWhitelist: string[];
5645 |       /**
5646 |        * Whether or not to retrieve details of DOM listeners (default false).
5647 |        */
5648 |       includeEventListeners?: boolean;
5649 |       /**
5650 |        * Whether to determine and include the paint order index of LayoutTreeNodes (default false).
5651 |        */
5652 |       includePaintOrder?: boolean;
5653 |       /**
5654 |        * Whether to include UA shadow tree in the snapshot (default false).
5655 |        */
5656 |       includeUserAgentShadowTree?: boolean;
5657 |     }
5658 |     export type getSnapshotReturnValue = {
5659 |       /**
5660 |        * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
5661 |        */
5662 |       domNodes: DOMNode[];
5663 |       /**
5664 |        * The nodes in the layout tree.
5665 |        */
5666 |       layoutTreeNodes: LayoutTreeNode[];
5667 |       /**
5668 |        * Whitelisted ComputedStyle properties for each node in the layout tree.
5669 |        */
5670 |       computedStyles: ComputedStyle[];
5671 |     }
5672 |     /**
5673 |      * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
5674 | template contents, and imported documents) in a flattened array, as well as layout and
5675 | white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
5676 | flattened.
5677 |      */
5678 |     export type captureSnapshotParameters = {
5679 |       /**
5680 |        * Whitelist of computed styles to return.
5681 |        */
5682 |       computedStyles: string[];
5683 |       /**
5684 |        * Whether to include layout object paint orders into the snapshot.
5685 |        */
5686 |       includePaintOrder?: boolean;
5687 |       /**
5688 |        * Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
5689 |        */
5690 |       includeDOMRects?: boolean;
5691 |       /**
5692 |        * Whether to include blended background colors in the snapshot (default: false).
5693 | Blended background color is achieved by blending background colors of all elements
5694 | that overlap with the current element.
5695 |        */
5696 |       includeBlendedBackgroundColors?: boolean;
5697 |       /**
5698 |        * Whether to include text color opacity in the snapshot (default: false).
5699 | An element might have the opacity property set that affects the text color of the element.
5700 | The final text color opacity is computed based on the opacity of all overlapping elements.
5701 |        */
5702 |       includeTextColorOpacities?: boolean;
5703 |     }
5704 |     export type captureSnapshotReturnValue = {
5705 |       /**
5706 |        * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
5707 |        */
5708 |       documents: DocumentSnapshot[];
5709 |       /**
5710 |        * Shared string table that all string properties refer to with indexes.
5711 |        */
5712 |       strings: string[];
5713 |     }
5714 |   }
5715 | 
5716 |   /**
5717 |    * Query and modify DOM storage.
5718 |    */
5719 |   export module DOMStorage {
5720 |     export type SerializedStorageKey = string;
5721 |     /**
5722 |      * DOM Storage identifier.
5723 |      */
5724 |     export interface StorageId {
5725 |       /**
5726 |        * Security origin for the storage.
5727 |        */
5728 |       securityOrigin?: string;
5729 |       /**
5730 |        * Represents a key by which DOM Storage keys its CachedStorageAreas
5731 |        */
5732 |       storageKey?: SerializedStorageKey;
5733 |       /**
5734 |        * Whether the storage is local storage (not session storage).
5735 |        */
5736 |       isLocalStorage: boolean;
5737 |     }
5738 |     /**
5739 |      * DOM Storage item.
5740 |      */
5741 |     export type Item = string[];
5742 | 
5743 |     export type domStorageItemAddedPayload = {
5744 |       storageId: StorageId;
5745 |       key: string;
5746 |       newValue: string;
5747 |     }
5748 |     export type domStorageItemRemovedPayload = {
5749 |       storageId: StorageId;
5750 |       key: string;
5751 |     }
5752 |     export type domStorageItemUpdatedPayload = {
5753 |       storageId: StorageId;
5754 |       key: string;
5755 |       oldValue: string;
5756 |       newValue: string;
5757 |     }
5758 |     export type domStorageItemsClearedPayload = {
5759 |       storageId: StorageId;
5760 |     }
5761 | 
5762 |     export type clearParameters = {
5763 |       storageId: StorageId;
5764 |     }
5765 |     export type clearReturnValue = {
5766 |     }
5767 |     /**
5768 |      * Disables storage tracking, prevents storage events from being sent to the client.
5769 |      */
5770 |     export type disableParameters = {
5771 |     }
5772 |     export type disableReturnValue = {
5773 |     }
5774 |     /**
5775 |      * Enables storage tracking, storage events will now be delivered to the client.
5776 |      */
5777 |     export type enableParameters = {
5778 |     }
5779 |     export type enableReturnValue = {
5780 |     }
5781 |     export type getDOMStorageItemsParameters = {
5782 |       storageId: StorageId;
5783 |     }
5784 |     export type getDOMStorageItemsReturnValue = {
5785 |       entries: Item[];
5786 |     }
5787 |     export type removeDOMStorageItemParameters = {
5788 |       storageId: StorageId;
5789 |       key: string;
5790 |     }
5791 |     export type removeDOMStorageItemReturnValue = {
5792 |     }
5793 |     export type setDOMStorageItemParameters = {
5794 |       storageId: StorageId;
5795 |       key: string;
5796 |       value: string;
5797 |     }
5798 |     export type setDOMStorageItemReturnValue = {
5799 |     }
5800 |   }
5801 | 
5802 |   export module Database {
5803 |     /**
5804 |      * Unique identifier of Database object.
5805 |      */
5806 |     export type DatabaseId = string;
5807 |     /**
5808 |      * Database object.
5809 |      */
5810 |     export interface Database {
5811 |       /**
5812 |        * Database ID.
5813 |        */
5814 |       id: DatabaseId;
5815 |       /**
5816 |        * Database domain.
5817 |        */
5818 |       domain: string;
5819 |       /**
5820 |        * Database name.
5821 |        */
5822 |       name: string;
5823 |       /**
5824 |        * Database version.
5825 |        */
5826 |       version: string;
5827 |     }
5828 |     /**
5829 |      * Database error.
5830 |      */
5831 |     export interface Error {
5832 |       /**
5833 |        * Error message.
5834 |        */
5835 |       message: string;
5836 |       /**
5837 |        * Error code.
5838 |        */
5839 |       code: number;
5840 |     }
5841 | 
5842 |     export type addDatabasePayload = {
5843 |       database: Database;
5844 |     }
5845 | 
5846 |     /**
5847 |      * Disables database tracking, prevents database events from being sent to the client.
5848 |      */
5849 |     export type disableParameters = {
5850 |     }
5851 |     export type disableReturnValue = {
5852 |     }
5853 |     /**
5854 |      * Enables database tracking, database events will now be delivered to the client.
5855 |      */
5856 |     export type enableParameters = {
5857 |     }
5858 |     export type enableReturnValue = {
5859 |     }
5860 |     export type executeSQLParameters = {
5861 |       databaseId: DatabaseId;
5862 |       query: string;
5863 |     }
5864 |     export type executeSQLReturnValue = {
5865 |       columnNames?: string[];
5866 |       values?: any[];
5867 |       sqlError?: Error;
5868 |     }
5869 |     export type getDatabaseTableNamesParameters = {
5870 |       databaseId: DatabaseId;
5871 |     }
5872 |     export type getDatabaseTableNamesReturnValue = {
5873 |       tableNames: string[];
5874 |     }
5875 |   }
5876 | 
5877 |   export module DeviceOrientation {
5878 | 
5879 | 
5880 |     /**
5881 |      * Clears the overridden Device Orientation.
5882 |      */
5883 |     export type clearDeviceOrientationOverrideParameters = {
5884 |     }
5885 |     export type clearDeviceOrientationOverrideReturnValue = {
5886 |     }
5887 |     /**
5888 |      * Overrides the Device Orientation.
5889 |      */
5890 |     export type setDeviceOrientationOverrideParameters = {
5891 |       /**
5892 |        * Mock alpha
5893 |        */
5894 |       alpha: number;
5895 |       /**
5896 |        * Mock beta
5897 |        */
5898 |       beta: number;
5899 |       /**
5900 |        * Mock gamma
5901 |        */
5902 |       gamma: number;
5903 |     }
5904 |     export type setDeviceOrientationOverrideReturnValue = {
5905 |     }
5906 |   }
5907 | 
5908 |   /**
5909 |    * This domain emulates different environments for the page.
5910 |    */
5911 |   export module Emulation {
5912 |     /**
5913 |      * Screen orientation.
5914 |      */
5915 |     export interface ScreenOrientation {
5916 |       /**
5917 |        * Orientation type.
5918 |        */
5919 |       type: "portraitPrimary"|"portraitSecondary"|"landscapePrimary"|"landscapeSecondary";
5920 |       /**
5921 |        * Orientation angle.
5922 |        */
5923 |       angle: number;
5924 |     }
5925 |     export interface DisplayFeature {
5926 |       /**
5927 |        * Orientation of a display feature in relation to screen
5928 |        */
5929 |       orientation: "vertical"|"horizontal";
5930 |       /**
5931 |        * The offset from the screen origin in either the x (for vertical
5932 | orientation) or y (for horizontal orientation) direction.
5933 |        */
5934 |       offset: number;
5935 |       /**
5936 |        * A display feature may mask content such that it is not physically
5937 | displayed - this length along with the offset describes this area.
5938 | A display feature that only splits content will have a 0 mask_length.
5939 |        */
5940 |       maskLength: number;
5941 |     }
5942 |     export interface DevicePosture {
5943 |       /**
5944 |        * Current posture of the device
5945 |        */
5946 |       type: "continuous"|"folded";
5947 |     }
5948 |     export interface MediaFeature {
5949 |       name: string;
5950 |       value: string;
5951 |     }
5952 |     /**
5953 |      * advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
5954 | allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
5955 | pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
5956 | resource fetches.
5957 |      */
5958 |     export type VirtualTimePolicy = "advance"|"pause"|"pauseIfNetworkFetchesPending";
5959 |     /**
5960 |      * Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
5961 |      */
5962 |     export interface UserAgentBrandVersion {
5963 |       brand: string;
5964 |       version: string;
5965 |     }
5966 |     /**
5967 |      * Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
5968 | Missing optional values will be filled in by the target with what it would normally use.
5969 |      */
5970 |     export interface UserAgentMetadata {
5971 |       /**
5972 |        * Brands appearing in Sec-CH-UA.
5973 |        */
5974 |       brands?: UserAgentBrandVersion[];
5975 |       /**
5976 |        * Brands appearing in Sec-CH-UA-Full-Version-List.
5977 |        */
5978 |       fullVersionList?: UserAgentBrandVersion[];
5979 |       fullVersion?: string;
5980 |       platform: string;
5981 |       platformVersion: string;
5982 |       architecture: string;
5983 |       model: string;
5984 |       mobile: boolean;
5985 |       bitness?: string;
5986 |       wow64?: boolean;
5987 |     }
5988 |     /**
5989 |      * Used to specify sensor types to emulate.
5990 | See https://w3c.github.io/sensors/#automation for more information.
5991 |      */
5992 |     export type SensorType = "absolute-orientation"|"accelerometer"|"ambient-light"|"gravity"|"gyroscope"|"linear-acceleration"|"magnetometer"|"relative-orientation";
5993 |     export interface SensorMetadata {
5994 |       available?: boolean;
5995 |       minimumFrequency?: number;
5996 |       maximumFrequency?: number;
5997 |     }
5998 |     export interface SensorReadingSingle {
5999 |       value: number;
6000 |     }
6001 |     export interface SensorReadingXYZ {
6002 |       x: number;
6003 |       y: number;
6004 |       z: number;
6005 |     }
6006 |     export interface SensorReadingQuaternion {
6007 |       x: number;
6008 |       y: number;
6009 |       z: number;
6010 |       w: number;
6011 |     }
6012 |     export interface SensorReading {
6013 |       single?: SensorReadingSingle;
6014 |       xyz?: SensorReadingXYZ;
6015 |       quaternion?: SensorReadingQuaternion;
6016 |     }
6017 |     export type PressureSource = "cpu";
6018 |     export type PressureState = "nominal"|"fair"|"serious"|"critical";
6019 |     export interface PressureMetadata {
6020 |       available?: boolean;
6021 |     }
6022 |     /**
6023 |      * Enum of image types that can be disabled.
6024 |      */
6025 |     export type DisabledImageType = "avif"|"webp";
6026 | 
6027 |     /**
6028 |      * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
6029 |      */
6030 |     export type virtualTimeBudgetExpiredPayload = void;
6031 | 
6032 |     /**
6033 |      * Tells whether emulation is supported.
6034 |      */
6035 |     export type canEmulateParameters = {
6036 |     }
6037 |     export type canEmulateReturnValue = {
6038 |       /**
6039 |        * True if emulation is supported.
6040 |        */
6041 |       result: boolean;
6042 |     }
6043 |     /**
6044 |      * Clears the overridden device metrics.
6045 |      */
6046 |     export type clearDeviceMetricsOverrideParameters = {
6047 |     }
6048 |     export type clearDeviceMetricsOverrideReturnValue = {
6049 |     }
6050 |     /**
6051 |      * Clears the overridden Geolocation Position and Error.
6052 |      */
6053 |     export type clearGeolocationOverrideParameters = {
6054 |     }
6055 |     export type clearGeolocationOverrideReturnValue = {
6056 |     }
6057 |     /**
6058 |      * Requests that page scale factor is reset to initial values.
6059 |      */
6060 |     export type resetPageScaleFactorParameters = {
6061 |     }
6062 |     export type resetPageScaleFactorReturnValue = {
6063 |     }
6064 |     /**
6065 |      * Enables or disables simulating a focused and active page.
6066 |      */
6067 |     export type setFocusEmulationEnabledParameters = {
6068 |       /**
6069 |        * Whether to enable to disable focus emulation.
6070 |        */
6071 |       enabled: boolean;
6072 |     }
6073 |     export type setFocusEmulationEnabledReturnValue = {
6074 |     }
6075 |     /**
6076 |      * Automatically render all web contents using a dark theme.
6077 |      */
6078 |     export type setAutoDarkModeOverrideParameters = {
6079 |       /**
6080 |        * Whether to enable or disable automatic dark mode.
6081 | If not specified, any existing override will be cleared.
6082 |        */
6083 |       enabled?: boolean;
6084 |     }
6085 |     export type setAutoDarkModeOverrideReturnValue = {
6086 |     }
6087 |     /**
6088 |      * Enables CPU throttling to emulate slow CPUs.
6089 |      */
6090 |     export type setCPUThrottlingRateParameters = {
6091 |       /**
6092 |        * Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
6093 |        */
6094 |       rate: number;
6095 |     }
6096 |     export type setCPUThrottlingRateReturnValue = {
6097 |     }
6098 |     /**
6099 |      * Sets or clears an override of the default background color of the frame. This override is used
6100 | if the content does not specify one.
6101 |      */
6102 |     export type setDefaultBackgroundColorOverrideParameters = {
6103 |       /**
6104 |        * RGBA of the default background color. If not specified, any existing override will be
6105 | cleared.
6106 |        */
6107 |       color?: DOM.RGBA;
6108 |     }
6109 |     export type setDefaultBackgroundColorOverrideReturnValue = {
6110 |     }
6111 |     /**
6112 |      * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
6113 | window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
6114 | query results).
6115 |      */
6116 |     export type setDeviceMetricsOverrideParameters = {
6117 |       /**
6118 |        * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
6119 |        */
6120 |       width: number;
6121 |       /**
6122 |        * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
6123 |        */
6124 |       height: number;
6125 |       /**
6126 |        * Overriding device scale factor value. 0 disables the override.
6127 |        */
6128 |       deviceScaleFactor: number;
6129 |       /**
6130 |        * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
6131 | autosizing and more.
6132 |        */
6133 |       mobile: boolean;
6134 |       /**
6135 |        * Scale to apply to resulting view image.
6136 |        */
6137 |       scale?: number;
6138 |       /**
6139 |        * Overriding screen width value in pixels (minimum 0, maximum 10000000).
6140 |        */
6141 |       screenWidth?: number;
6142 |       /**
6143 |        * Overriding screen height value in pixels (minimum 0, maximum 10000000).
6144 |        */
6145 |       screenHeight?: number;
6146 |       /**
6147 |        * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
6148 |        */
6149 |       positionX?: number;
6150 |       /**
6151 |        * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
6152 |        */
6153 |       positionY?: number;
6154 |       /**
6155 |        * Do not set visible view size, rely upon explicit setVisibleSize call.
6156 |        */
6157 |       dontSetVisibleSize?: boolean;
6158 |       /**
6159 |        * Screen orientation override.
6160 |        */
6161 |       screenOrientation?: ScreenOrientation;
6162 |       /**
6163 |        * If set, the visible area of the page will be overridden to this viewport. This viewport
6164 | change is not observed by the page, e.g. viewport-relative elements do not change positions.
6165 |        */
6166 |       viewport?: Page.Viewport;
6167 |       /**
6168 |        * If set, the display feature of a multi-segment screen. If not set, multi-segment support
6169 | is turned-off.
6170 |        */
6171 |       displayFeature?: DisplayFeature;
6172 |       /**
6173 |        * If set, the posture of a foldable device. If not set the posture is set
6174 | to continuous.
6175 | Deprecated, use Emulation.setDevicePostureOverride.
6176 |        */
6177 |       devicePosture?: DevicePosture;
6178 |     }
6179 |     export type setDeviceMetricsOverrideReturnValue = {
6180 |     }
6181 |     /**
6182 |      * Start reporting the given posture value to the Device Posture API.
6183 | This override can also be set in setDeviceMetricsOverride().
6184 |      */
6185 |     export type setDevicePostureOverrideParameters = {
6186 |       posture: DevicePosture;
6187 |     }
6188 |     export type setDevicePostureOverrideReturnValue = {
6189 |     }
6190 |     /**
6191 |      * Clears a device posture override set with either setDeviceMetricsOverride()
6192 | or setDevicePostureOverride() and starts using posture information from the
6193 | platform again.
6194 | Does nothing if no override is set.
6195 |      */
6196 |     export type clearDevicePostureOverrideParameters = {
6197 |     }
6198 |     export type clearDevicePostureOverrideReturnValue = {
6199 |     }
6200 |     export type setScrollbarsHiddenParameters = {
6201 |       /**
6202 |        * Whether scrollbars should be always hidden.
6203 |        */
6204 |       hidden: boolean;
6205 |     }
6206 |     export type setScrollbarsHiddenReturnValue = {
6207 |     }
6208 |     export type setDocumentCookieDisabledParameters = {
6209 |       /**
6210 |        * Whether document.coookie API should be disabled.
6211 |        */
6212 |       disabled: boolean;
6213 |     }
6214 |     export type setDocumentCookieDisabledReturnValue = {
6215 |     }
6216 |     export type setEmitTouchEventsForMouseParameters = {
6217 |       /**
6218 |        * Whether touch emulation based on mouse input should be enabled.
6219 |        */
6220 |       enabled: boolean;
6221 |       /**
6222 |        * Touch/gesture events configuration. Default: current platform.
6223 |        */
6224 |       configuration?: "mobile"|"desktop";
6225 |     }
6226 |     export type setEmitTouchEventsForMouseReturnValue = {
6227 |     }
6228 |     /**
6229 |      * Emulates the given media type or media feature for CSS media queries.
6230 |      */
6231 |     export type setEmulatedMediaParameters = {
6232 |       /**
6233 |        * Media type to emulate. Empty string disables the override.
6234 |        */
6235 |       media?: string;
6236 |       /**
6237 |        * Media features to emulate.
6238 |        */
6239 |       features?: MediaFeature[];
6240 |     }
6241 |     export type setEmulatedMediaReturnValue = {
6242 |     }
6243 |     /**
6244 |      * Emulates the given vision deficiency.
6245 |      */
6246 |     export type setEmulatedVisionDeficiencyParameters = {
6247 |       /**
6248 |        * Vision deficiency to emulate. Order: best-effort emulations come first, followed by any
6249 | physiologically accurate emulations for medically recognized color vision deficiencies.
6250 |        */
6251 |       type: "none"|"blurredVision"|"reducedContrast"|"achromatopsia"|"deuteranopia"|"protanopia"|"tritanopia";
6252 |     }
6253 |     export type setEmulatedVisionDeficiencyReturnValue = {
6254 |     }
6255 |     /**
6256 |      * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
6257 | unavailable.
6258 |      */
6259 |     export type setGeolocationOverrideParameters = {
6260 |       /**
6261 |        * Mock latitude
6262 |        */
6263 |       latitude?: number;
6264 |       /**
6265 |        * Mock longitude
6266 |        */
6267 |       longitude?: number;
6268 |       /**
6269 |        * Mock accuracy
6270 |        */
6271 |       accuracy?: number;
6272 |     }
6273 |     export type setGeolocationOverrideReturnValue = {
6274 |     }
6275 |     export type getOverriddenSensorInformationParameters = {
6276 |       type: SensorType;
6277 |     }
6278 |     export type getOverriddenSensorInformationReturnValue = {
6279 |       requestedSamplingFrequency: number;
6280 |     }
6281 |     /**
6282 |      * Overrides a platform sensor of a given type. If |enabled| is true, calls to
6283 | Sensor.start() will use a virtual sensor as backend rather than fetching
6284 | data from a real hardware sensor. Otherwise, existing virtual
6285 | sensor-backend Sensor objects will fire an error event and new calls to
6286 | Sensor.start() will attempt to use a real sensor instead.
6287 |      */
6288 |     export type setSensorOverrideEnabledParameters = {
6289 |       enabled: boolean;
6290 |       type: SensorType;
6291 |       metadata?: SensorMetadata;
6292 |     }
6293 |     export type setSensorOverrideEnabledReturnValue = {
6294 |     }
6295 |     /**
6296 |      * Updates the sensor readings reported by a sensor type previously overridden
6297 | by setSensorOverrideEnabled.
6298 |      */
6299 |     export type setSensorOverrideReadingsParameters = {
6300 |       type: SensorType;
6301 |       reading: SensorReading;
6302 |     }
6303 |     export type setSensorOverrideReadingsReturnValue = {
6304 |     }
6305 |     /**
6306 |      * Overrides a pressure source of a given type, as used by the Compute
6307 | Pressure API, so that updates to PressureObserver.observe() are provided
6308 | via setPressureStateOverride instead of being retrieved from
6309 | platform-provided telemetry data.
6310 |      */
6311 |     export type setPressureSourceOverrideEnabledParameters = {
6312 |       enabled: boolean;
6313 |       source: PressureSource;
6314 |       metadata?: PressureMetadata;
6315 |     }
6316 |     export type setPressureSourceOverrideEnabledReturnValue = {
6317 |     }
6318 |     /**
6319 |      * Provides a given pressure state that will be processed and eventually be
6320 | delivered to PressureObserver users. |source| must have been previously
6321 | overridden by setPressureSourceOverrideEnabled.
6322 |      */
6323 |     export type setPressureStateOverrideParameters = {
6324 |       source: PressureSource;
6325 |       state: PressureState;
6326 |     }
6327 |     export type setPressureStateOverrideReturnValue = {
6328 |     }
6329 |     /**
6330 |      * Overrides the Idle state.
6331 |      */
6332 |     export type setIdleOverrideParameters = {
6333 |       /**
6334 |        * Mock isUserActive
6335 |        */
6336 |       isUserActive: boolean;
6337 |       /**
6338 |        * Mock isScreenUnlocked
6339 |        */
6340 |       isScreenUnlocked: boolean;
6341 |     }
6342 |     export type setIdleOverrideReturnValue = {
6343 |     }
6344 |     /**
6345 |      * Clears Idle state overrides.
6346 |      */
6347 |     export type clearIdleOverrideParameters = {
6348 |     }
6349 |     export type clearIdleOverrideReturnValue = {
6350 |     }
6351 |     /**
6352 |      * Overrides value returned by the javascript navigator object.
6353 |      */
6354 |     export type setNavigatorOverridesParameters = {
6355 |       /**
6356 |        * The platform navigator.platform should return.
6357 |        */
6358 |       platform: string;
6359 |     }
6360 |     export type setNavigatorOverridesReturnValue = {
6361 |     }
6362 |     /**
6363 |      * Sets a specified page scale factor.
6364 |      */
6365 |     export type setPageScaleFactorParameters = {
6366 |       /**
6367 |        * Page scale factor.
6368 |        */
6369 |       pageScaleFactor: number;
6370 |     }
6371 |     export type setPageScaleFactorReturnValue = {
6372 |     }
6373 |     /**
6374 |      * Switches script execution in the page.
6375 |      */
6376 |     export type setScriptExecutionDisabledParameters = {
6377 |       /**
6378 |        * Whether script execution should be disabled in the page.
6379 |        */
6380 |       value: boolean;
6381 |     }
6382 |     export type setScriptExecutionDisabledReturnValue = {
6383 |     }
6384 |     /**
6385 |      * Enables touch on platforms which do not support them.
6386 |      */
6387 |     export type setTouchEmulationEnabledParameters = {
6388 |       /**
6389 |        * Whether the touch event emulation should be enabled.
6390 |        */
6391 |       enabled: boolean;
6392 |       /**
6393 |        * Maximum touch points supported. Defaults to one.
6394 |        */
6395 |       maxTouchPoints?: number;
6396 |     }
6397 |     export type setTouchEmulationEnabledReturnValue = {
6398 |     }
6399 |     /**
6400 |      * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
6401 | the current virtual time policy.  Note this supersedes any previous time budget.
6402 |      */
6403 |     export type setVirtualTimePolicyParameters = {
6404 |       policy: VirtualTimePolicy;
6405 |       /**
6406 |        * If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
6407 | virtualTimeBudgetExpired event is sent.
6408 |        */
6409 |       budget?: number;
6410 |       /**
6411 |        * If set this specifies the maximum number of tasks that can be run before virtual is forced
6412 | forwards to prevent deadlock.
6413 |        */
6414 |       maxVirtualTimeTaskStarvationCount?: number;
6415 |       /**
6416 |        * If set, base::Time::Now will be overridden to initially return this value.
6417 |        */
6418 |       initialVirtualTime?: Network.TimeSinceEpoch;
6419 |     }
6420 |     export type setVirtualTimePolicyReturnValue = {
6421 |       /**
6422 |        * Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
6423 |        */
6424 |       virtualTimeTicksBase: number;
6425 |     }
6426 |     /**
6427 |      * Overrides default host system locale with the specified one.
6428 |      */
6429 |     export type setLocaleOverrideParameters = {
6430 |       /**
6431 |        * ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
6432 | restores default host system locale.
6433 |        */
6434 |       locale?: string;
6435 |     }
6436 |     export type setLocaleOverrideReturnValue = {
6437 |     }
6438 |     /**
6439 |      * Overrides default host system timezone with the specified one.
6440 |      */
6441 |     export type setTimezoneOverrideParameters = {
6442 |       /**
6443 |        * The timezone identifier. List of supported timezones:
6444 | https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt
6445 | If empty, disables the override and restores default host system timezone.
6446 |        */
6447 |       timezoneId: string;
6448 |     }
6449 |     export type setTimezoneOverrideReturnValue = {
6450 |     }
6451 |     /**
6452 |      * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
6453 | (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
6454 | on Android.
6455 |      */
6456 |     export type setVisibleSizeParameters = {
6457 |       /**
6458 |        * Frame width (DIP).
6459 |        */
6460 |       width: number;
6461 |       /**
6462 |        * Frame height (DIP).
6463 |        */
6464 |       height: number;
6465 |     }
6466 |     export type setVisibleSizeReturnValue = {
6467 |     }
6468 |     export type setDisabledImageTypesParameters = {
6469 |       /**
6470 |        * Image types to disable.
6471 |        */
6472 |       imageTypes: DisabledImageType[];
6473 |     }
6474 |     export type setDisabledImageTypesReturnValue = {
6475 |     }
6476 |     export type setHardwareConcurrencyOverrideParameters = {
6477 |       /**
6478 |        * Hardware concurrency to report
6479 |        */
6480 |       hardwareConcurrency: number;
6481 |     }
6482 |     export type setHardwareConcurrencyOverrideReturnValue = {
6483 |     }
6484 |     /**
6485 |      * Allows overriding user agent with the given string.
6486 | `userAgentMetadata` must be set for Client Hint headers to be sent.
6487 |      */
6488 |     export type setUserAgentOverrideParameters = {
6489 |       /**
6490 |        * User agent to use.
6491 |        */
6492 |       userAgent: string;
6493 |       /**
6494 |        * Browser language to emulate.
6495 |        */
6496 |       acceptLanguage?: string;
6497 |       /**
6498 |        * The platform navigator.platform should return.
6499 |        */
6500 |       platform?: string;
6501 |       /**
6502 |        * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
6503 |        */
6504 |       userAgentMetadata?: UserAgentMetadata;
6505 |     }
6506 |     export type setUserAgentOverrideReturnValue = {
6507 |     }
6508 |     /**
6509 |      * Allows overriding the automation flag.
6510 |      */
6511 |     export type setAutomationOverrideParameters = {
6512 |       /**
6513 |        * Whether the override should be enabled.
6514 |        */
6515 |       enabled: boolean;
6516 |     }
6517 |     export type setAutomationOverrideReturnValue = {
6518 |     }
6519 |   }
6520 | 
6521 |   /**
6522 |    * This domain provides experimental commands only supported in headless mode.
6523 |    */
6524 |   export module HeadlessExperimental {
6525 |     /**
6526 |      * Encoding options for a screenshot.
6527 |      */
6528 |     export interface ScreenshotParams {
6529 |       /**
6530 |        * Image compression format (defaults to png).
6531 |        */
6532 |       format?: "jpeg"|"png"|"webp";
6533 |       /**
6534 |        * Compression quality from range [0..100] (jpeg and webp only).
6535 |        */
6536 |       quality?: number;
6537 |       /**
6538 |        * Optimize image encoding for speed, not for resulting size (defaults to false)
6539 |        */
6540 |       optimizeForSpeed?: boolean;
6541 |     }
6542 | 
6543 | 
6544 |     /**
6545 |      * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
6546 | screenshot from the resulting frame. Requires that the target was created with enabled
6547 | BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
6548 | https://goo.gle/chrome-headless-rendering for more background.
6549 |      */
6550 |     export type beginFrameParameters = {
6551 |       /**
6552 |        * Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,
6553 | the current time will be used.
6554 |        */
6555 |       frameTimeTicks?: number;
6556 |       /**
6557 |        * The interval between BeginFrames that is reported to the compositor, in milliseconds.
6558 | Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
6559 |        */
6560 |       interval?: number;
6561 |       /**
6562 |        * Whether updates should not be committed and drawn onto the display. False by default. If
6563 | true, only side effects of the BeginFrame will be run, such as layout and animations, but
6564 | any visual updates may not be visible on the display or in screenshots.
6565 |        */
6566 |       noDisplayUpdates?: boolean;
6567 |       /**
6568 |        * If set, a screenshot of the frame will be captured and returned in the response. Otherwise,
6569 | no screenshot will be captured. Note that capturing a screenshot can fail, for example,
6570 | during renderer initialization. In such a case, no screenshot data will be returned.
6571 |        */
6572 |       screenshot?: ScreenshotParams;
6573 |     }
6574 |     export type beginFrameReturnValue = {
6575 |       /**
6576 |        * Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the
6577 | display. Reported for diagnostic uses, may be removed in the future.
6578 |        */
6579 |       hasDamage: boolean;
6580 |       /**
6581 |        * Base64-encoded image data of the screenshot, if one was requested and successfully taken.
6582 |        */
6583 |       screenshotData?: binary;
6584 |     }
6585 |     /**
6586 |      * Disables headless events for the target.
6587 |      */
6588 |     export type disableParameters = {
6589 |     }
6590 |     export type disableReturnValue = {
6591 |     }
6592 |     /**
6593 |      * Enables headless events for the target.
6594 |      */
6595 |     export type enableParameters = {
6596 |     }
6597 |     export type enableReturnValue = {
6598 |     }
6599 |   }
6600 | 
6601 |   /**
6602 |    * Input/Output operations for streams produced by DevTools.
6603 |    */
6604 |   export module IO {
6605 |     /**
6606 |      * This is either obtained from another method or specified as `blob:<uuid>` where
6607 | `<uuid>` is an UUID of a Blob.
6608 |      */
6609 |     export type StreamHandle = string;
6610 | 
6611 | 
6612 |     /**
6613 |      * Close the stream, discard any temporary backing storage.
6614 |      */
6615 |     export type closeParameters = {
6616 |       /**
6617 |        * Handle of the stream to close.
6618 |        */
6619 |       handle: StreamHandle;
6620 |     }
6621 |     export type closeReturnValue = {
6622 |     }
6623 |     /**
6624 |      * Read a chunk of the stream
6625 |      */
6626 |     export type readParameters = {
6627 |       /**
6628 |        * Handle of the stream to read.
6629 |        */
6630 |       handle: StreamHandle;
6631 |       /**
6632 |        * Seek to the specified offset before reading (if not specified, proceed with offset
6633 | following the last read). Some types of streams may only support sequential reads.
6634 |        */
6635 |       offset?: number;
6636 |       /**
6637 |        * Maximum number of bytes to read (left upon the agent discretion if not specified).
6638 |        */
6639 |       size?: number;
6640 |     }
6641 |     export type readReturnValue = {
6642 |       /**
6643 |        * Set if the data is base64-encoded
6644 |        */
6645 |       base64Encoded?: boolean;
6646 |       /**
6647 |        * Data that were read.
6648 |        */
6649 |       data: string;
6650 |       /**
6651 |        * Set if the end-of-file condition occurred while reading.
6652 |        */
6653 |       eof: boolean;
6654 |     }
6655 |     /**
6656 |      * Return UUID of Blob object specified by a remote object id.
6657 |      */
6658 |     export type resolveBlobParameters = {
6659 |       /**
6660 |        * Object id of a Blob object wrapper.
6661 |        */
6662 |       objectId: Runtime.RemoteObjectId;
6663 |     }
6664 |     export type resolveBlobReturnValue = {
6665 |       /**
6666 |        * UUID of the specified Blob.
6667 |        */
6668 |       uuid: string;
6669 |     }
6670 |   }
6671 | 
6672 |   export module FileSystem {
6673 |     export interface File {
6674 |       name: string;
6675 |       /**
6676 |        * Timestamp
6677 |        */
6678 |       lastModified: Network.TimeSinceEpoch;
6679 |       /**
6680 |        * Size in bytes
6681 |        */
6682 |       size: number;
6683 |       type: string;
6684 |     }
6685 |     export interface Directory {
6686 |       name: string;
6687 |       nestedDirectories: string[];
6688 |       /**
6689 |        * Files that are directly nested under this directory.
6690 |        */
6691 |       nestedFiles: File[];
6692 |     }
6693 |     export interface BucketFileSystemLocator {
6694 |       /**
6695 |        * Storage key
6696 |        */
6697 |       storageKey: Storage.SerializedStorageKey;
6698 |       /**
6699 |        * Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)
6700 |        */
6701 |       bucketName?: string;
6702 |       /**
6703 |        * Path to the directory using each path component as an array item.
6704 |        */
6705 |       pathComponents: string[];
6706 |     }
6707 | 
6708 | 
6709 |     export type getDirectoryParameters = {
6710 |       bucketFileSystemLocator: BucketFileSystemLocator;
6711 |     }
6712 |     export type getDirectoryReturnValue = {
6713 |       /**
6714 |        * Returns the directory object at the path.
6715 |        */
6716 |       directory: Directory;
6717 |     }
6718 |   }
6719 | 
6720 |   export module IndexedDB {
6721 |     /**
6722 |      * Database with an array of object stores.
6723 |      */
6724 |     export interface DatabaseWithObjectStores {
6725 |       /**
6726 |        * Database name.
6727 |        */
6728 |       name: string;
6729 |       /**
6730 |        * Database version (type is not 'integer', as the standard
6731 | requires the version number to be 'unsigned long long')
6732 |        */
6733 |       version: number;
6734 |       /**
6735 |        * Object stores in this database.
6736 |        */
6737 |       objectStores: ObjectStore[];
6738 |     }
6739 |     /**
6740 |      * Object store.
6741 |      */
6742 |     export interface ObjectStore {
6743 |       /**
6744 |        * Object store name.
6745 |        */
6746 |       name: string;
6747 |       /**
6748 |        * Object store key path.
6749 |        */
6750 |       keyPath: KeyPath;
6751 |       /**
6752 |        * If true, object store has auto increment flag set.
6753 |        */
6754 |       autoIncrement: boolean;
6755 |       /**
6756 |        * Indexes in this object store.
6757 |        */
6758 |       indexes: ObjectStoreIndex[];
6759 |     }
6760 |     /**
6761 |      * Object store index.
6762 |      */
6763 |     export interface ObjectStoreIndex {
6764 |       /**
6765 |        * Index name.
6766 |        */
6767 |       name: string;
6768 |       /**
6769 |        * Index key path.
6770 |        */
6771 |       keyPath: KeyPath;
6772 |       /**
6773 |        * If true, index is unique.
6774 |        */
6775 |       unique: boolean;
6776 |       /**
6777 |        * If true, index allows multiple entries for a key.
6778 |        */
6779 |       multiEntry: boolean;
6780 |     }
6781 |     /**
6782 |      * Key.
6783 |      */
6784 |     export interface Key {
6785 |       /**
6786 |        * Key type.
6787 |        */
6788 |       type: "number"|"string"|"date"|"array";
6789 |       /**
6790 |        * Number value.
6791 |        */
6792 |       number?: number;
6793 |       /**
6794 |        * String value.
6795 |        */
6796 |       string?: string;
6797 |       /**
6798 |        * Date value.
6799 |        */
6800 |       date?: number;
6801 |       /**
6802 |        * Array value.
6803 |        */
6804 |       array?: Key[];
6805 |     }
6806 |     /**
6807 |      * Key range.
6808 |      */
6809 |     export interface KeyRange {
6810 |       /**
6811 |        * Lower bound.
6812 |        */
6813 |       lower?: Key;
6814 |       /**
6815 |        * Upper bound.
6816 |        */
6817 |       upper?: Key;
6818 |       /**
6819 |        * If true lower bound is open.
6820 |        */
6821 |       lowerOpen: boolean;
6822 |       /**
6823 |        * If true upper bound is open.
6824 |        */
6825 |       upperOpen: boolean;
6826 |     }
6827 |     /**
6828 |      * Data entry.
6829 |      */
6830 |     export interface DataEntry {
6831 |       /**
6832 |        * Key object.
6833 |        */
6834 |       key: Runtime.RemoteObject;
6835 |       /**
6836 |        * Primary key object.
6837 |        */
6838 |       primaryKey: Runtime.RemoteObject;
6839 |       /**
6840 |        * Value object.
6841 |        */
6842 |       value: Runtime.RemoteObject;
6843 |     }
6844 |     /**
6845 |      * Key path.
6846 |      */
6847 |     export interface KeyPath {
6848 |       /**
6849 |        * Key path type.
6850 |        */
6851 |       type: "null"|"string"|"array";
6852 |       /**
6853 |        * String value.
6854 |        */
6855 |       string?: string;
6856 |       /**
6857 |        * Array value.
6858 |        */
6859 |       array?: string[];
6860 |     }
6861 | 
6862 | 
6863 |     /**
6864 |      * Clears all entries from an object store.
6865 |      */
6866 |     export type clearObjectStoreParameters = {
6867 |       /**
6868 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
6869 | Security origin.
6870 |        */
6871 |       securityOrigin?: string;
6872 |       /**
6873 |        * Storage key.
6874 |        */
6875 |       storageKey?: string;
6876 |       /**
6877 |        * Storage bucket. If not specified, it uses the default bucket.
6878 |        */
6879 |       storageBucket?: Storage.StorageBucket;
6880 |       /**
6881 |        * Database name.
6882 |        */
6883 |       databaseName: string;
6884 |       /**
6885 |        * Object store name.
6886 |        */
6887 |       objectStoreName: string;
6888 |     }
6889 |     export type clearObjectStoreReturnValue = {
6890 |     }
6891 |     /**
6892 |      * Deletes a database.
6893 |      */
6894 |     export type deleteDatabaseParameters = {
6895 |       /**
6896 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
6897 | Security origin.
6898 |        */
6899 |       securityOrigin?: string;
6900 |       /**
6901 |        * Storage key.
6902 |        */
6903 |       storageKey?: string;
6904 |       /**
6905 |        * Storage bucket. If not specified, it uses the default bucket.
6906 |        */
6907 |       storageBucket?: Storage.StorageBucket;
6908 |       /**
6909 |        * Database name.
6910 |        */
6911 |       databaseName: string;
6912 |     }
6913 |     export type deleteDatabaseReturnValue = {
6914 |     }
6915 |     /**
6916 |      * Delete a range of entries from an object store
6917 |      */
6918 |     export type deleteObjectStoreEntriesParameters = {
6919 |       /**
6920 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
6921 | Security origin.
6922 |        */
6923 |       securityOrigin?: string;
6924 |       /**
6925 |        * Storage key.
6926 |        */
6927 |       storageKey?: string;
6928 |       /**
6929 |        * Storage bucket. If not specified, it uses the default bucket.
6930 |        */
6931 |       storageBucket?: Storage.StorageBucket;
6932 |       databaseName: string;
6933 |       objectStoreName: string;
6934 |       /**
6935 |        * Range of entry keys to delete
6936 |        */
6937 |       keyRange: KeyRange;
6938 |     }
6939 |     export type deleteObjectStoreEntriesReturnValue = {
6940 |     }
6941 |     /**
6942 |      * Disables events from backend.
6943 |      */
6944 |     export type disableParameters = {
6945 |     }
6946 |     export type disableReturnValue = {
6947 |     }
6948 |     /**
6949 |      * Enables events from backend.
6950 |      */
6951 |     export type enableParameters = {
6952 |     }
6953 |     export type enableReturnValue = {
6954 |     }
6955 |     /**
6956 |      * Requests data from object store or index.
6957 |      */
6958 |     export type requestDataParameters = {
6959 |       /**
6960 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
6961 | Security origin.
6962 |        */
6963 |       securityOrigin?: string;
6964 |       /**
6965 |        * Storage key.
6966 |        */
6967 |       storageKey?: string;
6968 |       /**
6969 |        * Storage bucket. If not specified, it uses the default bucket.
6970 |        */
6971 |       storageBucket?: Storage.StorageBucket;
6972 |       /**
6973 |        * Database name.
6974 |        */
6975 |       databaseName: string;
6976 |       /**
6977 |        * Object store name.
6978 |        */
6979 |       objectStoreName: string;
6980 |       /**
6981 |        * Index name, empty string for object store data requests.
6982 |        */
6983 |       indexName: string;
6984 |       /**
6985 |        * Number of records to skip.
6986 |        */
6987 |       skipCount: number;
6988 |       /**
6989 |        * Number of records to fetch.
6990 |        */
6991 |       pageSize: number;
6992 |       /**
6993 |        * Key range.
6994 |        */
6995 |       keyRange?: KeyRange;
6996 |     }
6997 |     export type requestDataReturnValue = {
6998 |       /**
6999 |        * Array of object store data entries.
7000 |        */
7001 |       objectStoreDataEntries: DataEntry[];
7002 |       /**
7003 |        * If true, there are more entries to fetch in the given range.
7004 |        */
7005 |       hasMore: boolean;
7006 |     }
7007 |     /**
7008 |      * Gets metadata of an object store.
7009 |      */
7010 |     export type getMetadataParameters = {
7011 |       /**
7012 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
7013 | Security origin.
7014 |        */
7015 |       securityOrigin?: string;
7016 |       /**
7017 |        * Storage key.
7018 |        */
7019 |       storageKey?: string;
7020 |       /**
7021 |        * Storage bucket. If not specified, it uses the default bucket.
7022 |        */
7023 |       storageBucket?: Storage.StorageBucket;
7024 |       /**
7025 |        * Database name.
7026 |        */
7027 |       databaseName: string;
7028 |       /**
7029 |        * Object store name.
7030 |        */
7031 |       objectStoreName: string;
7032 |     }
7033 |     export type getMetadataReturnValue = {
7034 |       /**
7035 |        * the entries count
7036 |        */
7037 |       entriesCount: number;
7038 |       /**
7039 |        * the current value of key generator, to become the next inserted
7040 | key into the object store. Valid if objectStore.autoIncrement
7041 | is true.
7042 |        */
7043 |       keyGeneratorValue: number;
7044 |     }
7045 |     /**
7046 |      * Requests database with given name in given frame.
7047 |      */
7048 |     export type requestDatabaseParameters = {
7049 |       /**
7050 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
7051 | Security origin.
7052 |        */
7053 |       securityOrigin?: string;
7054 |       /**
7055 |        * Storage key.
7056 |        */
7057 |       storageKey?: string;
7058 |       /**
7059 |        * Storage bucket. If not specified, it uses the default bucket.
7060 |        */
7061 |       storageBucket?: Storage.StorageBucket;
7062 |       /**
7063 |        * Database name.
7064 |        */
7065 |       databaseName: string;
7066 |     }
7067 |     export type requestDatabaseReturnValue = {
7068 |       /**
7069 |        * Database with an array of object stores.
7070 |        */
7071 |       databaseWithObjectStores: DatabaseWithObjectStores;
7072 |     }
7073 |     /**
7074 |      * Requests database names for given security origin.
7075 |      */
7076 |     export type requestDatabaseNamesParameters = {
7077 |       /**
7078 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
7079 | Security origin.
7080 |        */
7081 |       securityOrigin?: string;
7082 |       /**
7083 |        * Storage key.
7084 |        */
7085 |       storageKey?: string;
7086 |       /**
7087 |        * Storage bucket. If not specified, it uses the default bucket.
7088 |        */
7089 |       storageBucket?: Storage.StorageBucket;
7090 |     }
7091 |     export type requestDatabaseNamesReturnValue = {
7092 |       /**
7093 |        * Database names for origin.
7094 |        */
7095 |       databaseNames: string[];
7096 |     }
7097 |   }
7098 | 
7099 |   export module Input {
7100 |     export interface TouchPoint {
7101 |       /**
7102 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
7103 |        */
7104 |       x: number;
7105 |       /**
7106 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
7107 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
7108 |        */
7109 |       y: number;
7110 |       /**
7111 |        * X radius of the touch area (default: 1.0).
7112 |        */
7113 |       radiusX?: number;
7114 |       /**
7115 |        * Y radius of the touch area (default: 1.0).
7116 |        */
7117 |       radiusY?: number;
7118 |       /**
7119 |        * Rotation angle (default: 0.0).
7120 |        */
7121 |       rotationAngle?: number;
7122 |       /**
7123 |        * Force (default: 1.0).
7124 |        */
7125 |       force?: number;
7126 |       /**
7127 |        * The normalized tangential pressure, which has a range of [-1,1] (default: 0).
7128 |        */
7129 |       tangentialPressure?: number;
7130 |       /**
7131 |        * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
7132 |        */
7133 |       tiltX?: number;
7134 |       /**
7135 |        * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
7136 |        */
7137 |       tiltY?: number;
7138 |       /**
7139 |        * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
7140 |        */
7141 |       twist?: number;
7142 |       /**
7143 |        * Identifier used to track touch sources between events, must be unique within an event.
7144 |        */
7145 |       id?: number;
7146 |     }
7147 |     export type GestureSourceType = "default"|"touch"|"mouse";
7148 |     export type MouseButton = "none"|"left"|"middle"|"right"|"back"|"forward";
7149 |     /**
7150 |      * UTC time in seconds, counted from January 1, 1970.
7151 |      */
7152 |     export type TimeSinceEpoch = number;
7153 |     export interface DragDataItem {
7154 |       /**
7155 |        * Mime type of the dragged data.
7156 |        */
7157 |       mimeType: string;
7158 |       /**
7159 |        * Depending of the value of `mimeType`, it contains the dragged link,
7160 | text, HTML markup or any other data.
7161 |        */
7162 |       data: string;
7163 |       /**
7164 |        * Title associated with a link. Only valid when `mimeType` == "text/uri-list".
7165 |        */
7166 |       title?: string;
7167 |       /**
7168 |        * Stores the base URL for the contained markup. Only valid when `mimeType`
7169 | == "text/html".
7170 |        */
7171 |       baseURL?: string;
7172 |     }
7173 |     export interface DragData {
7174 |       items: DragDataItem[];
7175 |       /**
7176 |        * List of filenames that should be included when dropping
7177 |        */
7178 |       files?: string[];
7179 |       /**
7180 |        * Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
7181 |        */
7182 |       dragOperationsMask: number;
7183 |     }
7184 | 
7185 |     /**
7186 |      * Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
7187 | restore normal drag and drop behavior.
7188 |      */
7189 |     export type dragInterceptedPayload = {
7190 |       data: DragData;
7191 |     }
7192 | 
7193 |     /**
7194 |      * Dispatches a drag event into the page.
7195 |      */
7196 |     export type dispatchDragEventParameters = {
7197 |       /**
7198 |        * Type of the drag event.
7199 |        */
7200 |       type: "dragEnter"|"dragOver"|"drop"|"dragCancel";
7201 |       /**
7202 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
7203 |        */
7204 |       x: number;
7205 |       /**
7206 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
7207 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
7208 |        */
7209 |       y: number;
7210 |       data: DragData;
7211 |       /**
7212 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
7213 | (default: 0).
7214 |        */
7215 |       modifiers?: number;
7216 |     }
7217 |     export type dispatchDragEventReturnValue = {
7218 |     }
7219 |     /**
7220 |      * Dispatches a key event to the page.
7221 |      */
7222 |     export type dispatchKeyEventParameters = {
7223 |       /**
7224 |        * Type of the key event.
7225 |        */
7226 |       type: "keyDown"|"keyUp"|"rawKeyDown"|"char";
7227 |       /**
7228 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
7229 | (default: 0).
7230 |        */
7231 |       modifiers?: number;
7232 |       /**
7233 |        * Time at which the event occurred.
7234 |        */
7235 |       timestamp?: TimeSinceEpoch;
7236 |       /**
7237 |        * Text as generated by processing a virtual key code with a keyboard layout. Not needed for
7238 | for `keyUp` and `rawKeyDown` events (default: "")
7239 |        */
7240 |       text?: string;
7241 |       /**
7242 |        * Text that would have been generated by the keyboard if no modifiers were pressed (except for
7243 | shift). Useful for shortcut (accelerator) key handling (default: "").
7244 |        */
7245 |       unmodifiedText?: string;
7246 |       /**
7247 |        * Unique key identifier (e.g., 'U+0041') (default: "").
7248 |        */
7249 |       keyIdentifier?: string;
7250 |       /**
7251 |        * Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
7252 |        */
7253 |       code?: string;
7254 |       /**
7255 |        * Unique DOM defined string value describing the meaning of the key in the context of active
7256 | modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
7257 |        */
7258 |       key?: string;
7259 |       /**
7260 |        * Windows virtual key code (default: 0).
7261 |        */
7262 |       windowsVirtualKeyCode?: number;
7263 |       /**
7264 |        * Native virtual key code (default: 0).
7265 |        */
7266 |       nativeVirtualKeyCode?: number;
7267 |       /**
7268 |        * Whether the event was generated from auto repeat (default: false).
7269 |        */
7270 |       autoRepeat?: boolean;
7271 |       /**
7272 |        * Whether the event was generated from the keypad (default: false).
7273 |        */
7274 |       isKeypad?: boolean;
7275 |       /**
7276 |        * Whether the event was a system key event (default: false).
7277 |        */
7278 |       isSystemKey?: boolean;
7279 |       /**
7280 |        * Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:
7281 | 0).
7282 |        */
7283 |       location?: number;
7284 |       /**
7285 |        * Editing commands to send with the key event (e.g., 'selectAll') (default: []).
7286 | These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
7287 | See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
7288 |        */
7289 |       commands?: string[];
7290 |     }
7291 |     export type dispatchKeyEventReturnValue = {
7292 |     }
7293 |     /**
7294 |      * This method emulates inserting text that doesn't come from a key press,
7295 | for example an emoji keyboard or an IME.
7296 |      */
7297 |     export type insertTextParameters = {
7298 |       /**
7299 |        * The text to insert.
7300 |        */
7301 |       text: string;
7302 |     }
7303 |     export type insertTextReturnValue = {
7304 |     }
7305 |     /**
7306 |      * This method sets the current candidate text for IME.
7307 | Use imeCommitComposition to commit the final text.
7308 | Use imeSetComposition with empty string as text to cancel composition.
7309 |      */
7310 |     export type imeSetCompositionParameters = {
7311 |       /**
7312 |        * The text to insert
7313 |        */
7314 |       text: string;
7315 |       /**
7316 |        * selection start
7317 |        */
7318 |       selectionStart: number;
7319 |       /**
7320 |        * selection end
7321 |        */
7322 |       selectionEnd: number;
7323 |       /**
7324 |        * replacement start
7325 |        */
7326 |       replacementStart?: number;
7327 |       /**
7328 |        * replacement end
7329 |        */
7330 |       replacementEnd?: number;
7331 |     }
7332 |     export type imeSetCompositionReturnValue = {
7333 |     }
7334 |     /**
7335 |      * Dispatches a mouse event to the page.
7336 |      */
7337 |     export type dispatchMouseEventParameters = {
7338 |       /**
7339 |        * Type of the mouse event.
7340 |        */
7341 |       type: "mousePressed"|"mouseReleased"|"mouseMoved"|"mouseWheel";
7342 |       /**
7343 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
7344 |        */
7345 |       x: number;
7346 |       /**
7347 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
7348 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
7349 |        */
7350 |       y: number;
7351 |       /**
7352 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
7353 | (default: 0).
7354 |        */
7355 |       modifiers?: number;
7356 |       /**
7357 |        * Time at which the event occurred.
7358 |        */
7359 |       timestamp?: TimeSinceEpoch;
7360 |       /**
7361 |        * Mouse button (default: "none").
7362 |        */
7363 |       button?: MouseButton;
7364 |       /**
7365 |        * A number indicating which buttons are pressed on the mouse when a mouse event is triggered.
7366 | Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
7367 |        */
7368 |       buttons?: number;
7369 |       /**
7370 |        * Number of times the mouse button was clicked (default: 0).
7371 |        */
7372 |       clickCount?: number;
7373 |       /**
7374 |        * The normalized pressure, which has a range of [0,1] (default: 0).
7375 |        */
7376 |       force?: number;
7377 |       /**
7378 |        * The normalized tangential pressure, which has a range of [-1,1] (default: 0).
7379 |        */
7380 |       tangentialPressure?: number;
7381 |       /**
7382 |        * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
7383 |        */
7384 |       tiltX?: number;
7385 |       /**
7386 |        * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
7387 |        */
7388 |       tiltY?: number;
7389 |       /**
7390 |        * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
7391 |        */
7392 |       twist?: number;
7393 |       /**
7394 |        * X delta in CSS pixels for mouse wheel event (default: 0).
7395 |        */
7396 |       deltaX?: number;
7397 |       /**
7398 |        * Y delta in CSS pixels for mouse wheel event (default: 0).
7399 |        */
7400 |       deltaY?: number;
7401 |       /**
7402 |        * Pointer type (default: "mouse").
7403 |        */
7404 |       pointerType?: "mouse"|"pen";
7405 |     }
7406 |     export type dispatchMouseEventReturnValue = {
7407 |     }
7408 |     /**
7409 |      * Dispatches a touch event to the page.
7410 |      */
7411 |     export type dispatchTouchEventParameters = {
7412 |       /**
7413 |        * Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while
7414 | TouchStart and TouchMove must contains at least one.
7415 |        */
7416 |       type: "touchStart"|"touchEnd"|"touchMove"|"touchCancel";
7417 |       /**
7418 |        * Active touch points on the touch device. One event per any changed point (compared to
7419 | previous touch event in a sequence) is generated, emulating pressing/moving/releasing points
7420 | one by one.
7421 |        */
7422 |       touchPoints: TouchPoint[];
7423 |       /**
7424 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
7425 | (default: 0).
7426 |        */
7427 |       modifiers?: number;
7428 |       /**
7429 |        * Time at which the event occurred.
7430 |        */
7431 |       timestamp?: TimeSinceEpoch;
7432 |     }
7433 |     export type dispatchTouchEventReturnValue = {
7434 |     }
7435 |     /**
7436 |      * Cancels any active dragging in the page.
7437 |      */
7438 |     export type cancelDraggingParameters = {
7439 |     }
7440 |     export type cancelDraggingReturnValue = {
7441 |     }
7442 |     /**
7443 |      * Emulates touch event from the mouse event parameters.
7444 |      */
7445 |     export type emulateTouchFromMouseEventParameters = {
7446 |       /**
7447 |        * Type of the mouse event.
7448 |        */
7449 |       type: "mousePressed"|"mouseReleased"|"mouseMoved"|"mouseWheel";
7450 |       /**
7451 |        * X coordinate of the mouse pointer in DIP.
7452 |        */
7453 |       x: number;
7454 |       /**
7455 |        * Y coordinate of the mouse pointer in DIP.
7456 |        */
7457 |       y: number;
7458 |       /**
7459 |        * Mouse button. Only "none", "left", "right" are supported.
7460 |        */
7461 |       button: MouseButton;
7462 |       /**
7463 |        * Time at which the event occurred (default: current time).
7464 |        */
7465 |       timestamp?: TimeSinceEpoch;
7466 |       /**
7467 |        * X delta in DIP for mouse wheel event (default: 0).
7468 |        */
7469 |       deltaX?: number;
7470 |       /**
7471 |        * Y delta in DIP for mouse wheel event (default: 0).
7472 |        */
7473 |       deltaY?: number;
7474 |       /**
7475 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
7476 | (default: 0).
7477 |        */
7478 |       modifiers?: number;
7479 |       /**
7480 |        * Number of times the mouse button was clicked (default: 0).
7481 |        */
7482 |       clickCount?: number;
7483 |     }
7484 |     export type emulateTouchFromMouseEventReturnValue = {
7485 |     }
7486 |     /**
7487 |      * Ignores input events (useful while auditing page).
7488 |      */
7489 |     export type setIgnoreInputEventsParameters = {
7490 |       /**
7491 |        * Ignores input events processing when set to true.
7492 |        */
7493 |       ignore: boolean;
7494 |     }
7495 |     export type setIgnoreInputEventsReturnValue = {
7496 |     }
7497 |     /**
7498 |      * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
7499 | Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
7500 |      */
7501 |     export type setInterceptDragsParameters = {
7502 |       enabled: boolean;
7503 |     }
7504 |     export type setInterceptDragsReturnValue = {
7505 |     }
7506 |     /**
7507 |      * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
7508 |      */
7509 |     export type synthesizePinchGestureParameters = {
7510 |       /**
7511 |        * X coordinate of the start of the gesture in CSS pixels.
7512 |        */
7513 |       x: number;
7514 |       /**
7515 |        * Y coordinate of the start of the gesture in CSS pixels.
7516 |        */
7517 |       y: number;
7518 |       /**
7519 |        * Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
7520 |        */
7521 |       scaleFactor: number;
7522 |       /**
7523 |        * Relative pointer speed in pixels per second (default: 800).
7524 |        */
7525 |       relativeSpeed?: number;
7526 |       /**
7527 |        * Which type of input events to be generated (default: 'default', which queries the platform
7528 | for the preferred input type).
7529 |        */
7530 |       gestureSourceType?: GestureSourceType;
7531 |     }
7532 |     export type synthesizePinchGestureReturnValue = {
7533 |     }
7534 |     /**
7535 |      * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
7536 |      */
7537 |     export type synthesizeScrollGestureParameters = {
7538 |       /**
7539 |        * X coordinate of the start of the gesture in CSS pixels.
7540 |        */
7541 |       x: number;
7542 |       /**
7543 |        * Y coordinate of the start of the gesture in CSS pixels.
7544 |        */
7545 |       y: number;
7546 |       /**
7547 |        * The distance to scroll along the X axis (positive to scroll left).
7548 |        */
7549 |       xDistance?: number;
7550 |       /**
7551 |        * The distance to scroll along the Y axis (positive to scroll up).
7552 |        */
7553 |       yDistance?: number;
7554 |       /**
7555 |        * The number of additional pixels to scroll back along the X axis, in addition to the given
7556 | distance.
7557 |        */
7558 |       xOverscroll?: number;
7559 |       /**
7560 |        * The number of additional pixels to scroll back along the Y axis, in addition to the given
7561 | distance.
7562 |        */
7563 |       yOverscroll?: number;
7564 |       /**
7565 |        * Prevent fling (default: true).
7566 |        */
7567 |       preventFling?: boolean;
7568 |       /**
7569 |        * Swipe speed in pixels per second (default: 800).
7570 |        */
7571 |       speed?: number;
7572 |       /**
7573 |        * Which type of input events to be generated (default: 'default', which queries the platform
7574 | for the preferred input type).
7575 |        */
7576 |       gestureSourceType?: GestureSourceType;
7577 |       /**
7578 |        * The number of times to repeat the gesture (default: 0).
7579 |        */
7580 |       repeatCount?: number;
7581 |       /**
7582 |        * The number of milliseconds delay between each repeat. (default: 250).
7583 |        */
7584 |       repeatDelayMs?: number;
7585 |       /**
7586 |        * The name of the interaction markers to generate, if not empty (default: "").
7587 |        */
7588 |       interactionMarkerName?: string;
7589 |     }
7590 |     export type synthesizeScrollGestureReturnValue = {
7591 |     }
7592 |     /**
7593 |      * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
7594 |      */
7595 |     export type synthesizeTapGestureParameters = {
7596 |       /**
7597 |        * X coordinate of the start of the gesture in CSS pixels.
7598 |        */
7599 |       x: number;
7600 |       /**
7601 |        * Y coordinate of the start of the gesture in CSS pixels.
7602 |        */
7603 |       y: number;
7604 |       /**
7605 |        * Duration between touchdown and touchup events in ms (default: 50).
7606 |        */
7607 |       duration?: number;
7608 |       /**
7609 |        * Number of times to perform the tap (e.g. 2 for double tap, default: 1).
7610 |        */
7611 |       tapCount?: number;
7612 |       /**
7613 |        * Which type of input events to be generated (default: 'default', which queries the platform
7614 | for the preferred input type).
7615 |        */
7616 |       gestureSourceType?: GestureSourceType;
7617 |     }
7618 |     export type synthesizeTapGestureReturnValue = {
7619 |     }
7620 |   }
7621 | 
7622 |   export module Inspector {
7623 | 
7624 |     /**
7625 |      * Fired when remote debugging connection is about to be terminated. Contains detach reason.
7626 |      */
7627 |     export type detachedPayload = {
7628 |       /**
7629 |        * The reason why connection has been terminated.
7630 |        */
7631 |       reason: string;
7632 |     }
7633 |     /**
7634 |      * Fired when debugging target has crashed
7635 |      */
7636 |     export type targetCrashedPayload = void;
7637 |     /**
7638 |      * Fired when debugging target has reloaded after crash
7639 |      */
7640 |     export type targetReloadedAfterCrashPayload = void;
7641 | 
7642 |     /**
7643 |      * Disables inspector domain notifications.
7644 |      */
7645 |     export type disableParameters = {
7646 |     }
7647 |     export type disableReturnValue = {
7648 |     }
7649 |     /**
7650 |      * Enables inspector domain notifications.
7651 |      */
7652 |     export type enableParameters = {
7653 |     }
7654 |     export type enableReturnValue = {
7655 |     }
7656 |   }
7657 | 
7658 |   export module LayerTree {
7659 |     /**
7660 |      * Unique Layer identifier.
7661 |      */
7662 |     export type LayerId = string;
7663 |     /**
7664 |      * Unique snapshot identifier.
7665 |      */
7666 |     export type SnapshotId = string;
7667 |     /**
7668 |      * Rectangle where scrolling happens on the main thread.
7669 |      */
7670 |     export interface ScrollRect {
7671 |       /**
7672 |        * Rectangle itself.
7673 |        */
7674 |       rect: DOM.Rect;
7675 |       /**
7676 |        * Reason for rectangle to force scrolling on the main thread
7677 |        */
7678 |       type: "RepaintsOnScroll"|"TouchEventHandler"|"WheelEventHandler";
7679 |     }
7680 |     /**
7681 |      * Sticky position constraints.
7682 |      */
7683 |     export interface StickyPositionConstraint {
7684 |       /**
7685 |        * Layout rectangle of the sticky element before being shifted
7686 |        */
7687 |       stickyBoxRect: DOM.Rect;
7688 |       /**
7689 |        * Layout rectangle of the containing block of the sticky element
7690 |        */
7691 |       containingBlockRect: DOM.Rect;
7692 |       /**
7693 |        * The nearest sticky layer that shifts the sticky box
7694 |        */
7695 |       nearestLayerShiftingStickyBox?: LayerId;
7696 |       /**
7697 |        * The nearest sticky layer that shifts the containing block
7698 |        */
7699 |       nearestLayerShiftingContainingBlock?: LayerId;
7700 |     }
7701 |     /**
7702 |      * Serialized fragment of layer picture along with its offset within the layer.
7703 |      */
7704 |     export interface PictureTile {
7705 |       /**
7706 |        * Offset from owning layer left boundary
7707 |        */
7708 |       x: number;
7709 |       /**
7710 |        * Offset from owning layer top boundary
7711 |        */
7712 |       y: number;
7713 |       /**
7714 |        * Base64-encoded snapshot data.
7715 |        */
7716 |       picture: binary;
7717 |     }
7718 |     /**
7719 |      * Information about a compositing layer.
7720 |      */
7721 |     export interface Layer {
7722 |       /**
7723 |        * The unique id for this layer.
7724 |        */
7725 |       layerId: LayerId;
7726 |       /**
7727 |        * The id of parent (not present for root).
7728 |        */
7729 |       parentLayerId?: LayerId;
7730 |       /**
7731 |        * The backend id for the node associated with this layer.
7732 |        */
7733 |       backendNodeId?: DOM.BackendNodeId;
7734 |       /**
7735 |        * Offset from parent layer, X coordinate.
7736 |        */
7737 |       offsetX: number;
7738 |       /**
7739 |        * Offset from parent layer, Y coordinate.
7740 |        */
7741 |       offsetY: number;
7742 |       /**
7743 |        * Layer width.
7744 |        */
7745 |       width: number;
7746 |       /**
7747 |        * Layer height.
7748 |        */
7749 |       height: number;
7750 |       /**
7751 |        * Transformation matrix for layer, default is identity matrix
7752 |        */
7753 |       transform?: number[];
7754 |       /**
7755 |        * Transform anchor point X, absent if no transform specified
7756 |        */
7757 |       anchorX?: number;
7758 |       /**
7759 |        * Transform anchor point Y, absent if no transform specified
7760 |        */
7761 |       anchorY?: number;
7762 |       /**
7763 |        * Transform anchor point Z, absent if no transform specified
7764 |        */
7765 |       anchorZ?: number;
7766 |       /**
7767 |        * Indicates how many time this layer has painted.
7768 |        */
7769 |       paintCount: number;
7770 |       /**
7771 |        * Indicates whether this layer hosts any content, rather than being used for
7772 | transform/scrolling purposes only.
7773 |        */
7774 |       drawsContent: boolean;
7775 |       /**
7776 |        * Set if layer is not visible.
7777 |        */
7778 |       invisible?: boolean;
7779 |       /**
7780 |        * Rectangles scrolling on main thread only.
7781 |        */
7782 |       scrollRects?: ScrollRect[];
7783 |       /**
7784 |        * Sticky position constraint information
7785 |        */
7786 |       stickyPositionConstraint?: StickyPositionConstraint;
7787 |     }
7788 |     /**
7789 |      * Array of timings, one per paint step.
7790 |      */
7791 |     export type PaintProfile = number[];
7792 | 
7793 |     export type layerPaintedPayload = {
7794 |       /**
7795 |        * The id of the painted layer.
7796 |        */
7797 |       layerId: LayerId;
7798 |       /**
7799 |        * Clip rectangle.
7800 |        */
7801 |       clip: DOM.Rect;
7802 |     }
7803 |     export type layerTreeDidChangePayload = {
7804 |       /**
7805 |        * Layer tree, absent if not in the compositing mode.
7806 |        */
7807 |       layers?: Layer[];
7808 |     }
7809 | 
7810 |     /**
7811 |      * Provides the reasons why the given layer was composited.
7812 |      */
7813 |     export type compositingReasonsParameters = {
7814 |       /**
7815 |        * The id of the layer for which we want to get the reasons it was composited.
7816 |        */
7817 |       layerId: LayerId;
7818 |     }
7819 |     export type compositingReasonsReturnValue = {
7820 |       /**
7821 |        * A list of strings specifying reasons for the given layer to become composited.
7822 |        */
7823 |       compositingReasons: string[];
7824 |       /**
7825 |        * A list of strings specifying reason IDs for the given layer to become composited.
7826 |        */
7827 |       compositingReasonIds: string[];
7828 |     }
7829 |     /**
7830 |      * Disables compositing tree inspection.
7831 |      */
7832 |     export type disableParameters = {
7833 |     }
7834 |     export type disableReturnValue = {
7835 |     }
7836 |     /**
7837 |      * Enables compositing tree inspection.
7838 |      */
7839 |     export type enableParameters = {
7840 |     }
7841 |     export type enableReturnValue = {
7842 |     }
7843 |     /**
7844 |      * Returns the snapshot identifier.
7845 |      */
7846 |     export type loadSnapshotParameters = {
7847 |       /**
7848 |        * An array of tiles composing the snapshot.
7849 |        */
7850 |       tiles: PictureTile[];
7851 |     }
7852 |     export type loadSnapshotReturnValue = {
7853 |       /**
7854 |        * The id of the snapshot.
7855 |        */
7856 |       snapshotId: SnapshotId;
7857 |     }
7858 |     /**
7859 |      * Returns the layer snapshot identifier.
7860 |      */
7861 |     export type makeSnapshotParameters = {
7862 |       /**
7863 |        * The id of the layer.
7864 |        */
7865 |       layerId: LayerId;
7866 |     }
7867 |     export type makeSnapshotReturnValue = {
7868 |       /**
7869 |        * The id of the layer snapshot.
7870 |        */
7871 |       snapshotId: SnapshotId;
7872 |     }
7873 |     export type profileSnapshotParameters = {
7874 |       /**
7875 |        * The id of the layer snapshot.
7876 |        */
7877 |       snapshotId: SnapshotId;
7878 |       /**
7879 |        * The maximum number of times to replay the snapshot (1, if not specified).
7880 |        */
7881 |       minRepeatCount?: number;
7882 |       /**
7883 |        * The minimum duration (in seconds) to replay the snapshot.
7884 |        */
7885 |       minDuration?: number;
7886 |       /**
7887 |        * The clip rectangle to apply when replaying the snapshot.
7888 |        */
7889 |       clipRect?: DOM.Rect;
7890 |     }
7891 |     export type profileSnapshotReturnValue = {
7892 |       /**
7893 |        * The array of paint profiles, one per run.
7894 |        */
7895 |       timings: PaintProfile[];
7896 |     }
7897 |     /**
7898 |      * Releases layer snapshot captured by the back-end.
7899 |      */
7900 |     export type releaseSnapshotParameters = {
7901 |       /**
7902 |        * The id of the layer snapshot.
7903 |        */
7904 |       snapshotId: SnapshotId;
7905 |     }
7906 |     export type releaseSnapshotReturnValue = {
7907 |     }
7908 |     /**
7909 |      * Replays the layer snapshot and returns the resulting bitmap.
7910 |      */
7911 |     export type replaySnapshotParameters = {
7912 |       /**
7913 |        * The id of the layer snapshot.
7914 |        */
7915 |       snapshotId: SnapshotId;
7916 |       /**
7917 |        * The first step to replay from (replay from the very start if not specified).
7918 |        */
7919 |       fromStep?: number;
7920 |       /**
7921 |        * The last step to replay to (replay till the end if not specified).
7922 |        */
7923 |       toStep?: number;
7924 |       /**
7925 |        * The scale to apply while replaying (defaults to 1).
7926 |        */
7927 |       scale?: number;
7928 |     }
7929 |     export type replaySnapshotReturnValue = {
7930 |       /**
7931 |        * A data: URL for resulting image.
7932 |        */
7933 |       dataURL: string;
7934 |     }
7935 |     /**
7936 |      * Replays the layer snapshot and returns canvas log.
7937 |      */
7938 |     export type snapshotCommandLogParameters = {
7939 |       /**
7940 |        * The id of the layer snapshot.
7941 |        */
7942 |       snapshotId: SnapshotId;
7943 |     }
7944 |     export type snapshotCommandLogReturnValue = {
7945 |       /**
7946 |        * The array of canvas function calls.
7947 |        */
7948 |       commandLog: { [key: string]: string }[];
7949 |     }
7950 |   }
7951 | 
7952 |   /**
7953 |    * Provides access to log entries.
7954 |    */
7955 |   export module Log {
7956 |     /**
7957 |      * Log entry.
7958 |      */
7959 |     export interface LogEntry {
7960 |       /**
7961 |        * Log entry source.
7962 |        */
7963 |       source: "xml"|"javascript"|"network"|"storage"|"appcache"|"rendering"|"security"|"deprecation"|"worker"|"violation"|"intervention"|"recommendation"|"other";
7964 |       /**
7965 |        * Log entry severity.
7966 |        */
7967 |       level: "verbose"|"info"|"warning"|"error";
7968 |       /**
7969 |        * Logged text.
7970 |        */
7971 |       text: string;
7972 |       category?: "cors";
7973 |       /**
7974 |        * Timestamp when this entry was added.
7975 |        */
7976 |       timestamp: Runtime.Timestamp;
7977 |       /**
7978 |        * URL of the resource if known.
7979 |        */
7980 |       url?: string;
7981 |       /**
7982 |        * Line number in the resource.
7983 |        */
7984 |       lineNumber?: number;
7985 |       /**
7986 |        * JavaScript stack trace.
7987 |        */
7988 |       stackTrace?: Runtime.StackTrace;
7989 |       /**
7990 |        * Identifier of the network request associated with this entry.
7991 |        */
7992 |       networkRequestId?: Network.RequestId;
7993 |       /**
7994 |        * Identifier of the worker associated with this entry.
7995 |        */
7996 |       workerId?: string;
7997 |       /**
7998 |        * Call arguments.
7999 |        */
8000 |       args?: Runtime.RemoteObject[];
8001 |     }
8002 |     /**
8003 |      * Violation configuration setting.
8004 |      */
8005 |     export interface ViolationSetting {
8006 |       /**
8007 |        * Violation type.
8008 |        */
8009 |       name: "longTask"|"longLayout"|"blockedEvent"|"blockedParser"|"discouragedAPIUse"|"handler"|"recurringHandler";
8010 |       /**
8011 |        * Time threshold to trigger upon.
8012 |        */
8013 |       threshold: number;
8014 |     }
8015 | 
8016 |     /**
8017 |      * Issued when new message was logged.
8018 |      */
8019 |     export type entryAddedPayload = {
8020 |       /**
8021 |        * The entry.
8022 |        */
8023 |       entry: LogEntry;
8024 |     }
8025 | 
8026 |     /**
8027 |      * Clears the log.
8028 |      */
8029 |     export type clearParameters = {
8030 |     }
8031 |     export type clearReturnValue = {
8032 |     }
8033 |     /**
8034 |      * Disables log domain, prevents further log entries from being reported to the client.
8035 |      */
8036 |     export type disableParameters = {
8037 |     }
8038 |     export type disableReturnValue = {
8039 |     }
8040 |     /**
8041 |      * Enables log domain, sends the entries collected so far to the client by means of the
8042 | `entryAdded` notification.
8043 |      */
8044 |     export type enableParameters = {
8045 |     }
8046 |     export type enableReturnValue = {
8047 |     }
8048 |     /**
8049 |      * start violation reporting.
8050 |      */
8051 |     export type startViolationsReportParameters = {
8052 |       /**
8053 |        * Configuration for violations.
8054 |        */
8055 |       config: ViolationSetting[];
8056 |     }
8057 |     export type startViolationsReportReturnValue = {
8058 |     }
8059 |     /**
8060 |      * Stop violation reporting.
8061 |      */
8062 |     export type stopViolationsReportParameters = {
8063 |     }
8064 |     export type stopViolationsReportReturnValue = {
8065 |     }
8066 |   }
8067 | 
8068 |   export module Memory {
8069 |     /**
8070 |      * Memory pressure level.
8071 |      */
8072 |     export type PressureLevel = "moderate"|"critical";
8073 |     /**
8074 |      * Heap profile sample.
8075 |      */
8076 |     export interface SamplingProfileNode {
8077 |       /**
8078 |        * Size of the sampled allocation.
8079 |        */
8080 |       size: number;
8081 |       /**
8082 |        * Total bytes attributed to this sample.
8083 |        */
8084 |       total: number;
8085 |       /**
8086 |        * Execution stack at the point of allocation.
8087 |        */
8088 |       stack: string[];
8089 |     }
8090 |     /**
8091 |      * Array of heap profile samples.
8092 |      */
8093 |     export interface SamplingProfile {
8094 |       samples: SamplingProfileNode[];
8095 |       modules: Module[];
8096 |     }
8097 |     /**
8098 |      * Executable module information
8099 |      */
8100 |     export interface Module {
8101 |       /**
8102 |        * Name of the module.
8103 |        */
8104 |       name: string;
8105 |       /**
8106 |        * UUID of the module.
8107 |        */
8108 |       uuid: string;
8109 |       /**
8110 |        * Base address where the module is loaded into memory. Encoded as a decimal
8111 | or hexadecimal (0x prefixed) string.
8112 |        */
8113 |       baseAddress: string;
8114 |       /**
8115 |        * Size of the module in bytes.
8116 |        */
8117 |       size: number;
8118 |     }
8119 |     /**
8120 |      * DOM object counter data.
8121 |      */
8122 |     export interface DOMCounter {
8123 |       /**
8124 |        * Object name. Note: object names should be presumed volatile and clients should not expect
8125 | the returned names to be consistent across runs.
8126 |        */
8127 |       name: string;
8128 |       /**
8129 |        * Object count.
8130 |        */
8131 |       count: number;
8132 |     }
8133 | 
8134 | 
8135 |     /**
8136 |      * Retruns current DOM object counters.
8137 |      */
8138 |     export type getDOMCountersParameters = {
8139 |     }
8140 |     export type getDOMCountersReturnValue = {
8141 |       documents: number;
8142 |       nodes: number;
8143 |       jsEventListeners: number;
8144 |     }
8145 |     /**
8146 |      * Retruns DOM object counters after preparing renderer for leak detection.
8147 |      */
8148 |     export type getDOMCountersForLeakDetectionParameters = {
8149 |     }
8150 |     export type getDOMCountersForLeakDetectionReturnValue = {
8151 |       /**
8152 |        * DOM object counters.
8153 |        */
8154 |       counters: DOMCounter[];
8155 |     }
8156 |     /**
8157 |      * Prepares for leak detection by terminating workers, stopping spellcheckers,
8158 | dropping non-essential internal caches, running garbage collections, etc.
8159 |      */
8160 |     export type prepareForLeakDetectionParameters = {
8161 |     }
8162 |     export type prepareForLeakDetectionReturnValue = {
8163 |     }
8164 |     /**
8165 |      * Simulate OomIntervention by purging V8 memory.
8166 |      */
8167 |     export type forciblyPurgeJavaScriptMemoryParameters = {
8168 |     }
8169 |     export type forciblyPurgeJavaScriptMemoryReturnValue = {
8170 |     }
8171 |     /**
8172 |      * Enable/disable suppressing memory pressure notifications in all processes.
8173 |      */
8174 |     export type setPressureNotificationsSuppressedParameters = {
8175 |       /**
8176 |        * If true, memory pressure notifications will be suppressed.
8177 |        */
8178 |       suppressed: boolean;
8179 |     }
8180 |     export type setPressureNotificationsSuppressedReturnValue = {
8181 |     }
8182 |     /**
8183 |      * Simulate a memory pressure notification in all processes.
8184 |      */
8185 |     export type simulatePressureNotificationParameters = {
8186 |       /**
8187 |        * Memory pressure level of the notification.
8188 |        */
8189 |       level: PressureLevel;
8190 |     }
8191 |     export type simulatePressureNotificationReturnValue = {
8192 |     }
8193 |     /**
8194 |      * Start collecting native memory profile.
8195 |      */
8196 |     export type startSamplingParameters = {
8197 |       /**
8198 |        * Average number of bytes between samples.
8199 |        */
8200 |       samplingInterval?: number;
8201 |       /**
8202 |        * Do not randomize intervals between samples.
8203 |        */
8204 |       suppressRandomness?: boolean;
8205 |     }
8206 |     export type startSamplingReturnValue = {
8207 |     }
8208 |     /**
8209 |      * Stop collecting native memory profile.
8210 |      */
8211 |     export type stopSamplingParameters = {
8212 |     }
8213 |     export type stopSamplingReturnValue = {
8214 |     }
8215 |     /**
8216 |      * Retrieve native memory allocations profile
8217 | collected since renderer process startup.
8218 |      */
8219 |     export type getAllTimeSamplingProfileParameters = {
8220 |     }
8221 |     export type getAllTimeSamplingProfileReturnValue = {
8222 |       profile: SamplingProfile;
8223 |     }
8224 |     /**
8225 |      * Retrieve native memory allocations profile
8226 | collected since browser process startup.
8227 |      */
8228 |     export type getBrowserSamplingProfileParameters = {
8229 |     }
8230 |     export type getBrowserSamplingProfileReturnValue = {
8231 |       profile: SamplingProfile;
8232 |     }
8233 |     /**
8234 |      * Retrieve native memory allocations profile collected since last
8235 | `startSampling` call.
8236 |      */
8237 |     export type getSamplingProfileParameters = {
8238 |     }
8239 |     export type getSamplingProfileReturnValue = {
8240 |       profile: SamplingProfile;
8241 |     }
8242 |   }
8243 | 
8244 |   /**
8245 |    * Network domain allows tracking network activities of the page. It exposes information about http,
8246 | file, data and other requests and responses, their headers, bodies, timing, etc.
8247 |    */
8248 |   export module Network {
8249 |     /**
8250 |      * Resource type as it was perceived by the rendering engine.
8251 |      */
8252 |     export type ResourceType = "Document"|"Stylesheet"|"Image"|"Media"|"Font"|"Script"|"TextTrack"|"XHR"|"Fetch"|"Prefetch"|"EventSource"|"WebSocket"|"Manifest"|"SignedExchange"|"Ping"|"CSPViolationReport"|"Preflight"|"Other";
8253 |     /**
8254 |      * Unique loader identifier.
8255 |      */
8256 |     export type LoaderId = string;
8257 |     /**
8258 |      * Unique request identifier.
8259 |      */
8260 |     export type RequestId = string;
8261 |     /**
8262 |      * Unique intercepted request identifier.
8263 |      */
8264 |     export type InterceptionId = string;
8265 |     /**
8266 |      * Network level fetch failure reason.
8267 |      */
8268 |     export type ErrorReason = "Failed"|"Aborted"|"TimedOut"|"AccessDenied"|"ConnectionClosed"|"ConnectionReset"|"ConnectionRefused"|"ConnectionAborted"|"ConnectionFailed"|"NameNotResolved"|"InternetDisconnected"|"AddressUnreachable"|"BlockedByClient"|"BlockedByResponse";
8269 |     /**
8270 |      * UTC time in seconds, counted from January 1, 1970.
8271 |      */
8272 |     export type TimeSinceEpoch = number;
8273 |     /**
8274 |      * Monotonically increasing time in seconds since an arbitrary point in the past.
8275 |      */
8276 |     export type MonotonicTime = number;
8277 |     /**
8278 |      * Request / response headers as keys / values of JSON object.
8279 |      */
8280 |     export type Headers = { [key: string]: string };
8281 |     /**
8282 |      * The underlying connection technology that the browser is supposedly using.
8283 |      */
8284 |     export type ConnectionType = "none"|"cellular2g"|"cellular3g"|"cellular4g"|"bluetooth"|"ethernet"|"wifi"|"wimax"|"other";
8285 |     /**
8286 |      * Represents the cookie's 'SameSite' status:
8287 | https://tools.ietf.org/html/draft-west-first-party-cookies
8288 |      */
8289 |     export type CookieSameSite = "Strict"|"Lax"|"None";
8290 |     /**
8291 |      * Represents the cookie's 'Priority' status:
8292 | https://tools.ietf.org/html/draft-west-cookie-priority-00
8293 |      */
8294 |     export type CookiePriority = "Low"|"Medium"|"High";
8295 |     /**
8296 |      * Represents the source scheme of the origin that originally set the cookie.
8297 | A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme.
8298 | This is a temporary ability and it will be removed in the future.
8299 |      */
8300 |     export type CookieSourceScheme = "Unset"|"NonSecure"|"Secure";
8301 |     /**
8302 |      * Timing information for the request.
8303 |      */
8304 |     export interface ResourceTiming {
8305 |       /**
8306 |        * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
8307 | milliseconds relatively to this requestTime.
8308 |        */
8309 |       requestTime: number;
8310 |       /**
8311 |        * Started resolving proxy.
8312 |        */
8313 |       proxyStart: number;
8314 |       /**
8315 |        * Finished resolving proxy.
8316 |        */
8317 |       proxyEnd: number;
8318 |       /**
8319 |        * Started DNS address resolve.
8320 |        */
8321 |       dnsStart: number;
8322 |       /**
8323 |        * Finished DNS address resolve.
8324 |        */
8325 |       dnsEnd: number;
8326 |       /**
8327 |        * Started connecting to the remote host.
8328 |        */
8329 |       connectStart: number;
8330 |       /**
8331 |        * Connected to the remote host.
8332 |        */
8333 |       connectEnd: number;
8334 |       /**
8335 |        * Started SSL handshake.
8336 |        */
8337 |       sslStart: number;
8338 |       /**
8339 |        * Finished SSL handshake.
8340 |        */
8341 |       sslEnd: number;
8342 |       /**
8343 |        * Started running ServiceWorker.
8344 |        */
8345 |       workerStart: number;
8346 |       /**
8347 |        * Finished Starting ServiceWorker.
8348 |        */
8349 |       workerReady: number;
8350 |       /**
8351 |        * Started fetch event.
8352 |        */
8353 |       workerFetchStart: number;
8354 |       /**
8355 |        * Settled fetch event respondWith promise.
8356 |        */
8357 |       workerRespondWithSettled: number;
8358 |       /**
8359 |        * Started ServiceWorker static routing source evaluation.
8360 |        */
8361 |       workerRouterEvaluationStart?: number;
8362 |       /**
8363 |        * Started cache lookup when the source was evaluated to `cache`.
8364 |        */
8365 |       workerCacheLookupStart?: number;
8366 |       /**
8367 |        * Started sending request.
8368 |        */
8369 |       sendStart: number;
8370 |       /**
8371 |        * Finished sending request.
8372 |        */
8373 |       sendEnd: number;
8374 |       /**
8375 |        * Time the server started pushing request.
8376 |        */
8377 |       pushStart: number;
8378 |       /**
8379 |        * Time the server finished pushing request.
8380 |        */
8381 |       pushEnd: number;
8382 |       /**
8383 |        * Started receiving response headers.
8384 |        */
8385 |       receiveHeadersStart: number;
8386 |       /**
8387 |        * Finished receiving response headers.
8388 |        */
8389 |       receiveHeadersEnd: number;
8390 |     }
8391 |     /**
8392 |      * Loading priority of a resource request.
8393 |      */
8394 |     export type ResourcePriority = "VeryLow"|"Low"|"Medium"|"High"|"VeryHigh";
8395 |     /**
8396 |      * Post data entry for HTTP request
8397 |      */
8398 |     export interface PostDataEntry {
8399 |       bytes?: binary;
8400 |     }
8401 |     /**
8402 |      * HTTP request data.
8403 |      */
8404 |     export interface Request {
8405 |       /**
8406 |        * Request URL (without fragment).
8407 |        */
8408 |       url: string;
8409 |       /**
8410 |        * Fragment of the requested URL starting with hash, if present.
8411 |        */
8412 |       urlFragment?: string;
8413 |       /**
8414 |        * HTTP request method.
8415 |        */
8416 |       method: string;
8417 |       /**
8418 |        * HTTP request headers.
8419 |        */
8420 |       headers: Headers;
8421 |       /**
8422 |        * HTTP POST request data.
8423 | Use postDataEntries instead.
8424 |        */
8425 |       postData?: string;
8426 |       /**
8427 |        * True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
8428 |        */
8429 |       hasPostData?: boolean;
8430 |       /**
8431 |        * Request body elements (post data broken into individual entries).
8432 |        */
8433 |       postDataEntries?: PostDataEntry[];
8434 |       /**
8435 |        * The mixed content type of the request.
8436 |        */
8437 |       mixedContentType?: Security.MixedContentType;
8438 |       /**
8439 |        * Priority of the resource request at the time request is sent.
8440 |        */
8441 |       initialPriority: ResourcePriority;
8442 |       /**
8443 |        * The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
8444 |        */
8445 |       referrerPolicy: "unsafe-url"|"no-referrer-when-downgrade"|"no-referrer"|"origin"|"origin-when-cross-origin"|"same-origin"|"strict-origin"|"strict-origin-when-cross-origin";
8446 |       /**
8447 |        * Whether is loaded via link preload.
8448 |        */
8449 |       isLinkPreload?: boolean;
8450 |       /**
8451 |        * Set for requests when the TrustToken API is used. Contains the parameters
8452 | passed by the developer (e.g. via "fetch") as understood by the backend.
8453 |        */
8454 |       trustTokenParams?: TrustTokenParams;
8455 |       /**
8456 |        * True if this resource request is considered to be the 'same site' as the
8457 | request corresponding to the main frame.
8458 |        */
8459 |       isSameSite?: boolean;
8460 |     }
8461 |     /**
8462 |      * Details of a signed certificate timestamp (SCT).
8463 |      */
8464 |     export interface SignedCertificateTimestamp {
8465 |       /**
8466 |        * Validation status.
8467 |        */
8468 |       status: string;
8469 |       /**
8470 |        * Origin.
8471 |        */
8472 |       origin: string;
8473 |       /**
8474 |        * Log name / description.
8475 |        */
8476 |       logDescription: string;
8477 |       /**
8478 |        * Log ID.
8479 |        */
8480 |       logId: string;
8481 |       /**
8482 |        * Issuance date. Unlike TimeSinceEpoch, this contains the number of
8483 | milliseconds since January 1, 1970, UTC, not the number of seconds.
8484 |        */
8485 |       timestamp: number;
8486 |       /**
8487 |        * Hash algorithm.
8488 |        */
8489 |       hashAlgorithm: string;
8490 |       /**
8491 |        * Signature algorithm.
8492 |        */
8493 |       signatureAlgorithm: string;
8494 |       /**
8495 |        * Signature data.
8496 |        */
8497 |       signatureData: string;
8498 |     }
8499 |     /**
8500 |      * Security details about a request.
8501 |      */
8502 |     export interface SecurityDetails {
8503 |       /**
8504 |        * Protocol name (e.g. "TLS 1.2" or "QUIC").
8505 |        */
8506 |       protocol: string;
8507 |       /**
8508 |        * Key Exchange used by the connection, or the empty string if not applicable.
8509 |        */
8510 |       keyExchange: string;
8511 |       /**
8512 |        * (EC)DH group used by the connection, if applicable.
8513 |        */
8514 |       keyExchangeGroup?: string;
8515 |       /**
8516 |        * Cipher name.
8517 |        */
8518 |       cipher: string;
8519 |       /**
8520 |        * TLS MAC. Note that AEAD ciphers do not have separate MACs.
8521 |        */
8522 |       mac?: string;
8523 |       /**
8524 |        * Certificate ID value.
8525 |        */
8526 |       certificateId: Security.CertificateId;
8527 |       /**
8528 |        * Certificate subject name.
8529 |        */
8530 |       subjectName: string;
8531 |       /**
8532 |        * Subject Alternative Name (SAN) DNS names and IP addresses.
8533 |        */
8534 |       sanList: string[];
8535 |       /**
8536 |        * Name of the issuing CA.
8537 |        */
8538 |       issuer: string;
8539 |       /**
8540 |        * Certificate valid from date.
8541 |        */
8542 |       validFrom: TimeSinceEpoch;
8543 |       /**
8544 |        * Certificate valid to (expiration) date
8545 |        */
8546 |       validTo: TimeSinceEpoch;
8547 |       /**
8548 |        * List of signed certificate timestamps (SCTs).
8549 |        */
8550 |       signedCertificateTimestampList: SignedCertificateTimestamp[];
8551 |       /**
8552 |        * Whether the request complied with Certificate Transparency policy
8553 |        */
8554 |       certificateTransparencyCompliance: CertificateTransparencyCompliance;
8555 |       /**
8556 |        * The signature algorithm used by the server in the TLS server signature,
8557 | represented as a TLS SignatureScheme code point. Omitted if not
8558 | applicable or not known.
8559 |        */
8560 |       serverSignatureAlgorithm?: number;
8561 |       /**
8562 |        * Whether the connection used Encrypted ClientHello
8563 |        */
8564 |       encryptedClientHello: boolean;
8565 |     }
8566 |     /**
8567 |      * Whether the request complied with Certificate Transparency policy.
8568 |      */
8569 |     export type CertificateTransparencyCompliance = "unknown"|"not-compliant"|"compliant";
8570 |     /**
8571 |      * The reason why request was blocked.
8572 |      */
8573 |     export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-origin-after-defaulted-to-same-origin-by-dip"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"|"corp-not-same-site";
8574 |     /**
8575 |      * The reason why request was blocked.
8576 |      */
8577 |     export type CorsError = "DisallowedByMode"|"InvalidResponse"|"WildcardOriginNotAllowed"|"MissingAllowOriginHeader"|"MultipleAllowOriginValues"|"InvalidAllowOriginValue"|"AllowOriginMismatch"|"InvalidAllowCredentials"|"CorsDisabledScheme"|"PreflightInvalidStatus"|"PreflightDisallowedRedirect"|"PreflightWildcardOriginNotAllowed"|"PreflightMissingAllowOriginHeader"|"PreflightMultipleAllowOriginValues"|"PreflightInvalidAllowOriginValue"|"PreflightAllowOriginMismatch"|"PreflightInvalidAllowCredentials"|"PreflightMissingAllowExternal"|"PreflightInvalidAllowExternal"|"PreflightMissingAllowPrivateNetwork"|"PreflightInvalidAllowPrivateNetwork"|"InvalidAllowMethodsPreflightResponse"|"InvalidAllowHeadersPreflightResponse"|"MethodDisallowedByPreflightResponse"|"HeaderDisallowedByPreflightResponse"|"RedirectContainsCredentials"|"InsecurePrivateNetwork"|"InvalidPrivateNetworkAccess"|"UnexpectedPrivateNetworkAccess"|"NoCorsRedirectModeNotFollow"|"PreflightMissingPrivateNetworkAccessId"|"PreflightMissingPrivateNetworkAccessName"|"PrivateNetworkAccessPermissionUnavailable"|"PrivateNetworkAccessPermissionDenied";
8578 |     export interface CorsErrorStatus {
8579 |       corsError: CorsError;
8580 |       failedParameter: string;
8581 |     }
8582 |     /**
8583 |      * Source of serviceworker response.
8584 |      */
8585 |     export type ServiceWorkerResponseSource = "cache-storage"|"http-cache"|"fallback-code"|"network";
8586 |     /**
8587 |      * Determines what type of Trust Token operation is executed and
8588 | depending on the type, some additional parameters. The values
8589 | are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
8590 |      */
8591 |     export interface TrustTokenParams {
8592 |       operation: TrustTokenOperationType;
8593 |       /**
8594 |        * Only set for "token-redemption" operation and determine whether
8595 | to request a fresh SRR or use a still valid cached SRR.
8596 |        */
8597 |       refreshPolicy: "UseCached"|"Refresh";
8598 |       /**
8599 |        * Origins of issuers from whom to request tokens or redemption
8600 | records.
8601 |        */
8602 |       issuers?: string[];
8603 |     }
8604 |     export type TrustTokenOperationType = "Issuance"|"Redemption"|"Signing";
8605 |     /**
8606 |      * The reason why Chrome uses a specific transport protocol for HTTP semantics.
8607 |      */
8608 |     export type AlternateProtocolUsage = "alternativeJobWonWithoutRace"|"alternativeJobWonRace"|"mainJobWonRace"|"mappingMissing"|"broken"|"dnsAlpnH3JobWonWithoutRace"|"dnsAlpnH3JobWonRace"|"unspecifiedReason";
8609 |     /**
8610 |      * Source of service worker router.
8611 |      */
8612 |     export type ServiceWorkerRouterSource = "network"|"cache"|"fetch-event"|"race-network-and-fetch-handler";
8613 |     export interface ServiceWorkerRouterInfo {
8614 |       /**
8615 |        * ID of the rule matched. If there is a matched rule, this field will
8616 | be set, otherwiser no value will be set.
8617 |        */
8618 |       ruleIdMatched?: number;
8619 |       /**
8620 |        * The router source of the matched rule. If there is a matched rule, this
8621 | field will be set, otherwise no value will be set.
8622 |        */
8623 |       matchedSourceType?: ServiceWorkerRouterSource;
8624 |       /**
8625 |        * The actual router source used.
8626 |        */
8627 |       actualSourceType?: ServiceWorkerRouterSource;
8628 |     }
8629 |     /**
8630 |      * HTTP response data.
8631 |      */
8632 |     export interface Response {
8633 |       /**
8634 |        * Response URL. This URL can be different from CachedResource.url in case of redirect.
8635 |        */
8636 |       url: string;
8637 |       /**
8638 |        * HTTP response status code.
8639 |        */
8640 |       status: number;
8641 |       /**
8642 |        * HTTP response status text.
8643 |        */
8644 |       statusText: string;
8645 |       /**
8646 |        * HTTP response headers.
8647 |        */
8648 |       headers: Headers;
8649 |       /**
8650 |        * HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
8651 |        */
8652 |       headersText?: string;
8653 |       /**
8654 |        * Resource mimeType as determined by the browser.
8655 |        */
8656 |       mimeType: string;
8657 |       /**
8658 |        * Resource charset as determined by the browser (if applicable).
8659 |        */
8660 |       charset: string;
8661 |       /**
8662 |        * Refined HTTP request headers that were actually transmitted over the network.
8663 |        */
8664 |       requestHeaders?: Headers;
8665 |       /**
8666 |        * HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
8667 |        */
8668 |       requestHeadersText?: string;
8669 |       /**
8670 |        * Specifies whether physical connection was actually reused for this request.
8671 |        */
8672 |       connectionReused: boolean;
8673 |       /**
8674 |        * Physical connection id that was actually used for this request.
8675 |        */
8676 |       connectionId: number;
8677 |       /**
8678 |        * Remote IP address.
8679 |        */
8680 |       remoteIPAddress?: string;
8681 |       /**
8682 |        * Remote port.
8683 |        */
8684 |       remotePort?: number;
8685 |       /**
8686 |        * Specifies that the request was served from the disk cache.
8687 |        */
8688 |       fromDiskCache?: boolean;
8689 |       /**
8690 |        * Specifies that the request was served from the ServiceWorker.
8691 |        */
8692 |       fromServiceWorker?: boolean;
8693 |       /**
8694 |        * Specifies that the request was served from the prefetch cache.
8695 |        */
8696 |       fromPrefetchCache?: boolean;
8697 |       /**
8698 |        * Specifies that the request was served from the prefetch cache.
8699 |        */
8700 |       fromEarlyHints?: boolean;
8701 |       /**
8702 |        * Information about how ServiceWorker Static Router API was used. If this
8703 | field is set with `matchedSourceType` field, a matching rule is found.
8704 | If this field is set without `matchedSource`, no matching rule is found.
8705 | Otherwise, the API is not used.
8706 |        */
8707 |       serviceWorkerRouterInfo?: ServiceWorkerRouterInfo;
8708 |       /**
8709 |        * Total number of bytes received for this request so far.
8710 |        */
8711 |       encodedDataLength: number;
8712 |       /**
8713 |        * Timing information for the given request.
8714 |        */
8715 |       timing?: ResourceTiming;
8716 |       /**
8717 |        * Response source of response from ServiceWorker.
8718 |        */
8719 |       serviceWorkerResponseSource?: ServiceWorkerResponseSource;
8720 |       /**
8721 |        * The time at which the returned response was generated.
8722 |        */
8723 |       responseTime?: TimeSinceEpoch;
8724 |       /**
8725 |        * Cache Storage Cache Name.
8726 |        */
8727 |       cacheStorageCacheName?: string;
8728 |       /**
8729 |        * Protocol used to fetch this request.
8730 |        */
8731 |       protocol?: string;
8732 |       /**
8733 |        * The reason why Chrome uses a specific transport protocol for HTTP semantics.
8734 |        */
8735 |       alternateProtocolUsage?: AlternateProtocolUsage;
8736 |       /**
8737 |        * Security state of the request resource.
8738 |        */
8739 |       securityState: Security.SecurityState;
8740 |       /**
8741 |        * Security details for the request.
8742 |        */
8743 |       securityDetails?: SecurityDetails;
8744 |     }
8745 |     /**
8746 |      * WebSocket request data.
8747 |      */
8748 |     export interface WebSocketRequest {
8749 |       /**
8750 |        * HTTP request headers.
8751 |        */
8752 |       headers: Headers;
8753 |     }
8754 |     /**
8755 |      * WebSocket response data.
8756 |      */
8757 |     export interface WebSocketResponse {
8758 |       /**
8759 |        * HTTP response status code.
8760 |        */
8761 |       status: number;
8762 |       /**
8763 |        * HTTP response status text.
8764 |        */
8765 |       statusText: string;
8766 |       /**
8767 |        * HTTP response headers.
8768 |        */
8769 |       headers: Headers;
8770 |       /**
8771 |        * HTTP response headers text.
8772 |        */
8773 |       headersText?: string;
8774 |       /**
8775 |        * HTTP request headers.
8776 |        */
8777 |       requestHeaders?: Headers;
8778 |       /**
8779 |        * HTTP request headers text.
8780 |        */
8781 |       requestHeadersText?: string;
8782 |     }
8783 |     /**
8784 |      * WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
8785 |      */
8786 |     export interface WebSocketFrame {
8787 |       /**
8788 |        * WebSocket message opcode.
8789 |        */
8790 |       opcode: number;
8791 |       /**
8792 |        * WebSocket message mask.
8793 |        */
8794 |       mask: boolean;
8795 |       /**
8796 |        * WebSocket message payload data.
8797 | If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
8798 | If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
8799 |        */
8800 |       payloadData: string;
8801 |     }
8802 |     /**
8803 |      * Information about the cached resource.
8804 |      */
8805 |     export interface CachedResource {
8806 |       /**
8807 |        * Resource URL. This is the url of the original network request.
8808 |        */
8809 |       url: string;
8810 |       /**
8811 |        * Type of this resource.
8812 |        */
8813 |       type: ResourceType;
8814 |       /**
8815 |        * Cached response data.
8816 |        */
8817 |       response?: Response;
8818 |       /**
8819 |        * Cached response body size.
8820 |        */
8821 |       bodySize: number;
8822 |     }
8823 |     /**
8824 |      * Information about the request initiator.
8825 |      */
8826 |     export interface Initiator {
8827 |       /**
8828 |        * Type of this initiator.
8829 |        */
8830 |       type: "parser"|"script"|"preload"|"SignedExchange"|"preflight"|"other";
8831 |       /**
8832 |        * Initiator JavaScript stack trace, set for Script only.
8833 |        */
8834 |       stack?: Runtime.StackTrace;
8835 |       /**
8836 |        * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
8837 |        */
8838 |       url?: string;
8839 |       /**
8840 |        * Initiator line number, set for Parser type or for Script type (when script is importing
8841 | module) (0-based).
8842 |        */
8843 |       lineNumber?: number;
8844 |       /**
8845 |        * Initiator column number, set for Parser type or for Script type (when script is importing
8846 | module) (0-based).
8847 |        */
8848 |       columnNumber?: number;
8849 |       /**
8850 |        * Set if another request triggered this request (e.g. preflight).
8851 |        */
8852 |       requestId?: RequestId;
8853 |     }
8854 |     /**
8855 |      * cookiePartitionKey object
8856 | The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
8857 |      */
8858 |     export interface CookiePartitionKey {
8859 |       /**
8860 |        * The site of the top-level URL the browser was visiting at the start
8861 | of the request to the endpoint that set the cookie.
8862 |        */
8863 |       topLevelSite: string;
8864 |       /**
8865 |        * Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
8866 |        */
8867 |       hasCrossSiteAncestor: boolean;
8868 |     }
8869 |     /**
8870 |      * Cookie object
8871 |      */
8872 |     export interface Cookie {
8873 |       /**
8874 |        * Cookie name.
8875 |        */
8876 |       name: string;
8877 |       /**
8878 |        * Cookie value.
8879 |        */
8880 |       value: string;
8881 |       /**
8882 |        * Cookie domain.
8883 |        */
8884 |       domain: string;
8885 |       /**
8886 |        * Cookie path.
8887 |        */
8888 |       path: string;
8889 |       /**
8890 |        * Cookie expiration date as the number of seconds since the UNIX epoch.
8891 |        */
8892 |       expires: number;
8893 |       /**
8894 |        * Cookie size.
8895 |        */
8896 |       size: number;
8897 |       /**
8898 |        * True if cookie is http-only.
8899 |        */
8900 |       httpOnly: boolean;
8901 |       /**
8902 |        * True if cookie is secure.
8903 |        */
8904 |       secure: boolean;
8905 |       /**
8906 |        * True in case of session cookie.
8907 |        */
8908 |       session: boolean;
8909 |       /**
8910 |        * Cookie SameSite type.
8911 |        */
8912 |       sameSite?: CookieSameSite;
8913 |       /**
8914 |        * Cookie Priority
8915 |        */
8916 |       priority: CookiePriority;
8917 |       /**
8918 |        * True if cookie is SameParty.
8919 |        */
8920 |       sameParty: boolean;
8921 |       /**
8922 |        * Cookie source scheme type.
8923 |        */
8924 |       sourceScheme: CookieSourceScheme;
8925 |       /**
8926 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
8927 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
8928 | This is a temporary ability and it will be removed in the future.
8929 |        */
8930 |       sourcePort: number;
8931 |       /**
8932 |        * Cookie partition key.
8933 |        */
8934 |       partitionKey?: CookiePartitionKey;
8935 |       /**
8936 |        * True if cookie partition key is opaque.
8937 |        */
8938 |       partitionKeyOpaque?: boolean;
8939 |     }
8940 |     /**
8941 |      * Types of reasons why a cookie may not be stored from a response.
8942 |      */
8943 |     export type SetCookieBlockedReason = "SecureOnly"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"ThirdPartyPhaseout"|"ThirdPartyBlockedInFirstPartySet"|"SyntaxError"|"SchemeNotSupported"|"OverwriteSecure"|"InvalidDomain"|"InvalidPrefix"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"|"SamePartyConflictsWithOtherAttributes"|"NameValuePairExceedsMaxSize"|"DisallowedCharacter"|"NoCookieContent";
8944 |     /**
8945 |      * Types of reasons why a cookie may not be sent with a request.
8946 |      */
8947 |     export type CookieBlockedReason = "SecureOnly"|"NotOnPath"|"DomainMismatch"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"ThirdPartyPhaseout"|"ThirdPartyBlockedInFirstPartySet"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"|"NameValuePairExceedsMaxSize";
8948 |     /**
8949 |      * Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
8950 |      */
8951 |     export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TopLevelTPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"Scheme";
8952 |     /**
8953 |      * A cookie which was not stored from a response with the corresponding reason.
8954 |      */
8955 |     export interface BlockedSetCookieWithReason {
8956 |       /**
8957 |        * The reason(s) this cookie was blocked.
8958 |        */
8959 |       blockedReasons: SetCookieBlockedReason[];
8960 |       /**
8961 |        * The string representing this individual cookie as it would appear in the header.
8962 | This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
8963 |        */
8964 |       cookieLine: string;
8965 |       /**
8966 |        * The cookie object which represents the cookie which was not stored. It is optional because
8967 | sometimes complete cookie information is not available, such as in the case of parsing
8968 | errors.
8969 |        */
8970 |       cookie?: Cookie;
8971 |     }
8972 |     /**
8973 |      * A cookie should have been blocked by 3PCD but is exempted and stored from a response with the
8974 | corresponding reason. A cookie could only have at most one exemption reason.
8975 |      */
8976 |     export interface ExemptedSetCookieWithReason {
8977 |       /**
8978 |        * The reason the cookie was exempted.
8979 |        */
8980 |       exemptionReason: CookieExemptionReason;
8981 |       /**
8982 |        * The string representing this individual cookie as it would appear in the header.
8983 |        */
8984 |       cookieLine: string;
8985 |       /**
8986 |        * The cookie object representing the cookie.
8987 |        */
8988 |       cookie: Cookie;
8989 |     }
8990 |     /**
8991 |      * A cookie associated with the request which may or may not be sent with it.
8992 | Includes the cookies itself and reasons for blocking or exemption.
8993 |      */
8994 |     export interface AssociatedCookie {
8995 |       /**
8996 |        * The cookie object representing the cookie which was not sent.
8997 |        */
8998 |       cookie: Cookie;
8999 |       /**
9000 |        * The reason(s) the cookie was blocked. If empty means the cookie is included.
9001 |        */
9002 |       blockedReasons: CookieBlockedReason[];
9003 |       /**
9004 |        * The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could
9005 | only have at most one exemption reason.
9006 |        */
9007 |       exemptionReason?: CookieExemptionReason;
9008 |     }
9009 |     /**
9010 |      * Cookie parameter object
9011 |      */
9012 |     export interface CookieParam {
9013 |       /**
9014 |        * Cookie name.
9015 |        */
9016 |       name: string;
9017 |       /**
9018 |        * Cookie value.
9019 |        */
9020 |       value: string;
9021 |       /**
9022 |        * The request-URI to associate with the setting of the cookie. This value can affect the
9023 | default domain, path, source port, and source scheme values of the created cookie.
9024 |        */
9025 |       url?: string;
9026 |       /**
9027 |        * Cookie domain.
9028 |        */
9029 |       domain?: string;
9030 |       /**
9031 |        * Cookie path.
9032 |        */
9033 |       path?: string;
9034 |       /**
9035 |        * True if cookie is secure.
9036 |        */
9037 |       secure?: boolean;
9038 |       /**
9039 |        * True if cookie is http-only.
9040 |        */
9041 |       httpOnly?: boolean;
9042 |       /**
9043 |        * Cookie SameSite type.
9044 |        */
9045 |       sameSite?: CookieSameSite;
9046 |       /**
9047 |        * Cookie expiration date, session cookie if not set
9048 |        */
9049 |       expires?: TimeSinceEpoch;
9050 |       /**
9051 |        * Cookie Priority.
9052 |        */
9053 |       priority?: CookiePriority;
9054 |       /**
9055 |        * True if cookie is SameParty.
9056 |        */
9057 |       sameParty?: boolean;
9058 |       /**
9059 |        * Cookie source scheme type.
9060 |        */
9061 |       sourceScheme?: CookieSourceScheme;
9062 |       /**
9063 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
9064 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
9065 | This is a temporary ability and it will be removed in the future.
9066 |        */
9067 |       sourcePort?: number;
9068 |       /**
9069 |        * Cookie partition key. If not set, the cookie will be set as not partitioned.
9070 |        */
9071 |       partitionKey?: CookiePartitionKey;
9072 |     }
9073 |     /**
9074 |      * Authorization challenge for HTTP status code 401 or 407.
9075 |      */
9076 |     export interface AuthChallenge {
9077 |       /**
9078 |        * Source of the authentication challenge.
9079 |        */
9080 |       source?: "Server"|"Proxy";
9081 |       /**
9082 |        * Origin of the challenger.
9083 |        */
9084 |       origin: string;
9085 |       /**
9086 |        * The authentication scheme used, such as basic or digest
9087 |        */
9088 |       scheme: string;
9089 |       /**
9090 |        * The realm of the challenge. May be empty.
9091 |        */
9092 |       realm: string;
9093 |     }
9094 |     /**
9095 |      * Response to an AuthChallenge.
9096 |      */
9097 |     export interface AuthChallengeResponse {
9098 |       /**
9099 |        * The decision on what to do in response to the authorization challenge.  Default means
9100 | deferring to the default behavior of the net stack, which will likely either the Cancel
9101 | authentication or display a popup dialog box.
9102 |        */
9103 |       response: "Default"|"CancelAuth"|"ProvideCredentials";
9104 |       /**
9105 |        * The username to provide, possibly empty. Should only be set if response is
9106 | ProvideCredentials.
9107 |        */
9108 |       username?: string;
9109 |       /**
9110 |        * The password to provide, possibly empty. Should only be set if response is
9111 | ProvideCredentials.
9112 |        */
9113 |       password?: string;
9114 |     }
9115 |     /**
9116 |      * Stages of the interception to begin intercepting. Request will intercept before the request is
9117 | sent. Response will intercept after the response is received.
9118 |      */
9119 |     export type InterceptionStage = "Request"|"HeadersReceived";
9120 |     /**
9121 |      * Request pattern for interception.
9122 |      */
9123 |     export interface RequestPattern {
9124 |       /**
9125 |        * Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is
9126 | backslash. Omitting is equivalent to `"*"`.
9127 |        */
9128 |       urlPattern?: string;
9129 |       /**
9130 |        * If set, only requests for matching resource types will be intercepted.
9131 |        */
9132 |       resourceType?: ResourceType;
9133 |       /**
9134 |        * Stage at which to begin intercepting requests. Default is Request.
9135 |        */
9136 |       interceptionStage?: InterceptionStage;
9137 |     }
9138 |     /**
9139 |      * Information about a signed exchange signature.
9140 | https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
9141 |      */
9142 |     export interface SignedExchangeSignature {
9143 |       /**
9144 |        * Signed exchange signature label.
9145 |        */
9146 |       label: string;
9147 |       /**
9148 |        * The hex string of signed exchange signature.
9149 |        */
9150 |       signature: string;
9151 |       /**
9152 |        * Signed exchange signature integrity.
9153 |        */
9154 |       integrity: string;
9155 |       /**
9156 |        * Signed exchange signature cert Url.
9157 |        */
9158 |       certUrl?: string;
9159 |       /**
9160 |        * The hex string of signed exchange signature cert sha256.
9161 |        */
9162 |       certSha256?: string;
9163 |       /**
9164 |        * Signed exchange signature validity Url.
9165 |        */
9166 |       validityUrl: string;
9167 |       /**
9168 |        * Signed exchange signature date.
9169 |        */
9170 |       date: number;
9171 |       /**
9172 |        * Signed exchange signature expires.
9173 |        */
9174 |       expires: number;
9175 |       /**
9176 |        * The encoded certificates.
9177 |        */
9178 |       certificates?: string[];
9179 |     }
9180 |     /**
9181 |      * Information about a signed exchange header.
9182 | https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
9183 |      */
9184 |     export interface SignedExchangeHeader {
9185 |       /**
9186 |        * Signed exchange request URL.
9187 |        */
9188 |       requestUrl: string;
9189 |       /**
9190 |        * Signed exchange response code.
9191 |        */
9192 |       responseCode: number;
9193 |       /**
9194 |        * Signed exchange response headers.
9195 |        */
9196 |       responseHeaders: Headers;
9197 |       /**
9198 |        * Signed exchange response signature.
9199 |        */
9200 |       signatures: SignedExchangeSignature[];
9201 |       /**
9202 |        * Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.
9203 |        */
9204 |       headerIntegrity: string;
9205 |     }
9206 |     /**
9207 |      * Field type for a signed exchange related error.
9208 |      */
9209 |     export type SignedExchangeErrorField = "signatureSig"|"signatureIntegrity"|"signatureCertUrl"|"signatureCertSha256"|"signatureValidityUrl"|"signatureTimestamps";
9210 |     /**
9211 |      * Information about a signed exchange response.
9212 |      */
9213 |     export interface SignedExchangeError {
9214 |       /**
9215 |        * Error message.
9216 |        */
9217 |       message: string;
9218 |       /**
9219 |        * The index of the signature which caused the error.
9220 |        */
9221 |       signatureIndex?: number;
9222 |       /**
9223 |        * The field which caused the error.
9224 |        */
9225 |       errorField?: SignedExchangeErrorField;
9226 |     }
9227 |     /**
9228 |      * Information about a signed exchange response.
9229 |      */
9230 |     export interface SignedExchangeInfo {
9231 |       /**
9232 |        * The outer response of signed HTTP exchange which was received from network.
9233 |        */
9234 |       outerResponse: Response;
9235 |       /**
9236 |        * Information about the signed exchange header.
9237 |        */
9238 |       header?: SignedExchangeHeader;
9239 |       /**
9240 |        * Security details for the signed exchange header.
9241 |        */
9242 |       securityDetails?: SecurityDetails;
9243 |       /**
9244 |        * Errors occurred while handling the signed exchange.
9245 |        */
9246 |       errors?: SignedExchangeError[];
9247 |     }
9248 |     /**
9249 |      * List of content encodings supported by the backend.
9250 |      */
9251 |     export type ContentEncoding = "deflate"|"gzip"|"br"|"zstd";
9252 |     export type PrivateNetworkRequestPolicy = "Allow"|"BlockFromInsecureToMorePrivate"|"WarnFromInsecureToMorePrivate"|"PreflightBlock"|"PreflightWarn";
9253 |     export type IPAddressSpace = "Local"|"Private"|"Public"|"Unknown";
9254 |     export interface ConnectTiming {
9255 |       /**
9256 |        * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
9257 | milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for
9258 | the same request (but not for redirected requests).
9259 |        */
9260 |       requestTime: number;
9261 |     }
9262 |     export interface ClientSecurityState {
9263 |       initiatorIsSecureContext: boolean;
9264 |       initiatorIPAddressSpace: IPAddressSpace;
9265 |       privateNetworkRequestPolicy: PrivateNetworkRequestPolicy;
9266 |     }
9267 |     export type CrossOriginOpenerPolicyValue = "SameOrigin"|"SameOriginAllowPopups"|"RestrictProperties"|"UnsafeNone"|"SameOriginPlusCoep"|"RestrictPropertiesPlusCoep"|"NoopenerAllowPopups";
9268 |     export interface CrossOriginOpenerPolicyStatus {
9269 |       value: CrossOriginOpenerPolicyValue;
9270 |       reportOnlyValue: CrossOriginOpenerPolicyValue;
9271 |       reportingEndpoint?: string;
9272 |       reportOnlyReportingEndpoint?: string;
9273 |     }
9274 |     export type CrossOriginEmbedderPolicyValue = "None"|"Credentialless"|"RequireCorp";
9275 |     export interface CrossOriginEmbedderPolicyStatus {
9276 |       value: CrossOriginEmbedderPolicyValue;
9277 |       reportOnlyValue: CrossOriginEmbedderPolicyValue;
9278 |       reportingEndpoint?: string;
9279 |       reportOnlyReportingEndpoint?: string;
9280 |     }
9281 |     export type ContentSecurityPolicySource = "HTTP"|"Meta";
9282 |     export interface ContentSecurityPolicyStatus {
9283 |       effectiveDirectives: string;
9284 |       isEnforced: boolean;
9285 |       source: ContentSecurityPolicySource;
9286 |     }
9287 |     export interface SecurityIsolationStatus {
9288 |       coop?: CrossOriginOpenerPolicyStatus;
9289 |       coep?: CrossOriginEmbedderPolicyStatus;
9290 |       csp?: ContentSecurityPolicyStatus[];
9291 |     }
9292 |     /**
9293 |      * The status of a Reporting API report.
9294 |      */
9295 |     export type ReportStatus = "Queued"|"Pending"|"MarkedForRemoval"|"Success";
9296 |     export type ReportId = string;
9297 |     /**
9298 |      * An object representing a report generated by the Reporting API.
9299 |      */
9300 |     export interface ReportingApiReport {
9301 |       id: ReportId;
9302 |       /**
9303 |        * The URL of the document that triggered the report.
9304 |        */
9305 |       initiatorUrl: string;
9306 |       /**
9307 |        * The name of the endpoint group that should be used to deliver the report.
9308 |        */
9309 |       destination: string;
9310 |       /**
9311 |        * The type of the report (specifies the set of data that is contained in the report body).
9312 |        */
9313 |       type: string;
9314 |       /**
9315 |        * When the report was generated.
9316 |        */
9317 |       timestamp: Network.TimeSinceEpoch;
9318 |       /**
9319 |        * How many uploads deep the related request was.
9320 |        */
9321 |       depth: number;
9322 |       /**
9323 |        * The number of delivery attempts made so far, not including an active attempt.
9324 |        */
9325 |       completedAttempts: number;
9326 |       body: { [key: string]: string };
9327 |       status: ReportStatus;
9328 |     }
9329 |     export interface ReportingApiEndpoint {
9330 |       /**
9331 |        * The URL of the endpoint to which reports may be delivered.
9332 |        */
9333 |       url: string;
9334 |       /**
9335 |        * Name of the endpoint group.
9336 |        */
9337 |       groupName: string;
9338 |     }
9339 |     /**
9340 |      * An object providing the result of a network resource load.
9341 |      */
9342 |     export interface LoadNetworkResourcePageResult {
9343 |       success: boolean;
9344 |       /**
9345 |        * Optional values used for error reporting.
9346 |        */
9347 |       netError?: number;
9348 |       netErrorName?: string;
9349 |       httpStatusCode?: number;
9350 |       /**
9351 |        * If successful, one of the following two fields holds the result.
9352 |        */
9353 |       stream?: IO.StreamHandle;
9354 |       /**
9355 |        * Response headers.
9356 |        */
9357 |       headers?: Network.Headers;
9358 |     }
9359 |     /**
9360 |      * An options object that may be extended later to better support CORS,
9361 | CORB and streaming.
9362 |      */
9363 |     export interface LoadNetworkResourceOptions {
9364 |       disableCache: boolean;
9365 |       includeCredentials: boolean;
9366 |     }
9367 | 
9368 |     /**
9369 |      * Fired when data chunk was received over the network.
9370 |      */
9371 |     export type dataReceivedPayload = {
9372 |       /**
9373 |        * Request identifier.
9374 |        */
9375 |       requestId: RequestId;
9376 |       /**
9377 |        * Timestamp.
9378 |        */
9379 |       timestamp: MonotonicTime;
9380 |       /**
9381 |        * Data chunk length.
9382 |        */
9383 |       dataLength: number;
9384 |       /**
9385 |        * Actual bytes received (might be less than dataLength for compressed encodings).
9386 |        */
9387 |       encodedDataLength: number;
9388 |       /**
9389 |        * Data that was received.
9390 |        */
9391 |       data?: binary;
9392 |     }
9393 |     /**
9394 |      * Fired when EventSource message is received.
9395 |      */
9396 |     export type eventSourceMessageReceivedPayload = {
9397 |       /**
9398 |        * Request identifier.
9399 |        */
9400 |       requestId: RequestId;
9401 |       /**
9402 |        * Timestamp.
9403 |        */
9404 |       timestamp: MonotonicTime;
9405 |       /**
9406 |        * Message type.
9407 |        */
9408 |       eventName: string;
9409 |       /**
9410 |        * Message identifier.
9411 |        */
9412 |       eventId: string;
9413 |       /**
9414 |        * Message content.
9415 |        */
9416 |       data: string;
9417 |     }
9418 |     /**
9419 |      * Fired when HTTP request has failed to load.
9420 |      */
9421 |     export type loadingFailedPayload = {
9422 |       /**
9423 |        * Request identifier.
9424 |        */
9425 |       requestId: RequestId;
9426 |       /**
9427 |        * Timestamp.
9428 |        */
9429 |       timestamp: MonotonicTime;
9430 |       /**
9431 |        * Resource type.
9432 |        */
9433 |       type: ResourceType;
9434 |       /**
9435 |        * Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h
9436 |        */
9437 |       errorText: string;
9438 |       /**
9439 |        * True if loading was canceled.
9440 |        */
9441 |       canceled?: boolean;
9442 |       /**
9443 |        * The reason why loading was blocked, if any.
9444 |        */
9445 |       blockedReason?: BlockedReason;
9446 |       /**
9447 |        * The reason why loading was blocked by CORS, if any.
9448 |        */
9449 |       corsErrorStatus?: CorsErrorStatus;
9450 |     }
9451 |     /**
9452 |      * Fired when HTTP request has finished loading.
9453 |      */
9454 |     export type loadingFinishedPayload = {
9455 |       /**
9456 |        * Request identifier.
9457 |        */
9458 |       requestId: RequestId;
9459 |       /**
9460 |        * Timestamp.
9461 |        */
9462 |       timestamp: MonotonicTime;
9463 |       /**
9464 |        * Total number of bytes received for this request.
9465 |        */
9466 |       encodedDataLength: number;
9467 |     }
9468 |     /**
9469 |      * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
9470 | mocked.
9471 | Deprecated, use Fetch.requestPaused instead.
9472 |      */
9473 |     export type requestInterceptedPayload = {
9474 |       /**
9475 |        * Each request the page makes will have a unique id, however if any redirects are encountered
9476 | while processing that fetch, they will be reported with the same id as the original fetch.
9477 | Likewise if HTTP authentication is needed then the same fetch id will be used.
9478 |        */
9479 |       interceptionId: InterceptionId;
9480 |       request: Request;
9481 |       /**
9482 |        * The id of the frame that initiated the request.
9483 |        */
9484 |       frameId: Page.FrameId;
9485 |       /**
9486 |        * How the requested resource will be used.
9487 |        */
9488 |       resourceType: ResourceType;
9489 |       /**
9490 |        * Whether this is a navigation request, which can abort the navigation completely.
9491 |        */
9492 |       isNavigationRequest: boolean;
9493 |       /**
9494 |        * Set if the request is a navigation that will result in a download.
9495 | Only present after response is received from the server (i.e. HeadersReceived stage).
9496 |        */
9497 |       isDownload?: boolean;
9498 |       /**
9499 |        * Redirect location, only sent if a redirect was intercepted.
9500 |        */
9501 |       redirectUrl?: string;
9502 |       /**
9503 |        * Details of the Authorization Challenge encountered. If this is set then
9504 | continueInterceptedRequest must contain an authChallengeResponse.
9505 |        */
9506 |       authChallenge?: AuthChallenge;
9507 |       /**
9508 |        * Response error if intercepted at response stage or if redirect occurred while intercepting
9509 | request.
9510 |        */
9511 |       responseErrorReason?: ErrorReason;
9512 |       /**
9513 |        * Response code if intercepted at response stage or if redirect occurred while intercepting
9514 | request or auth retry occurred.
9515 |        */
9516 |       responseStatusCode?: number;
9517 |       /**
9518 |        * Response headers if intercepted at the response stage or if redirect occurred while
9519 | intercepting request or auth retry occurred.
9520 |        */
9521 |       responseHeaders?: Headers;
9522 |       /**
9523 |        * If the intercepted request had a corresponding requestWillBeSent event fired for it, then
9524 | this requestId will be the same as the requestId present in the requestWillBeSent event.
9525 |        */
9526 |       requestId?: RequestId;
9527 |     }
9528 |     /**
9529 |      * Fired if request ended up loading from cache.
9530 |      */
9531 |     export type requestServedFromCachePayload = {
9532 |       /**
9533 |        * Request identifier.
9534 |        */
9535 |       requestId: RequestId;
9536 |     }
9537 |     /**
9538 |      * Fired when page is about to send HTTP request.
9539 |      */
9540 |     export type requestWillBeSentPayload = {
9541 |       /**
9542 |        * Request identifier.
9543 |        */
9544 |       requestId: RequestId;
9545 |       /**
9546 |        * Loader identifier. Empty string if the request is fetched from worker.
9547 |        */
9548 |       loaderId: LoaderId;
9549 |       /**
9550 |        * URL of the document this request is loaded for.
9551 |        */
9552 |       documentURL: string;
9553 |       /**
9554 |        * Request data.
9555 |        */
9556 |       request: Request;
9557 |       /**
9558 |        * Timestamp.
9559 |        */
9560 |       timestamp: MonotonicTime;
9561 |       /**
9562 |        * Timestamp.
9563 |        */
9564 |       wallTime: TimeSinceEpoch;
9565 |       /**
9566 |        * Request initiator.
9567 |        */
9568 |       initiator: Initiator;
9569 |       /**
9570 |        * In the case that redirectResponse is populated, this flag indicates whether
9571 | requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted
9572 | for the request which was just redirected.
9573 |        */
9574 |       redirectHasExtraInfo: boolean;
9575 |       /**
9576 |        * Redirect response data.
9577 |        */
9578 |       redirectResponse?: Response;
9579 |       /**
9580 |        * Type of this resource.
9581 |        */
9582 |       type?: ResourceType;
9583 |       /**
9584 |        * Frame identifier.
9585 |        */
9586 |       frameId?: Page.FrameId;
9587 |       /**
9588 |        * Whether the request is initiated by a user gesture. Defaults to false.
9589 |        */
9590 |       hasUserGesture?: boolean;
9591 |     }
9592 |     /**
9593 |      * Fired when resource loading priority is changed
9594 |      */
9595 |     export type resourceChangedPriorityPayload = {
9596 |       /**
9597 |        * Request identifier.
9598 |        */
9599 |       requestId: RequestId;
9600 |       /**
9601 |        * New priority
9602 |        */
9603 |       newPriority: ResourcePriority;
9604 |       /**
9605 |        * Timestamp.
9606 |        */
9607 |       timestamp: MonotonicTime;
9608 |     }
9609 |     /**
9610 |      * Fired when a signed exchange was received over the network
9611 |      */
9612 |     export type signedExchangeReceivedPayload = {
9613 |       /**
9614 |        * Request identifier.
9615 |        */
9616 |       requestId: RequestId;
9617 |       /**
9618 |        * Information about the signed exchange response.
9619 |        */
9620 |       info: SignedExchangeInfo;
9621 |     }
9622 |     /**
9623 |      * Fired when HTTP response is available.
9624 |      */
9625 |     export type responseReceivedPayload = {
9626 |       /**
9627 |        * Request identifier.
9628 |        */
9629 |       requestId: RequestId;
9630 |       /**
9631 |        * Loader identifier. Empty string if the request is fetched from worker.
9632 |        */
9633 |       loaderId: LoaderId;
9634 |       /**
9635 |        * Timestamp.
9636 |        */
9637 |       timestamp: MonotonicTime;
9638 |       /**
9639 |        * Resource type.
9640 |        */
9641 |       type: ResourceType;
9642 |       /**
9643 |        * Response data.
9644 |        */
9645 |       response: Response;
9646 |       /**
9647 |        * Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be
9648 | or were emitted for this request.
9649 |        */
9650 |       hasExtraInfo: boolean;
9651 |       /**
9652 |        * Frame identifier.
9653 |        */
9654 |       frameId?: Page.FrameId;
9655 |     }
9656 |     /**
9657 |      * Fired when WebSocket is closed.
9658 |      */
9659 |     export type webSocketClosedPayload = {
9660 |       /**
9661 |        * Request identifier.
9662 |        */
9663 |       requestId: RequestId;
9664 |       /**
9665 |        * Timestamp.
9666 |        */
9667 |       timestamp: MonotonicTime;
9668 |     }
9669 |     /**
9670 |      * Fired upon WebSocket creation.
9671 |      */
9672 |     export type webSocketCreatedPayload = {
9673 |       /**
9674 |        * Request identifier.
9675 |        */
9676 |       requestId: RequestId;
9677 |       /**
9678 |        * WebSocket request URL.
9679 |        */
9680 |       url: string;
9681 |       /**
9682 |        * Request initiator.
9683 |        */
9684 |       initiator?: Initiator;
9685 |     }
9686 |     /**
9687 |      * Fired when WebSocket message error occurs.
9688 |      */
9689 |     export type webSocketFrameErrorPayload = {
9690 |       /**
9691 |        * Request identifier.
9692 |        */
9693 |       requestId: RequestId;
9694 |       /**
9695 |        * Timestamp.
9696 |        */
9697 |       timestamp: MonotonicTime;
9698 |       /**
9699 |        * WebSocket error message.
9700 |        */
9701 |       errorMessage: string;
9702 |     }
9703 |     /**
9704 |      * Fired when WebSocket message is received.
9705 |      */
9706 |     export type webSocketFrameReceivedPayload = {
9707 |       /**
9708 |        * Request identifier.
9709 |        */
9710 |       requestId: RequestId;
9711 |       /**
9712 |        * Timestamp.
9713 |        */
9714 |       timestamp: MonotonicTime;
9715 |       /**
9716 |        * WebSocket response data.
9717 |        */
9718 |       response: WebSocketFrame;
9719 |     }
9720 |     /**
9721 |      * Fired when WebSocket message is sent.
9722 |      */
9723 |     export type webSocketFrameSentPayload = {
9724 |       /**
9725 |        * Request identifier.
9726 |        */
9727 |       requestId: RequestId;
9728 |       /**
9729 |        * Timestamp.
9730 |        */
9731 |       timestamp: MonotonicTime;
9732 |       /**
9733 |        * WebSocket response data.
9734 |        */
9735 |       response: WebSocketFrame;
9736 |     }
9737 |     /**
9738 |      * Fired when WebSocket handshake response becomes available.
9739 |      */
9740 |     export type webSocketHandshakeResponseReceivedPayload = {
9741 |       /**
9742 |        * Request identifier.
9743 |        */
9744 |       requestId: RequestId;
9745 |       /**
9746 |        * Timestamp.
9747 |        */
9748 |       timestamp: MonotonicTime;
9749 |       /**
9750 |        * WebSocket response data.
9751 |        */
9752 |       response: WebSocketResponse;
9753 |     }
9754 |     /**
9755 |      * Fired when WebSocket is about to initiate handshake.
9756 |      */
9757 |     export type webSocketWillSendHandshakeRequestPayload = {
9758 |       /**
9759 |        * Request identifier.
9760 |        */
9761 |       requestId: RequestId;
9762 |       /**
9763 |        * Timestamp.
9764 |        */
9765 |       timestamp: MonotonicTime;
9766 |       /**
9767 |        * UTC Timestamp.
9768 |        */
9769 |       wallTime: TimeSinceEpoch;
9770 |       /**
9771 |        * WebSocket request data.
9772 |        */
9773 |       request: WebSocketRequest;
9774 |     }
9775 |     /**
9776 |      * Fired upon WebTransport creation.
9777 |      */
9778 |     export type webTransportCreatedPayload = {
9779 |       /**
9780 |        * WebTransport identifier.
9781 |        */
9782 |       transportId: RequestId;
9783 |       /**
9784 |        * WebTransport request URL.
9785 |        */
9786 |       url: string;
9787 |       /**
9788 |        * Timestamp.
9789 |        */
9790 |       timestamp: MonotonicTime;
9791 |       /**
9792 |        * Request initiator.
9793 |        */
9794 |       initiator?: Initiator;
9795 |     }
9796 |     /**
9797 |      * Fired when WebTransport handshake is finished.
9798 |      */
9799 |     export type webTransportConnectionEstablishedPayload = {
9800 |       /**
9801 |        * WebTransport identifier.
9802 |        */
9803 |       transportId: RequestId;
9804 |       /**
9805 |        * Timestamp.
9806 |        */
9807 |       timestamp: MonotonicTime;
9808 |     }
9809 |     /**
9810 |      * Fired when WebTransport is disposed.
9811 |      */
9812 |     export type webTransportClosedPayload = {
9813 |       /**
9814 |        * WebTransport identifier.
9815 |        */
9816 |       transportId: RequestId;
9817 |       /**
9818 |        * Timestamp.
9819 |        */
9820 |       timestamp: MonotonicTime;
9821 |     }
9822 |     /**
9823 |      * Fired when additional information about a requestWillBeSent event is available from the
9824 | network stack. Not every requestWillBeSent event will have an additional
9825 | requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
9826 | or requestWillBeSentExtraInfo will be fired first for the same request.
9827 |      */
9828 |     export type requestWillBeSentExtraInfoPayload = {
9829 |       /**
9830 |        * Request identifier. Used to match this information to an existing requestWillBeSent event.
9831 |        */
9832 |       requestId: RequestId;
9833 |       /**
9834 |        * A list of cookies potentially associated to the requested URL. This includes both cookies sent with
9835 | the request and the ones not sent; the latter are distinguished by having blockedReasons field set.
9836 |        */
9837 |       associatedCookies: AssociatedCookie[];
9838 |       /**
9839 |        * Raw request headers as they will be sent over the wire.
9840 |        */
9841 |       headers: Headers;
9842 |       /**
9843 |        * Connection timing information for the request.
9844 |        */
9845 |       connectTiming: ConnectTiming;
9846 |       /**
9847 |        * The client security state set for the request.
9848 |        */
9849 |       clientSecurityState?: ClientSecurityState;
9850 |       /**
9851 |        * Whether the site has partitioned cookies stored in a partition different than the current one.
9852 |        */
9853 |       siteHasCookieInOtherPartition?: boolean;
9854 |     }
9855 |     /**
9856 |      * Fired when additional information about a responseReceived event is available from the network
9857 | stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
9858 | it, and responseReceivedExtraInfo may be fired before or after responseReceived.
9859 |      */
9860 |     export type responseReceivedExtraInfoPayload = {
9861 |       /**
9862 |        * Request identifier. Used to match this information to another responseReceived event.
9863 |        */
9864 |       requestId: RequestId;
9865 |       /**
9866 |        * A list of cookies which were not stored from the response along with the corresponding
9867 | reasons for blocking. The cookies here may not be valid due to syntax errors, which
9868 | are represented by the invalid cookie line string instead of a proper cookie.
9869 |        */
9870 |       blockedCookies: BlockedSetCookieWithReason[];
9871 |       /**
9872 |        * Raw response headers as they were received over the wire.
9873 |        */
9874 |       headers: Headers;
9875 |       /**
9876 |        * The IP address space of the resource. The address space can only be determined once the transport
9877 | established the connection, so we can't send it in `requestWillBeSentExtraInfo`.
9878 |        */
9879 |       resourceIPAddressSpace: IPAddressSpace;
9880 |       /**
9881 |        * The status code of the response. This is useful in cases the request failed and no responseReceived
9882 | event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code
9883 | for cached requests, where the status in responseReceived is a 200 and this will be 304.
9884 |        */
9885 |       statusCode: number;
9886 |       /**
9887 |        * Raw response header text as it was received over the wire. The raw text may not always be
9888 | available, such as in the case of HTTP/2 or QUIC.
9889 |        */
9890 |       headersText?: string;
9891 |       /**
9892 |        * The cookie partition key that will be used to store partitioned cookies set in this response.
9893 | Only sent when partitioned cookies are enabled.
9894 |        */
9895 |       cookiePartitionKey?: CookiePartitionKey;
9896 |       /**
9897 |        * True if partitioned cookies are enabled, but the partition key is not serializable to string.
9898 |        */
9899 |       cookiePartitionKeyOpaque?: boolean;
9900 |       /**
9901 |        * A list of cookies which should have been blocked by 3PCD but are exempted and stored from
9902 | the response with the corresponding reason.
9903 |        */
9904 |       exemptedCookies?: ExemptedSetCookieWithReason[];
9905 |     }
9906 |     /**
9907 |      * Fired when 103 Early Hints headers is received in addition to the common response.
9908 | Not every responseReceived event will have an responseReceivedEarlyHints fired.
9909 | Only one responseReceivedEarlyHints may be fired for eached responseReceived event.
9910 |      */
9911 |     export type responseReceivedEarlyHintsPayload = {
9912 |       /**
9913 |        * Request identifier. Used to match this information to another responseReceived event.
9914 |        */
9915 |       requestId: RequestId;
9916 |       /**
9917 |        * Raw response headers as they were received over the wire.
9918 |        */
9919 |       headers: Headers;
9920 |     }
9921 |     /**
9922 |      * Fired exactly once for each Trust Token operation. Depending on
9923 | the type of the operation and whether the operation succeeded or
9924 | failed, the event is fired before the corresponding request was sent
9925 | or after the response was received.
9926 |      */
9927 |     export type trustTokenOperationDonePayload = {
9928 |       /**
9929 |        * Detailed success or error status of the operation.
9930 | 'AlreadyExists' also signifies a successful operation, as the result
9931 | of the operation already exists und thus, the operation was abort
9932 | preemptively (e.g. a cache hit).
9933 |        */
9934 |       status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"ResourceLimited"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally";
9935 |       type: TrustTokenOperationType;
9936 |       requestId: RequestId;
9937 |       /**
9938 |        * Top level origin. The context in which the operation was attempted.
9939 |        */
9940 |       topLevelOrigin?: string;
9941 |       /**
9942 |        * Origin of the issuer in case of a "Issuance" or "Redemption" operation.
9943 |        */
9944 |       issuerOrigin?: string;
9945 |       /**
9946 |        * The number of obtained Trust Tokens on a successful "Issuance" operation.
9947 |        */
9948 |       issuedTokenCount?: number;
9949 |     }
9950 |     /**
9951 |      * Fired once security policy has been updated.
9952 |      */
9953 |     export type policyUpdatedPayload = void;
9954 |     /**
9955 |      * Fired once when parsing the .wbn file has succeeded.
9956 | The event contains the information about the web bundle contents.
9957 |      */
9958 |     export type subresourceWebBundleMetadataReceivedPayload = {
9959 |       /**
9960 |        * Request identifier. Used to match this information to another event.
9961 |        */
9962 |       requestId: RequestId;
9963 |       /**
9964 |        * A list of URLs of resources in the subresource Web Bundle.
9965 |        */
9966 |       urls: string[];
9967 |     }
9968 |     /**
9969 |      * Fired once when parsing the .wbn file has failed.
9970 |      */
9971 |     export type subresourceWebBundleMetadataErrorPayload = {
9972 |       /**
9973 |        * Request identifier. Used to match this information to another event.
9974 |        */
9975 |       requestId: RequestId;
9976 |       /**
9977 |        * Error message
9978 |        */
9979 |       errorMessage: string;
9980 |     }
9981 |     /**
9982 |      * Fired when handling requests for resources within a .wbn file.
9983 | Note: this will only be fired for resources that are requested by the webpage.
9984 |      */
9985 |     export type subresourceWebBundleInnerResponseParsedPayload = {
9986 |       /**
9987 |        * Request identifier of the subresource request
9988 |        */
9989 |       innerRequestId: RequestId;
9990 |       /**
9991 |        * URL of the subresource resource.
9992 |        */
9993 |       innerRequestURL: string;
9994 |       /**
9995 |        * Bundle request identifier. Used to match this information to another event.
9996 | This made be absent in case when the instrumentation was enabled only
9997 | after webbundle was parsed.
9998 |        */
9999 |       bundleRequestId?: RequestId;
10000 |     }
10001 |     /**
10002 |      * Fired when request for resources within a .wbn file failed.
10003 |      */
10004 |     export type subresourceWebBundleInnerResponseErrorPayload = {
10005 |       /**
10006 |        * Request identifier of the subresource request
10007 |        */
10008 |       innerRequestId: RequestId;
10009 |       /**
10010 |        * URL of the subresource resource.
10011 |        */
10012 |       innerRequestURL: string;
10013 |       /**
10014 |        * Error message
10015 |        */
10016 |       errorMessage: string;
10017 |       /**
10018 |        * Bundle request identifier. Used to match this information to another event.
10019 | This made be absent in case when the instrumentation was enabled only
10020 | after webbundle was parsed.
10021 |        */
10022 |       bundleRequestId?: RequestId;
10023 |     }
10024 |     /**
10025 |      * Is sent whenever a new report is added.
10026 | And after 'enableReportingApi' for all existing reports.
10027 |      */
10028 |     export type reportingApiReportAddedPayload = {
10029 |       report: ReportingApiReport;
10030 |     }
10031 |     export type reportingApiReportUpdatedPayload = {
10032 |       report: ReportingApiReport;
10033 |     }
10034 |     export type reportingApiEndpointsChangedForOriginPayload = {
10035 |       /**
10036 |        * Origin of the document(s) which configured the endpoints.
10037 |        */
10038 |       origin: string;
10039 |       endpoints: ReportingApiEndpoint[];
10040 |     }
10041 | 
10042 |     /**
10043 |      * Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
10044 |      */
10045 |     export type setAcceptedEncodingsParameters = {
10046 |       /**
10047 |        * List of accepted content encodings.
10048 |        */
10049 |       encodings: ContentEncoding[];
10050 |     }
10051 |     export type setAcceptedEncodingsReturnValue = {
10052 |     }
10053 |     /**
10054 |      * Clears accepted encodings set by setAcceptedEncodings
10055 |      */
10056 |     export type clearAcceptedEncodingsOverrideParameters = {
10057 |     }
10058 |     export type clearAcceptedEncodingsOverrideReturnValue = {
10059 |     }
10060 |     /**
10061 |      * Tells whether clearing browser cache is supported.
10062 |      */
10063 |     export type canClearBrowserCacheParameters = {
10064 |     }
10065 |     export type canClearBrowserCacheReturnValue = {
10066 |       /**
10067 |        * True if browser cache can be cleared.
10068 |        */
10069 |       result: boolean;
10070 |     }
10071 |     /**
10072 |      * Tells whether clearing browser cookies is supported.
10073 |      */
10074 |     export type canClearBrowserCookiesParameters = {
10075 |     }
10076 |     export type canClearBrowserCookiesReturnValue = {
10077 |       /**
10078 |        * True if browser cookies can be cleared.
10079 |        */
10080 |       result: boolean;
10081 |     }
10082 |     /**
10083 |      * Tells whether emulation of network conditions is supported.
10084 |      */
10085 |     export type canEmulateNetworkConditionsParameters = {
10086 |     }
10087 |     export type canEmulateNetworkConditionsReturnValue = {
10088 |       /**
10089 |        * True if emulation of network conditions is supported.
10090 |        */
10091 |       result: boolean;
10092 |     }
10093 |     /**
10094 |      * Clears browser cache.
10095 |      */
10096 |     export type clearBrowserCacheParameters = {
10097 |     }
10098 |     export type clearBrowserCacheReturnValue = {
10099 |     }
10100 |     /**
10101 |      * Clears browser cookies.
10102 |      */
10103 |     export type clearBrowserCookiesParameters = {
10104 |     }
10105 |     export type clearBrowserCookiesReturnValue = {
10106 |     }
10107 |     /**
10108 |      * Response to Network.requestIntercepted which either modifies the request to continue with any
10109 | modifications, or blocks it, or completes it with the provided response bytes. If a network
10110 | fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
10111 | event will be sent with the same InterceptionId.
10112 | Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
10113 |      */
10114 |     export type continueInterceptedRequestParameters = {
10115 |       interceptionId: InterceptionId;
10116 |       /**
10117 |        * If set this causes the request to fail with the given reason. Passing `Aborted` for requests
10118 | marked with `isNavigationRequest` also cancels the navigation. Must not be set in response
10119 | to an authChallenge.
10120 |        */
10121 |       errorReason?: ErrorReason;
10122 |       /**
10123 |        * If set the requests completes using with the provided base64 encoded raw response, including
10124 | HTTP status line and headers etc... Must not be set in response to an authChallenge.
10125 |        */
10126 |       rawResponse?: binary;
10127 |       /**
10128 |        * If set the request url will be modified in a way that's not observable by page. Must not be
10129 | set in response to an authChallenge.
10130 |        */
10131 |       url?: string;
10132 |       /**
10133 |        * If set this allows the request method to be overridden. Must not be set in response to an
10134 | authChallenge.
10135 |        */
10136 |       method?: string;
10137 |       /**
10138 |        * If set this allows postData to be set. Must not be set in response to an authChallenge.
10139 |        */
10140 |       postData?: string;
10141 |       /**
10142 |        * If set this allows the request headers to be changed. Must not be set in response to an
10143 | authChallenge.
10144 |        */
10145 |       headers?: Headers;
10146 |       /**
10147 |        * Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
10148 |        */
10149 |       authChallengeResponse?: AuthChallengeResponse;
10150 |     }
10151 |     export type continueInterceptedRequestReturnValue = {
10152 |     }
10153 |     /**
10154 |      * Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
10155 |      */
10156 |     export type deleteCookiesParameters = {
10157 |       /**
10158 |        * Name of the cookies to remove.
10159 |        */
10160 |       name: string;
10161 |       /**
10162 |        * If specified, deletes all the cookies with the given name where domain and path match
10163 | provided URL.
10164 |        */
10165 |       url?: string;
10166 |       /**
10167 |        * If specified, deletes only cookies with the exact domain.
10168 |        */
10169 |       domain?: string;
10170 |       /**
10171 |        * If specified, deletes only cookies with the exact path.
10172 |        */
10173 |       path?: string;
10174 |       /**
10175 |        * If specified, deletes only cookies with the the given name and partitionKey where
10176 | all partition key attributes match the cookie partition key attribute.
10177 |        */
10178 |       partitionKey?: CookiePartitionKey;
10179 |     }
10180 |     export type deleteCookiesReturnValue = {
10181 |     }
10182 |     /**
10183 |      * Disables network tracking, prevents network events from being sent to the client.
10184 |      */
10185 |     export type disableParameters = {
10186 |     }
10187 |     export type disableReturnValue = {
10188 |     }
10189 |     /**
10190 |      * Activates emulation of network conditions.
10191 |      */
10192 |     export type emulateNetworkConditionsParameters = {
10193 |       /**
10194 |        * True to emulate internet disconnection.
10195 |        */
10196 |       offline: boolean;
10197 |       /**
10198 |        * Minimum latency from request sent to response headers received (ms).
10199 |        */
10200 |       latency: number;
10201 |       /**
10202 |        * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
10203 |        */
10204 |       downloadThroughput: number;
10205 |       /**
10206 |        * Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
10207 |        */
10208 |       uploadThroughput: number;
10209 |       /**
10210 |        * Connection type if known.
10211 |        */
10212 |       connectionType?: ConnectionType;
10213 |       /**
10214 |        * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
10215 |        */
10216 |       packetLoss?: number;
10217 |       /**
10218 |        * WebRTC packet queue length (packet). 0 removes any queue length limitations.
10219 |        */
10220 |       packetQueueLength?: number;
10221 |       /**
10222 |        * WebRTC packetReordering feature.
10223 |        */
10224 |       packetReordering?: boolean;
10225 |     }
10226 |     export type emulateNetworkConditionsReturnValue = {
10227 |     }
10228 |     /**
10229 |      * Enables network tracking, network events will now be delivered to the client.
10230 |      */
10231 |     export type enableParameters = {
10232 |       /**
10233 |        * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
10234 |        */
10235 |       maxTotalBufferSize?: number;
10236 |       /**
10237 |        * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
10238 |        */
10239 |       maxResourceBufferSize?: number;
10240 |       /**
10241 |        * Longest post body size (in bytes) that would be included in requestWillBeSent notification
10242 |        */
10243 |       maxPostDataSize?: number;
10244 |     }
10245 |     export type enableReturnValue = {
10246 |     }
10247 |     /**
10248 |      * Returns all browser cookies. Depending on the backend support, will return detailed cookie
10249 | information in the `cookies` field.
10250 | Deprecated. Use Storage.getCookies instead.
10251 |      */
10252 |     export type getAllCookiesParameters = {
10253 |     }
10254 |     export type getAllCookiesReturnValue = {
10255 |       /**
10256 |        * Array of cookie objects.
10257 |        */
10258 |       cookies: Cookie[];
10259 |     }
10260 |     /**
10261 |      * Returns the DER-encoded certificate.
10262 |      */
10263 |     export type getCertificateParameters = {
10264 |       /**
10265 |        * Origin to get certificate for.
10266 |        */
10267 |       origin: string;
10268 |     }
10269 |     export type getCertificateReturnValue = {
10270 |       tableNames: string[];
10271 |     }
10272 |     /**
10273 |      * Returns all browser cookies for the current URL. Depending on the backend support, will return
10274 | detailed cookie information in the `cookies` field.
10275 |      */
10276 |     export type getCookiesParameters = {
10277 |       /**
10278 |        * The list of URLs for which applicable cookies will be fetched.
10279 | If not specified, it's assumed to be set to the list containing
10280 | the URLs of the page and all of its subframes.
10281 |        */
10282 |       urls?: string[];
10283 |     }
10284 |     export type getCookiesReturnValue = {
10285 |       /**
10286 |        * Array of cookie objects.
10287 |        */
10288 |       cookies: Cookie[];
10289 |     }
10290 |     /**
10291 |      * Returns content served for the given request.
10292 |      */
10293 |     export type getResponseBodyParameters = {
10294 |       /**
10295 |        * Identifier of the network request to get content for.
10296 |        */
10297 |       requestId: RequestId;
10298 |     }
10299 |     export type getResponseBodyReturnValue = {
10300 |       /**
10301 |        * Response body.
10302 |        */
10303 |       body: string;
10304 |       /**
10305 |        * True, if content was sent as base64.
10306 |        */
10307 |       base64Encoded: boolean;
10308 |     }
10309 |     /**
10310 |      * Returns post data sent with the request. Returns an error when no data was sent with the request.
10311 |      */
10312 |     export type getRequestPostDataParameters = {
10313 |       /**
10314 |        * Identifier of the network request to get content for.
10315 |        */
10316 |       requestId: RequestId;
10317 |     }
10318 |     export type getRequestPostDataReturnValue = {
10319 |       /**
10320 |        * Request body string, omitting files from multipart requests
10321 |        */
10322 |       postData: string;
10323 |     }
10324 |     /**
10325 |      * Returns content served for the given currently intercepted request.
10326 |      */
10327 |     export type getResponseBodyForInterceptionParameters = {
10328 |       /**
10329 |        * Identifier for the intercepted request to get body for.
10330 |        */
10331 |       interceptionId: InterceptionId;
10332 |     }
10333 |     export type getResponseBodyForInterceptionReturnValue = {
10334 |       /**
10335 |        * Response body.
10336 |        */
10337 |       body: string;
10338 |       /**
10339 |        * True, if content was sent as base64.
10340 |        */
10341 |       base64Encoded: boolean;
10342 |     }
10343 |     /**
10344 |      * Returns a handle to the stream representing the response body. Note that after this command,
10345 | the intercepted request can't be continued as is -- you either need to cancel it or to provide
10346 | the response body. The stream only supports sequential read, IO.read will fail if the position
10347 | is specified.
10348 |      */
10349 |     export type takeResponseBodyForInterceptionAsStreamParameters = {
10350 |       interceptionId: InterceptionId;
10351 |     }
10352 |     export type takeResponseBodyForInterceptionAsStreamReturnValue = {
10353 |       stream: IO.StreamHandle;
10354 |     }
10355 |     /**
10356 |      * This method sends a new XMLHttpRequest which is identical to the original one. The following
10357 | parameters should be identical: method, url, async, request body, extra headers, withCredentials
10358 | attribute, user, password.
10359 |      */
10360 |     export type replayXHRParameters = {
10361 |       /**
10362 |        * Identifier of XHR to replay.
10363 |        */
10364 |       requestId: RequestId;
10365 |     }
10366 |     export type replayXHRReturnValue = {
10367 |     }
10368 |     /**
10369 |      * Searches for given string in response content.
10370 |      */
10371 |     export type searchInResponseBodyParameters = {
10372 |       /**
10373 |        * Identifier of the network response to search.
10374 |        */
10375 |       requestId: RequestId;
10376 |       /**
10377 |        * String to search for.
10378 |        */
10379 |       query: string;
10380 |       /**
10381 |        * If true, search is case sensitive.
10382 |        */
10383 |       caseSensitive?: boolean;
10384 |       /**
10385 |        * If true, treats string parameter as regex.
10386 |        */
10387 |       isRegex?: boolean;
10388 |     }
10389 |     export type searchInResponseBodyReturnValue = {
10390 |       /**
10391 |        * List of search matches.
10392 |        */
10393 |       result: Debugger.SearchMatch[];
10394 |     }
10395 |     /**
10396 |      * Blocks URLs from loading.
10397 |      */
10398 |     export type setBlockedURLsParameters = {
10399 |       /**
10400 |        * URL patterns to block. Wildcards ('*') are allowed.
10401 |        */
10402 |       urls: string[];
10403 |     }
10404 |     export type setBlockedURLsReturnValue = {
10405 |     }
10406 |     /**
10407 |      * Toggles ignoring of service worker for each request.
10408 |      */
10409 |     export type setBypassServiceWorkerParameters = {
10410 |       /**
10411 |        * Bypass service worker and load from network.
10412 |        */
10413 |       bypass: boolean;
10414 |     }
10415 |     export type setBypassServiceWorkerReturnValue = {
10416 |     }
10417 |     /**
10418 |      * Toggles ignoring cache for each request. If `true`, cache will not be used.
10419 |      */
10420 |     export type setCacheDisabledParameters = {
10421 |       /**
10422 |        * Cache disabled state.
10423 |        */
10424 |       cacheDisabled: boolean;
10425 |     }
10426 |     export type setCacheDisabledReturnValue = {
10427 |     }
10428 |     /**
10429 |      * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
10430 |      */
10431 |     export type setCookieParameters = {
10432 |       /**
10433 |        * Cookie name.
10434 |        */
10435 |       name: string;
10436 |       /**
10437 |        * Cookie value.
10438 |        */
10439 |       value: string;
10440 |       /**
10441 |        * The request-URI to associate with the setting of the cookie. This value can affect the
10442 | default domain, path, source port, and source scheme values of the created cookie.
10443 |        */
10444 |       url?: string;
10445 |       /**
10446 |        * Cookie domain.
10447 |        */
10448 |       domain?: string;
10449 |       /**
10450 |        * Cookie path.
10451 |        */
10452 |       path?: string;
10453 |       /**
10454 |        * True if cookie is secure.
10455 |        */
10456 |       secure?: boolean;
10457 |       /**
10458 |        * True if cookie is http-only.
10459 |        */
10460 |       httpOnly?: boolean;
10461 |       /**
10462 |        * Cookie SameSite type.
10463 |        */
10464 |       sameSite?: CookieSameSite;
10465 |       /**
10466 |        * Cookie expiration date, session cookie if not set
10467 |        */
10468 |       expires?: TimeSinceEpoch;
10469 |       /**
10470 |        * Cookie Priority type.
10471 |        */
10472 |       priority?: CookiePriority;
10473 |       /**
10474 |        * True if cookie is SameParty.
10475 |        */
10476 |       sameParty?: boolean;
10477 |       /**
10478 |        * Cookie source scheme type.
10479 |        */
10480 |       sourceScheme?: CookieSourceScheme;
10481 |       /**
10482 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
10483 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
10484 | This is a temporary ability and it will be removed in the future.
10485 |        */
10486 |       sourcePort?: number;
10487 |       /**
10488 |        * Cookie partition key. If not set, the cookie will be set as not partitioned.
10489 |        */
10490 |       partitionKey?: CookiePartitionKey;
10491 |     }
10492 |     export type setCookieReturnValue = {
10493 |       /**
10494 |        * Always set to true. If an error occurs, the response indicates protocol error.
10495 |        */
10496 |       success: boolean;
10497 |     }
10498 |     /**
10499 |      * Sets given cookies.
10500 |      */
10501 |     export type setCookiesParameters = {
10502 |       /**
10503 |        * Cookies to be set.
10504 |        */
10505 |       cookies: CookieParam[];
10506 |     }
10507 |     export type setCookiesReturnValue = {
10508 |     }
10509 |     /**
10510 |      * Specifies whether to always send extra HTTP headers with the requests from this page.
10511 |      */
10512 |     export type setExtraHTTPHeadersParameters = {
10513 |       /**
10514 |        * Map with extra HTTP headers.
10515 |        */
10516 |       headers: Headers;
10517 |     }
10518 |     export type setExtraHTTPHeadersReturnValue = {
10519 |     }
10520 |     /**
10521 |      * Specifies whether to attach a page script stack id in requests
10522 |      */
10523 |     export type setAttachDebugStackParameters = {
10524 |       /**
10525 |        * Whether to attach a page script stack for debugging purpose.
10526 |        */
10527 |       enabled: boolean;
10528 |     }
10529 |     export type setAttachDebugStackReturnValue = {
10530 |     }
10531 |     /**
10532 |      * Sets the requests to intercept that match the provided patterns and optionally resource types.
10533 | Deprecated, please use Fetch.enable instead.
10534 |      */
10535 |     export type setRequestInterceptionParameters = {
10536 |       /**
10537 |        * Requests matching any of these patterns will be forwarded and wait for the corresponding
10538 | continueInterceptedRequest call.
10539 |        */
10540 |       patterns: RequestPattern[];
10541 |     }
10542 |     export type setRequestInterceptionReturnValue = {
10543 |     }
10544 |     /**
10545 |      * Allows overriding user agent with the given string.
10546 |      */
10547 |     export type setUserAgentOverrideParameters = {
10548 |       /**
10549 |        * User agent to use.
10550 |        */
10551 |       userAgent: string;
10552 |       /**
10553 |        * Browser language to emulate.
10554 |        */
10555 |       acceptLanguage?: string;
10556 |       /**
10557 |        * The platform navigator.platform should return.
10558 |        */
10559 |       platform?: string;
10560 |       /**
10561 |        * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
10562 |        */
10563 |       userAgentMetadata?: Emulation.UserAgentMetadata;
10564 |     }
10565 |     export type setUserAgentOverrideReturnValue = {
10566 |     }
10567 |     /**
10568 |      * Enables streaming of the response for the given requestId.
10569 | If enabled, the dataReceived event contains the data that was received during streaming.
10570 |      */
10571 |     export type streamResourceContentParameters = {
10572 |       /**
10573 |        * Identifier of the request to stream.
10574 |        */
10575 |       requestId: RequestId;
10576 |     }
10577 |     export type streamResourceContentReturnValue = {
10578 |       /**
10579 |        * Data that has been buffered until streaming is enabled.
10580 |        */
10581 |       bufferedData: binary;
10582 |     }
10583 |     /**
10584 |      * Returns information about the COEP/COOP isolation status.
10585 |      */
10586 |     export type getSecurityIsolationStatusParameters = {
10587 |       /**
10588 |        * If no frameId is provided, the status of the target is provided.
10589 |        */
10590 |       frameId?: Page.FrameId;
10591 |     }
10592 |     export type getSecurityIsolationStatusReturnValue = {
10593 |       status: SecurityIsolationStatus;
10594 |     }
10595 |     /**
10596 |      * Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
10597 | Enabling triggers 'reportingApiReportAdded' for all existing reports.
10598 |      */
10599 |     export type enableReportingApiParameters = {
10600 |       /**
10601 |        * Whether to enable or disable events for the Reporting API
10602 |        */
10603 |       enable: boolean;
10604 |     }
10605 |     export type enableReportingApiReturnValue = {
10606 |     }
10607 |     /**
10608 |      * Fetches the resource and returns the content.
10609 |      */
10610 |     export type loadNetworkResourceParameters = {
10611 |       /**
10612 |        * Frame id to get the resource for. Mandatory for frame targets, and
10613 | should be omitted for worker targets.
10614 |        */
10615 |       frameId?: Page.FrameId;
10616 |       /**
10617 |        * URL of the resource to get content for.
10618 |        */
10619 |       url: string;
10620 |       /**
10621 |        * Options for the request.
10622 |        */
10623 |       options: LoadNetworkResourceOptions;
10624 |     }
10625 |     export type loadNetworkResourceReturnValue = {
10626 |       resource: LoadNetworkResourcePageResult;
10627 |     }
10628 |   }
10629 | 
10630 |   /**
10631 |    * This domain provides various functionality related to drawing atop the inspected page.
10632 |    */
10633 |   export module Overlay {
10634 |     /**
10635 |      * Configuration data for drawing the source order of an elements children.
10636 |      */
10637 |     export interface SourceOrderConfig {
10638 |       /**
10639 |        * the color to outline the given element in.
10640 |        */
10641 |       parentOutlineColor: DOM.RGBA;
10642 |       /**
10643 |        * the color to outline the child elements in.
10644 |        */
10645 |       childOutlineColor: DOM.RGBA;
10646 |     }
10647 |     /**
10648 |      * Configuration data for the highlighting of Grid elements.
10649 |      */
10650 |     export interface GridHighlightConfig {
10651 |       /**
10652 |        * Whether the extension lines from grid cells to the rulers should be shown (default: false).
10653 |        */
10654 |       showGridExtensionLines?: boolean;
10655 |       /**
10656 |        * Show Positive line number labels (default: false).
10657 |        */
10658 |       showPositiveLineNumbers?: boolean;
10659 |       /**
10660 |        * Show Negative line number labels (default: false).
10661 |        */
10662 |       showNegativeLineNumbers?: boolean;
10663 |       /**
10664 |        * Show area name labels (default: false).
10665 |        */
10666 |       showAreaNames?: boolean;
10667 |       /**
10668 |        * Show line name labels (default: false).
10669 |        */
10670 |       showLineNames?: boolean;
10671 |       /**
10672 |        * Show track size labels (default: false).
10673 |        */
10674 |       showTrackSizes?: boolean;
10675 |       /**
10676 |        * The grid container border highlight color (default: transparent).
10677 |        */
10678 |       gridBorderColor?: DOM.RGBA;
10679 |       /**
10680 |        * The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
10681 |        */
10682 |       cellBorderColor?: DOM.RGBA;
10683 |       /**
10684 |        * The row line color (default: transparent).
10685 |        */
10686 |       rowLineColor?: DOM.RGBA;
10687 |       /**
10688 |        * The column line color (default: transparent).
10689 |        */
10690 |       columnLineColor?: DOM.RGBA;
10691 |       /**
10692 |        * Whether the grid border is dashed (default: false).
10693 |        */
10694 |       gridBorderDash?: boolean;
10695 |       /**
10696 |        * Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
10697 |        */
10698 |       cellBorderDash?: boolean;
10699 |       /**
10700 |        * Whether row lines are dashed (default: false).
10701 |        */
10702 |       rowLineDash?: boolean;
10703 |       /**
10704 |        * Whether column lines are dashed (default: false).
10705 |        */
10706 |       columnLineDash?: boolean;
10707 |       /**
10708 |        * The row gap highlight fill color (default: transparent).
10709 |        */
10710 |       rowGapColor?: DOM.RGBA;
10711 |       /**
10712 |        * The row gap hatching fill color (default: transparent).
10713 |        */
10714 |       rowHatchColor?: DOM.RGBA;
10715 |       /**
10716 |        * The column gap highlight fill color (default: transparent).
10717 |        */
10718 |       columnGapColor?: DOM.RGBA;
10719 |       /**
10720 |        * The column gap hatching fill color (default: transparent).
10721 |        */
10722 |       columnHatchColor?: DOM.RGBA;
10723 |       /**
10724 |        * The named grid areas border color (Default: transparent).
10725 |        */
10726 |       areaBorderColor?: DOM.RGBA;
10727 |       /**
10728 |        * The grid container background color (Default: transparent).
10729 |        */
10730 |       gridBackgroundColor?: DOM.RGBA;
10731 |     }
10732 |     /**
10733 |      * Configuration data for the highlighting of Flex container elements.
10734 |      */
10735 |     export interface FlexContainerHighlightConfig {
10736 |       /**
10737 |        * The style of the container border
10738 |        */
10739 |       containerBorder?: LineStyle;
10740 |       /**
10741 |        * The style of the separator between lines
10742 |        */
10743 |       lineSeparator?: LineStyle;
10744 |       /**
10745 |        * The style of the separator between items
10746 |        */
10747 |       itemSeparator?: LineStyle;
10748 |       /**
10749 |        * Style of content-distribution space on the main axis (justify-content).
10750 |        */
10751 |       mainDistributedSpace?: BoxStyle;
10752 |       /**
10753 |        * Style of content-distribution space on the cross axis (align-content).
10754 |        */
10755 |       crossDistributedSpace?: BoxStyle;
10756 |       /**
10757 |        * Style of empty space caused by row gaps (gap/row-gap).
10758 |        */
10759 |       rowGapSpace?: BoxStyle;
10760 |       /**
10761 |        * Style of empty space caused by columns gaps (gap/column-gap).
10762 |        */
10763 |       columnGapSpace?: BoxStyle;
10764 |       /**
10765 |        * Style of the self-alignment line (align-items).
10766 |        */
10767 |       crossAlignment?: LineStyle;
10768 |     }
10769 |     /**
10770 |      * Configuration data for the highlighting of Flex item elements.
10771 |      */
10772 |     export interface FlexItemHighlightConfig {
10773 |       /**
10774 |        * Style of the box representing the item's base size
10775 |        */
10776 |       baseSizeBox?: BoxStyle;
10777 |       /**
10778 |        * Style of the border around the box representing the item's base size
10779 |        */
10780 |       baseSizeBorder?: LineStyle;
10781 |       /**
10782 |        * Style of the arrow representing if the item grew or shrank
10783 |        */
10784 |       flexibilityArrow?: LineStyle;
10785 |     }
10786 |     /**
10787 |      * Style information for drawing a line.
10788 |      */
10789 |     export interface LineStyle {
10790 |       /**
10791 |        * The color of the line (default: transparent)
10792 |        */
10793 |       color?: DOM.RGBA;
10794 |       /**
10795 |        * The line pattern (default: solid)
10796 |        */
10797 |       pattern?: "dashed"|"dotted";
10798 |     }
10799 |     /**
10800 |      * Style information for drawing a box.
10801 |      */
10802 |     export interface BoxStyle {
10803 |       /**
10804 |        * The background color for the box (default: transparent)
10805 |        */
10806 |       fillColor?: DOM.RGBA;
10807 |       /**
10808 |        * The hatching color for the box (default: transparent)
10809 |        */
10810 |       hatchColor?: DOM.RGBA;
10811 |     }
10812 |     export type ContrastAlgorithm = "aa"|"aaa"|"apca";
10813 |     /**
10814 |      * Configuration data for the highlighting of page elements.
10815 |      */
10816 |     export interface HighlightConfig {
10817 |       /**
10818 |        * Whether the node info tooltip should be shown (default: false).
10819 |        */
10820 |       showInfo?: boolean;
10821 |       /**
10822 |        * Whether the node styles in the tooltip (default: false).
10823 |        */
10824 |       showStyles?: boolean;
10825 |       /**
10826 |        * Whether the rulers should be shown (default: false).
10827 |        */
10828 |       showRulers?: boolean;
10829 |       /**
10830 |        * Whether the a11y info should be shown (default: true).
10831 |        */
10832 |       showAccessibilityInfo?: boolean;
10833 |       /**
10834 |        * Whether the extension lines from node to the rulers should be shown (default: false).
10835 |        */
10836 |       showExtensionLines?: boolean;
10837 |       /**
10838 |        * The content box highlight fill color (default: transparent).
10839 |        */
10840 |       contentColor?: DOM.RGBA;
10841 |       /**
10842 |        * The padding highlight fill color (default: transparent).
10843 |        */
10844 |       paddingColor?: DOM.RGBA;
10845 |       /**
10846 |        * The border highlight fill color (default: transparent).
10847 |        */
10848 |       borderColor?: DOM.RGBA;
10849 |       /**
10850 |        * The margin highlight fill color (default: transparent).
10851 |        */
10852 |       marginColor?: DOM.RGBA;
10853 |       /**
10854 |        * The event target element highlight fill color (default: transparent).
10855 |        */
10856 |       eventTargetColor?: DOM.RGBA;
10857 |       /**
10858 |        * The shape outside fill color (default: transparent).
10859 |        */
10860 |       shapeColor?: DOM.RGBA;
10861 |       /**
10862 |        * The shape margin fill color (default: transparent).
10863 |        */
10864 |       shapeMarginColor?: DOM.RGBA;
10865 |       /**
10866 |        * The grid layout color (default: transparent).
10867 |        */
10868 |       cssGridColor?: DOM.RGBA;
10869 |       /**
10870 |        * The color format used to format color styles (default: hex).
10871 |        */
10872 |       colorFormat?: ColorFormat;
10873 |       /**
10874 |        * The grid layout highlight configuration (default: all transparent).
10875 |        */
10876 |       gridHighlightConfig?: GridHighlightConfig;
10877 |       /**
10878 |        * The flex container highlight configuration (default: all transparent).
10879 |        */
10880 |       flexContainerHighlightConfig?: FlexContainerHighlightConfig;
10881 |       /**
10882 |        * The flex item highlight configuration (default: all transparent).
10883 |        */
10884 |       flexItemHighlightConfig?: FlexItemHighlightConfig;
10885 |       /**
10886 |        * The contrast algorithm to use for the contrast ratio (default: aa).
10887 |        */
10888 |       contrastAlgorithm?: ContrastAlgorithm;
10889 |       /**
10890 |        * The container query container highlight configuration (default: all transparent).
10891 |        */
10892 |       containerQueryContainerHighlightConfig?: ContainerQueryContainerHighlightConfig;
10893 |     }
10894 |     export type ColorFormat = "rgb"|"hsl"|"hwb"|"hex";
10895 |     /**
10896 |      * Configurations for Persistent Grid Highlight
10897 |      */
10898 |     export interface GridNodeHighlightConfig {
10899 |       /**
10900 |        * A descriptor for the highlight appearance.
10901 |        */
10902 |       gridHighlightConfig: GridHighlightConfig;
10903 |       /**
10904 |        * Identifier of the node to highlight.
10905 |        */
10906 |       nodeId: DOM.NodeId;
10907 |     }
10908 |     export interface FlexNodeHighlightConfig {
10909 |       /**
10910 |        * A descriptor for the highlight appearance of flex containers.
10911 |        */
10912 |       flexContainerHighlightConfig: FlexContainerHighlightConfig;
10913 |       /**
10914 |        * Identifier of the node to highlight.
10915 |        */
10916 |       nodeId: DOM.NodeId;
10917 |     }
10918 |     export interface ScrollSnapContainerHighlightConfig {
10919 |       /**
10920 |        * The style of the snapport border (default: transparent)
10921 |        */
10922 |       snapportBorder?: LineStyle;
10923 |       /**
10924 |        * The style of the snap area border (default: transparent)
10925 |        */
10926 |       snapAreaBorder?: LineStyle;
10927 |       /**
10928 |        * The margin highlight fill color (default: transparent).
10929 |        */
10930 |       scrollMarginColor?: DOM.RGBA;
10931 |       /**
10932 |        * The padding highlight fill color (default: transparent).
10933 |        */
10934 |       scrollPaddingColor?: DOM.RGBA;
10935 |     }
10936 |     export interface ScrollSnapHighlightConfig {
10937 |       /**
10938 |        * A descriptor for the highlight appearance of scroll snap containers.
10939 |        */
10940 |       scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig;
10941 |       /**
10942 |        * Identifier of the node to highlight.
10943 |        */
10944 |       nodeId: DOM.NodeId;
10945 |     }
10946 |     /**
10947 |      * Configuration for dual screen hinge
10948 |      */
10949 |     export interface HingeConfig {
10950 |       /**
10951 |        * A rectangle represent hinge
10952 |        */
10953 |       rect: DOM.Rect;
10954 |       /**
10955 |        * The content box highlight fill color (default: a dark color).
10956 |        */
10957 |       contentColor?: DOM.RGBA;
10958 |       /**
10959 |        * The content box highlight outline color (default: transparent).
10960 |        */
10961 |       outlineColor?: DOM.RGBA;
10962 |     }
10963 |     /**
10964 |      * Configuration for Window Controls Overlay
10965 |      */
10966 |     export interface WindowControlsOverlayConfig {
10967 |       /**
10968 |        * Whether the title bar CSS should be shown when emulating the Window Controls Overlay.
10969 |        */
10970 |       showCSS: boolean;
10971 |       /**
10972 |        * Selected platforms to show the overlay.
10973 |        */
10974 |       selectedPlatform: string;
10975 |       /**
10976 |        * The theme color defined in app manifest.
10977 |        */
10978 |       themeColor: string;
10979 |     }
10980 |     export interface ContainerQueryHighlightConfig {
10981 |       /**
10982 |        * A descriptor for the highlight appearance of container query containers.
10983 |        */
10984 |       containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig;
10985 |       /**
10986 |        * Identifier of the container node to highlight.
10987 |        */
10988 |       nodeId: DOM.NodeId;
10989 |     }
10990 |     export interface ContainerQueryContainerHighlightConfig {
10991 |       /**
10992 |        * The style of the container border.
10993 |        */
10994 |       containerBorder?: LineStyle;
10995 |       /**
10996 |        * The style of the descendants' borders.
10997 |        */
10998 |       descendantBorder?: LineStyle;
10999 |     }
11000 |     export interface IsolatedElementHighlightConfig {
11001 |       /**
11002 |        * A descriptor for the highlight appearance of an element in isolation mode.
11003 |        */
11004 |       isolationModeHighlightConfig: IsolationModeHighlightConfig;
11005 |       /**
11006 |        * Identifier of the isolated element to highlight.
11007 |        */
11008 |       nodeId: DOM.NodeId;
11009 |     }
11010 |     export interface IsolationModeHighlightConfig {
11011 |       /**
11012 |        * The fill color of the resizers (default: transparent).
11013 |        */
11014 |       resizerColor?: DOM.RGBA;
11015 |       /**
11016 |        * The fill color for resizer handles (default: transparent).
11017 |        */
11018 |       resizerHandleColor?: DOM.RGBA;
11019 |       /**
11020 |        * The fill color for the mask covering non-isolated elements (default: transparent).
11021 |        */
11022 |       maskColor?: DOM.RGBA;
11023 |     }
11024 |     export type InspectMode = "searchForNode"|"searchForUAShadowDOM"|"captureAreaScreenshot"|"showDistances"|"none";
11025 | 
11026 |     /**
11027 |      * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
11028 | user manually inspects an element.
11029 |      */
11030 |     export type inspectNodeRequestedPayload = {
11031 |       /**
11032 |        * Id of the node to inspect.
11033 |        */
11034 |       backendNodeId: DOM.BackendNodeId;
11035 |     }
11036 |     /**
11037 |      * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
11038 |      */
11039 |     export type nodeHighlightRequestedPayload = {
11040 |       nodeId: DOM.NodeId;
11041 |     }
11042 |     /**
11043 |      * Fired when user asks to capture screenshot of some area on the page.
11044 |      */
11045 |     export type screenshotRequestedPayload = {
11046 |       /**
11047 |        * Viewport to capture, in device independent pixels (dip).
11048 |        */
11049 |       viewport: Page.Viewport;
11050 |     }
11051 |     /**
11052 |      * Fired when user cancels the inspect mode.
11053 |      */
11054 |     export type inspectModeCanceledPayload = void;
11055 | 
11056 |     /**
11057 |      * Disables domain notifications.
11058 |      */
11059 |     export type disableParameters = {
11060 |     }
11061 |     export type disableReturnValue = {
11062 |     }
11063 |     /**
11064 |      * Enables domain notifications.
11065 |      */
11066 |     export type enableParameters = {
11067 |     }
11068 |     export type enableReturnValue = {
11069 |     }
11070 |     /**
11071 |      * For testing.
11072 |      */
11073 |     export type getHighlightObjectForTestParameters = {
11074 |       /**
11075 |        * Id of the node to get highlight object for.
11076 |        */
11077 |       nodeId: DOM.NodeId;
11078 |       /**
11079 |        * Whether to include distance info.
11080 |        */
11081 |       includeDistance?: boolean;
11082 |       /**
11083 |        * Whether to include style info.
11084 |        */
11085 |       includeStyle?: boolean;
11086 |       /**
11087 |        * The color format to get config with (default: hex).
11088 |        */
11089 |       colorFormat?: ColorFormat;
11090 |       /**
11091 |        * Whether to show accessibility info (default: true).
11092 |        */
11093 |       showAccessibilityInfo?: boolean;
11094 |     }
11095 |     export type getHighlightObjectForTestReturnValue = {
11096 |       /**
11097 |        * Highlight data for the node.
11098 |        */
11099 |       highlight: { [key: string]: string };
11100 |     }
11101 |     /**
11102 |      * For Persistent Grid testing.
11103 |      */
11104 |     export type getGridHighlightObjectsForTestParameters = {
11105 |       /**
11106 |        * Ids of the node to get highlight object for.
11107 |        */
11108 |       nodeIds: DOM.NodeId[];
11109 |     }
11110 |     export type getGridHighlightObjectsForTestReturnValue = {
11111 |       /**
11112 |        * Grid Highlight data for the node ids provided.
11113 |        */
11114 |       highlights: { [key: string]: string };
11115 |     }
11116 |     /**
11117 |      * For Source Order Viewer testing.
11118 |      */
11119 |     export type getSourceOrderHighlightObjectForTestParameters = {
11120 |       /**
11121 |        * Id of the node to highlight.
11122 |        */
11123 |       nodeId: DOM.NodeId;
11124 |     }
11125 |     export type getSourceOrderHighlightObjectForTestReturnValue = {
11126 |       /**
11127 |        * Source order highlight data for the node id provided.
11128 |        */
11129 |       highlight: { [key: string]: string };
11130 |     }
11131 |     /**
11132 |      * Hides any highlight.
11133 |      */
11134 |     export type hideHighlightParameters = {
11135 |     }
11136 |     export type hideHighlightReturnValue = {
11137 |     }
11138 |     /**
11139 |      * Highlights owner element of the frame with given id.
11140 | Deprecated: Doesn't work reliably and cannot be fixed due to process
11141 | separation (the owner node might be in a different process). Determine
11142 | the owner node in the client and use highlightNode.
11143 |      */
11144 |     export type highlightFrameParameters = {
11145 |       /**
11146 |        * Identifier of the frame to highlight.
11147 |        */
11148 |       frameId: Page.FrameId;
11149 |       /**
11150 |        * The content box highlight fill color (default: transparent).
11151 |        */
11152 |       contentColor?: DOM.RGBA;
11153 |       /**
11154 |        * The content box highlight outline color (default: transparent).
11155 |        */
11156 |       contentOutlineColor?: DOM.RGBA;
11157 |     }
11158 |     export type highlightFrameReturnValue = {
11159 |     }
11160 |     /**
11161 |      * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
11162 | objectId must be specified.
11163 |      */
11164 |     export type highlightNodeParameters = {
11165 |       /**
11166 |        * A descriptor for the highlight appearance.
11167 |        */
11168 |       highlightConfig: HighlightConfig;
11169 |       /**
11170 |        * Identifier of the node to highlight.
11171 |        */
11172 |       nodeId?: DOM.NodeId;
11173 |       /**
11174 |        * Identifier of the backend node to highlight.
11175 |        */
11176 |       backendNodeId?: DOM.BackendNodeId;
11177 |       /**
11178 |        * JavaScript object id of the node to be highlighted.
11179 |        */
11180 |       objectId?: Runtime.RemoteObjectId;
11181 |       /**
11182 |        * Selectors to highlight relevant nodes.
11183 |        */
11184 |       selector?: string;
11185 |     }
11186 |     export type highlightNodeReturnValue = {
11187 |     }
11188 |     /**
11189 |      * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
11190 |      */
11191 |     export type highlightQuadParameters = {
11192 |       /**
11193 |        * Quad to highlight
11194 |        */
11195 |       quad: DOM.Quad;
11196 |       /**
11197 |        * The highlight fill color (default: transparent).
11198 |        */
11199 |       color?: DOM.RGBA;
11200 |       /**
11201 |        * The highlight outline color (default: transparent).
11202 |        */
11203 |       outlineColor?: DOM.RGBA;
11204 |     }
11205 |     export type highlightQuadReturnValue = {
11206 |     }
11207 |     /**
11208 |      * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
11209 |      */
11210 |     export type highlightRectParameters = {
11211 |       /**
11212 |        * X coordinate
11213 |        */
11214 |       x: number;
11215 |       /**
11216 |        * Y coordinate
11217 |        */
11218 |       y: number;
11219 |       /**
11220 |        * Rectangle width
11221 |        */
11222 |       width: number;
11223 |       /**
11224 |        * Rectangle height
11225 |        */
11226 |       height: number;
11227 |       /**
11228 |        * The highlight fill color (default: transparent).
11229 |        */
11230 |       color?: DOM.RGBA;
11231 |       /**
11232 |        * The highlight outline color (default: transparent).
11233 |        */
11234 |       outlineColor?: DOM.RGBA;
11235 |     }
11236 |     export type highlightRectReturnValue = {
11237 |     }
11238 |     /**
11239 |      * Highlights the source order of the children of the DOM node with given id or with the given
11240 | JavaScript object wrapper. Either nodeId or objectId must be specified.
11241 |      */
11242 |     export type highlightSourceOrderParameters = {
11243 |       /**
11244 |        * A descriptor for the appearance of the overlay drawing.
11245 |        */
11246 |       sourceOrderConfig: SourceOrderConfig;
11247 |       /**
11248 |        * Identifier of the node to highlight.
11249 |        */
11250 |       nodeId?: DOM.NodeId;
11251 |       /**
11252 |        * Identifier of the backend node to highlight.
11253 |        */
11254 |       backendNodeId?: DOM.BackendNodeId;
11255 |       /**
11256 |        * JavaScript object id of the node to be highlighted.
11257 |        */
11258 |       objectId?: Runtime.RemoteObjectId;
11259 |     }
11260 |     export type highlightSourceOrderReturnValue = {
11261 |     }
11262 |     /**
11263 |      * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
11264 | Backend then generates 'inspectNodeRequested' event upon element selection.
11265 |      */
11266 |     export type setInspectModeParameters = {
11267 |       /**
11268 |        * Set an inspection mode.
11269 |        */
11270 |       mode: InspectMode;
11271 |       /**
11272 |        * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
11273 | == false`.
11274 |        */
11275 |       highlightConfig?: HighlightConfig;
11276 |     }
11277 |     export type setInspectModeReturnValue = {
11278 |     }
11279 |     /**
11280 |      * Highlights owner element of all frames detected to be ads.
11281 |      */
11282 |     export type setShowAdHighlightsParameters = {
11283 |       /**
11284 |        * True for showing ad highlights
11285 |        */
11286 |       show: boolean;
11287 |     }
11288 |     export type setShowAdHighlightsReturnValue = {
11289 |     }
11290 |     export type setPausedInDebuggerMessageParameters = {
11291 |       /**
11292 |        * The message to display, also triggers resume and step over controls.
11293 |        */
11294 |       message?: string;
11295 |     }
11296 |     export type setPausedInDebuggerMessageReturnValue = {
11297 |     }
11298 |     /**
11299 |      * Requests that backend shows debug borders on layers
11300 |      */
11301 |     export type setShowDebugBordersParameters = {
11302 |       /**
11303 |        * True for showing debug borders
11304 |        */
11305 |       show: boolean;
11306 |     }
11307 |     export type setShowDebugBordersReturnValue = {
11308 |     }
11309 |     /**
11310 |      * Requests that backend shows the FPS counter
11311 |      */
11312 |     export type setShowFPSCounterParameters = {
11313 |       /**
11314 |        * True for showing the FPS counter
11315 |        */
11316 |       show: boolean;
11317 |     }
11318 |     export type setShowFPSCounterReturnValue = {
11319 |     }
11320 |     /**
11321 |      * Highlight multiple elements with the CSS Grid overlay.
11322 |      */
11323 |     export type setShowGridOverlaysParameters = {
11324 |       /**
11325 |        * An array of node identifiers and descriptors for the highlight appearance.
11326 |        */
11327 |       gridNodeHighlightConfigs: GridNodeHighlightConfig[];
11328 |     }
11329 |     export type setShowGridOverlaysReturnValue = {
11330 |     }
11331 |     export type setShowFlexOverlaysParameters = {
11332 |       /**
11333 |        * An array of node identifiers and descriptors for the highlight appearance.
11334 |        */
11335 |       flexNodeHighlightConfigs: FlexNodeHighlightConfig[];
11336 |     }
11337 |     export type setShowFlexOverlaysReturnValue = {
11338 |     }
11339 |     export type setShowScrollSnapOverlaysParameters = {
11340 |       /**
11341 |        * An array of node identifiers and descriptors for the highlight appearance.
11342 |        */
11343 |       scrollSnapHighlightConfigs: ScrollSnapHighlightConfig[];
11344 |     }
11345 |     export type setShowScrollSnapOverlaysReturnValue = {
11346 |     }
11347 |     export type setShowContainerQueryOverlaysParameters = {
11348 |       /**
11349 |        * An array of node identifiers and descriptors for the highlight appearance.
11350 |        */
11351 |       containerQueryHighlightConfigs: ContainerQueryHighlightConfig[];
11352 |     }
11353 |     export type setShowContainerQueryOverlaysReturnValue = {
11354 |     }
11355 |     /**
11356 |      * Requests that backend shows paint rectangles
11357 |      */
11358 |     export type setShowPaintRectsParameters = {
11359 |       /**
11360 |        * True for showing paint rectangles
11361 |        */
11362 |       result: boolean;
11363 |     }
11364 |     export type setShowPaintRectsReturnValue = {
11365 |     }
11366 |     /**
11367 |      * Requests that backend shows layout shift regions
11368 |      */
11369 |     export type setShowLayoutShiftRegionsParameters = {
11370 |       /**
11371 |        * True for showing layout shift regions
11372 |        */
11373 |       result: boolean;
11374 |     }
11375 |     export type setShowLayoutShiftRegionsReturnValue = {
11376 |     }
11377 |     /**
11378 |      * Requests that backend shows scroll bottleneck rects
11379 |      */
11380 |     export type setShowScrollBottleneckRectsParameters = {
11381 |       /**
11382 |        * True for showing scroll bottleneck rects
11383 |        */
11384 |       show: boolean;
11385 |     }
11386 |     export type setShowScrollBottleneckRectsReturnValue = {
11387 |     }
11388 |     /**
11389 |      * Deprecated, no longer has any effect.
11390 |      */
11391 |     export type setShowHitTestBordersParameters = {
11392 |       /**
11393 |        * True for showing hit-test borders
11394 |        */
11395 |       show: boolean;
11396 |     }
11397 |     export type setShowHitTestBordersReturnValue = {
11398 |     }
11399 |     /**
11400 |      * Deprecated, no longer has any effect.
11401 |      */
11402 |     export type setShowWebVitalsParameters = {
11403 |       show: boolean;
11404 |     }
11405 |     export type setShowWebVitalsReturnValue = {
11406 |     }
11407 |     /**
11408 |      * Paints viewport size upon main frame resize.
11409 |      */
11410 |     export type setShowViewportSizeOnResizeParameters = {
11411 |       /**
11412 |        * Whether to paint size or not.
11413 |        */
11414 |       show: boolean;
11415 |     }
11416 |     export type setShowViewportSizeOnResizeReturnValue = {
11417 |     }
11418 |     /**
11419 |      * Add a dual screen device hinge
11420 |      */
11421 |     export type setShowHingeParameters = {
11422 |       /**
11423 |        * hinge data, null means hideHinge
11424 |        */
11425 |       hingeConfig?: HingeConfig;
11426 |     }
11427 |     export type setShowHingeReturnValue = {
11428 |     }
11429 |     /**
11430 |      * Show elements in isolation mode with overlays.
11431 |      */
11432 |     export type setShowIsolatedElementsParameters = {
11433 |       /**
11434 |        * An array of node identifiers and descriptors for the highlight appearance.
11435 |        */
11436 |       isolatedElementHighlightConfigs: IsolatedElementHighlightConfig[];
11437 |     }
11438 |     export type setShowIsolatedElementsReturnValue = {
11439 |     }
11440 |     /**
11441 |      * Show Window Controls Overlay for PWA
11442 |      */
11443 |     export type setShowWindowControlsOverlayParameters = {
11444 |       /**
11445 |        * Window Controls Overlay data, null means hide Window Controls Overlay
11446 |        */
11447 |       windowControlsOverlayConfig?: WindowControlsOverlayConfig;
11448 |     }
11449 |     export type setShowWindowControlsOverlayReturnValue = {
11450 |     }
11451 |   }
11452 | 
11453 |   /**
11454 |    * Actions and events related to the inspected page belong to the page domain.
11455 |    */
11456 |   export module Page {
11457 |     /**
11458 |      * Unique frame identifier.
11459 |      */
11460 |     export type FrameId = string;
11461 |     /**
11462 |      * Indicates whether a frame has been identified as an ad.
11463 |      */
11464 |     export type AdFrameType = "none"|"child"|"root";
11465 |     export type AdFrameExplanation = "ParentIsAd"|"CreatedByAdScript"|"MatchedBlockingRule";
11466 |     /**
11467 |      * Indicates whether a frame has been identified as an ad and why.
11468 |      */
11469 |     export interface AdFrameStatus {
11470 |       adFrameType: AdFrameType;
11471 |       explanations?: AdFrameExplanation[];
11472 |     }
11473 |     /**
11474 |      * Identifies the bottom-most script which caused the frame to be labelled
11475 | as an ad.
11476 |      */
11477 |     export interface AdScriptId {
11478 |       /**
11479 |        * Script Id of the bottom-most script which caused the frame to be labelled
11480 | as an ad.
11481 |        */
11482 |       scriptId: Runtime.ScriptId;
11483 |       /**
11484 |        * Id of adScriptId's debugger.
11485 |        */
11486 |       debuggerId: Runtime.UniqueDebuggerId;
11487 |     }
11488 |     /**
11489 |      * Indicates whether the frame is a secure context and why it is the case.
11490 |      */
11491 |     export type SecureContextType = "Secure"|"SecureLocalhost"|"InsecureScheme"|"InsecureAncestor";
11492 |     /**
11493 |      * Indicates whether the frame is cross-origin isolated and why it is the case.
11494 |      */
11495 |     export type CrossOriginIsolatedContextType = "Isolated"|"NotIsolated"|"NotIsolatedFeatureDisabled";
11496 |     export type GatedAPIFeatures = "SharedArrayBuffers"|"SharedArrayBuffersTransferAllowed"|"PerformanceMeasureMemory"|"PerformanceProfile";
11497 |     /**
11498 |      * All Permissions Policy features. This enum should match the one defined
11499 | in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
11500 |      */
11501 |     export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"attribution-reporting"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"local-fonts"|"magnetometer"|"media-playback-while-not-visible"|"microphone"|"midi"|"otp-credentials"|"payment"|"picture-in-picture"|"popins"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-autofill"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"sync-xhr"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"xr-spatial-tracking";
11502 |     /**
11503 |      * Reason for a permissions policy feature to be disabled.
11504 |      */
11505 |     export type PermissionsPolicyBlockReason = "Header"|"IframeAttribute"|"InFencedFrameTree"|"InIsolatedApp";
11506 |     export interface PermissionsPolicyBlockLocator {
11507 |       frameId: FrameId;
11508 |       blockReason: PermissionsPolicyBlockReason;
11509 |     }
11510 |     export interface PermissionsPolicyFeatureState {
11511 |       feature: PermissionsPolicyFeature;
11512 |       allowed: boolean;
11513 |       locator?: PermissionsPolicyBlockLocator;
11514 |     }
11515 |     /**
11516 |      * Origin Trial(https://www.chromium.org/blink/origin-trials) support.
11517 | Status for an Origin Trial token.
11518 |      */
11519 |     export type OriginTrialTokenStatus = "Success"|"NotSupported"|"Insecure"|"Expired"|"WrongOrigin"|"InvalidSignature"|"Malformed"|"WrongVersion"|"FeatureDisabled"|"TokenDisabled"|"FeatureDisabledForUser"|"UnknownTrial";
11520 |     /**
11521 |      * Status for an Origin Trial.
11522 |      */
11523 |     export type OriginTrialStatus = "Enabled"|"ValidTokenNotProvided"|"OSNotSupported"|"TrialNotAllowed";
11524 |     export type OriginTrialUsageRestriction = "None"|"Subset";
11525 |     export interface OriginTrialToken {
11526 |       origin: string;
11527 |       matchSubDomains: boolean;
11528 |       trialName: string;
11529 |       expiryTime: Network.TimeSinceEpoch;
11530 |       isThirdParty: boolean;
11531 |       usageRestriction: OriginTrialUsageRestriction;
11532 |     }
11533 |     export interface OriginTrialTokenWithStatus {
11534 |       rawTokenText: string;
11535 |       /**
11536 |        * `parsedToken` is present only when the token is extractable and
11537 | parsable.
11538 |        */
11539 |       parsedToken?: OriginTrialToken;
11540 |       status: OriginTrialTokenStatus;
11541 |     }
11542 |     export interface OriginTrial {
11543 |       trialName: string;
11544 |       status: OriginTrialStatus;
11545 |       tokensWithStatus: OriginTrialTokenWithStatus[];
11546 |     }
11547 |     /**
11548 |      * Information about the Frame on the page.
11549 |      */
11550 |     export interface Frame {
11551 |       /**
11552 |        * Frame unique identifier.
11553 |        */
11554 |       id: FrameId;
11555 |       /**
11556 |        * Parent frame identifier.
11557 |        */
11558 |       parentId?: FrameId;
11559 |       /**
11560 |        * Identifier of the loader associated with this frame.
11561 |        */
11562 |       loaderId: Network.LoaderId;
11563 |       /**
11564 |        * Frame's name as specified in the tag.
11565 |        */
11566 |       name?: string;
11567 |       /**
11568 |        * Frame document's URL without fragment.
11569 |        */
11570 |       url: string;
11571 |       /**
11572 |        * Frame document's URL fragment including the '#'.
11573 |        */
11574 |       urlFragment?: string;
11575 |       /**
11576 |        * Frame document's registered domain, taking the public suffixes list into account.
11577 | Extracted from the Frame's url.
11578 | Example URLs: http://www.google.com/file.html -> "google.com"
11579 |               http://a.b.co.uk/file.html      -> "b.co.uk"
11580 |        */
11581 |       domainAndRegistry: string;
11582 |       /**
11583 |        * Frame document's security origin.
11584 |        */
11585 |       securityOrigin: string;
11586 |       /**
11587 |        * Frame document's mimeType as determined by the browser.
11588 |        */
11589 |       mimeType: string;
11590 |       /**
11591 |        * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
11592 |        */
11593 |       unreachableUrl?: string;
11594 |       /**
11595 |        * Indicates whether this frame was tagged as an ad and why.
11596 |        */
11597 |       adFrameStatus?: AdFrameStatus;
11598 |       /**
11599 |        * Indicates whether the main document is a secure context and explains why that is the case.
11600 |        */
11601 |       secureContextType: SecureContextType;
11602 |       /**
11603 |        * Indicates whether this is a cross origin isolated context.
11604 |        */
11605 |       crossOriginIsolatedContextType: CrossOriginIsolatedContextType;
11606 |       /**
11607 |        * Indicated which gated APIs / features are available.
11608 |        */
11609 |       gatedAPIFeatures: GatedAPIFeatures[];
11610 |     }
11611 |     /**
11612 |      * Information about the Resource on the page.
11613 |      */
11614 |     export interface FrameResource {
11615 |       /**
11616 |        * Resource URL.
11617 |        */
11618 |       url: string;
11619 |       /**
11620 |        * Type of this resource.
11621 |        */
11622 |       type: Network.ResourceType;
11623 |       /**
11624 |        * Resource mimeType as determined by the browser.
11625 |        */
11626 |       mimeType: string;
11627 |       /**
11628 |        * last-modified timestamp as reported by server.
11629 |        */
11630 |       lastModified?: Network.TimeSinceEpoch;
11631 |       /**
11632 |        * Resource content size.
11633 |        */
11634 |       contentSize?: number;
11635 |       /**
11636 |        * True if the resource failed to load.
11637 |        */
11638 |       failed?: boolean;
11639 |       /**
11640 |        * True if the resource was canceled during loading.
11641 |        */
11642 |       canceled?: boolean;
11643 |     }
11644 |     /**
11645 |      * Information about the Frame hierarchy along with their cached resources.
11646 |      */
11647 |     export interface FrameResourceTree {
11648 |       /**
11649 |        * Frame information for this tree item.
11650 |        */
11651 |       frame: Frame;
11652 |       /**
11653 |        * Child frames.
11654 |        */
11655 |       childFrames?: FrameResourceTree[];
11656 |       /**
11657 |        * Information about frame resources.
11658 |        */
11659 |       resources: FrameResource[];
11660 |     }
11661 |     /**
11662 |      * Information about the Frame hierarchy.
11663 |      */
11664 |     export interface FrameTree {
11665 |       /**
11666 |        * Frame information for this tree item.
11667 |        */
11668 |       frame: Frame;
11669 |       /**
11670 |        * Child frames.
11671 |        */
11672 |       childFrames?: FrameTree[];
11673 |     }
11674 |     /**
11675 |      * Unique script identifier.
11676 |      */
11677 |     export type ScriptIdentifier = string;
11678 |     /**
11679 |      * Transition type.
11680 |      */
11681 |     export type TransitionType = "link"|"typed"|"address_bar"|"auto_bookmark"|"auto_subframe"|"manual_subframe"|"generated"|"auto_toplevel"|"form_submit"|"reload"|"keyword"|"keyword_generated"|"other";
11682 |     /**
11683 |      * Navigation history entry.
11684 |      */
11685 |     export interface NavigationEntry {
11686 |       /**
11687 |        * Unique id of the navigation history entry.
11688 |        */
11689 |       id: number;
11690 |       /**
11691 |        * URL of the navigation history entry.
11692 |        */
11693 |       url: string;
11694 |       /**
11695 |        * URL that the user typed in the url bar.
11696 |        */
11697 |       userTypedURL: string;
11698 |       /**
11699 |        * Title of the navigation history entry.
11700 |        */
11701 |       title: string;
11702 |       /**
11703 |        * Transition type.
11704 |        */
11705 |       transitionType: TransitionType;
11706 |     }
11707 |     /**
11708 |      * Screencast frame metadata.
11709 |      */
11710 |     export interface ScreencastFrameMetadata {
11711 |       /**
11712 |        * Top offset in DIP.
11713 |        */
11714 |       offsetTop: number;
11715 |       /**
11716 |        * Page scale factor.
11717 |        */
11718 |       pageScaleFactor: number;
11719 |       /**
11720 |        * Device screen width in DIP.
11721 |        */
11722 |       deviceWidth: number;
11723 |       /**
11724 |        * Device screen height in DIP.
11725 |        */
11726 |       deviceHeight: number;
11727 |       /**
11728 |        * Position of horizontal scroll in CSS pixels.
11729 |        */
11730 |       scrollOffsetX: number;
11731 |       /**
11732 |        * Position of vertical scroll in CSS pixels.
11733 |        */
11734 |       scrollOffsetY: number;
11735 |       /**
11736 |        * Frame swap timestamp.
11737 |        */
11738 |       timestamp?: Network.TimeSinceEpoch;
11739 |     }
11740 |     /**
11741 |      * Javascript dialog type.
11742 |      */
11743 |     export type DialogType = "alert"|"confirm"|"prompt"|"beforeunload";
11744 |     /**
11745 |      * Error while paring app manifest.
11746 |      */
11747 |     export interface AppManifestError {
11748 |       /**
11749 |        * Error message.
11750 |        */
11751 |       message: string;
11752 |       /**
11753 |        * If critical, this is a non-recoverable parse error.
11754 |        */
11755 |       critical: number;
11756 |       /**
11757 |        * Error line.
11758 |        */
11759 |       line: number;
11760 |       /**
11761 |        * Error column.
11762 |        */
11763 |       column: number;
11764 |     }
11765 |     /**
11766 |      * Parsed app manifest properties.
11767 |      */
11768 |     export interface AppManifestParsedProperties {
11769 |       /**
11770 |        * Computed scope value
11771 |        */
11772 |       scope: string;
11773 |     }
11774 |     /**
11775 |      * Layout viewport position and dimensions.
11776 |      */
11777 |     export interface LayoutViewport {
11778 |       /**
11779 |        * Horizontal offset relative to the document (CSS pixels).
11780 |        */
11781 |       pageX: number;
11782 |       /**
11783 |        * Vertical offset relative to the document (CSS pixels).
11784 |        */
11785 |       pageY: number;
11786 |       /**
11787 |        * Width (CSS pixels), excludes scrollbar if present.
11788 |        */
11789 |       clientWidth: number;
11790 |       /**
11791 |        * Height (CSS pixels), excludes scrollbar if present.
11792 |        */
11793 |       clientHeight: number;
11794 |     }
11795 |     /**
11796 |      * Visual viewport position, dimensions, and scale.
11797 |      */
11798 |     export interface VisualViewport {
11799 |       /**
11800 |        * Horizontal offset relative to the layout viewport (CSS pixels).
11801 |        */
11802 |       offsetX: number;
11803 |       /**
11804 |        * Vertical offset relative to the layout viewport (CSS pixels).
11805 |        */
11806 |       offsetY: number;
11807 |       /**
11808 |        * Horizontal offset relative to the document (CSS pixels).
11809 |        */
11810 |       pageX: number;
11811 |       /**
11812 |        * Vertical offset relative to the document (CSS pixels).
11813 |        */
11814 |       pageY: number;
11815 |       /**
11816 |        * Width (CSS pixels), excludes scrollbar if present.
11817 |        */
11818 |       clientWidth: number;
11819 |       /**
11820 |        * Height (CSS pixels), excludes scrollbar if present.
11821 |        */
11822 |       clientHeight: number;
11823 |       /**
11824 |        * Scale relative to the ideal viewport (size at width=device-width).
11825 |        */
11826 |       scale: number;
11827 |       /**
11828 |        * Page zoom factor (CSS to device independent pixels ratio).
11829 |        */
11830 |       zoom?: number;
11831 |     }
11832 |     /**
11833 |      * Viewport for capturing screenshot.
11834 |      */
11835 |     export interface Viewport {
11836 |       /**
11837 |        * X offset in device independent pixels (dip).
11838 |        */
11839 |       x: number;
11840 |       /**
11841 |        * Y offset in device independent pixels (dip).
11842 |        */
11843 |       y: number;
11844 |       /**
11845 |        * Rectangle width in device independent pixels (dip).
11846 |        */
11847 |       width: number;
11848 |       /**
11849 |        * Rectangle height in device independent pixels (dip).
11850 |        */
11851 |       height: number;
11852 |       /**
11853 |        * Page scale factor.
11854 |        */
11855 |       scale: number;
11856 |     }
11857 |     /**
11858 |      * Generic font families collection.
11859 |      */
11860 |     export interface FontFamilies {
11861 |       /**
11862 |        * The standard font-family.
11863 |        */
11864 |       standard?: string;
11865 |       /**
11866 |        * The fixed font-family.
11867 |        */
11868 |       fixed?: string;
11869 |       /**
11870 |        * The serif font-family.
11871 |        */
11872 |       serif?: string;
11873 |       /**
11874 |        * The sansSerif font-family.
11875 |        */
11876 |       sansSerif?: string;
11877 |       /**
11878 |        * The cursive font-family.
11879 |        */
11880 |       cursive?: string;
11881 |       /**
11882 |        * The fantasy font-family.
11883 |        */
11884 |       fantasy?: string;
11885 |       /**
11886 |        * The math font-family.
11887 |        */
11888 |       math?: string;
11889 |     }
11890 |     /**
11891 |      * Font families collection for a script.
11892 |      */
11893 |     export interface ScriptFontFamilies {
11894 |       /**
11895 |        * Name of the script which these font families are defined for.
11896 |        */
11897 |       script: string;
11898 |       /**
11899 |        * Generic font families collection for the script.
11900 |        */
11901 |       fontFamilies: FontFamilies;
11902 |     }
11903 |     /**
11904 |      * Default font sizes.
11905 |      */
11906 |     export interface FontSizes {
11907 |       /**
11908 |        * Default standard font size.
11909 |        */
11910 |       standard?: number;
11911 |       /**
11912 |        * Default fixed font size.
11913 |        */
11914 |       fixed?: number;
11915 |     }
11916 |     export type ClientNavigationReason = "anchorClick"|"formSubmissionGet"|"formSubmissionPost"|"httpHeaderRefresh"|"initialFrameNavigation"|"metaTagRefresh"|"other"|"pageBlockInterstitial"|"reload"|"scriptInitiated";
11917 |     export type ClientNavigationDisposition = "currentTab"|"newTab"|"newWindow"|"download";
11918 |     export interface InstallabilityErrorArgument {
11919 |       /**
11920 |        * Argument name (e.g. name:'minimum-icon-size-in-pixels').
11921 |        */
11922 |       name: string;
11923 |       /**
11924 |        * Argument value (e.g. value:'64').
11925 |        */
11926 |       value: string;
11927 |     }
11928 |     /**
11929 |      * The installability error
11930 |      */
11931 |     export interface InstallabilityError {
11932 |       /**
11933 |        * The error id (e.g. 'manifest-missing-suitable-icon').
11934 |        */
11935 |       errorId: string;
11936 |       /**
11937 |        * The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
11938 |        */
11939 |       errorArguments: InstallabilityErrorArgument[];
11940 |     }
11941 |     /**
11942 |      * The referring-policy used for the navigation.
11943 |      */
11944 |     export type ReferrerPolicy = "noReferrer"|"noReferrerWhenDowngrade"|"origin"|"originWhenCrossOrigin"|"sameOrigin"|"strictOrigin"|"strictOriginWhenCrossOrigin"|"unsafeUrl";
11945 |     /**
11946 |      * Per-script compilation cache parameters for `Page.produceCompilationCache`
11947 |      */
11948 |     export interface CompilationCacheParams {
11949 |       /**
11950 |        * The URL of the script to produce a compilation cache entry for.
11951 |        */
11952 |       url: string;
11953 |       /**
11954 |        * A hint to the backend whether eager compilation is recommended.
11955 | (the actual compilation mode used is upon backend discretion).
11956 |        */
11957 |       eager?: boolean;
11958 |     }
11959 |     export interface FileFilter {
11960 |       name?: string;
11961 |       accepts?: string[];
11962 |     }
11963 |     export interface FileHandler {
11964 |       action: string;
11965 |       name: string;
11966 |       icons?: ImageResource[];
11967 |       /**
11968 |        * Mimic a map, name is the key, accepts is the value.
11969 |        */
11970 |       accepts?: FileFilter[];
11971 |       /**
11972 |        * Won't repeat the enums, using string for easy comparison. Same as the
11973 | other enums below.
11974 |        */
11975 |       launchType: string;
11976 |     }
11977 |     /**
11978 |      * The image definition used in both icon and screenshot.
11979 |      */
11980 |     export interface ImageResource {
11981 |       /**
11982 |        * The src field in the definition, but changing to url in favor of
11983 | consistency.
11984 |        */
11985 |       url: string;
11986 |       sizes?: string;
11987 |       type?: string;
11988 |     }
11989 |     export interface LaunchHandler {
11990 |       clientMode: string;
11991 |     }
11992 |     export interface ProtocolHandler {
11993 |       protocol: string;
11994 |       url: string;
11995 |     }
11996 |     export interface RelatedApplication {
11997 |       id?: string;
11998 |       url: string;
11999 |     }
12000 |     export interface ScopeExtension {
12001 |       /**
12002 |        * Instead of using tuple, this field always returns the serialized string
12003 | for easy understanding and comparison.
12004 |        */
12005 |       origin: string;
12006 |       hasOriginWildcard: boolean;
12007 |     }
12008 |     export interface Screenshot {
12009 |       image: ImageResource;
12010 |       formFactor: string;
12011 |       label?: string;
12012 |     }
12013 |     export interface ShareTarget {
12014 |       action: string;
12015 |       method: string;
12016 |       enctype: string;
12017 |       /**
12018 |        * Embed the ShareTargetParams
12019 |        */
12020 |       title?: string;
12021 |       text?: string;
12022 |       url?: string;
12023 |       files?: FileFilter[];
12024 |     }
12025 |     export interface Shortcut {
12026 |       name: string;
12027 |       url: string;
12028 |     }
12029 |     export interface WebAppManifest {
12030 |       backgroundColor?: string;
12031 |       /**
12032 |        * The extra description provided by the manifest.
12033 |        */
12034 |       description?: string;
12035 |       dir?: string;
12036 |       display?: string;
12037 |       /**
12038 |        * The overrided display mode controlled by the user.
12039 |        */
12040 |       displayOverrides?: string[];
12041 |       /**
12042 |        * The handlers to open files.
12043 |        */
12044 |       fileHandlers?: FileHandler[];
12045 |       icons?: ImageResource[];
12046 |       id?: string;
12047 |       lang?: string;
12048 |       /**
12049 |        * TODO(crbug.com/1231886): This field is non-standard and part of a Chrome
12050 | experiment. See:
12051 | https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
12052 |        */
12053 |       launchHandler?: LaunchHandler;
12054 |       name?: string;
12055 |       orientation?: string;
12056 |       preferRelatedApplications?: boolean;
12057 |       /**
12058 |        * The handlers to open protocols.
12059 |        */
12060 |       protocolHandlers?: ProtocolHandler[];
12061 |       relatedApplications?: RelatedApplication[];
12062 |       scope?: string;
12063 |       /**
12064 |        * Non-standard, see
12065 | https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
12066 |        */
12067 |       scopeExtensions?: ScopeExtension[];
12068 |       /**
12069 |        * The screenshots used by chromium.
12070 |        */
12071 |       screenshots?: Screenshot[];
12072 |       shareTarget?: ShareTarget;
12073 |       shortName?: string;
12074 |       shortcuts?: Shortcut[];
12075 |       startUrl?: string;
12076 |       themeColor?: string;
12077 |     }
12078 |     /**
12079 |      * Enum of possible auto-response for permission / prompt dialogs.
12080 |      */
12081 |     export type AutoResponseMode = "none"|"autoAccept"|"autoReject"|"autoOptOut";
12082 |     /**
12083 |      * The type of a frameNavigated event.
12084 |      */
12085 |     export type NavigationType = "Navigation"|"BackForwardCacheRestore";
12086 |     /**
12087 |      * List of not restored reasons for back-forward cache.
12088 |      */
12089 |     export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"WebLocks"|"WebHID"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCSticky"|"WebTransportSticky"|"WebSocketSticky"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"ContentDiscarded"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient"|"PostMessageByWebViewClient";
12090 |     /**
12091 |      * Types of not restored reasons for back-forward cache.
12092 |      */
12093 |     export type BackForwardCacheNotRestoredReasonType = "SupportPending"|"PageSupportNeeded"|"Circumstantial";
12094 |     export interface BackForwardCacheBlockingDetails {
12095 |       /**
12096 |        * Url of the file where blockage happened. Optional because of tests.
12097 |        */
12098 |       url?: string;
12099 |       /**
12100 |        * Function name where blockage happened. Optional because of anonymous functions and tests.
12101 |        */
12102 |       function?: string;
12103 |       /**
12104 |        * Line number in the script (0-based).
12105 |        */
12106 |       lineNumber: number;
12107 |       /**
12108 |        * Column number in the script (0-based).
12109 |        */
12110 |       columnNumber: number;
12111 |     }
12112 |     export interface BackForwardCacheNotRestoredExplanation {
12113 |       /**
12114 |        * Type of the reason
12115 |        */
12116 |       type: BackForwardCacheNotRestoredReasonType;
12117 |       /**
12118 |        * Not restored reason
12119 |        */
12120 |       reason: BackForwardCacheNotRestoredReason;
12121 |       /**
12122 |        * Context associated with the reason. The meaning of this context is
12123 | dependent on the reason:
12124 | - EmbedderExtensionSentMessageToCachedFrame: the extension ID.
12125 |        */
12126 |       context?: string;
12127 |       details?: BackForwardCacheBlockingDetails[];
12128 |     }
12129 |     export interface BackForwardCacheNotRestoredExplanationTree {
12130 |       /**
12131 |        * URL of each frame
12132 |        */
12133 |       url: string;
12134 |       /**
12135 |        * Not restored reasons of each frame
12136 |        */
12137 |       explanations: BackForwardCacheNotRestoredExplanation[];
12138 |       /**
12139 |        * Array of children frame
12140 |        */
12141 |       children: BackForwardCacheNotRestoredExplanationTree[];
12142 |     }
12143 | 
12144 |     export type domContentEventFiredPayload = {
12145 |       timestamp: Network.MonotonicTime;
12146 |     }
12147 |     /**
12148 |      * Emitted only when `page.interceptFileChooser` is enabled.
12149 |      */
12150 |     export type fileChooserOpenedPayload = {
12151 |       /**
12152 |        * Id of the frame containing input node.
12153 |        */
12154 |       frameId: FrameId;
12155 |       /**
12156 |        * Input mode.
12157 |        */
12158 |       mode: "selectSingle"|"selectMultiple";
12159 |       /**
12160 |        * Input node id. Only present for file choosers opened via an `<input type="file">` element.
12161 |        */
12162 |       backendNodeId?: DOM.BackendNodeId;
12163 |     }
12164 |     /**
12165 |      * Fired when frame has been attached to its parent.
12166 |      */
12167 |     export type frameAttachedPayload = {
12168 |       /**
12169 |        * Id of the frame that has been attached.
12170 |        */
12171 |       frameId: FrameId;
12172 |       /**
12173 |        * Parent frame identifier.
12174 |        */
12175 |       parentFrameId: FrameId;
12176 |       /**
12177 |        * JavaScript stack trace of when frame was attached, only set if frame initiated from script.
12178 |        */
12179 |       stack?: Runtime.StackTrace;
12180 |     }
12181 |     /**
12182 |      * Fired when frame no longer has a scheduled navigation.
12183 |      */
12184 |     export type frameClearedScheduledNavigationPayload = {
12185 |       /**
12186 |        * Id of the frame that has cleared its scheduled navigation.
12187 |        */
12188 |       frameId: FrameId;
12189 |     }
12190 |     /**
12191 |      * Fired when frame has been detached from its parent.
12192 |      */
12193 |     export type frameDetachedPayload = {
12194 |       /**
12195 |        * Id of the frame that has been detached.
12196 |        */
12197 |       frameId: FrameId;
12198 |       reason: "remove"|"swap";
12199 |     }
12200 |     /**
12201 |      * Fired before frame subtree is detached. Emitted before any frame of the
12202 | subtree is actually detached.
12203 |      */
12204 |     export type frameSubtreeWillBeDetachedPayload = {
12205 |       /**
12206 |        * Id of the frame that is the root of the subtree that will be detached.
12207 |        */
12208 |       frameId: FrameId;
12209 |     }
12210 |     /**
12211 |      * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
12212 |      */
12213 |     export type frameNavigatedPayload = {
12214 |       /**
12215 |        * Frame object.
12216 |        */
12217 |       frame: Frame;
12218 |       type: NavigationType;
12219 |     }
12220 |     /**
12221 |      * Fired when opening document to write to.
12222 |      */
12223 |     export type documentOpenedPayload = {
12224 |       /**
12225 |        * Frame object.
12226 |        */
12227 |       frame: Frame;
12228 |     }
12229 |     export type frameResizedPayload = void;
12230 |     /**
12231 |      * Fired when a renderer-initiated navigation is requested.
12232 | Navigation may still be cancelled after the event is issued.
12233 |      */
12234 |     export type frameRequestedNavigationPayload = {
12235 |       /**
12236 |        * Id of the frame that is being navigated.
12237 |        */
12238 |       frameId: FrameId;
12239 |       /**
12240 |        * The reason for the navigation.
12241 |        */
12242 |       reason: ClientNavigationReason;
12243 |       /**
12244 |        * The destination URL for the requested navigation.
12245 |        */
12246 |       url: string;
12247 |       /**
12248 |        * The disposition for the navigation.
12249 |        */
12250 |       disposition: ClientNavigationDisposition;
12251 |     }
12252 |     /**
12253 |      * Fired when frame schedules a potential navigation.
12254 |      */
12255 |     export type frameScheduledNavigationPayload = {
12256 |       /**
12257 |        * Id of the frame that has scheduled a navigation.
12258 |        */
12259 |       frameId: FrameId;
12260 |       /**
12261 |        * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not
12262 | guaranteed to start.
12263 |        */
12264 |       delay: number;
12265 |       /**
12266 |        * The reason for the navigation.
12267 |        */
12268 |       reason: ClientNavigationReason;
12269 |       /**
12270 |        * The destination URL for the scheduled navigation.
12271 |        */
12272 |       url: string;
12273 |     }
12274 |     /**
12275 |      * Fired when frame has started loading.
12276 |      */
12277 |     export type frameStartedLoadingPayload = {
12278 |       /**
12279 |        * Id of the frame that has started loading.
12280 |        */
12281 |       frameId: FrameId;
12282 |     }
12283 |     /**
12284 |      * Fired when frame has stopped loading.
12285 |      */
12286 |     export type frameStoppedLoadingPayload = {
12287 |       /**
12288 |        * Id of the frame that has stopped loading.
12289 |        */
12290 |       frameId: FrameId;
12291 |     }
12292 |     /**
12293 |      * Fired when page is about to start a download.
12294 | Deprecated. Use Browser.downloadWillBegin instead.
12295 |      */
12296 |     export type downloadWillBeginPayload = {
12297 |       /**
12298 |        * Id of the frame that caused download to begin.
12299 |        */
12300 |       frameId: FrameId;
12301 |       /**
12302 |        * Global unique identifier of the download.
12303 |        */
12304 |       guid: string;
12305 |       /**
12306 |        * URL of the resource being downloaded.
12307 |        */
12308 |       url: string;
12309 |       /**
12310 |        * Suggested file name of the resource (the actual name of the file saved on disk may differ).
12311 |        */
12312 |       suggestedFilename: string;
12313 |     }
12314 |     /**
12315 |      * Fired when download makes progress. Last call has |done| == true.
12316 | Deprecated. Use Browser.downloadProgress instead.
12317 |      */
12318 |     export type downloadProgressPayload = {
12319 |       /**
12320 |        * Global unique identifier of the download.
12321 |        */
12322 |       guid: string;
12323 |       /**
12324 |        * Total expected bytes to download.
12325 |        */
12326 |       totalBytes: number;
12327 |       /**
12328 |        * Total bytes received.
12329 |        */
12330 |       receivedBytes: number;
12331 |       /**
12332 |        * Download status.
12333 |        */
12334 |       state: "inProgress"|"completed"|"canceled";
12335 |     }
12336 |     /**
12337 |      * Fired when interstitial page was hidden
12338 |      */
12339 |     export type interstitialHiddenPayload = void;
12340 |     /**
12341 |      * Fired when interstitial page was shown
12342 |      */
12343 |     export type interstitialShownPayload = void;
12344 |     /**
12345 |      * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
12346 | closed.
12347 |      */
12348 |     export type javascriptDialogClosedPayload = {
12349 |       /**
12350 |        * Whether dialog was confirmed.
12351 |        */
12352 |       result: boolean;
12353 |       /**
12354 |        * User input in case of prompt.
12355 |        */
12356 |       userInput: string;
12357 |     }
12358 |     /**
12359 |      * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
12360 | open.
12361 |      */
12362 |     export type javascriptDialogOpeningPayload = {
12363 |       /**
12364 |        * Frame url.
12365 |        */
12366 |       url: string;
12367 |       /**
12368 |        * Message that will be displayed by the dialog.
12369 |        */
12370 |       message: string;
12371 |       /**
12372 |        * Dialog type.
12373 |        */
12374 |       type: DialogType;
12375 |       /**
12376 |        * True iff browser is capable showing or acting on the given dialog. When browser has no
12377 | dialog handler for given target, calling alert while Page domain is engaged will stall
12378 | the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
12379 |        */
12380 |       hasBrowserHandler: boolean;
12381 |       /**
12382 |        * Default dialog prompt.
12383 |        */
12384 |       defaultPrompt?: string;
12385 |     }
12386 |     /**
12387 |      * Fired for top level page lifecycle events such as navigation, load, paint, etc.
12388 |      */
12389 |     export type lifecycleEventPayload = {
12390 |       /**
12391 |        * Id of the frame.
12392 |        */
12393 |       frameId: FrameId;
12394 |       /**
12395 |        * Loader identifier. Empty string if the request is fetched from worker.
12396 |        */
12397 |       loaderId: Network.LoaderId;
12398 |       name: string;
12399 |       timestamp: Network.MonotonicTime;
12400 |     }
12401 |     /**
12402 |      * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
12403 | not assume any ordering with the Page.frameNavigated event. This event is fired only for
12404 | main-frame history navigation where the document changes (non-same-document navigations),
12405 | when bfcache navigation fails.
12406 |      */
12407 |     export type backForwardCacheNotUsedPayload = {
12408 |       /**
12409 |        * The loader id for the associated navigation.
12410 |        */
12411 |       loaderId: Network.LoaderId;
12412 |       /**
12413 |        * The frame id of the associated frame.
12414 |        */
12415 |       frameId: FrameId;
12416 |       /**
12417 |        * Array of reasons why the page could not be cached. This must not be empty.
12418 |        */
12419 |       notRestoredExplanations: BackForwardCacheNotRestoredExplanation[];
12420 |       /**
12421 |        * Tree structure of reasons why the page could not be cached for each frame.
12422 |        */
12423 |       notRestoredExplanationsTree?: BackForwardCacheNotRestoredExplanationTree;
12424 |     }
12425 |     export type loadEventFiredPayload = {
12426 |       timestamp: Network.MonotonicTime;
12427 |     }
12428 |     /**
12429 |      * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
12430 |      */
12431 |     export type navigatedWithinDocumentPayload = {
12432 |       /**
12433 |        * Id of the frame.
12434 |        */
12435 |       frameId: FrameId;
12436 |       /**
12437 |        * Frame's new url.
12438 |        */
12439 |       url: string;
12440 |       /**
12441 |        * Navigation type
12442 |        */
12443 |       navigationType: "fragment"|"historyApi"|"other";
12444 |     }
12445 |     /**
12446 |      * Compressed image data requested by the `startScreencast`.
12447 |      */
12448 |     export type screencastFramePayload = {
12449 |       /**
12450 |        * Base64-encoded compressed image.
12451 |        */
12452 |       data: binary;
12453 |       /**
12454 |        * Screencast frame metadata.
12455 |        */
12456 |       metadata: ScreencastFrameMetadata;
12457 |       /**
12458 |        * Frame number.
12459 |        */
12460 |       sessionId: number;
12461 |     }
12462 |     /**
12463 |      * Fired when the page with currently enabled screencast was shown or hidden `.
12464 |      */
12465 |     export type screencastVisibilityChangedPayload = {
12466 |       /**
12467 |        * True if the page is visible.
12468 |        */
12469 |       visible: boolean;
12470 |     }
12471 |     /**
12472 |      * Fired when a new window is going to be opened, via window.open(), link click, form submission,
12473 | etc.
12474 |      */
12475 |     export type windowOpenPayload = {
12476 |       /**
12477 |        * The URL for the new window.
12478 |        */
12479 |       url: string;
12480 |       /**
12481 |        * Window name.
12482 |        */
12483 |       windowName: string;
12484 |       /**
12485 |        * An array of enabled window features.
12486 |        */
12487 |       windowFeatures: string[];
12488 |       /**
12489 |        * Whether or not it was triggered by user gesture.
12490 |        */
12491 |       userGesture: boolean;
12492 |     }
12493 |     /**
12494 |      * Issued for every compilation cache generated. Is only available
12495 | if Page.setGenerateCompilationCache is enabled.
12496 |      */
12497 |     export type compilationCacheProducedPayload = {
12498 |       url: string;
12499 |       /**
12500 |        * Base64-encoded data
12501 |        */
12502 |       data: binary;
12503 |     }
12504 | 
12505 |     /**
12506 |      * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
12507 |      */
12508 |     export type addScriptToEvaluateOnLoadParameters = {
12509 |       scriptSource: string;
12510 |     }
12511 |     export type addScriptToEvaluateOnLoadReturnValue = {
12512 |       /**
12513 |        * Identifier of the added script.
12514 |        */
12515 |       identifier: ScriptIdentifier;
12516 |     }
12517 |     /**
12518 |      * Evaluates given script in every frame upon creation (before loading frame's scripts).
12519 |      */
12520 |     export type addScriptToEvaluateOnNewDocumentParameters = {
12521 |       source: string;
12522 |       /**
12523 |        * If specified, creates an isolated world with the given name and evaluates given script in it.
12524 | This world name will be used as the ExecutionContextDescription::name when the corresponding
12525 | event is emitted.
12526 |        */
12527 |       worldName?: string;
12528 |       /**
12529 |        * Specifies whether command line API should be available to the script, defaults
12530 | to false.
12531 |        */
12532 |       includeCommandLineAPI?: boolean;
12533 |       /**
12534 |        * If true, runs the script immediately on existing execution contexts or worlds.
12535 | Default: false.
12536 |        */
12537 |       runImmediately?: boolean;
12538 |     }
12539 |     export type addScriptToEvaluateOnNewDocumentReturnValue = {
12540 |       /**
12541 |        * Identifier of the added script.
12542 |        */
12543 |       identifier: ScriptIdentifier;
12544 |     }
12545 |     /**
12546 |      * Brings page to front (activates tab).
12547 |      */
12548 |     export type bringToFrontParameters = {
12549 |     }
12550 |     export type bringToFrontReturnValue = {
12551 |     }
12552 |     /**
12553 |      * Capture page screenshot.
12554 |      */
12555 |     export type captureScreenshotParameters = {
12556 |       /**
12557 |        * Image compression format (defaults to png).
12558 |        */
12559 |       format?: "jpeg"|"png"|"webp";
12560 |       /**
12561 |        * Compression quality from range [0..100] (jpeg only).
12562 |        */
12563 |       quality?: number;
12564 |       /**
12565 |        * Capture the screenshot of a given region only.
12566 |        */
12567 |       clip?: Viewport;
12568 |       /**
12569 |        * Capture the screenshot from the surface, rather than the view. Defaults to true.
12570 |        */
12571 |       fromSurface?: boolean;
12572 |       /**
12573 |        * Capture the screenshot beyond the viewport. Defaults to false.
12574 |        */
12575 |       captureBeyondViewport?: boolean;
12576 |       /**
12577 |        * Optimize image encoding for speed, not for resulting size (defaults to false)
12578 |        */
12579 |       optimizeForSpeed?: boolean;
12580 |     }
12581 |     export type captureScreenshotReturnValue = {
12582 |       /**
12583 |        * Base64-encoded image data.
12584 |        */
12585 |       data: binary;
12586 |     }
12587 |     /**
12588 |      * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
12589 | iframes, shadow DOM, external resources, and element-inline styles.
12590 |      */
12591 |     export type captureSnapshotParameters = {
12592 |       /**
12593 |        * Format (defaults to mhtml).
12594 |        */
12595 |       format?: "mhtml";
12596 |     }
12597 |     export type captureSnapshotReturnValue = {
12598 |       /**
12599 |        * Serialized page data.
12600 |        */
12601 |       data: string;
12602 |     }
12603 |     /**
12604 |      * Clears the overridden device metrics.
12605 |      */
12606 |     export type clearDeviceMetricsOverrideParameters = {
12607 |     }
12608 |     export type clearDeviceMetricsOverrideReturnValue = {
12609 |     }
12610 |     /**
12611 |      * Clears the overridden Device Orientation.
12612 |      */
12613 |     export type clearDeviceOrientationOverrideParameters = {
12614 |     }
12615 |     export type clearDeviceOrientationOverrideReturnValue = {
12616 |     }
12617 |     /**
12618 |      * Clears the overridden Geolocation Position and Error.
12619 |      */
12620 |     export type clearGeolocationOverrideParameters = {
12621 |     }
12622 |     export type clearGeolocationOverrideReturnValue = {
12623 |     }
12624 |     /**
12625 |      * Creates an isolated world for the given frame.
12626 |      */
12627 |     export type createIsolatedWorldParameters = {
12628 |       /**
12629 |        * Id of the frame in which the isolated world should be created.
12630 |        */
12631 |       frameId: FrameId;
12632 |       /**
12633 |        * An optional name which is reported in the Execution Context.
12634 |        */
12635 |       worldName?: string;
12636 |       /**
12637 |        * Whether or not universal access should be granted to the isolated world. This is a powerful
12638 | option, use with caution.
12639 |        */
12640 |       grantUniveralAccess?: boolean;
12641 |     }
12642 |     export type createIsolatedWorldReturnValue = {
12643 |       /**
12644 |        * Execution context of the isolated world.
12645 |        */
12646 |       executionContextId: Runtime.ExecutionContextId;
12647 |     }
12648 |     /**
12649 |      * Deletes browser cookie with given name, domain and path.
12650 |      */
12651 |     export type deleteCookieParameters = {
12652 |       /**
12653 |        * Name of the cookie to remove.
12654 |        */
12655 |       cookieName: string;
12656 |       /**
12657 |        * URL to match cooke domain and path.
12658 |        */
12659 |       url: string;
12660 |     }
12661 |     export type deleteCookieReturnValue = {
12662 |     }
12663 |     /**
12664 |      * Disables page domain notifications.
12665 |      */
12666 |     export type disableParameters = {
12667 |     }
12668 |     export type disableReturnValue = {
12669 |     }
12670 |     /**
12671 |      * Enables page domain notifications.
12672 |      */
12673 |     export type enableParameters = {
12674 |     }
12675 |     export type enableReturnValue = {
12676 |     }
12677 |     /**
12678 |      * Gets the processed manifest for this current document.
12679 |   This API always waits for the manifest to be loaded.
12680 |   If manifestId is provided, and it does not match the manifest of the
12681 |     current document, this API errors out.
12682 |   If there is not a loaded page, this API errors out immediately.
12683 |      */
12684 |     export type getAppManifestParameters = {
12685 |       manifestId?: string;
12686 |     }
12687 |     export type getAppManifestReturnValue = {
12688 |       /**
12689 |        * Manifest location.
12690 |        */
12691 |       url: string;
12692 |       errors: AppManifestError[];
12693 |       /**
12694 |        * Manifest content.
12695 |        */
12696 |       data?: string;
12697 |       /**
12698 |        * Parsed manifest properties. Deprecated, use manifest instead.
12699 |        */
12700 |       parsed?: AppManifestParsedProperties;
12701 |       manifest: WebAppManifest;
12702 |     }
12703 |     export type getInstallabilityErrorsParameters = {
12704 |     }
12705 |     export type getInstallabilityErrorsReturnValue = {
12706 |       installabilityErrors: InstallabilityError[];
12707 |     }
12708 |     /**
12709 |      * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
12710 |      */
12711 |     export type getManifestIconsParameters = {
12712 |     }
12713 |     export type getManifestIconsReturnValue = {
12714 |       primaryIcon?: binary;
12715 |     }
12716 |     /**
12717 |      * Returns the unique (PWA) app id.
12718 | Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
12719 |      */
12720 |     export type getAppIdParameters = {
12721 |     }
12722 |     export type getAppIdReturnValue = {
12723 |       /**
12724 |        * App id, either from manifest's id attribute or computed from start_url
12725 |        */
12726 |       appId?: string;
12727 |       /**
12728 |        * Recommendation for manifest's id attribute to match current id computed from start_url
12729 |        */
12730 |       recommendedId?: string;
12731 |     }
12732 |     export type getAdScriptIdParameters = {
12733 |       frameId: FrameId;
12734 |     }
12735 |     export type getAdScriptIdReturnValue = {
12736 |       /**
12737 |        * Identifies the bottom-most script which caused the frame to be labelled
12738 | as an ad. Only sent if frame is labelled as an ad and id is available.
12739 |        */
12740 |       adScriptId?: AdScriptId;
12741 |     }
12742 |     /**
12743 |      * Returns present frame tree structure.
12744 |      */
12745 |     export type getFrameTreeParameters = {
12746 |     }
12747 |     export type getFrameTreeReturnValue = {
12748 |       /**
12749 |        * Present frame tree structure.
12750 |        */
12751 |       frameTree: FrameTree;
12752 |     }
12753 |     /**
12754 |      * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
12755 |      */
12756 |     export type getLayoutMetricsParameters = {
12757 |     }
12758 |     export type getLayoutMetricsReturnValue = {
12759 |       /**
12760 |        * Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead.
12761 |        */
12762 |       layoutViewport: LayoutViewport;
12763 |       /**
12764 |        * Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead.
12765 |        */
12766 |       visualViewport: VisualViewport;
12767 |       /**
12768 |        * Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead.
12769 |        */
12770 |       contentSize: DOM.Rect;
12771 |       /**
12772 |        * Metrics relating to the layout viewport in CSS pixels.
12773 |        */
12774 |       cssLayoutViewport: LayoutViewport;
12775 |       /**
12776 |        * Metrics relating to the visual viewport in CSS pixels.
12777 |        */
12778 |       cssVisualViewport: VisualViewport;
12779 |       /**
12780 |        * Size of scrollable area in CSS pixels.
12781 |        */
12782 |       cssContentSize: DOM.Rect;
12783 |     }
12784 |     /**
12785 |      * Returns navigation history for the current page.
12786 |      */
12787 |     export type getNavigationHistoryParameters = {
12788 |     }
12789 |     export type getNavigationHistoryReturnValue = {
12790 |       /**
12791 |        * Index of the current navigation history entry.
12792 |        */
12793 |       currentIndex: number;
12794 |       /**
12795 |        * Array of navigation history entries.
12796 |        */
12797 |       entries: NavigationEntry[];
12798 |     }
12799 |     /**
12800 |      * Resets navigation history for the current page.
12801 |      */
12802 |     export type resetNavigationHistoryParameters = {
12803 |     }
12804 |     export type resetNavigationHistoryReturnValue = {
12805 |     }
12806 |     /**
12807 |      * Returns content of the given resource.
12808 |      */
12809 |     export type getResourceContentParameters = {
12810 |       /**
12811 |        * Frame id to get resource for.
12812 |        */
12813 |       frameId: FrameId;
12814 |       /**
12815 |        * URL of the resource to get content for.
12816 |        */
12817 |       url: string;
12818 |     }
12819 |     export type getResourceContentReturnValue = {
12820 |       /**
12821 |        * Resource content.
12822 |        */
12823 |       content: string;
12824 |       /**
12825 |        * True, if content was served as base64.
12826 |        */
12827 |       base64Encoded: boolean;
12828 |     }
12829 |     /**
12830 |      * Returns present frame / resource tree structure.
12831 |      */
12832 |     export type getResourceTreeParameters = {
12833 |     }
12834 |     export type getResourceTreeReturnValue = {
12835 |       /**
12836 |        * Present frame / resource tree structure.
12837 |        */
12838 |       frameTree: FrameResourceTree;
12839 |     }
12840 |     /**
12841 |      * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
12842 |      */
12843 |     export type handleJavaScriptDialogParameters = {
12844 |       /**
12845 |        * Whether to accept or dismiss the dialog.
12846 |        */
12847 |       accept: boolean;
12848 |       /**
12849 |        * The text to enter into the dialog prompt before accepting. Used only if this is a prompt
12850 | dialog.
12851 |        */
12852 |       promptText?: string;
12853 |     }
12854 |     export type handleJavaScriptDialogReturnValue = {
12855 |     }
12856 |     /**
12857 |      * Navigates current page to the given URL.
12858 |      */
12859 |     export type navigateParameters = {
12860 |       /**
12861 |        * URL to navigate the page to.
12862 |        */
12863 |       url: string;
12864 |       /**
12865 |        * Referrer URL.
12866 |        */
12867 |       referrer?: string;
12868 |       /**
12869 |        * Intended transition type.
12870 |        */
12871 |       transitionType?: TransitionType;
12872 |       /**
12873 |        * Frame id to navigate, if not specified navigates the top frame.
12874 |        */
12875 |       frameId?: FrameId;
12876 |       /**
12877 |        * Referrer-policy used for the navigation.
12878 |        */
12879 |       referrerPolicy?: ReferrerPolicy;
12880 |     }
12881 |     export type navigateReturnValue = {
12882 |       /**
12883 |        * Frame id that has navigated (or failed to navigate)
12884 |        */
12885 |       frameId: FrameId;
12886 |       /**
12887 |        * Loader identifier. This is omitted in case of same-document navigation,
12888 | as the previously committed loaderId would not change.
12889 |        */
12890 |       loaderId?: Network.LoaderId;
12891 |       /**
12892 |        * User friendly error message, present if and only if navigation has failed.
12893 |        */
12894 |       errorText?: string;
12895 |     }
12896 |     /**
12897 |      * Navigates current page to the given history entry.
12898 |      */
12899 |     export type navigateToHistoryEntryParameters = {
12900 |       /**
12901 |        * Unique id of the entry to navigate to.
12902 |        */
12903 |       entryId: number;
12904 |     }
12905 |     export type navigateToHistoryEntryReturnValue = {
12906 |     }
12907 |     /**
12908 |      * Print page as PDF.
12909 |      */
12910 |     export type printToPDFParameters = {
12911 |       /**
12912 |        * Paper orientation. Defaults to false.
12913 |        */
12914 |       landscape?: boolean;
12915 |       /**
12916 |        * Display header and footer. Defaults to false.
12917 |        */
12918 |       displayHeaderFooter?: boolean;
12919 |       /**
12920 |        * Print background graphics. Defaults to false.
12921 |        */
12922 |       printBackground?: boolean;
12923 |       /**
12924 |        * Scale of the webpage rendering. Defaults to 1.
12925 |        */
12926 |       scale?: number;
12927 |       /**
12928 |        * Paper width in inches. Defaults to 8.5 inches.
12929 |        */
12930 |       paperWidth?: number;
12931 |       /**
12932 |        * Paper height in inches. Defaults to 11 inches.
12933 |        */
12934 |       paperHeight?: number;
12935 |       /**
12936 |        * Top margin in inches. Defaults to 1cm (~0.4 inches).
12937 |        */
12938 |       marginTop?: number;
12939 |       /**
12940 |        * Bottom margin in inches. Defaults to 1cm (~0.4 inches).
12941 |        */
12942 |       marginBottom?: number;
12943 |       /**
12944 |        * Left margin in inches. Defaults to 1cm (~0.4 inches).
12945 |        */
12946 |       marginLeft?: number;
12947 |       /**
12948 |        * Right margin in inches. Defaults to 1cm (~0.4 inches).
12949 |        */
12950 |       marginRight?: number;
12951 |       /**
12952 |        * Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are
12953 | printed in the document order, not in the order specified, and no
12954 | more than once.
12955 | Defaults to empty string, which implies the entire document is printed.
12956 | The page numbers are quietly capped to actual page count of the
12957 | document, and ranges beyond the end of the document are ignored.
12958 | If this results in no pages to print, an error is reported.
12959 | It is an error to specify a range with start greater than end.
12960 |        */
12961 |       pageRanges?: string;
12962 |       /**
12963 |        * HTML template for the print header. Should be valid HTML markup with following
12964 | classes used to inject printing values into them:
12965 | - `date`: formatted print date
12966 | - `title`: document title
12967 | - `url`: document location
12968 | - `pageNumber`: current page number
12969 | - `totalPages`: total pages in the document
12970 | 
12971 | For example, `<span class=title></span>` would generate span containing the title.
12972 |        */
12973 |       headerTemplate?: string;
12974 |       /**
12975 |        * HTML template for the print footer. Should use the same format as the `headerTemplate`.
12976 |        */
12977 |       footerTemplate?: string;
12978 |       /**
12979 |        * Whether or not to prefer page size as defined by css. Defaults to false,
12980 | in which case the content will be scaled to fit the paper size.
12981 |        */
12982 |       preferCSSPageSize?: boolean;
12983 |       /**
12984 |        * return as stream
12985 |        */
12986 |       transferMode?: "ReturnAsBase64"|"ReturnAsStream";
12987 |       /**
12988 |        * Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
12989 |        */
12990 |       generateTaggedPDF?: boolean;
12991 |       /**
12992 |        * Whether or not to embed the document outline into the PDF.
12993 |        */
12994 |       generateDocumentOutline?: boolean;
12995 |     }
12996 |     export type printToPDFReturnValue = {
12997 |       /**
12998 |        * Base64-encoded pdf data. Empty if |returnAsStream| is specified.
12999 |        */
13000 |       data: binary;
13001 |       /**
13002 |        * A handle of the stream that holds resulting PDF data.
13003 |        */
13004 |       stream?: IO.StreamHandle;
13005 |     }
13006 |     /**
13007 |      * Reloads given page optionally ignoring the cache.
13008 |      */
13009 |     export type reloadParameters = {
13010 |       /**
13011 |        * If true, browser cache is ignored (as if the user pressed Shift+refresh).
13012 |        */
13013 |       ignoreCache?: boolean;
13014 |       /**
13015 |        * If set, the script will be injected into all frames of the inspected page after reload.
13016 | Argument will be ignored if reloading dataURL origin.
13017 |        */
13018 |       scriptToEvaluateOnLoad?: string;
13019 |       /**
13020 |        * If set, an error will be thrown if the target page's main frame's
13021 | loader id does not match the provided id. This prevents accidentally
13022 | reloading an unintended target in case there's a racing navigation.
13023 |        */
13024 |       loaderId?: Network.LoaderId;
13025 |     }
13026 |     export type reloadReturnValue = {
13027 |     }
13028 |     /**
13029 |      * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
13030 |      */
13031 |     export type removeScriptToEvaluateOnLoadParameters = {
13032 |       identifier: ScriptIdentifier;
13033 |     }
13034 |     export type removeScriptToEvaluateOnLoadReturnValue = {
13035 |     }
13036 |     /**
13037 |      * Removes given script from the list.
13038 |      */
13039 |     export type removeScriptToEvaluateOnNewDocumentParameters = {
13040 |       identifier: ScriptIdentifier;
13041 |     }
13042 |     export type removeScriptToEvaluateOnNewDocumentReturnValue = {
13043 |     }
13044 |     /**
13045 |      * Acknowledges that a screencast frame has been received by the frontend.
13046 |      */
13047 |     export type screencastFrameAckParameters = {
13048 |       /**
13049 |        * Frame number.
13050 |        */
13051 |       sessionId: number;
13052 |     }
13053 |     export type screencastFrameAckReturnValue = {
13054 |     }
13055 |     /**
13056 |      * Searches for given string in resource content.
13057 |      */
13058 |     export type searchInResourceParameters = {
13059 |       /**
13060 |        * Frame id for resource to search in.
13061 |        */
13062 |       frameId: FrameId;
13063 |       /**
13064 |        * URL of the resource to search in.
13065 |        */
13066 |       url: string;
13067 |       /**
13068 |        * String to search for.
13069 |        */
13070 |       query: string;
13071 |       /**
13072 |        * If true, search is case sensitive.
13073 |        */
13074 |       caseSensitive?: boolean;
13075 |       /**
13076 |        * If true, treats string parameter as regex.
13077 |        */
13078 |       isRegex?: boolean;
13079 |     }
13080 |     export type searchInResourceReturnValue = {
13081 |       /**
13082 |        * List of search matches.
13083 |        */
13084 |       result: Debugger.SearchMatch[];
13085 |     }
13086 |     /**
13087 |      * Enable Chrome's experimental ad filter on all sites.
13088 |      */
13089 |     export type setAdBlockingEnabledParameters = {
13090 |       /**
13091 |        * Whether to block ads.
13092 |        */
13093 |       enabled: boolean;
13094 |     }
13095 |     export type setAdBlockingEnabledReturnValue = {
13096 |     }
13097 |     /**
13098 |      * Enable page Content Security Policy by-passing.
13099 |      */
13100 |     export type setBypassCSPParameters = {
13101 |       /**
13102 |        * Whether to bypass page CSP.
13103 |        */
13104 |       enabled: boolean;
13105 |     }
13106 |     export type setBypassCSPReturnValue = {
13107 |     }
13108 |     /**
13109 |      * Get Permissions Policy state on given frame.
13110 |      */
13111 |     export type getPermissionsPolicyStateParameters = {
13112 |       frameId: FrameId;
13113 |     }
13114 |     export type getPermissionsPolicyStateReturnValue = {
13115 |       states: PermissionsPolicyFeatureState[];
13116 |     }
13117 |     /**
13118 |      * Get Origin Trials on given frame.
13119 |      */
13120 |     export type getOriginTrialsParameters = {
13121 |       frameId: FrameId;
13122 |     }
13123 |     export type getOriginTrialsReturnValue = {
13124 |       originTrials: OriginTrial[];
13125 |     }
13126 |     /**
13127 |      * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
13128 | window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
13129 | query results).
13130 |      */
13131 |     export type setDeviceMetricsOverrideParameters = {
13132 |       /**
13133 |        * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
13134 |        */
13135 |       width: number;
13136 |       /**
13137 |        * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
13138 |        */
13139 |       height: number;
13140 |       /**
13141 |        * Overriding device scale factor value. 0 disables the override.
13142 |        */
13143 |       deviceScaleFactor: number;
13144 |       /**
13145 |        * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
13146 | autosizing and more.
13147 |        */
13148 |       mobile: boolean;
13149 |       /**
13150 |        * Scale to apply to resulting view image.
13151 |        */
13152 |       scale?: number;
13153 |       /**
13154 |        * Overriding screen width value in pixels (minimum 0, maximum 10000000).
13155 |        */
13156 |       screenWidth?: number;
13157 |       /**
13158 |        * Overriding screen height value in pixels (minimum 0, maximum 10000000).
13159 |        */
13160 |       screenHeight?: number;
13161 |       /**
13162 |        * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
13163 |        */
13164 |       positionX?: number;
13165 |       /**
13166 |        * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
13167 |        */
13168 |       positionY?: number;
13169 |       /**
13170 |        * Do not set visible view size, rely upon explicit setVisibleSize call.
13171 |        */
13172 |       dontSetVisibleSize?: boolean;
13173 |       /**
13174 |        * Screen orientation override.
13175 |        */
13176 |       screenOrientation?: Emulation.ScreenOrientation;
13177 |       /**
13178 |        * The viewport dimensions and scale. If not set, the override is cleared.
13179 |        */
13180 |       viewport?: Viewport;
13181 |     }
13182 |     export type setDeviceMetricsOverrideReturnValue = {
13183 |     }
13184 |     /**
13185 |      * Overrides the Device Orientation.
13186 |      */
13187 |     export type setDeviceOrientationOverrideParameters = {
13188 |       /**
13189 |        * Mock alpha
13190 |        */
13191 |       alpha: number;
13192 |       /**
13193 |        * Mock beta
13194 |        */
13195 |       beta: number;
13196 |       /**
13197 |        * Mock gamma
13198 |        */
13199 |       gamma: number;
13200 |     }
13201 |     export type setDeviceOrientationOverrideReturnValue = {
13202 |     }
13203 |     /**
13204 |      * Set generic font families.
13205 |      */
13206 |     export type setFontFamiliesParameters = {
13207 |       /**
13208 |        * Specifies font families to set. If a font family is not specified, it won't be changed.
13209 |        */
13210 |       fontFamilies: FontFamilies;
13211 |       /**
13212 |        * Specifies font families to set for individual scripts.
13213 |        */
13214 |       forScripts?: ScriptFontFamilies[];
13215 |     }
13216 |     export type setFontFamiliesReturnValue = {
13217 |     }
13218 |     /**
13219 |      * Set default font sizes.
13220 |      */
13221 |     export type setFontSizesParameters = {
13222 |       /**
13223 |        * Specifies font sizes to set. If a font size is not specified, it won't be changed.
13224 |        */
13225 |       fontSizes: FontSizes;
13226 |     }
13227 |     export type setFontSizesReturnValue = {
13228 |     }
13229 |     /**
13230 |      * Sets given markup as the document's HTML.
13231 |      */
13232 |     export type setDocumentContentParameters = {
13233 |       /**
13234 |        * Frame id to set HTML for.
13235 |        */
13236 |       frameId: FrameId;
13237 |       /**
13238 |        * HTML content to set.
13239 |        */
13240 |       html: string;
13241 |     }
13242 |     export type setDocumentContentReturnValue = {
13243 |     }
13244 |     /**
13245 |      * Set the behavior when downloading a file.
13246 |      */
13247 |     export type setDownloadBehaviorParameters = {
13248 |       /**
13249 |        * Whether to allow all or deny all download requests, or use default Chrome behavior if
13250 | available (otherwise deny).
13251 |        */
13252 |       behavior: "deny"|"allow"|"default";
13253 |       /**
13254 |        * The default path to save downloaded files to. This is required if behavior is set to 'allow'
13255 |        */
13256 |       downloadPath?: string;
13257 |     }
13258 |     export type setDownloadBehaviorReturnValue = {
13259 |     }
13260 |     /**
13261 |      * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
13262 | unavailable.
13263 |      */
13264 |     export type setGeolocationOverrideParameters = {
13265 |       /**
13266 |        * Mock latitude
13267 |        */
13268 |       latitude?: number;
13269 |       /**
13270 |        * Mock longitude
13271 |        */
13272 |       longitude?: number;
13273 |       /**
13274 |        * Mock accuracy
13275 |        */
13276 |       accuracy?: number;
13277 |     }
13278 |     export type setGeolocationOverrideReturnValue = {
13279 |     }
13280 |     /**
13281 |      * Controls whether page will emit lifecycle events.
13282 |      */
13283 |     export type setLifecycleEventsEnabledParameters = {
13284 |       /**
13285 |        * If true, starts emitting lifecycle events.
13286 |        */
13287 |       enabled: boolean;
13288 |     }
13289 |     export type setLifecycleEventsEnabledReturnValue = {
13290 |     }
13291 |     /**
13292 |      * Toggles mouse event-based touch event emulation.
13293 |      */
13294 |     export type setTouchEmulationEnabledParameters = {
13295 |       /**
13296 |        * Whether the touch event emulation should be enabled.
13297 |        */
13298 |       enabled: boolean;
13299 |       /**
13300 |        * Touch/gesture events configuration. Default: current platform.
13301 |        */
13302 |       configuration?: "mobile"|"desktop";
13303 |     }
13304 |     export type setTouchEmulationEnabledReturnValue = {
13305 |     }
13306 |     /**
13307 |      * Starts sending each frame using the `screencastFrame` event.
13308 |      */
13309 |     export type startScreencastParameters = {
13310 |       /**
13311 |        * Image compression format.
13312 |        */
13313 |       format?: "jpeg"|"png";
13314 |       /**
13315 |        * Compression quality from range [0..100].
13316 |        */
13317 |       quality?: number;
13318 |       /**
13319 |        * Maximum screenshot width.
13320 |        */
13321 |       maxWidth?: number;
13322 |       /**
13323 |        * Maximum screenshot height.
13324 |        */
13325 |       maxHeight?: number;
13326 |       /**
13327 |        * Send every n-th frame.
13328 |        */
13329 |       everyNthFrame?: number;
13330 |     }
13331 |     export type startScreencastReturnValue = {
13332 |     }
13333 |     /**
13334 |      * Force the page stop all navigations and pending resource fetches.
13335 |      */
13336 |     export type stopLoadingParameters = {
13337 |     }
13338 |     export type stopLoadingReturnValue = {
13339 |     }
13340 |     /**
13341 |      * Crashes renderer on the IO thread, generates minidumps.
13342 |      */
13343 |     export type crashParameters = {
13344 |     }
13345 |     export type crashReturnValue = {
13346 |     }
13347 |     /**
13348 |      * Tries to close page, running its beforeunload hooks, if any.
13349 |      */
13350 |     export type closeParameters = {
13351 |     }
13352 |     export type closeReturnValue = {
13353 |     }
13354 |     /**
13355 |      * Tries to update the web lifecycle state of the page.
13356 | It will transition the page to the given state according to:
13357 | https://github.com/WICG/web-lifecycle/
13358 |      */
13359 |     export type setWebLifecycleStateParameters = {
13360 |       /**
13361 |        * Target lifecycle state
13362 |        */
13363 |       state: "frozen"|"active";
13364 |     }
13365 |     export type setWebLifecycleStateReturnValue = {
13366 |     }
13367 |     /**
13368 |      * Stops sending each frame in the `screencastFrame`.
13369 |      */
13370 |     export type stopScreencastParameters = {
13371 |     }
13372 |     export type stopScreencastReturnValue = {
13373 |     }
13374 |     /**
13375 |      * Requests backend to produce compilation cache for the specified scripts.
13376 | `scripts` are appended to the list of scripts for which the cache
13377 | would be produced. The list may be reset during page navigation.
13378 | When script with a matching URL is encountered, the cache is optionally
13379 | produced upon backend discretion, based on internal heuristics.
13380 | See also: `Page.compilationCacheProduced`.
13381 |      */
13382 |     export type produceCompilationCacheParameters = {
13383 |       scripts: CompilationCacheParams[];
13384 |     }
13385 |     export type produceCompilationCacheReturnValue = {
13386 |     }
13387 |     /**
13388 |      * Seeds compilation cache for given url. Compilation cache does not survive
13389 | cross-process navigation.
13390 |      */
13391 |     export type addCompilationCacheParameters = {
13392 |       url: string;
13393 |       /**
13394 |        * Base64-encoded data
13395 |        */
13396 |       data: binary;
13397 |     }
13398 |     export type addCompilationCacheReturnValue = {
13399 |     }
13400 |     /**
13401 |      * Clears seeded compilation cache.
13402 |      */
13403 |     export type clearCompilationCacheParameters = {
13404 |     }
13405 |     export type clearCompilationCacheReturnValue = {
13406 |     }
13407 |     /**
13408 |      * Sets the Secure Payment Confirmation transaction mode.
13409 | https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
13410 |      */
13411 |     export type setSPCTransactionModeParameters = {
13412 |       mode: AutoResponseMode;
13413 |     }
13414 |     export type setSPCTransactionModeReturnValue = {
13415 |     }
13416 |     /**
13417 |      * Extensions for Custom Handlers API:
13418 | https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
13419 |      */
13420 |     export type setRPHRegistrationModeParameters = {
13421 |       mode: AutoResponseMode;
13422 |     }
13423 |     export type setRPHRegistrationModeReturnValue = {
13424 |     }
13425 |     /**
13426 |      * Generates a report for testing.
13427 |      */
13428 |     export type generateTestReportParameters = {
13429 |       /**
13430 |        * Message to be displayed in the report.
13431 |        */
13432 |       message: string;
13433 |       /**
13434 |        * Specifies the endpoint group to deliver the report to.
13435 |        */
13436 |       group?: string;
13437 |     }
13438 |     export type generateTestReportReturnValue = {
13439 |     }
13440 |     /**
13441 |      * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
13442 |      */
13443 |     export type waitForDebuggerParameters = {
13444 |     }
13445 |     export type waitForDebuggerReturnValue = {
13446 |     }
13447 |     /**
13448 |      * Intercept file chooser requests and transfer control to protocol clients.
13449 | When file chooser interception is enabled, native file chooser dialog is not shown.
13450 | Instead, a protocol event `Page.fileChooserOpened` is emitted.
13451 |      */
13452 |     export type setInterceptFileChooserDialogParameters = {
13453 |       enabled: boolean;
13454 |     }
13455 |     export type setInterceptFileChooserDialogReturnValue = {
13456 |     }
13457 |     /**
13458 |      * Enable/disable prerendering manually.
13459 | 
13460 | This command is a short-term solution for https://crbug.com/1440085.
13461 | See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
13462 | for more details.
13463 | 
13464 | TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
13465 |      */
13466 |     export type setPrerenderingAllowedParameters = {
13467 |       isAllowed: boolean;
13468 |     }
13469 |     export type setPrerenderingAllowedReturnValue = {
13470 |     }
13471 |   }
13472 | 
13473 |   export module Performance {
13474 |     /**
13475 |      * Run-time execution metric.
13476 |      */
13477 |     export interface Metric {
13478 |       /**
13479 |        * Metric name.
13480 |        */
13481 |       name: string;
13482 |       /**
13483 |        * Metric value.
13484 |        */
13485 |       value: number;
13486 |     }
13487 | 
13488 |     /**
13489 |      * Current values of the metrics.
13490 |      */
13491 |     export type metricsPayload = {
13492 |       /**
13493 |        * Current values of the metrics.
13494 |        */
13495 |       metrics: Metric[];
13496 |       /**
13497 |        * Timestamp title.
13498 |        */
13499 |       title: string;
13500 |     }
13501 | 
13502 |     /**
13503 |      * Disable collecting and reporting metrics.
13504 |      */
13505 |     export type disableParameters = {
13506 |     }
13507 |     export type disableReturnValue = {
13508 |     }
13509 |     /**
13510 |      * Enable collecting and reporting metrics.
13511 |      */
13512 |     export type enableParameters = {
13513 |       /**
13514 |        * Time domain to use for collecting and reporting duration metrics.
13515 |        */
13516 |       timeDomain?: "timeTicks"|"threadTicks";
13517 |     }
13518 |     export type enableReturnValue = {
13519 |     }
13520 |     /**
13521 |      * Sets time domain to use for collecting and reporting duration metrics.
13522 | Note that this must be called before enabling metrics collection. Calling
13523 | this method while metrics collection is enabled returns an error.
13524 |      */
13525 |     export type setTimeDomainParameters = {
13526 |       /**
13527 |        * Time domain
13528 |        */
13529 |       timeDomain: "timeTicks"|"threadTicks";
13530 |     }
13531 |     export type setTimeDomainReturnValue = {
13532 |     }
13533 |     /**
13534 |      * Retrieve current values of run-time metrics.
13535 |      */
13536 |     export type getMetricsParameters = {
13537 |     }
13538 |     export type getMetricsReturnValue = {
13539 |       /**
13540 |        * Current values for run-time metrics.
13541 |        */
13542 |       metrics: Metric[];
13543 |     }
13544 |   }
13545 | 
13546 |   /**
13547 |    * Reporting of performance timeline events, as specified in
13548 | https://w3c.github.io/performance-timeline/#dom-performanceobserver.
13549 |    */
13550 |   export module PerformanceTimeline {
13551 |     /**
13552 |      * See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
13553 |      */
13554 |     export interface LargestContentfulPaint {
13555 |       renderTime: Network.TimeSinceEpoch;
13556 |       loadTime: Network.TimeSinceEpoch;
13557 |       /**
13558 |        * The number of pixels being painted.
13559 |        */
13560 |       size: number;
13561 |       /**
13562 |        * The id attribute of the element, if available.
13563 |        */
13564 |       elementId?: string;
13565 |       /**
13566 |        * The URL of the image (may be trimmed).
13567 |        */
13568 |       url?: string;
13569 |       nodeId?: DOM.BackendNodeId;
13570 |     }
13571 |     export interface LayoutShiftAttribution {
13572 |       previousRect: DOM.Rect;
13573 |       currentRect: DOM.Rect;
13574 |       nodeId?: DOM.BackendNodeId;
13575 |     }
13576 |     /**
13577 |      * See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
13578 |      */
13579 |     export interface LayoutShift {
13580 |       /**
13581 |        * Score increment produced by this event.
13582 |        */
13583 |       value: number;
13584 |       hadRecentInput: boolean;
13585 |       lastInputTime: Network.TimeSinceEpoch;
13586 |       sources: LayoutShiftAttribution[];
13587 |     }
13588 |     export interface TimelineEvent {
13589 |       /**
13590 |        * Identifies the frame that this event is related to. Empty for non-frame targets.
13591 |        */
13592 |       frameId: Page.FrameId;
13593 |       /**
13594 |        * The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
13595 | This determines which of the optional "details" fields is present.
13596 |        */
13597 |       type: string;
13598 |       /**
13599 |        * Name may be empty depending on the type.
13600 |        */
13601 |       name: string;
13602 |       /**
13603 |        * Time in seconds since Epoch, monotonically increasing within document lifetime.
13604 |        */
13605 |       time: Network.TimeSinceEpoch;
13606 |       /**
13607 |        * Event duration, if applicable.
13608 |        */
13609 |       duration?: number;
13610 |       lcpDetails?: LargestContentfulPaint;
13611 |       layoutShiftDetails?: LayoutShift;
13612 |     }
13613 | 
13614 |     /**
13615 |      * Sent when a performance timeline event is added. See reportPerformanceTimeline method.
13616 |      */
13617 |     export type timelineEventAddedPayload = {
13618 |       event: TimelineEvent;
13619 |     }
13620 | 
13621 |     /**
13622 |      * Previously buffered events would be reported before method returns.
13623 | See also: timelineEventAdded
13624 |      */
13625 |     export type enableParameters = {
13626 |       /**
13627 |        * The types of event to report, as specified in
13628 | https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
13629 | The specified filter overrides any previous filters, passing empty
13630 | filter disables recording.
13631 | Note that not all types exposed to the web platform are currently supported.
13632 |        */
13633 |       eventTypes: string[];
13634 |     }
13635 |     export type enableReturnValue = {
13636 |     }
13637 |   }
13638 | 
13639 |   /**
13640 |    * Security
13641 |    */
13642 |   export module Security {
13643 |     /**
13644 |      * An internal certificate ID value.
13645 |      */
13646 |     export type CertificateId = number;
13647 |     /**
13648 |      * A description of mixed content (HTTP resources on HTTPS pages), as defined by
13649 | https://www.w3.org/TR/mixed-content/#categories
13650 |      */
13651 |     export type MixedContentType = "blockable"|"optionally-blockable"|"none";
13652 |     /**
13653 |      * The security level of a page or resource.
13654 |      */
13655 |     export type SecurityState = "unknown"|"neutral"|"insecure"|"secure"|"info"|"insecure-broken";
13656 |     /**
13657 |      * Details about the security state of the page certificate.
13658 |      */
13659 |     export interface CertificateSecurityState {
13660 |       /**
13661 |        * Protocol name (e.g. "TLS 1.2" or "QUIC").
13662 |        */
13663 |       protocol: string;
13664 |       /**
13665 |        * Key Exchange used by the connection, or the empty string if not applicable.
13666 |        */
13667 |       keyExchange: string;
13668 |       /**
13669 |        * (EC)DH group used by the connection, if applicable.
13670 |        */
13671 |       keyExchangeGroup?: string;
13672 |       /**
13673 |        * Cipher name.
13674 |        */
13675 |       cipher: string;
13676 |       /**
13677 |        * TLS MAC. Note that AEAD ciphers do not have separate MACs.
13678 |        */
13679 |       mac?: string;
13680 |       /**
13681 |        * Page certificate.
13682 |        */
13683 |       certificate: string[];
13684 |       /**
13685 |        * Certificate subject name.
13686 |        */
13687 |       subjectName: string;
13688 |       /**
13689 |        * Name of the issuing CA.
13690 |        */
13691 |       issuer: string;
13692 |       /**
13693 |        * Certificate valid from date.
13694 |        */
13695 |       validFrom: Network.TimeSinceEpoch;
13696 |       /**
13697 |        * Certificate valid to (expiration) date
13698 |        */
13699 |       validTo: Network.TimeSinceEpoch;
13700 |       /**
13701 |        * The highest priority network error code, if the certificate has an error.
13702 |        */
13703 |       certificateNetworkError?: string;
13704 |       /**
13705 |        * True if the certificate uses a weak signature algorithm.
13706 |        */
13707 |       certificateHasWeakSignature: boolean;
13708 |       /**
13709 |        * True if the certificate has a SHA1 signature in the chain.
13710 |        */
13711 |       certificateHasSha1Signature: boolean;
13712 |       /**
13713 |        * True if modern SSL
13714 |        */
13715 |       modernSSL: boolean;
13716 |       /**
13717 |        * True if the connection is using an obsolete SSL protocol.
13718 |        */
13719 |       obsoleteSslProtocol: boolean;
13720 |       /**
13721 |        * True if the connection is using an obsolete SSL key exchange.
13722 |        */
13723 |       obsoleteSslKeyExchange: boolean;
13724 |       /**
13725 |        * True if the connection is using an obsolete SSL cipher.
13726 |        */
13727 |       obsoleteSslCipher: boolean;
13728 |       /**
13729 |        * True if the connection is using an obsolete SSL signature.
13730 |        */
13731 |       obsoleteSslSignature: boolean;
13732 |     }
13733 |     export type SafetyTipStatus = "badReputation"|"lookalike";
13734 |     export interface SafetyTipInfo {
13735 |       /**
13736 |        * Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
13737 |        */
13738 |       safetyTipStatus: SafetyTipStatus;
13739 |       /**
13740 |        * The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
13741 |        */
13742 |       safeUrl?: string;
13743 |     }
13744 |     /**
13745 |      * Security state information about the page.
13746 |      */
13747 |     export interface VisibleSecurityState {
13748 |       /**
13749 |        * The security level of the page.
13750 |        */
13751 |       securityState: SecurityState;
13752 |       /**
13753 |        * Security state details about the page certificate.
13754 |        */
13755 |       certificateSecurityState?: CertificateSecurityState;
13756 |       /**
13757 |        * The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
13758 |        */
13759 |       safetyTipInfo?: SafetyTipInfo;
13760 |       /**
13761 |        * Array of security state issues ids.
13762 |        */
13763 |       securityStateIssueIds: string[];
13764 |     }
13765 |     /**
13766 |      * An explanation of an factor contributing to the security state.
13767 |      */
13768 |     export interface SecurityStateExplanation {
13769 |       /**
13770 |        * Security state representing the severity of the factor being explained.
13771 |        */
13772 |       securityState: SecurityState;
13773 |       /**
13774 |        * Title describing the type of factor.
13775 |        */
13776 |       title: string;
13777 |       /**
13778 |        * Short phrase describing the type of factor.
13779 |        */
13780 |       summary: string;
13781 |       /**
13782 |        * Full text explanation of the factor.
13783 |        */
13784 |       description: string;
13785 |       /**
13786 |        * The type of mixed content described by the explanation.
13787 |        */
13788 |       mixedContentType: MixedContentType;
13789 |       /**
13790 |        * Page certificate.
13791 |        */
13792 |       certificate: string[];
13793 |       /**
13794 |        * Recommendations to fix any issues.
13795 |        */
13796 |       recommendations?: string[];
13797 |     }
13798 |     /**
13799 |      * Information about insecure content on the page.
13800 |      */
13801 |     export interface InsecureContentStatus {
13802 |       /**
13803 |        * Always false.
13804 |        */
13805 |       ranMixedContent: boolean;
13806 |       /**
13807 |        * Always false.
13808 |        */
13809 |       displayedMixedContent: boolean;
13810 |       /**
13811 |        * Always false.
13812 |        */
13813 |       containedMixedForm: boolean;
13814 |       /**
13815 |        * Always false.
13816 |        */
13817 |       ranContentWithCertErrors: boolean;
13818 |       /**
13819 |        * Always false.
13820 |        */
13821 |       displayedContentWithCertErrors: boolean;
13822 |       /**
13823 |        * Always set to unknown.
13824 |        */
13825 |       ranInsecureContentStyle: SecurityState;
13826 |       /**
13827 |        * Always set to unknown.
13828 |        */
13829 |       displayedInsecureContentStyle: SecurityState;
13830 |     }
13831 |     /**
13832 |      * The action to take when a certificate error occurs. continue will continue processing the
13833 | request and cancel will cancel the request.
13834 |      */
13835 |     export type CertificateErrorAction = "continue"|"cancel";
13836 | 
13837 |     /**
13838 |      * There is a certificate error. If overriding certificate errors is enabled, then it should be
13839 | handled with the `handleCertificateError` command. Note: this event does not fire if the
13840 | certificate error has been allowed internally. Only one client per target should override
13841 | certificate errors at the same time.
13842 |      */
13843 |     export type certificateErrorPayload = {
13844 |       /**
13845 |        * The ID of the event.
13846 |        */
13847 |       eventId: number;
13848 |       /**
13849 |        * The type of the error.
13850 |        */
13851 |       errorType: string;
13852 |       /**
13853 |        * The url that was requested.
13854 |        */
13855 |       requestURL: string;
13856 |     }
13857 |     /**
13858 |      * The security state of the page changed.
13859 |      */
13860 |     export type visibleSecurityStateChangedPayload = {
13861 |       /**
13862 |        * Security state information about the page.
13863 |        */
13864 |       visibleSecurityState: VisibleSecurityState;
13865 |     }
13866 |     /**
13867 |      * The security state of the page changed. No longer being sent.
13868 |      */
13869 |     export type securityStateChangedPayload = {
13870 |       /**
13871 |        * Security state.
13872 |        */
13873 |       securityState: SecurityState;
13874 |       /**
13875 |        * True if the page was loaded over cryptographic transport such as HTTPS.
13876 |        */
13877 |       schemeIsCryptographic: boolean;
13878 |       /**
13879 |        * Previously a list of explanations for the security state. Now always
13880 | empty.
13881 |        */
13882 |       explanations: SecurityStateExplanation[];
13883 |       /**
13884 |        * Information about insecure content on the page.
13885 |        */
13886 |       insecureContentStatus: InsecureContentStatus;
13887 |       /**
13888 |        * Overrides user-visible description of the state. Always omitted.
13889 |        */
13890 |       summary?: string;
13891 |     }
13892 | 
13893 |     /**
13894 |      * Disables tracking security state changes.
13895 |      */
13896 |     export type disableParameters = {
13897 |     }
13898 |     export type disableReturnValue = {
13899 |     }
13900 |     /**
13901 |      * Enables tracking security state changes.
13902 |      */
13903 |     export type enableParameters = {
13904 |     }
13905 |     export type enableReturnValue = {
13906 |     }
13907 |     /**
13908 |      * Enable/disable whether all certificate errors should be ignored.
13909 |      */
13910 |     export type setIgnoreCertificateErrorsParameters = {
13911 |       /**
13912 |        * If true, all certificate errors will be ignored.
13913 |        */
13914 |       ignore: boolean;
13915 |     }
13916 |     export type setIgnoreCertificateErrorsReturnValue = {
13917 |     }
13918 |     /**
13919 |      * Handles a certificate error that fired a certificateError event.
13920 |      */
13921 |     export type handleCertificateErrorParameters = {
13922 |       /**
13923 |        * The ID of the event.
13924 |        */
13925 |       eventId: number;
13926 |       /**
13927 |        * The action to take on the certificate error.
13928 |        */
13929 |       action: CertificateErrorAction;
13930 |     }
13931 |     export type handleCertificateErrorReturnValue = {
13932 |     }
13933 |     /**
13934 |      * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
13935 | be handled by the DevTools client and should be answered with `handleCertificateError` commands.
13936 |      */
13937 |     export type setOverrideCertificateErrorsParameters = {
13938 |       /**
13939 |        * If true, certificate errors will be overridden.
13940 |        */
13941 |       override: boolean;
13942 |     }
13943 |     export type setOverrideCertificateErrorsReturnValue = {
13944 |     }
13945 |   }
13946 | 
13947 |   export module ServiceWorker {
13948 |     export type RegistrationID = string;
13949 |     /**
13950 |      * ServiceWorker registration.
13951 |      */
13952 |     export interface ServiceWorkerRegistration {
13953 |       registrationId: RegistrationID;
13954 |       scopeURL: string;
13955 |       isDeleted: boolean;
13956 |     }
13957 |     export type ServiceWorkerVersionRunningStatus = "stopped"|"starting"|"running"|"stopping";
13958 |     export type ServiceWorkerVersionStatus = "new"|"installing"|"installed"|"activating"|"activated"|"redundant";
13959 |     /**
13960 |      * ServiceWorker version.
13961 |      */
13962 |     export interface ServiceWorkerVersion {
13963 |       versionId: string;
13964 |       registrationId: RegistrationID;
13965 |       scriptURL: string;
13966 |       runningStatus: ServiceWorkerVersionRunningStatus;
13967 |       status: ServiceWorkerVersionStatus;
13968 |       /**
13969 |        * The Last-Modified header value of the main script.
13970 |        */
13971 |       scriptLastModified?: number;
13972 |       /**
13973 |        * The time at which the response headers of the main script were received from the server.
13974 | For cached script it is the last time the cache entry was validated.
13975 |        */
13976 |       scriptResponseTime?: number;
13977 |       controlledClients?: Target.TargetID[];
13978 |       targetId?: Target.TargetID;
13979 |       routerRules?: string;
13980 |     }
13981 |     /**
13982 |      * ServiceWorker error message.
13983 |      */
13984 |     export interface ServiceWorkerErrorMessage {
13985 |       errorMessage: string;
13986 |       registrationId: RegistrationID;
13987 |       versionId: string;
13988 |       sourceURL: string;
13989 |       lineNumber: number;
13990 |       columnNumber: number;
13991 |     }
13992 | 
13993 |     export type workerErrorReportedPayload = {
13994 |       errorMessage: ServiceWorkerErrorMessage;
13995 |     }
13996 |     export type workerRegistrationUpdatedPayload = {
13997 |       registrations: ServiceWorkerRegistration[];
13998 |     }
13999 |     export type workerVersionUpdatedPayload = {
14000 |       versions: ServiceWorkerVersion[];
14001 |     }
14002 | 
14003 |     export type deliverPushMessageParameters = {
14004 |       origin: string;
14005 |       registrationId: RegistrationID;
14006 |       data: string;
14007 |     }
14008 |     export type deliverPushMessageReturnValue = {
14009 |     }
14010 |     export type disableParameters = {
14011 |     }
14012 |     export type disableReturnValue = {
14013 |     }
14014 |     export type dispatchSyncEventParameters = {
14015 |       origin: string;
14016 |       registrationId: RegistrationID;
14017 |       tag: string;
14018 |       lastChance: boolean;
14019 |     }
14020 |     export type dispatchSyncEventReturnValue = {
14021 |     }
14022 |     export type dispatchPeriodicSyncEventParameters = {
14023 |       origin: string;
14024 |       registrationId: RegistrationID;
14025 |       tag: string;
14026 |     }
14027 |     export type dispatchPeriodicSyncEventReturnValue = {
14028 |     }
14029 |     export type enableParameters = {
14030 |     }
14031 |     export type enableReturnValue = {
14032 |     }
14033 |     export type inspectWorkerParameters = {
14034 |       versionId: string;
14035 |     }
14036 |     export type inspectWorkerReturnValue = {
14037 |     }
14038 |     export type setForceUpdateOnPageLoadParameters = {
14039 |       forceUpdateOnPageLoad: boolean;
14040 |     }
14041 |     export type setForceUpdateOnPageLoadReturnValue = {
14042 |     }
14043 |     export type skipWaitingParameters = {
14044 |       scopeURL: string;
14045 |     }
14046 |     export type skipWaitingReturnValue = {
14047 |     }
14048 |     export type startWorkerParameters = {
14049 |       scopeURL: string;
14050 |     }
14051 |     export type startWorkerReturnValue = {
14052 |     }
14053 |     export type stopAllWorkersParameters = {
14054 |     }
14055 |     export type stopAllWorkersReturnValue = {
14056 |     }
14057 |     export type stopWorkerParameters = {
14058 |       versionId: string;
14059 |     }
14060 |     export type stopWorkerReturnValue = {
14061 |     }
14062 |     export type unregisterParameters = {
14063 |       scopeURL: string;
14064 |     }
14065 |     export type unregisterReturnValue = {
14066 |     }
14067 |     export type updateRegistrationParameters = {
14068 |       scopeURL: string;
14069 |     }
14070 |     export type updateRegistrationReturnValue = {
14071 |     }
14072 |   }
14073 | 
14074 |   export module Storage {
14075 |     export type SerializedStorageKey = string;
14076 |     /**
14077 |      * Enum of possible storage types.
14078 |      */
14079 |     export type StorageType = "appcache"|"cookies"|"file_systems"|"indexeddb"|"local_storage"|"shader_cache"|"websql"|"service_workers"|"cache_storage"|"interest_groups"|"shared_storage"|"storage_buckets"|"all"|"other";
14080 |     /**
14081 |      * Usage for a storage type.
14082 |      */
14083 |     export interface UsageForType {
14084 |       /**
14085 |        * Name of storage type.
14086 |        */
14087 |       storageType: StorageType;
14088 |       /**
14089 |        * Storage usage (bytes).
14090 |        */
14091 |       usage: number;
14092 |     }
14093 |     /**
14094 |      * Pair of issuer origin and number of available (signed, but not used) Trust
14095 | Tokens from that issuer.
14096 |      */
14097 |     export interface TrustTokens {
14098 |       issuerOrigin: string;
14099 |       count: number;
14100 |     }
14101 |     /**
14102 |      * Protected audience interest group auction identifier.
14103 |      */
14104 |     export type InterestGroupAuctionId = string;
14105 |     /**
14106 |      * Enum of interest group access types.
14107 |      */
14108 |     export type InterestGroupAccessType = "join"|"leave"|"update"|"loaded"|"bid"|"win"|"additionalBid"|"additionalBidWin"|"topLevelBid"|"topLevelAdditionalBid"|"clear";
14109 |     /**
14110 |      * Enum of auction events.
14111 |      */
14112 |     export type InterestGroupAuctionEventType = "started"|"configResolved";
14113 |     /**
14114 |      * Enum of network fetches auctions can do.
14115 |      */
14116 |     export type InterestGroupAuctionFetchType = "bidderJs"|"bidderWasm"|"sellerJs"|"bidderTrustedSignals"|"sellerTrustedSignals";
14117 |     /**
14118 |      * Enum of shared storage access types.
14119 |      */
14120 |     export type SharedStorageAccessType = "documentAddModule"|"documentSelectURL"|"documentRun"|"documentSet"|"documentAppend"|"documentDelete"|"documentClear"|"documentGet"|"workletSet"|"workletAppend"|"workletDelete"|"workletClear"|"workletGet"|"workletKeys"|"workletEntries"|"workletLength"|"workletRemainingBudget"|"headerSet"|"headerAppend"|"headerDelete"|"headerClear";
14121 |     /**
14122 |      * Struct for a single key-value pair in an origin's shared storage.
14123 |      */
14124 |     export interface SharedStorageEntry {
14125 |       key: string;
14126 |       value: string;
14127 |     }
14128 |     /**
14129 |      * Details for an origin's shared storage.
14130 |      */
14131 |     export interface SharedStorageMetadata {
14132 |       /**
14133 |        * Time when the origin's shared storage was last created.
14134 |        */
14135 |       creationTime: Network.TimeSinceEpoch;
14136 |       /**
14137 |        * Number of key-value pairs stored in origin's shared storage.
14138 |        */
14139 |       length: number;
14140 |       /**
14141 |        * Current amount of bits of entropy remaining in the navigation budget.
14142 |        */
14143 |       remainingBudget: number;
14144 |       /**
14145 |        * Total number of bytes stored as key-value pairs in origin's shared
14146 | storage.
14147 |        */
14148 |       bytesUsed: number;
14149 |     }
14150 |     /**
14151 |      * Pair of reporting metadata details for a candidate URL for `selectURL()`.
14152 |      */
14153 |     export interface SharedStorageReportingMetadata {
14154 |       eventType: string;
14155 |       reportingUrl: string;
14156 |     }
14157 |     /**
14158 |      * Bundles a candidate URL with its reporting metadata.
14159 |      */
14160 |     export interface SharedStorageUrlWithMetadata {
14161 |       /**
14162 |        * Spec of candidate URL.
14163 |        */
14164 |       url: string;
14165 |       /**
14166 |        * Any associated reporting metadata.
14167 |        */
14168 |       reportingMetadata: SharedStorageReportingMetadata[];
14169 |     }
14170 |     /**
14171 |      * Bundles the parameters for shared storage access events whose
14172 | presence/absence can vary according to SharedStorageAccessType.
14173 |      */
14174 |     export interface SharedStorageAccessParams {
14175 |       /**
14176 |        * Spec of the module script URL.
14177 | Present only for SharedStorageAccessType.documentAddModule.
14178 |        */
14179 |       scriptSourceUrl?: string;
14180 |       /**
14181 |        * Name of the registered operation to be run.
14182 | Present only for SharedStorageAccessType.documentRun and
14183 | SharedStorageAccessType.documentSelectURL.
14184 |        */
14185 |       operationName?: string;
14186 |       /**
14187 |        * The operation's serialized data in bytes (converted to a string).
14188 | Present only for SharedStorageAccessType.documentRun and
14189 | SharedStorageAccessType.documentSelectURL.
14190 |        */
14191 |       serializedData?: string;
14192 |       /**
14193 |        * Array of candidate URLs' specs, along with any associated metadata.
14194 | Present only for SharedStorageAccessType.documentSelectURL.
14195 |        */
14196 |       urlsWithMetadata?: SharedStorageUrlWithMetadata[];
14197 |       /**
14198 |        * Key for a specific entry in an origin's shared storage.
14199 | Present only for SharedStorageAccessType.documentSet,
14200 | SharedStorageAccessType.documentAppend,
14201 | SharedStorageAccessType.documentDelete,
14202 | SharedStorageAccessType.workletSet,
14203 | SharedStorageAccessType.workletAppend,
14204 | SharedStorageAccessType.workletDelete,
14205 | SharedStorageAccessType.workletGet,
14206 | SharedStorageAccessType.headerSet,
14207 | SharedStorageAccessType.headerAppend, and
14208 | SharedStorageAccessType.headerDelete.
14209 |        */
14210 |       key?: string;
14211 |       /**
14212 |        * Value for a specific entry in an origin's shared storage.
14213 | Present only for SharedStorageAccessType.documentSet,
14214 | SharedStorageAccessType.documentAppend,
14215 | SharedStorageAccessType.workletSet,
14216 | SharedStorageAccessType.workletAppend,
14217 | SharedStorageAccessType.headerSet, and
14218 | SharedStorageAccessType.headerAppend.
14219 |        */
14220 |       value?: string;
14221 |       /**
14222 |        * Whether or not to set an entry for a key if that key is already present.
14223 | Present only for SharedStorageAccessType.documentSet,
14224 | SharedStorageAccessType.workletSet, and
14225 | SharedStorageAccessType.headerSet.
14226 |        */
14227 |       ignoreIfPresent?: boolean;
14228 |     }
14229 |     export type StorageBucketsDurability = "relaxed"|"strict";
14230 |     export interface StorageBucket {
14231 |       storageKey: SerializedStorageKey;
14232 |       /**
14233 |        * If not specified, it is the default bucket of the storageKey.
14234 |        */
14235 |       name?: string;
14236 |     }
14237 |     export interface StorageBucketInfo {
14238 |       bucket: StorageBucket;
14239 |       id: string;
14240 |       expiration: Network.TimeSinceEpoch;
14241 |       /**
14242 |        * Storage quota (bytes).
14243 |        */
14244 |       quota: number;
14245 |       persistent: boolean;
14246 |       durability: StorageBucketsDurability;
14247 |     }
14248 |     export type AttributionReportingSourceType = "navigation"|"event";
14249 |     export type UnsignedInt64AsBase10 = string;
14250 |     export type UnsignedInt128AsBase16 = string;
14251 |     export type SignedInt64AsBase10 = string;
14252 |     export interface AttributionReportingFilterDataEntry {
14253 |       key: string;
14254 |       values: string[];
14255 |     }
14256 |     export interface AttributionReportingFilterConfig {
14257 |       filterValues: AttributionReportingFilterDataEntry[];
14258 |       /**
14259 |        * duration in seconds
14260 |        */
14261 |       lookbackWindow?: number;
14262 |     }
14263 |     export interface AttributionReportingFilterPair {
14264 |       filters: AttributionReportingFilterConfig[];
14265 |       notFilters: AttributionReportingFilterConfig[];
14266 |     }
14267 |     export interface AttributionReportingAggregationKeysEntry {
14268 |       key: string;
14269 |       value: UnsignedInt128AsBase16;
14270 |     }
14271 |     export interface AttributionReportingEventReportWindows {
14272 |       /**
14273 |        * duration in seconds
14274 |        */
14275 |       start: number;
14276 |       /**
14277 |        * duration in seconds
14278 |        */
14279 |       ends: number[];
14280 |     }
14281 |     export interface AttributionReportingTriggerSpec {
14282 |       /**
14283 |        * number instead of integer because not all uint32 can be represented by
14284 | int
14285 |        */
14286 |       triggerData: number[];
14287 |       eventReportWindows: AttributionReportingEventReportWindows;
14288 |     }
14289 |     export type AttributionReportingTriggerDataMatching = "exact"|"modulus";
14290 |     export interface AttributionReportingAggregatableDebugReportingData {
14291 |       keyPiece: UnsignedInt128AsBase16;
14292 |       /**
14293 |        * number instead of integer because not all uint32 can be represented by
14294 | int
14295 |        */
14296 |       value: number;
14297 |       types: string[];
14298 |     }
14299 |     export interface AttributionReportingAggregatableDebugReportingConfig {
14300 |       /**
14301 |        * number instead of integer because not all uint32 can be represented by
14302 | int, only present for source registrations
14303 |        */
14304 |       budget?: number;
14305 |       keyPiece: UnsignedInt128AsBase16;
14306 |       debugData: AttributionReportingAggregatableDebugReportingData[];
14307 |       aggregationCoordinatorOrigin?: string;
14308 |     }
14309 |     export interface AttributionScopesData {
14310 |       values: string[];
14311 |       /**
14312 |        * number instead of integer because not all uint32 can be represented by
14313 | int
14314 |        */
14315 |       limit: number;
14316 |       maxEventStates: number;
14317 |     }
14318 |     export interface AttributionReportingSourceRegistration {
14319 |       time: Network.TimeSinceEpoch;
14320 |       /**
14321 |        * duration in seconds
14322 |        */
14323 |       expiry: number;
14324 |       triggerSpecs: AttributionReportingTriggerSpec[];
14325 |       /**
14326 |        * duration in seconds
14327 |        */
14328 |       aggregatableReportWindow: number;
14329 |       type: AttributionReportingSourceType;
14330 |       sourceOrigin: string;
14331 |       reportingOrigin: string;
14332 |       destinationSites: string[];
14333 |       eventId: UnsignedInt64AsBase10;
14334 |       priority: SignedInt64AsBase10;
14335 |       filterData: AttributionReportingFilterDataEntry[];
14336 |       aggregationKeys: AttributionReportingAggregationKeysEntry[];
14337 |       debugKey?: UnsignedInt64AsBase10;
14338 |       triggerDataMatching: AttributionReportingTriggerDataMatching;
14339 |       destinationLimitPriority: SignedInt64AsBase10;
14340 |       aggregatableDebugReportingConfig: AttributionReportingAggregatableDebugReportingConfig;
14341 |       scopesData?: AttributionScopesData;
14342 |     }
14343 |     export type AttributionReportingSourceRegistrationResult = "success"|"internalError"|"insufficientSourceCapacity"|"insufficientUniqueDestinationCapacity"|"excessiveReportingOrigins"|"prohibitedByBrowserPolicy"|"successNoised"|"destinationReportingLimitReached"|"destinationGlobalLimitReached"|"destinationBothLimitsReached"|"reportingOriginsPerSiteLimitReached"|"exceedsMaxChannelCapacity"|"exceedsMaxScopesChannelCapacity"|"exceedsMaxTriggerStateCardinality"|"exceedsMaxEventStatesLimit"|"destinationPerDayReportingLimitReached";
14344 |     export type AttributionReportingSourceRegistrationTimeConfig = "include"|"exclude";
14345 |     export interface AttributionReportingAggregatableValueDictEntry {
14346 |       key: string;
14347 |       /**
14348 |        * number instead of integer because not all uint32 can be represented by
14349 | int
14350 |        */
14351 |       value: number;
14352 |       filteringId: UnsignedInt64AsBase10;
14353 |     }
14354 |     export interface AttributionReportingAggregatableValueEntry {
14355 |       values: AttributionReportingAggregatableValueDictEntry[];
14356 |       filters: AttributionReportingFilterPair;
14357 |     }
14358 |     export interface AttributionReportingEventTriggerData {
14359 |       data: UnsignedInt64AsBase10;
14360 |       priority: SignedInt64AsBase10;
14361 |       dedupKey?: UnsignedInt64AsBase10;
14362 |       filters: AttributionReportingFilterPair;
14363 |     }
14364 |     export interface AttributionReportingAggregatableTriggerData {
14365 |       keyPiece: UnsignedInt128AsBase16;
14366 |       sourceKeys: string[];
14367 |       filters: AttributionReportingFilterPair;
14368 |     }
14369 |     export interface AttributionReportingAggregatableDedupKey {
14370 |       dedupKey?: UnsignedInt64AsBase10;
14371 |       filters: AttributionReportingFilterPair;
14372 |     }
14373 |     export interface AttributionReportingTriggerRegistration {
14374 |       filters: AttributionReportingFilterPair;
14375 |       debugKey?: UnsignedInt64AsBase10;
14376 |       aggregatableDedupKeys: AttributionReportingAggregatableDedupKey[];
14377 |       eventTriggerData: AttributionReportingEventTriggerData[];
14378 |       aggregatableTriggerData: AttributionReportingAggregatableTriggerData[];
14379 |       aggregatableValues: AttributionReportingAggregatableValueEntry[];
14380 |       aggregatableFilteringIdMaxBytes: number;
14381 |       debugReporting: boolean;
14382 |       aggregationCoordinatorOrigin?: string;
14383 |       sourceRegistrationTimeConfig: AttributionReportingSourceRegistrationTimeConfig;
14384 |       triggerContextId?: string;
14385 |       aggregatableDebugReportingConfig: AttributionReportingAggregatableDebugReportingConfig;
14386 |       scopes: string[];
14387 |     }
14388 |     export type AttributionReportingEventLevelResult = "success"|"successDroppedLowerPriority"|"internalError"|"noCapacityForAttributionDestination"|"noMatchingSources"|"deduplicated"|"excessiveAttributions"|"priorityTooLow"|"neverAttributedSource"|"excessiveReportingOrigins"|"noMatchingSourceFilterData"|"prohibitedByBrowserPolicy"|"noMatchingConfigurations"|"excessiveReports"|"falselyAttributedSource"|"reportWindowPassed"|"notRegistered"|"reportWindowNotStarted"|"noMatchingTriggerData";
14389 |     export type AttributionReportingAggregatableResult = "success"|"internalError"|"noCapacityForAttributionDestination"|"noMatchingSources"|"excessiveAttributions"|"excessiveReportingOrigins"|"noHistograms"|"insufficientBudget"|"noMatchingSourceFilterData"|"notRegistered"|"prohibitedByBrowserPolicy"|"deduplicated"|"reportWindowPassed"|"excessiveReports";
14390 |     /**
14391 |      * A single Related Website Set object.
14392 |      */
14393 |     export interface RelatedWebsiteSet {
14394 |       /**
14395 |        * The primary site of this set, along with the ccTLDs if there is any.
14396 |        */
14397 |       primarySites: string[];
14398 |       /**
14399 |        * The associated sites of this set, along with the ccTLDs if there is any.
14400 |        */
14401 |       associatedSites: string[];
14402 |       /**
14403 |        * The service sites of this set, along with the ccTLDs if there is any.
14404 |        */
14405 |       serviceSites: string[];
14406 |     }
14407 | 
14408 |     /**
14409 |      * A cache's contents have been modified.
14410 |      */
14411 |     export type cacheStorageContentUpdatedPayload = {
14412 |       /**
14413 |        * Origin to update.
14414 |        */
14415 |       origin: string;
14416 |       /**
14417 |        * Storage key to update.
14418 |        */
14419 |       storageKey: string;
14420 |       /**
14421 |        * Storage bucket to update.
14422 |        */
14423 |       bucketId: string;
14424 |       /**
14425 |        * Name of cache in origin.
14426 |        */
14427 |       cacheName: string;
14428 |     }
14429 |     /**
14430 |      * A cache has been added/deleted.
14431 |      */
14432 |     export type cacheStorageListUpdatedPayload = {
14433 |       /**
14434 |        * Origin to update.
14435 |        */
14436 |       origin: string;
14437 |       /**
14438 |        * Storage key to update.
14439 |        */
14440 |       storageKey: string;
14441 |       /**
14442 |        * Storage bucket to update.
14443 |        */
14444 |       bucketId: string;
14445 |     }
14446 |     /**
14447 |      * The origin's IndexedDB object store has been modified.
14448 |      */
14449 |     export type indexedDBContentUpdatedPayload = {
14450 |       /**
14451 |        * Origin to update.
14452 |        */
14453 |       origin: string;
14454 |       /**
14455 |        * Storage key to update.
14456 |        */
14457 |       storageKey: string;
14458 |       /**
14459 |        * Storage bucket to update.
14460 |        */
14461 |       bucketId: string;
14462 |       /**
14463 |        * Database to update.
14464 |        */
14465 |       databaseName: string;
14466 |       /**
14467 |        * ObjectStore to update.
14468 |        */
14469 |       objectStoreName: string;
14470 |     }
14471 |     /**
14472 |      * The origin's IndexedDB database list has been modified.
14473 |      */
14474 |     export type indexedDBListUpdatedPayload = {
14475 |       /**
14476 |        * Origin to update.
14477 |        */
14478 |       origin: string;
14479 |       /**
14480 |        * Storage key to update.
14481 |        */
14482 |       storageKey: string;
14483 |       /**
14484 |        * Storage bucket to update.
14485 |        */
14486 |       bucketId: string;
14487 |     }
14488 |     /**
14489 |      * One of the interest groups was accessed. Note that these events are global
14490 | to all targets sharing an interest group store.
14491 |      */
14492 |     export type interestGroupAccessedPayload = {
14493 |       accessTime: Network.TimeSinceEpoch;
14494 |       type: InterestGroupAccessType;
14495 |       ownerOrigin: string;
14496 |       name: string;
14497 |       /**
14498 |        * For topLevelBid/topLevelAdditionalBid, and when appropriate,
14499 | win and additionalBidWin
14500 |        */
14501 |       componentSellerOrigin?: string;
14502 |       /**
14503 |        * For bid or somethingBid event, if done locally and not on a server.
14504 |        */
14505 |       bid?: number;
14506 |       bidCurrency?: string;
14507 |       /**
14508 |        * For non-global events --- links to interestGroupAuctionEvent
14509 |        */
14510 |       uniqueAuctionId?: InterestGroupAuctionId;
14511 |     }
14512 |     /**
14513 |      * An auction involving interest groups is taking place. These events are
14514 | target-specific.
14515 |      */
14516 |     export type interestGroupAuctionEventOccurredPayload = {
14517 |       eventTime: Network.TimeSinceEpoch;
14518 |       type: InterestGroupAuctionEventType;
14519 |       uniqueAuctionId: InterestGroupAuctionId;
14520 |       /**
14521 |        * Set for child auctions.
14522 |        */
14523 |       parentAuctionId?: InterestGroupAuctionId;
14524 |       /**
14525 |        * Set for started and configResolved
14526 |        */
14527 |       auctionConfig?: { [key: string]: string };
14528 |     }
14529 |     /**
14530 |      * Specifies which auctions a particular network fetch may be related to, and
14531 | in what role. Note that it is not ordered with respect to
14532 | Network.requestWillBeSent (but will happen before loadingFinished
14533 | loadingFailed).
14534 |      */
14535 |     export type interestGroupAuctionNetworkRequestCreatedPayload = {
14536 |       type: InterestGroupAuctionFetchType;
14537 |       requestId: Network.RequestId;
14538 |       /**
14539 |        * This is the set of the auctions using the worklet that issued this
14540 | request.  In the case of trusted signals, it's possible that only some of
14541 | them actually care about the keys being queried.
14542 |        */
14543 |       auctions: InterestGroupAuctionId[];
14544 |     }
14545 |     /**
14546 |      * Shared storage was accessed by the associated page.
14547 | The following parameters are included in all events.
14548 |      */
14549 |     export type sharedStorageAccessedPayload = {
14550 |       /**
14551 |        * Time of the access.
14552 |        */
14553 |       accessTime: Network.TimeSinceEpoch;
14554 |       /**
14555 |        * Enum value indicating the Shared Storage API method invoked.
14556 |        */
14557 |       type: SharedStorageAccessType;
14558 |       /**
14559 |        * DevTools Frame Token for the primary frame tree's root.
14560 |        */
14561 |       mainFrameId: Page.FrameId;
14562 |       /**
14563 |        * Serialized origin for the context that invoked the Shared Storage API.
14564 |        */
14565 |       ownerOrigin: string;
14566 |       /**
14567 |        * The sub-parameters wrapped by `params` are all optional and their
14568 | presence/absence depends on `type`.
14569 |        */
14570 |       params: SharedStorageAccessParams;
14571 |     }
14572 |     export type storageBucketCreatedOrUpdatedPayload = {
14573 |       bucketInfo: StorageBucketInfo;
14574 |     }
14575 |     export type storageBucketDeletedPayload = {
14576 |       bucketId: string;
14577 |     }
14578 |     export type attributionReportingSourceRegisteredPayload = {
14579 |       registration: AttributionReportingSourceRegistration;
14580 |       result: AttributionReportingSourceRegistrationResult;
14581 |     }
14582 |     export type attributionReportingTriggerRegisteredPayload = {
14583 |       registration: AttributionReportingTriggerRegistration;
14584 |       eventLevel: AttributionReportingEventLevelResult;
14585 |       aggregatable: AttributionReportingAggregatableResult;
14586 |     }
14587 | 
14588 |     /**
14589 |      * Returns a storage key given a frame id.
14590 |      */
14591 |     export type getStorageKeyForFrameParameters = {
14592 |       frameId: Page.FrameId;
14593 |     }
14594 |     export type getStorageKeyForFrameReturnValue = {
14595 |       storageKey: SerializedStorageKey;
14596 |     }
14597 |     /**
14598 |      * Clears storage for origin.
14599 |      */
14600 |     export type clearDataForOriginParameters = {
14601 |       /**
14602 |        * Security origin.
14603 |        */
14604 |       origin: string;
14605 |       /**
14606 |        * Comma separated list of StorageType to clear.
14607 |        */
14608 |       storageTypes: string;
14609 |     }
14610 |     export type clearDataForOriginReturnValue = {
14611 |     }
14612 |     /**
14613 |      * Clears storage for storage key.
14614 |      */
14615 |     export type clearDataForStorageKeyParameters = {
14616 |       /**
14617 |        * Storage key.
14618 |        */
14619 |       storageKey: string;
14620 |       /**
14621 |        * Comma separated list of StorageType to clear.
14622 |        */
14623 |       storageTypes: string;
14624 |     }
14625 |     export type clearDataForStorageKeyReturnValue = {
14626 |     }
14627 |     /**
14628 |      * Returns all browser cookies.
14629 |      */
14630 |     export type getCookiesParameters = {
14631 |       /**
14632 |        * Browser context to use when called on the browser endpoint.
14633 |        */
14634 |       browserContextId?: Browser.BrowserContextID;
14635 |     }
14636 |     export type getCookiesReturnValue = {
14637 |       /**
14638 |        * Array of cookie objects.
14639 |        */
14640 |       cookies: Network.Cookie[];
14641 |     }
14642 |     /**
14643 |      * Sets given cookies.
14644 |      */
14645 |     export type setCookiesParameters = {
14646 |       /**
14647 |        * Cookies to be set.
14648 |        */
14649 |       cookies: Network.CookieParam[];
14650 |       /**
14651 |        * Browser context to use when called on the browser endpoint.
14652 |        */
14653 |       browserContextId?: Browser.BrowserContextID;
14654 |     }
14655 |     export type setCookiesReturnValue = {
14656 |     }
14657 |     /**
14658 |      * Clears cookies.
14659 |      */
14660 |     export type clearCookiesParameters = {
14661 |       /**
14662 |        * Browser context to use when called on the browser endpoint.
14663 |        */
14664 |       browserContextId?: Browser.BrowserContextID;
14665 |     }
14666 |     export type clearCookiesReturnValue = {
14667 |     }
14668 |     /**
14669 |      * Returns usage and quota in bytes.
14670 |      */
14671 |     export type getUsageAndQuotaParameters = {
14672 |       /**
14673 |        * Security origin.
14674 |        */
14675 |       origin: string;
14676 |     }
14677 |     export type getUsageAndQuotaReturnValue = {
14678 |       /**
14679 |        * Storage usage (bytes).
14680 |        */
14681 |       usage: number;
14682 |       /**
14683 |        * Storage quota (bytes).
14684 |        */
14685 |       quota: number;
14686 |       /**
14687 |        * Whether or not the origin has an active storage quota override
14688 |        */
14689 |       overrideActive: boolean;
14690 |       /**
14691 |        * Storage usage per type (bytes).
14692 |        */
14693 |       usageBreakdown: UsageForType[];
14694 |     }
14695 |     /**
14696 |      * Override quota for the specified origin
14697 |      */
14698 |     export type overrideQuotaForOriginParameters = {
14699 |       /**
14700 |        * Security origin.
14701 |        */
14702 |       origin: string;
14703 |       /**
14704 |        * The quota size (in bytes) to override the original quota with.
14705 | If this is called multiple times, the overridden quota will be equal to
14706 | the quotaSize provided in the final call. If this is called without
14707 | specifying a quotaSize, the quota will be reset to the default value for
14708 | the specified origin. If this is called multiple times with different
14709 | origins, the override will be maintained for each origin until it is
14710 | disabled (called without a quotaSize).
14711 |        */
14712 |       quotaSize?: number;
14713 |     }
14714 |     export type overrideQuotaForOriginReturnValue = {
14715 |     }
14716 |     /**
14717 |      * Registers origin to be notified when an update occurs to its cache storage list.
14718 |      */
14719 |     export type trackCacheStorageForOriginParameters = {
14720 |       /**
14721 |        * Security origin.
14722 |        */
14723 |       origin: string;
14724 |     }
14725 |     export type trackCacheStorageForOriginReturnValue = {
14726 |     }
14727 |     /**
14728 |      * Registers storage key to be notified when an update occurs to its cache storage list.
14729 |      */
14730 |     export type trackCacheStorageForStorageKeyParameters = {
14731 |       /**
14732 |        * Storage key.
14733 |        */
14734 |       storageKey: string;
14735 |     }
14736 |     export type trackCacheStorageForStorageKeyReturnValue = {
14737 |     }
14738 |     /**
14739 |      * Registers origin to be notified when an update occurs to its IndexedDB.
14740 |      */
14741 |     export type trackIndexedDBForOriginParameters = {
14742 |       /**
14743 |        * Security origin.
14744 |        */
14745 |       origin: string;
14746 |     }
14747 |     export type trackIndexedDBForOriginReturnValue = {
14748 |     }
14749 |     /**
14750 |      * Registers storage key to be notified when an update occurs to its IndexedDB.
14751 |      */
14752 |     export type trackIndexedDBForStorageKeyParameters = {
14753 |       /**
14754 |        * Storage key.
14755 |        */
14756 |       storageKey: string;
14757 |     }
14758 |     export type trackIndexedDBForStorageKeyReturnValue = {
14759 |     }
14760 |     /**
14761 |      * Unregisters origin from receiving notifications for cache storage.
14762 |      */
14763 |     export type untrackCacheStorageForOriginParameters = {
14764 |       /**
14765 |        * Security origin.
14766 |        */
14767 |       origin: string;
14768 |     }
14769 |     export type untrackCacheStorageForOriginReturnValue = {
14770 |     }
14771 |     /**
14772 |      * Unregisters storage key from receiving notifications for cache storage.
14773 |      */
14774 |     export type untrackCacheStorageForStorageKeyParameters = {
14775 |       /**
14776 |        * Storage key.
14777 |        */
14778 |       storageKey: string;
14779 |     }
14780 |     export type untrackCacheStorageForStorageKeyReturnValue = {
14781 |     }
14782 |     /**
14783 |      * Unregisters origin from receiving notifications for IndexedDB.
14784 |      */
14785 |     export type untrackIndexedDBForOriginParameters = {
14786 |       /**
14787 |        * Security origin.
14788 |        */
14789 |       origin: string;
14790 |     }
14791 |     export type untrackIndexedDBForOriginReturnValue = {
14792 |     }
14793 |     /**
14794 |      * Unregisters storage key from receiving notifications for IndexedDB.
14795 |      */
14796 |     export type untrackIndexedDBForStorageKeyParameters = {
14797 |       /**
14798 |        * Storage key.
14799 |        */
14800 |       storageKey: string;
14801 |     }
14802 |     export type untrackIndexedDBForStorageKeyReturnValue = {
14803 |     }
14804 |     /**
14805 |      * Returns the number of stored Trust Tokens per issuer for the
14806 | current browsing context.
14807 |      */
14808 |     export type getTrustTokensParameters = {
14809 |     }
14810 |     export type getTrustTokensReturnValue = {
14811 |       tokens: TrustTokens[];
14812 |     }
14813 |     /**
14814 |      * Removes all Trust Tokens issued by the provided issuerOrigin.
14815 | Leaves other stored data, including the issuer's Redemption Records, intact.
14816 |      */
14817 |     export type clearTrustTokensParameters = {
14818 |       issuerOrigin: string;
14819 |     }
14820 |     export type clearTrustTokensReturnValue = {
14821 |       /**
14822 |        * True if any tokens were deleted, false otherwise.
14823 |        */
14824 |       didDeleteTokens: boolean;
14825 |     }
14826 |     /**
14827 |      * Gets details for a named interest group.
14828 |      */
14829 |     export type getInterestGroupDetailsParameters = {
14830 |       ownerOrigin: string;
14831 |       name: string;
14832 |     }
14833 |     export type getInterestGroupDetailsReturnValue = {
14834 |       /**
14835 |        * This largely corresponds to:
14836 | https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup
14837 | but has absolute expirationTime instead of relative lifetimeMs and
14838 | also adds joiningOrigin.
14839 |        */
14840 |       details: { [key: string]: string };
14841 |     }
14842 |     /**
14843 |      * Enables/Disables issuing of interestGroupAccessed events.
14844 |      */
14845 |     export type setInterestGroupTrackingParameters = {
14846 |       enable: boolean;
14847 |     }
14848 |     export type setInterestGroupTrackingReturnValue = {
14849 |     }
14850 |     /**
14851 |      * Enables/Disables issuing of interestGroupAuctionEventOccurred and
14852 | interestGroupAuctionNetworkRequestCreated.
14853 |      */
14854 |     export type setInterestGroupAuctionTrackingParameters = {
14855 |       enable: boolean;
14856 |     }
14857 |     export type setInterestGroupAuctionTrackingReturnValue = {
14858 |     }
14859 |     /**
14860 |      * Gets metadata for an origin's shared storage.
14861 |      */
14862 |     export type getSharedStorageMetadataParameters = {
14863 |       ownerOrigin: string;
14864 |     }
14865 |     export type getSharedStorageMetadataReturnValue = {
14866 |       metadata: SharedStorageMetadata;
14867 |     }
14868 |     /**
14869 |      * Gets the entries in an given origin's shared storage.
14870 |      */
14871 |     export type getSharedStorageEntriesParameters = {
14872 |       ownerOrigin: string;
14873 |     }
14874 |     export type getSharedStorageEntriesReturnValue = {
14875 |       entries: SharedStorageEntry[];
14876 |     }
14877 |     /**
14878 |      * Sets entry with `key` and `value` for a given origin's shared storage.
14879 |      */
14880 |     export type setSharedStorageEntryParameters = {
14881 |       ownerOrigin: string;
14882 |       key: string;
14883 |       value: string;
14884 |       /**
14885 |        * If `ignoreIfPresent` is included and true, then only sets the entry if
14886 | `key` doesn't already exist.
14887 |        */
14888 |       ignoreIfPresent?: boolean;
14889 |     }
14890 |     export type setSharedStorageEntryReturnValue = {
14891 |     }
14892 |     /**
14893 |      * Deletes entry for `key` (if it exists) for a given origin's shared storage.
14894 |      */
14895 |     export type deleteSharedStorageEntryParameters = {
14896 |       ownerOrigin: string;
14897 |       key: string;
14898 |     }
14899 |     export type deleteSharedStorageEntryReturnValue = {
14900 |     }
14901 |     /**
14902 |      * Clears all entries for a given origin's shared storage.
14903 |      */
14904 |     export type clearSharedStorageEntriesParameters = {
14905 |       ownerOrigin: string;
14906 |     }
14907 |     export type clearSharedStorageEntriesReturnValue = {
14908 |     }
14909 |     /**
14910 |      * Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
14911 |      */
14912 |     export type resetSharedStorageBudgetParameters = {
14913 |       ownerOrigin: string;
14914 |     }
14915 |     export type resetSharedStorageBudgetReturnValue = {
14916 |     }
14917 |     /**
14918 |      * Enables/disables issuing of sharedStorageAccessed events.
14919 |      */
14920 |     export type setSharedStorageTrackingParameters = {
14921 |       enable: boolean;
14922 |     }
14923 |     export type setSharedStorageTrackingReturnValue = {
14924 |     }
14925 |     /**
14926 |      * Set tracking for a storage key's buckets.
14927 |      */
14928 |     export type setStorageBucketTrackingParameters = {
14929 |       storageKey: string;
14930 |       enable: boolean;
14931 |     }
14932 |     export type setStorageBucketTrackingReturnValue = {
14933 |     }
14934 |     /**
14935 |      * Deletes the Storage Bucket with the given storage key and bucket name.
14936 |      */
14937 |     export type deleteStorageBucketParameters = {
14938 |       bucket: StorageBucket;
14939 |     }
14940 |     export type deleteStorageBucketReturnValue = {
14941 |     }
14942 |     /**
14943 |      * Deletes state for sites identified as potential bounce trackers, immediately.
14944 |      */
14945 |     export type runBounceTrackingMitigationsParameters = {
14946 |     }
14947 |     export type runBounceTrackingMitigationsReturnValue = {
14948 |       deletedSites: string[];
14949 |     }
14950 |     /**
14951 |      * https://wicg.github.io/attribution-reporting-api/
14952 |      */
14953 |     export type setAttributionReportingLocalTestingModeParameters = {
14954 |       /**
14955 |        * If enabled, noise is suppressed and reports are sent immediately.
14956 |        */
14957 |       enabled: boolean;
14958 |     }
14959 |     export type setAttributionReportingLocalTestingModeReturnValue = {
14960 |     }
14961 |     /**
14962 |      * Enables/disables issuing of Attribution Reporting events.
14963 |      */
14964 |     export type setAttributionReportingTrackingParameters = {
14965 |       enable: boolean;
14966 |     }
14967 |     export type setAttributionReportingTrackingReturnValue = {
14968 |     }
14969 |     /**
14970 |      * Sends all pending Attribution Reports immediately, regardless of their
14971 | scheduled report time.
14972 |      */
14973 |     export type sendPendingAttributionReportsParameters = {
14974 |     }
14975 |     export type sendPendingAttributionReportsReturnValue = {
14976 |       /**
14977 |        * The number of reports that were sent.
14978 |        */
14979 |       numSent: number;
14980 |     }
14981 |     /**
14982 |      * Returns the effective Related Website Sets in use by this profile for the browser
14983 | session. The effective Related Website Sets will not change during a browser session.
14984 |      */
14985 |     export type getRelatedWebsiteSetsParameters = {
14986 |     }
14987 |     export type getRelatedWebsiteSetsReturnValue = {
14988 |       sets: RelatedWebsiteSet[];
14989 |     }
14990 |   }
14991 | 
14992 |   /**
14993 |    * The SystemInfo domain defines methods and events for querying low-level system information.
14994 |    */
14995 |   export module SystemInfo {
14996 |     /**
14997 |      * Describes a single graphics processor (GPU).
14998 |      */
14999 |     export interface GPUDevice {
15000 |       /**
15001 |        * PCI ID of the GPU vendor, if available; 0 otherwise.
15002 |        */
15003 |       vendorId: number;
15004 |       /**
15005 |        * PCI ID of the GPU device, if available; 0 otherwise.
15006 |        */
15007 |       deviceId: number;
15008 |       /**
15009 |        * Sub sys ID of the GPU, only available on Windows.
15010 |        */
15011 |       subSysId?: number;
15012 |       /**
15013 |        * Revision of the GPU, only available on Windows.
15014 |        */
15015 |       revision?: number;
15016 |       /**
15017 |        * String description of the GPU vendor, if the PCI ID is not available.
15018 |        */
15019 |       vendorString: string;
15020 |       /**
15021 |        * String description of the GPU device, if the PCI ID is not available.
15022 |        */
15023 |       deviceString: string;
15024 |       /**
15025 |        * String description of the GPU driver vendor.
15026 |        */
15027 |       driverVendor: string;
15028 |       /**
15029 |        * String description of the GPU driver version.
15030 |        */
15031 |       driverVersion: string;
15032 |     }
15033 |     /**
15034 |      * Describes the width and height dimensions of an entity.
15035 |      */
15036 |     export interface Size {
15037 |       /**
15038 |        * Width in pixels.
15039 |        */
15040 |       width: number;
15041 |       /**
15042 |        * Height in pixels.
15043 |        */
15044 |       height: number;
15045 |     }
15046 |     /**
15047 |      * Describes a supported video decoding profile with its associated minimum and
15048 | maximum resolutions.
15049 |      */
15050 |     export interface VideoDecodeAcceleratorCapability {
15051 |       /**
15052 |        * Video codec profile that is supported, e.g. VP9 Profile 2.
15053 |        */
15054 |       profile: string;
15055 |       /**
15056 |        * Maximum video dimensions in pixels supported for this |profile|.
15057 |        */
15058 |       maxResolution: Size;
15059 |       /**
15060 |        * Minimum video dimensions in pixels supported for this |profile|.
15061 |        */
15062 |       minResolution: Size;
15063 |     }
15064 |     /**
15065 |      * Describes a supported video encoding profile with its associated maximum
15066 | resolution and maximum framerate.
15067 |      */
15068 |     export interface VideoEncodeAcceleratorCapability {
15069 |       /**
15070 |        * Video codec profile that is supported, e.g H264 Main.
15071 |        */
15072 |       profile: string;
15073 |       /**
15074 |        * Maximum video dimensions in pixels supported for this |profile|.
15075 |        */
15076 |       maxResolution: Size;
15077 |       /**
15078 |        * Maximum encoding framerate in frames per second supported for this
15079 | |profile|, as fraction's numerator and denominator, e.g. 24/1 fps,
15080 | 24000/1001 fps, etc.
15081 |        */
15082 |       maxFramerateNumerator: number;
15083 |       maxFramerateDenominator: number;
15084 |     }
15085 |     /**
15086 |      * YUV subsampling type of the pixels of a given image.
15087 |      */
15088 |     export type SubsamplingFormat = "yuv420"|"yuv422"|"yuv444";
15089 |     /**
15090 |      * Image format of a given image.
15091 |      */
15092 |     export type ImageType = "jpeg"|"webp"|"unknown";
15093 |     /**
15094 |      * Describes a supported image decoding profile with its associated minimum and
15095 | maximum resolutions and subsampling.
15096 |      */
15097 |     export interface ImageDecodeAcceleratorCapability {
15098 |       /**
15099 |        * Image coded, e.g. Jpeg.
15100 |        */
15101 |       imageType: ImageType;
15102 |       /**
15103 |        * Maximum supported dimensions of the image in pixels.
15104 |        */
15105 |       maxDimensions: Size;
15106 |       /**
15107 |        * Minimum supported dimensions of the image in pixels.
15108 |        */
15109 |       minDimensions: Size;
15110 |       /**
15111 |        * Optional array of supported subsampling formats, e.g. 4:2:0, if known.
15112 |        */
15113 |       subsamplings: SubsamplingFormat[];
15114 |     }
15115 |     /**
15116 |      * Provides information about the GPU(s) on the system.
15117 |      */
15118 |     export interface GPUInfo {
15119 |       /**
15120 |        * The graphics devices on the system. Element 0 is the primary GPU.
15121 |        */
15122 |       devices: GPUDevice[];
15123 |       /**
15124 |        * An optional dictionary of additional GPU related attributes.
15125 |        */
15126 |       auxAttributes?: { [key: string]: string };
15127 |       /**
15128 |        * An optional dictionary of graphics features and their status.
15129 |        */
15130 |       featureStatus?: { [key: string]: string };
15131 |       /**
15132 |        * An optional array of GPU driver bug workarounds.
15133 |        */
15134 |       driverBugWorkarounds: string[];
15135 |       /**
15136 |        * Supported accelerated video decoding capabilities.
15137 |        */
15138 |       videoDecoding: VideoDecodeAcceleratorCapability[];
15139 |       /**
15140 |        * Supported accelerated video encoding capabilities.
15141 |        */
15142 |       videoEncoding: VideoEncodeAcceleratorCapability[];
15143 |       /**
15144 |        * Supported accelerated image decoding capabilities.
15145 |        */
15146 |       imageDecoding: ImageDecodeAcceleratorCapability[];
15147 |     }
15148 |     /**
15149 |      * Represents process info.
15150 |      */
15151 |     export interface ProcessInfo {
15152 |       /**
15153 |        * Specifies process type.
15154 |        */
15155 |       type: string;
15156 |       /**
15157 |        * Specifies process id.
15158 |        */
15159 |       id: number;
15160 |       /**
15161 |        * Specifies cumulative CPU usage in seconds across all threads of the
15162 | process since the process start.
15163 |        */
15164 |       cpuTime: number;
15165 |     }
15166 | 
15167 | 
15168 |     /**
15169 |      * Returns information about the system.
15170 |      */
15171 |     export type getInfoParameters = {
15172 |     }
15173 |     export type getInfoReturnValue = {
15174 |       /**
15175 |        * Information about the GPUs on the system.
15176 |        */
15177 |       gpu: GPUInfo;
15178 |       /**
15179 |        * A platform-dependent description of the model of the machine. On Mac OS, this is, for
15180 | example, 'MacBookPro'. Will be the empty string if not supported.
15181 |        */
15182 |       modelName: string;
15183 |       /**
15184 |        * A platform-dependent description of the version of the machine. On Mac OS, this is, for
15185 | example, '10.1'. Will be the empty string if not supported.
15186 |        */
15187 |       modelVersion: string;
15188 |       /**
15189 |        * The command line string used to launch the browser. Will be the empty string if not
15190 | supported.
15191 |        */
15192 |       commandLine: string;
15193 |     }
15194 |     /**
15195 |      * Returns information about the feature state.
15196 |      */
15197 |     export type getFeatureStateParameters = {
15198 |       featureState: string;
15199 |     }
15200 |     export type getFeatureStateReturnValue = {
15201 |       featureEnabled: boolean;
15202 |     }
15203 |     /**
15204 |      * Returns information about all running processes.
15205 |      */
15206 |     export type getProcessInfoParameters = {
15207 |     }
15208 |     export type getProcessInfoReturnValue = {
15209 |       /**
15210 |        * An array of process info blocks.
15211 |        */
15212 |       processInfo: ProcessInfo[];
15213 |     }
15214 |   }
15215 | 
15216 |   /**
15217 |    * Supports additional targets discovery and allows to attach to them.
15218 |    */
15219 |   export module Target {
15220 |     export type TargetID = string;
15221 |     /**
15222 |      * Unique identifier of attached debugging session.
15223 |      */
15224 |     export type SessionID = string;
15225 |     export interface TargetInfo {
15226 |       targetId: TargetID;
15227 |       /**
15228 |        * List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22
15229 |        */
15230 |       type: string;
15231 |       title: string;
15232 |       url: string;
15233 |       /**
15234 |        * Whether the target has an attached client.
15235 |        */
15236 |       attached: boolean;
15237 |       /**
15238 |        * Opener target Id
15239 |        */
15240 |       openerId?: TargetID;
15241 |       /**
15242 |        * Whether the target has access to the originating window.
15243 |        */
15244 |       canAccessOpener: boolean;
15245 |       /**
15246 |        * Frame id of originating window (is only set if target has an opener).
15247 |        */
15248 |       openerFrameId?: Page.FrameId;
15249 |       browserContextId?: Browser.BrowserContextID;
15250 |       /**
15251 |        * Provides additional details for specific target types. For example, for
15252 | the type of "page", this may be set to "prerender".
15253 |        */
15254 |       subtype?: string;
15255 |     }
15256 |     /**
15257 |      * A filter used by target query/discovery/auto-attach operations.
15258 |      */
15259 |     export interface FilterEntry {
15260 |       /**
15261 |        * If set, causes exclusion of matching targets from the list.
15262 |        */
15263 |       exclude?: boolean;
15264 |       /**
15265 |        * If not present, matches any type.
15266 |        */
15267 |       type?: string;
15268 |     }
15269 |     /**
15270 |      * The entries in TargetFilter are matched sequentially against targets and
15271 | the first entry that matches determines if the target is included or not,
15272 | depending on the value of `exclude` field in the entry.
15273 | If filter is not specified, the one assumed is
15274 | [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}]
15275 | (i.e. include everything but `browser` and `tab`).
15276 |      */
15277 |     export type TargetFilter = FilterEntry[];
15278 |     export interface RemoteLocation {
15279 |       host: string;
15280 |       port: number;
15281 |     }
15282 | 
15283 |     /**
15284 |      * Issued when attached to target because of auto-attach or `attachToTarget` command.
15285 |      */
15286 |     export type attachedToTargetPayload = {
15287 |       /**
15288 |        * Identifier assigned to the session used to send/receive messages.
15289 |        */
15290 |       sessionId: SessionID;
15291 |       targetInfo: TargetInfo;
15292 |       waitingForDebugger: boolean;
15293 |     }
15294 |     /**
15295 |      * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
15296 | issued multiple times per target if multiple sessions have been attached to it.
15297 |      */
15298 |     export type detachedFromTargetPayload = {
15299 |       /**
15300 |        * Detached session identifier.
15301 |        */
15302 |       sessionId: SessionID;
15303 |       /**
15304 |        * Deprecated.
15305 |        */
15306 |       targetId?: TargetID;
15307 |     }
15308 |     /**
15309 |      * Notifies about a new protocol message received from the session (as reported in
15310 | `attachedToTarget` event).
15311 |      */
15312 |     export type receivedMessageFromTargetPayload = {
15313 |       /**
15314 |        * Identifier of a session which sends a message.
15315 |        */
15316 |       sessionId: SessionID;
15317 |       message: string;
15318 |       /**
15319 |        * Deprecated.
15320 |        */
15321 |       targetId?: TargetID;
15322 |     }
15323 |     /**
15324 |      * Issued when a possible inspection target is created.
15325 |      */
15326 |     export type targetCreatedPayload = {
15327 |       targetInfo: TargetInfo;
15328 |     }
15329 |     /**
15330 |      * Issued when a target is destroyed.
15331 |      */
15332 |     export type targetDestroyedPayload = {
15333 |       targetId: TargetID;
15334 |     }
15335 |     /**
15336 |      * Issued when a target has crashed.
15337 |      */
15338 |     export type targetCrashedPayload = {
15339 |       targetId: TargetID;
15340 |       /**
15341 |        * Termination status type.
15342 |        */
15343 |       status: string;
15344 |       /**
15345 |        * Termination error code.
15346 |        */
15347 |       errorCode: number;
15348 |     }
15349 |     /**
15350 |      * Issued when some information about a target has changed. This only happens between
15351 | `targetCreated` and `targetDestroyed`.
15352 |      */
15353 |     export type targetInfoChangedPayload = {
15354 |       targetInfo: TargetInfo;
15355 |     }
15356 | 
15357 |     /**
15358 |      * Activates (focuses) the target.
15359 |      */
15360 |     export type activateTargetParameters = {
15361 |       targetId: TargetID;
15362 |     }
15363 |     export type activateTargetReturnValue = {
15364 |     }
15365 |     /**
15366 |      * Attaches to the target with given id.
15367 |      */
15368 |     export type attachToTargetParameters = {
15369 |       targetId: TargetID;
15370 |       /**
15371 |        * Enables "flat" access to the session via specifying sessionId attribute in the commands.
15372 | We plan to make this the default, deprecate non-flattened mode,
15373 | and eventually retire it. See crbug.com/991325.
15374 |        */
15375 |       flatten?: boolean;
15376 |     }
15377 |     export type attachToTargetReturnValue = {
15378 |       /**
15379 |        * Id assigned to the session.
15380 |        */
15381 |       sessionId: SessionID;
15382 |     }
15383 |     /**
15384 |      * Attaches to the browser target, only uses flat sessionId mode.
15385 |      */
15386 |     export type attachToBrowserTargetParameters = {
15387 |     }
15388 |     export type attachToBrowserTargetReturnValue = {
15389 |       /**
15390 |        * Id assigned to the session.
15391 |        */
15392 |       sessionId: SessionID;
15393 |     }
15394 |     /**
15395 |      * Closes the target. If the target is a page that gets closed too.
15396 |      */
15397 |     export type closeTargetParameters = {
15398 |       targetId: TargetID;
15399 |     }
15400 |     export type closeTargetReturnValue = {
15401 |       /**
15402 |        * Always set to true. If an error occurs, the response indicates protocol error.
15403 |        */
15404 |       success: boolean;
15405 |     }
15406 |     /**
15407 |      * Inject object to the target's main frame that provides a communication
15408 | channel with browser target.
15409 | 
15410 | Injected object will be available as `window[bindingName]`.
15411 | 
15412 | The object has the following API:
15413 | - `binding.send(json)` - a method to send messages over the remote debugging protocol
15414 | - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
15415 |      */
15416 |     export type exposeDevToolsProtocolParameters = {
15417 |       targetId: TargetID;
15418 |       /**
15419 |        * Binding name, 'cdp' if not specified.
15420 |        */
15421 |       bindingName?: string;
15422 |     }
15423 |     export type exposeDevToolsProtocolReturnValue = {
15424 |     }
15425 |     /**
15426 |      * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
15427 | one.
15428 |      */
15429 |     export type createBrowserContextParameters = {
15430 |       /**
15431 |        * If specified, disposes this context when debugging session disconnects.
15432 |        */
15433 |       disposeOnDetach?: boolean;
15434 |       /**
15435 |        * Proxy server, similar to the one passed to --proxy-server
15436 |        */
15437 |       proxyServer?: string;
15438 |       /**
15439 |        * Proxy bypass list, similar to the one passed to --proxy-bypass-list
15440 |        */
15441 |       proxyBypassList?: string;
15442 |       /**
15443 |        * An optional list of origins to grant unlimited cross-origin access to.
15444 | Parts of the URL other than those constituting origin are ignored.
15445 |        */
15446 |       originsWithUniversalNetworkAccess?: string[];
15447 |     }
15448 |     export type createBrowserContextReturnValue = {
15449 |       /**
15450 |        * The id of the context created.
15451 |        */
15452 |       browserContextId: Browser.BrowserContextID;
15453 |     }
15454 |     /**
15455 |      * Returns all browser contexts created with `Target.createBrowserContext` method.
15456 |      */
15457 |     export type getBrowserContextsParameters = {
15458 |     }
15459 |     export type getBrowserContextsReturnValue = {
15460 |       /**
15461 |        * An array of browser context ids.
15462 |        */
15463 |       browserContextIds: Browser.BrowserContextID[];
15464 |     }
15465 |     /**
15466 |      * Creates a new page.
15467 |      */
15468 |     export type createTargetParameters = {
15469 |       /**
15470 |        * The initial URL the page will be navigated to. An empty string indicates about:blank.
15471 |        */
15472 |       url: string;
15473 |       /**
15474 |        * Frame width in DIP (headless chrome only).
15475 |        */
15476 |       width?: number;
15477 |       /**
15478 |        * Frame height in DIP (headless chrome only).
15479 |        */
15480 |       height?: number;
15481 |       /**
15482 |        * The browser context to create the page in.
15483 |        */
15484 |       browserContextId?: Browser.BrowserContextID;
15485 |       /**
15486 |        * Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,
15487 | not supported on MacOS yet, false by default).
15488 |        */
15489 |       enableBeginFrameControl?: boolean;
15490 |       /**
15491 |        * Whether to create a new Window or Tab (chrome-only, false by default).
15492 |        */
15493 |       newWindow?: boolean;
15494 |       /**
15495 |        * Whether to create the target in background or foreground (chrome-only,
15496 | false by default).
15497 |        */
15498 |       background?: boolean;
15499 |       /**
15500 |        * Whether to create the target of type "tab".
15501 |        */
15502 |       forTab?: boolean;
15503 |     }
15504 |     export type createTargetReturnValue = {
15505 |       /**
15506 |        * The id of the page opened.
15507 |        */
15508 |       targetId: TargetID;
15509 |     }
15510 |     /**
15511 |      * Detaches session with given id.
15512 |      */
15513 |     export type detachFromTargetParameters = {
15514 |       /**
15515 |        * Session to detach.
15516 |        */
15517 |       sessionId?: SessionID;
15518 |       /**
15519 |        * Deprecated.
15520 |        */
15521 |       targetId?: TargetID;
15522 |     }
15523 |     export type detachFromTargetReturnValue = {
15524 |     }
15525 |     /**
15526 |      * Deletes a BrowserContext. All the belonging pages will be closed without calling their
15527 | beforeunload hooks.
15528 |      */
15529 |     export type disposeBrowserContextParameters = {
15530 |       browserContextId: Browser.BrowserContextID;
15531 |     }
15532 |     export type disposeBrowserContextReturnValue = {
15533 |     }
15534 |     /**
15535 |      * Returns information about a target.
15536 |      */
15537 |     export type getTargetInfoParameters = {
15538 |       targetId?: TargetID;
15539 |     }
15540 |     export type getTargetInfoReturnValue = {
15541 |       targetInfo: TargetInfo;
15542 |     }
15543 |     /**
15544 |      * Retrieves a list of available targets.
15545 |      */
15546 |     export type getTargetsParameters = {
15547 |       /**
15548 |        * Only targets matching filter will be reported. If filter is not specified
15549 | and target discovery is currently enabled, a filter used for target discovery
15550 | is used for consistency.
15551 |        */
15552 |       filter?: TargetFilter;
15553 |     }
15554 |     export type getTargetsReturnValue = {
15555 |       /**
15556 |        * The list of targets.
15557 |        */
15558 |       targetInfos: TargetInfo[];
15559 |     }
15560 |     /**
15561 |      * Sends protocol message over session with given id.
15562 | Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
15563 | and crbug.com/991325.
15564 |      */
15565 |     export type sendMessageToTargetParameters = {
15566 |       message: string;
15567 |       /**
15568 |        * Identifier of the session.
15569 |        */
15570 |       sessionId?: SessionID;
15571 |       /**
15572 |        * Deprecated.
15573 |        */
15574 |       targetId?: TargetID;
15575 |     }
15576 |     export type sendMessageToTargetReturnValue = {
15577 |     }
15578 |     /**
15579 |      * Controls whether to automatically attach to new targets which are considered to be related to
15580 | this one. When turned on, attaches to all existing related targets as well. When turned off,
15581 | automatically detaches from all currently attached targets.
15582 | This also clears all targets added by `autoAttachRelated` from the list of targets to watch
15583 | for creation of related targets.
15584 |      */
15585 |     export type setAutoAttachParameters = {
15586 |       /**
15587 |        * Whether to auto-attach to related targets.
15588 |        */
15589 |       autoAttach: boolean;
15590 |       /**
15591 |        * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
15592 | to run paused targets.
15593 |        */
15594 |       waitForDebuggerOnStart: boolean;
15595 |       /**
15596 |        * Enables "flat" access to the session via specifying sessionId attribute in the commands.
15597 | We plan to make this the default, deprecate non-flattened mode,
15598 | and eventually retire it. See crbug.com/991325.
15599 |        */
15600 |       flatten?: boolean;
15601 |       /**
15602 |        * Only targets matching filter will be attached.
15603 |        */
15604 |       filter?: TargetFilter;
15605 |     }
15606 |     export type setAutoAttachReturnValue = {
15607 |     }
15608 |     /**
15609 |      * Adds the specified target to the list of targets that will be monitored for any related target
15610 | creation (such as child frames, child workers and new versions of service worker) and reported
15611 | through `attachedToTarget`. The specified target is also auto-attached.
15612 | This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
15613 | `setAutoAttach`. Only available at the Browser target.
15614 |      */
15615 |     export type autoAttachRelatedParameters = {
15616 |       targetId: TargetID;
15617 |       /**
15618 |        * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
15619 | to run paused targets.
15620 |        */
15621 |       waitForDebuggerOnStart: boolean;
15622 |       /**
15623 |        * Only targets matching filter will be attached.
15624 |        */
15625 |       filter?: TargetFilter;
15626 |     }
15627 |     export type autoAttachRelatedReturnValue = {
15628 |     }
15629 |     /**
15630 |      * Controls whether to discover available targets and notify via
15631 | `targetCreated/targetInfoChanged/targetDestroyed` events.
15632 |      */
15633 |     export type setDiscoverTargetsParameters = {
15634 |       /**
15635 |        * Whether to discover available targets.
15636 |        */
15637 |       discover: boolean;
15638 |       /**
15639 |        * Only targets matching filter will be attached. If `discover` is false,
15640 | `filter` must be omitted or empty.
15641 |        */
15642 |       filter?: TargetFilter;
15643 |     }
15644 |     export type setDiscoverTargetsReturnValue = {
15645 |     }
15646 |     /**
15647 |      * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
15648 | `true`.
15649 |      */
15650 |     export type setRemoteLocationsParameters = {
15651 |       /**
15652 |        * List of remote locations.
15653 |        */
15654 |       locations: RemoteLocation[];
15655 |     }
15656 |     export type setRemoteLocationsReturnValue = {
15657 |     }
15658 |   }
15659 | 
15660 |   /**
15661 |    * The Tethering domain defines methods and events for browser port binding.
15662 |    */
15663 |   export module Tethering {
15664 | 
15665 |     /**
15666 |      * Informs that port was successfully bound and got a specified connection id.
15667 |      */
15668 |     export type acceptedPayload = {
15669 |       /**
15670 |        * Port number that was successfully bound.
15671 |        */
15672 |       port: number;
15673 |       /**
15674 |        * Connection id to be used.
15675 |        */
15676 |       connectionId: string;
15677 |     }
15678 | 
15679 |     /**
15680 |      * Request browser port binding.
15681 |      */
15682 |     export type bindParameters = {
15683 |       /**
15684 |        * Port number to bind.
15685 |        */
15686 |       port: number;
15687 |     }
15688 |     export type bindReturnValue = {
15689 |     }
15690 |     /**
15691 |      * Request browser port unbinding.
15692 |      */
15693 |     export type unbindParameters = {
15694 |       /**
15695 |        * Port number to unbind.
15696 |        */
15697 |       port: number;
15698 |     }
15699 |     export type unbindReturnValue = {
15700 |     }
15701 |   }
15702 | 
15703 |   export module Tracing {
15704 |     /**
15705 |      * Configuration for memory dump. Used only when "memory-infra" category is enabled.
15706 |      */
15707 |     export type MemoryDumpConfig = { [key: string]: string };
15708 |     export interface TraceConfig {
15709 |       /**
15710 |        * Controls how the trace buffer stores data.
15711 |        */
15712 |       recordMode?: "recordUntilFull"|"recordContinuously"|"recordAsMuchAsPossible"|"echoToConsole";
15713 |       /**
15714 |        * Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value
15715 | of 200 MB would be used.
15716 |        */
15717 |       traceBufferSizeInKb?: number;
15718 |       /**
15719 |        * Turns on JavaScript stack sampling.
15720 |        */
15721 |       enableSampling?: boolean;
15722 |       /**
15723 |        * Turns on system tracing.
15724 |        */
15725 |       enableSystrace?: boolean;
15726 |       /**
15727 |        * Turns on argument filter.
15728 |        */
15729 |       enableArgumentFilter?: boolean;
15730 |       /**
15731 |        * Included category filters.
15732 |        */
15733 |       includedCategories?: string[];
15734 |       /**
15735 |        * Excluded category filters.
15736 |        */
15737 |       excludedCategories?: string[];
15738 |       /**
15739 |        * Configuration to synthesize the delays in tracing.
15740 |        */
15741 |       syntheticDelays?: string[];
15742 |       /**
15743 |        * Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
15744 |        */
15745 |       memoryDumpConfig?: MemoryDumpConfig;
15746 |     }
15747 |     /**
15748 |      * Data format of a trace. Can be either the legacy JSON format or the
15749 | protocol buffer format. Note that the JSON format will be deprecated soon.
15750 |      */
15751 |     export type StreamFormat = "json"|"proto";
15752 |     /**
15753 |      * Compression type to use for traces returned via streams.
15754 |      */
15755 |     export type StreamCompression = "none"|"gzip";
15756 |     /**
15757 |      * Details exposed when memory request explicitly declared.
15758 | Keep consistent with memory_dump_request_args.h and
15759 | memory_instrumentation.mojom
15760 |      */
15761 |     export type MemoryDumpLevelOfDetail = "background"|"light"|"detailed";
15762 |     /**
15763 |      * Backend type to use for tracing. `chrome` uses the Chrome-integrated
15764 | tracing service and is supported on all platforms. `system` is only
15765 | supported on Chrome OS and uses the Perfetto system tracing service.
15766 | `auto` chooses `system` when the perfettoConfig provided to Tracing.start
15767 | specifies at least one non-Chrome data source; otherwise uses `chrome`.
15768 |      */
15769 |     export type TracingBackend = "auto"|"chrome"|"system";
15770 | 
15771 |     export type bufferUsagePayload = {
15772 |       /**
15773 |        * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
15774 | total size.
15775 |        */
15776 |       percentFull?: number;
15777 |       /**
15778 |        * An approximate number of events in the trace log.
15779 |        */
15780 |       eventCount?: number;
15781 |       /**
15782 |        * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
15783 | total size.
15784 |        */
15785 |       value?: number;
15786 |     }
15787 |     /**
15788 |      * Contains a bucket of collected trace events. When tracing is stopped collected events will be
15789 | sent as a sequence of dataCollected events followed by tracingComplete event.
15790 |      */
15791 |     export type dataCollectedPayload = {
15792 |       value: { [key: string]: string }[];
15793 |     }
15794 |     /**
15795 |      * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
15796 | delivered via dataCollected events.
15797 |      */
15798 |     export type tracingCompletePayload = {
15799 |       /**
15800 |        * Indicates whether some trace data is known to have been lost, e.g. because the trace ring
15801 | buffer wrapped around.
15802 |        */
15803 |       dataLossOccurred: boolean;
15804 |       /**
15805 |        * A handle of the stream that holds resulting trace data.
15806 |        */
15807 |       stream?: IO.StreamHandle;
15808 |       /**
15809 |        * Trace data format of returned stream.
15810 |        */
15811 |       traceFormat?: StreamFormat;
15812 |       /**
15813 |        * Compression format of returned stream.
15814 |        */
15815 |       streamCompression?: StreamCompression;
15816 |     }
15817 | 
15818 |     /**
15819 |      * Stop trace events collection.
15820 |      */
15821 |     export type endParameters = {
15822 |     }
15823 |     export type endReturnValue = {
15824 |     }
15825 |     /**
15826 |      * Gets supported tracing categories.
15827 |      */
15828 |     export type getCategoriesParameters = {
15829 |     }
15830 |     export type getCategoriesReturnValue = {
15831 |       /**
15832 |        * A list of supported tracing categories.
15833 |        */
15834 |       categories: string[];
15835 |     }
15836 |     /**
15837 |      * Record a clock sync marker in the trace.
15838 |      */
15839 |     export type recordClockSyncMarkerParameters = {
15840 |       /**
15841 |        * The ID of this clock sync marker
15842 |        */
15843 |       syncId: string;
15844 |     }
15845 |     export type recordClockSyncMarkerReturnValue = {
15846 |     }
15847 |     /**
15848 |      * Request a global memory dump.
15849 |      */
15850 |     export type requestMemoryDumpParameters = {
15851 |       /**
15852 |        * Enables more deterministic results by forcing garbage collection
15853 |        */
15854 |       deterministic?: boolean;
15855 |       /**
15856 |        * Specifies level of details in memory dump. Defaults to "detailed".
15857 |        */
15858 |       levelOfDetail?: MemoryDumpLevelOfDetail;
15859 |     }
15860 |     export type requestMemoryDumpReturnValue = {
15861 |       /**
15862 |        * GUID of the resulting global memory dump.
15863 |        */
15864 |       dumpGuid: string;
15865 |       /**
15866 |        * True iff the global memory dump succeeded.
15867 |        */
15868 |       success: boolean;
15869 |     }
15870 |     /**
15871 |      * Start trace events collection.
15872 |      */
15873 |     export type startParameters = {
15874 |       /**
15875 |        * Category/tag filter
15876 |        */
15877 |       categories?: string;
15878 |       /**
15879 |        * Tracing options
15880 |        */
15881 |       options?: string;
15882 |       /**
15883 |        * If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
15884 |        */
15885 |       bufferUsageReportingInterval?: number;
15886 |       /**
15887 |        * Whether to report trace events as series of dataCollected events or to save trace to a
15888 | stream (defaults to `ReportEvents`).
15889 |        */
15890 |       transferMode?: "ReportEvents"|"ReturnAsStream";
15891 |       /**
15892 |        * Trace data format to use. This only applies when using `ReturnAsStream`
15893 | transfer mode (defaults to `json`).
15894 |        */
15895 |       streamFormat?: StreamFormat;
15896 |       /**
15897 |        * Compression format to use. This only applies when using `ReturnAsStream`
15898 | transfer mode (defaults to `none`)
15899 |        */
15900 |       streamCompression?: StreamCompression;
15901 |       traceConfig?: TraceConfig;
15902 |       /**
15903 |        * Base64-encoded serialized perfetto.protos.TraceConfig protobuf message
15904 | When specified, the parameters `categories`, `options`, `traceConfig`
15905 | are ignored.
15906 |        */
15907 |       perfettoConfig?: binary;
15908 |       /**
15909 |        * Backend type (defaults to `auto`)
15910 |        */
15911 |       tracingBackend?: TracingBackend;
15912 |     }
15913 |     export type startReturnValue = {
15914 |     }
15915 |   }
15916 | 
15917 |   /**
15918 |    * A domain for letting clients substitute browser's network layer with client code.
15919 |    */
15920 |   export module Fetch {
15921 |     /**
15922 |      * Unique request identifier.
15923 |      */
15924 |     export type RequestId = string;
15925 |     /**
15926 |      * Stages of the request to handle. Request will intercept before the request is
15927 | sent. Response will intercept after the response is received (but before response
15928 | body is received).
15929 |      */
15930 |     export type RequestStage = "Request"|"Response";
15931 |     export interface RequestPattern {
15932 |       /**
15933 |        * Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is
15934 | backslash. Omitting is equivalent to `"*"`.
15935 |        */
15936 |       urlPattern?: string;
15937 |       /**
15938 |        * If set, only requests for matching resource types will be intercepted.
15939 |        */
15940 |       resourceType?: Network.ResourceType;
15941 |       /**
15942 |        * Stage at which to begin intercepting requests. Default is Request.
15943 |        */
15944 |       requestStage?: RequestStage;
15945 |     }
15946 |     /**
15947 |      * Response HTTP header entry
15948 |      */
15949 |     export interface HeaderEntry {
15950 |       name: string;
15951 |       value: string;
15952 |     }
15953 |     /**
15954 |      * Authorization challenge for HTTP status code 401 or 407.
15955 |      */
15956 |     export interface AuthChallenge {
15957 |       /**
15958 |        * Source of the authentication challenge.
15959 |        */
15960 |       source?: "Server"|"Proxy";
15961 |       /**
15962 |        * Origin of the challenger.
15963 |        */
15964 |       origin: string;
15965 |       /**
15966 |        * The authentication scheme used, such as basic or digest
15967 |        */
15968 |       scheme: string;
15969 |       /**
15970 |        * The realm of the challenge. May be empty.
15971 |        */
15972 |       realm: string;
15973 |     }
15974 |     /**
15975 |      * Response to an AuthChallenge.
15976 |      */
15977 |     export interface AuthChallengeResponse {
15978 |       /**
15979 |        * The decision on what to do in response to the authorization challenge.  Default means
15980 | deferring to the default behavior of the net stack, which will likely either the Cancel
15981 | authentication or display a popup dialog box.
15982 |        */
15983 |       response: "Default"|"CancelAuth"|"ProvideCredentials";
15984 |       /**
15985 |        * The username to provide, possibly empty. Should only be set if response is
15986 | ProvideCredentials.
15987 |        */
15988 |       username?: string;
15989 |       /**
15990 |        * The password to provide, possibly empty. Should only be set if response is
15991 | ProvideCredentials.
15992 |        */
15993 |       password?: string;
15994 |     }
15995 | 
15996 |     /**
15997 |      * Issued when the domain is enabled and the request URL matches the
15998 | specified filter. The request is paused until the client responds
15999 | with one of continueRequest, failRequest or fulfillRequest.
16000 | The stage of the request can be determined by presence of responseErrorReason
16001 | and responseStatusCode -- the request is at the response stage if either
16002 | of these fields is present and in the request stage otherwise.
16003 | Redirect responses and subsequent requests are reported similarly to regular
16004 | responses and requests. Redirect responses may be distinguished by the value
16005 | of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
16006 | presence of the `location` header. Requests resulting from a redirect will
16007 | have `redirectedRequestId` field set.
16008 |      */
16009 |     export type requestPausedPayload = {
16010 |       /**
16011 |        * Each request the page makes will have a unique id.
16012 |        */
16013 |       requestId: RequestId;
16014 |       /**
16015 |        * The details of the request.
16016 |        */
16017 |       request: Network.Request;
16018 |       /**
16019 |        * The id of the frame that initiated the request.
16020 |        */
16021 |       frameId: Page.FrameId;
16022 |       /**
16023 |        * How the requested resource will be used.
16024 |        */
16025 |       resourceType: Network.ResourceType;
16026 |       /**
16027 |        * Response error if intercepted at response stage.
16028 |        */
16029 |       responseErrorReason?: Network.ErrorReason;
16030 |       /**
16031 |        * Response code if intercepted at response stage.
16032 |        */
16033 |       responseStatusCode?: number;
16034 |       /**
16035 |        * Response status text if intercepted at response stage.
16036 |        */
16037 |       responseStatusText?: string;
16038 |       /**
16039 |        * Response headers if intercepted at the response stage.
16040 |        */
16041 |       responseHeaders?: HeaderEntry[];
16042 |       /**
16043 |        * If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,
16044 | then this networkId will be the same as the requestId present in the requestWillBeSent event.
16045 |        */
16046 |       networkId?: Network.RequestId;
16047 |       /**
16048 |        * If the request is due to a redirect response from the server, the id of the request that
16049 | has caused the redirect.
16050 |        */
16051 |       redirectedRequestId?: RequestId;
16052 |     }
16053 |     /**
16054 |      * Issued when the domain is enabled with handleAuthRequests set to true.
16055 | The request is paused until client responds with continueWithAuth.
16056 |      */
16057 |     export type authRequiredPayload = {
16058 |       /**
16059 |        * Each request the page makes will have a unique id.
16060 |        */
16061 |       requestId: RequestId;
16062 |       /**
16063 |        * The details of the request.
16064 |        */
16065 |       request: Network.Request;
16066 |       /**
16067 |        * The id of the frame that initiated the request.
16068 |        */
16069 |       frameId: Page.FrameId;
16070 |       /**
16071 |        * How the requested resource will be used.
16072 |        */
16073 |       resourceType: Network.ResourceType;
16074 |       /**
16075 |        * Details of the Authorization Challenge encountered.
16076 | If this is set, client should respond with continueRequest that
16077 | contains AuthChallengeResponse.
16078 |        */
16079 |       authChallenge: AuthChallenge;
16080 |     }
16081 | 
16082 |     /**
16083 |      * Disables the fetch domain.
16084 |      */
16085 |     export type disableParameters = {
16086 |     }
16087 |     export type disableReturnValue = {
16088 |     }
16089 |     /**
16090 |      * Enables issuing of requestPaused events. A request will be paused until client
16091 | calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
16092 |      */
16093 |     export type enableParameters = {
16094 |       /**
16095 |        * If specified, only requests matching any of these patterns will produce
16096 | fetchRequested event and will be paused until clients response. If not set,
16097 | all requests will be affected.
16098 |        */
16099 |       patterns?: RequestPattern[];
16100 |       /**
16101 |        * If true, authRequired events will be issued and requests will be paused
16102 | expecting a call to continueWithAuth.
16103 |        */
16104 |       handleAuthRequests?: boolean;
16105 |     }
16106 |     export type enableReturnValue = {
16107 |     }
16108 |     /**
16109 |      * Causes the request to fail with specified reason.
16110 |      */
16111 |     export type failRequestParameters = {
16112 |       /**
16113 |        * An id the client received in requestPaused event.
16114 |        */
16115 |       requestId: RequestId;
16116 |       /**
16117 |        * Causes the request to fail with the given reason.
16118 |        */
16119 |       errorReason: Network.ErrorReason;
16120 |     }
16121 |     export type failRequestReturnValue = {
16122 |     }
16123 |     /**
16124 |      * Provides response to the request.
16125 |      */
16126 |     export type fulfillRequestParameters = {
16127 |       /**
16128 |        * An id the client received in requestPaused event.
16129 |        */
16130 |       requestId: RequestId;
16131 |       /**
16132 |        * An HTTP response code.
16133 |        */
16134 |       responseCode: number;
16135 |       /**
16136 |        * Response headers.
16137 |        */
16138 |       responseHeaders?: HeaderEntry[];
16139 |       /**
16140 |        * Alternative way of specifying response headers as a \0-separated
16141 | series of name: value pairs. Prefer the above method unless you
16142 | need to represent some non-UTF8 values that can't be transmitted
16143 | over the protocol as text.
16144 |        */
16145 |       binaryResponseHeaders?: binary;
16146 |       /**
16147 |        * A response body. If absent, original response body will be used if
16148 | the request is intercepted at the response stage and empty body
16149 | will be used if the request is intercepted at the request stage.
16150 |        */
16151 |       body?: binary;
16152 |       /**
16153 |        * A textual representation of responseCode.
16154 | If absent, a standard phrase matching responseCode is used.
16155 |        */
16156 |       responsePhrase?: string;
16157 |     }
16158 |     export type fulfillRequestReturnValue = {
16159 |     }
16160 |     /**
16161 |      * Continues the request, optionally modifying some of its parameters.
16162 |      */
16163 |     export type continueRequestParameters = {
16164 |       /**
16165 |        * An id the client received in requestPaused event.
16166 |        */
16167 |       requestId: RequestId;
16168 |       /**
16169 |        * If set, the request url will be modified in a way that's not observable by page.
16170 |        */
16171 |       url?: string;
16172 |       /**
16173 |        * If set, the request method is overridden.
16174 |        */
16175 |       method?: string;
16176 |       /**
16177 |        * If set, overrides the post data in the request.
16178 |        */
16179 |       postData?: binary;
16180 |       /**
16181 |        * If set, overrides the request headers. Note that the overrides do not
16182 | extend to subsequent redirect hops, if a redirect happens. Another override
16183 | may be applied to a different request produced by a redirect.
16184 |        */
16185 |       headers?: HeaderEntry[];
16186 |       /**
16187 |        * If set, overrides response interception behavior for this request.
16188 |        */
16189 |       interceptResponse?: boolean;
16190 |     }
16191 |     export type continueRequestReturnValue = {
16192 |     }
16193 |     /**
16194 |      * Continues a request supplying authChallengeResponse following authRequired event.
16195 |      */
16196 |     export type continueWithAuthParameters = {
16197 |       /**
16198 |        * An id the client received in authRequired event.
16199 |        */
16200 |       requestId: RequestId;
16201 |       /**
16202 |        * Response to  with an authChallenge.
16203 |        */
16204 |       authChallengeResponse: AuthChallengeResponse;
16205 |     }
16206 |     export type continueWithAuthReturnValue = {
16207 |     }
16208 |     /**
16209 |      * Continues loading of the paused response, optionally modifying the
16210 | response headers. If either responseCode or headers are modified, all of them
16211 | must be present.
16212 |      */
16213 |     export type continueResponseParameters = {
16214 |       /**
16215 |        * An id the client received in requestPaused event.
16216 |        */
16217 |       requestId: RequestId;
16218 |       /**
16219 |        * An HTTP response code. If absent, original response code will be used.
16220 |        */
16221 |       responseCode?: number;
16222 |       /**
16223 |        * A textual representation of responseCode.
16224 | If absent, a standard phrase matching responseCode is used.
16225 |        */
16226 |       responsePhrase?: string;
16227 |       /**
16228 |        * Response headers. If absent, original response headers will be used.
16229 |        */
16230 |       responseHeaders?: HeaderEntry[];
16231 |       /**
16232 |        * Alternative way of specifying response headers as a \0-separated
16233 | series of name: value pairs. Prefer the above method unless you
16234 | need to represent some non-UTF8 values that can't be transmitted
16235 | over the protocol as text.
16236 |        */
16237 |       binaryResponseHeaders?: binary;
16238 |     }
16239 |     export type continueResponseReturnValue = {
16240 |     }
16241 |     /**
16242 |      * Causes the body of the response to be received from the server and
16243 | returned as a single string. May only be issued for a request that
16244 | is paused in the Response stage and is mutually exclusive with
16245 | takeResponseBodyForInterceptionAsStream. Calling other methods that
16246 | affect the request or disabling fetch domain before body is received
16247 | results in an undefined behavior.
16248 | Note that the response body is not available for redirects. Requests
16249 | paused in the _redirect received_ state may be differentiated by
16250 | `responseCode` and presence of `location` response header, see
16251 | comments to `requestPaused` for details.
16252 |      */
16253 |     export type getResponseBodyParameters = {
16254 |       /**
16255 |        * Identifier for the intercepted request to get body for.
16256 |        */
16257 |       requestId: RequestId;
16258 |     }
16259 |     export type getResponseBodyReturnValue = {
16260 |       /**
16261 |        * Response body.
16262 |        */
16263 |       body: string;
16264 |       /**
16265 |        * True, if content was sent as base64.
16266 |        */
16267 |       base64Encoded: boolean;
16268 |     }
16269 |     /**
16270 |      * Returns a handle to the stream representing the response body.
16271 | The request must be paused in the HeadersReceived stage.
16272 | Note that after this command the request can't be continued
16273 | as is -- client either needs to cancel it or to provide the
16274 | response body.
16275 | The stream only supports sequential read, IO.read will fail if the position
16276 | is specified.
16277 | This method is mutually exclusive with getResponseBody.
16278 | Calling other methods that affect the request or disabling fetch
16279 | domain before body is received results in an undefined behavior.
16280 |      */
16281 |     export type takeResponseBodyAsStreamParameters = {
16282 |       requestId: RequestId;
16283 |     }
16284 |     export type takeResponseBodyAsStreamReturnValue = {
16285 |       stream: IO.StreamHandle;
16286 |     }
16287 |   }
16288 | 
16289 |   /**
16290 |    * This domain allows inspection of Web Audio API.
16291 | https://webaudio.github.io/web-audio-api/
16292 |    */
16293 |   export module WebAudio {
16294 |     /**
16295 |      * An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
16296 |      */
16297 |     export type GraphObjectId = string;
16298 |     /**
16299 |      * Enum of BaseAudioContext types
16300 |      */
16301 |     export type ContextType = "realtime"|"offline";
16302 |     /**
16303 |      * Enum of AudioContextState from the spec
16304 |      */
16305 |     export type ContextState = "suspended"|"running"|"closed";
16306 |     /**
16307 |      * Enum of AudioNode types
16308 |      */
16309 |     export type NodeType = string;
16310 |     /**
16311 |      * Enum of AudioNode::ChannelCountMode from the spec
16312 |      */
16313 |     export type ChannelCountMode = "clamped-max"|"explicit"|"max";
16314 |     /**
16315 |      * Enum of AudioNode::ChannelInterpretation from the spec
16316 |      */
16317 |     export type ChannelInterpretation = "discrete"|"speakers";
16318 |     /**
16319 |      * Enum of AudioParam types
16320 |      */
16321 |     export type ParamType = string;
16322 |     /**
16323 |      * Enum of AudioParam::AutomationRate from the spec
16324 |      */
16325 |     export type AutomationRate = "a-rate"|"k-rate";
16326 |     /**
16327 |      * Fields in AudioContext that change in real-time.
16328 |      */
16329 |     export interface ContextRealtimeData {
16330 |       /**
16331 |        * The current context time in second in BaseAudioContext.
16332 |        */
16333 |       currentTime: number;
16334 |       /**
16335 |        * The time spent on rendering graph divided by render quantum duration,
16336 | and multiplied by 100. 100 means the audio renderer reached the full
16337 | capacity and glitch may occur.
16338 |        */
16339 |       renderCapacity: number;
16340 |       /**
16341 |        * A running mean of callback interval.
16342 |        */
16343 |       callbackIntervalMean: number;
16344 |       /**
16345 |        * A running variance of callback interval.
16346 |        */
16347 |       callbackIntervalVariance: number;
16348 |     }
16349 |     /**
16350 |      * Protocol object for BaseAudioContext
16351 |      */
16352 |     export interface BaseAudioContext {
16353 |       contextId: GraphObjectId;
16354 |       contextType: ContextType;
16355 |       contextState: ContextState;
16356 |       realtimeData?: ContextRealtimeData;
16357 |       /**
16358 |        * Platform-dependent callback buffer size.
16359 |        */
16360 |       callbackBufferSize: number;
16361 |       /**
16362 |        * Number of output channels supported by audio hardware in use.
16363 |        */
16364 |       maxOutputChannelCount: number;
16365 |       /**
16366 |        * Context sample rate.
16367 |        */
16368 |       sampleRate: number;
16369 |     }
16370 |     /**
16371 |      * Protocol object for AudioListener
16372 |      */
16373 |     export interface AudioListener {
16374 |       listenerId: GraphObjectId;
16375 |       contextId: GraphObjectId;
16376 |     }
16377 |     /**
16378 |      * Protocol object for AudioNode
16379 |      */
16380 |     export interface AudioNode {
16381 |       nodeId: GraphObjectId;
16382 |       contextId: GraphObjectId;
16383 |       nodeType: NodeType;
16384 |       numberOfInputs: number;
16385 |       numberOfOutputs: number;
16386 |       channelCount: number;
16387 |       channelCountMode: ChannelCountMode;
16388 |       channelInterpretation: ChannelInterpretation;
16389 |     }
16390 |     /**
16391 |      * Protocol object for AudioParam
16392 |      */
16393 |     export interface AudioParam {
16394 |       paramId: GraphObjectId;
16395 |       nodeId: GraphObjectId;
16396 |       contextId: GraphObjectId;
16397 |       paramType: ParamType;
16398 |       rate: AutomationRate;
16399 |       defaultValue: number;
16400 |       minValue: number;
16401 |       maxValue: number;
16402 |     }
16403 | 
16404 |     /**
16405 |      * Notifies that a new BaseAudioContext has been created.
16406 |      */
16407 |     export type contextCreatedPayload = {
16408 |       context: BaseAudioContext;
16409 |     }
16410 |     /**
16411 |      * Notifies that an existing BaseAudioContext will be destroyed.
16412 |      */
16413 |     export type contextWillBeDestroyedPayload = {
16414 |       contextId: GraphObjectId;
16415 |     }
16416 |     /**
16417 |      * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
16418 |      */
16419 |     export type contextChangedPayload = {
16420 |       context: BaseAudioContext;
16421 |     }
16422 |     /**
16423 |      * Notifies that the construction of an AudioListener has finished.
16424 |      */
16425 |     export type audioListenerCreatedPayload = {
16426 |       listener: AudioListener;
16427 |     }
16428 |     /**
16429 |      * Notifies that a new AudioListener has been created.
16430 |      */
16431 |     export type audioListenerWillBeDestroyedPayload = {
16432 |       contextId: GraphObjectId;
16433 |       listenerId: GraphObjectId;
16434 |     }
16435 |     /**
16436 |      * Notifies that a new AudioNode has been created.
16437 |      */
16438 |     export type audioNodeCreatedPayload = {
16439 |       node: AudioNode;
16440 |     }
16441 |     /**
16442 |      * Notifies that an existing AudioNode has been destroyed.
16443 |      */
16444 |     export type audioNodeWillBeDestroyedPayload = {
16445 |       contextId: GraphObjectId;
16446 |       nodeId: GraphObjectId;
16447 |     }
16448 |     /**
16449 |      * Notifies that a new AudioParam has been created.
16450 |      */
16451 |     export type audioParamCreatedPayload = {
16452 |       param: AudioParam;
16453 |     }
16454 |     /**
16455 |      * Notifies that an existing AudioParam has been destroyed.
16456 |      */
16457 |     export type audioParamWillBeDestroyedPayload = {
16458 |       contextId: GraphObjectId;
16459 |       nodeId: GraphObjectId;
16460 |       paramId: GraphObjectId;
16461 |     }
16462 |     /**
16463 |      * Notifies that two AudioNodes are connected.
16464 |      */
16465 |     export type nodesConnectedPayload = {
16466 |       contextId: GraphObjectId;
16467 |       sourceId: GraphObjectId;
16468 |       destinationId: GraphObjectId;
16469 |       sourceOutputIndex?: number;
16470 |       destinationInputIndex?: number;
16471 |     }
16472 |     /**
16473 |      * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
16474 |      */
16475 |     export type nodesDisconnectedPayload = {
16476 |       contextId: GraphObjectId;
16477 |       sourceId: GraphObjectId;
16478 |       destinationId: GraphObjectId;
16479 |       sourceOutputIndex?: number;
16480 |       destinationInputIndex?: number;
16481 |     }
16482 |     /**
16483 |      * Notifies that an AudioNode is connected to an AudioParam.
16484 |      */
16485 |     export type nodeParamConnectedPayload = {
16486 |       contextId: GraphObjectId;
16487 |       sourceId: GraphObjectId;
16488 |       destinationId: GraphObjectId;
16489 |       sourceOutputIndex?: number;
16490 |     }
16491 |     /**
16492 |      * Notifies that an AudioNode is disconnected to an AudioParam.
16493 |      */
16494 |     export type nodeParamDisconnectedPayload = {
16495 |       contextId: GraphObjectId;
16496 |       sourceId: GraphObjectId;
16497 |       destinationId: GraphObjectId;
16498 |       sourceOutputIndex?: number;
16499 |     }
16500 | 
16501 |     /**
16502 |      * Enables the WebAudio domain and starts sending context lifetime events.
16503 |      */
16504 |     export type enableParameters = {
16505 |     }
16506 |     export type enableReturnValue = {
16507 |     }
16508 |     /**
16509 |      * Disables the WebAudio domain.
16510 |      */
16511 |     export type disableParameters = {
16512 |     }
16513 |     export type disableReturnValue = {
16514 |     }
16515 |     /**
16516 |      * Fetch the realtime data from the registered contexts.
16517 |      */
16518 |     export type getRealtimeDataParameters = {
16519 |       contextId: GraphObjectId;
16520 |     }
16521 |     export type getRealtimeDataReturnValue = {
16522 |       realtimeData: ContextRealtimeData;
16523 |     }
16524 |   }
16525 | 
16526 |   /**
16527 |    * This domain allows configuring virtual authenticators to test the WebAuthn
16528 | API.
16529 |    */
16530 |   export module WebAuthn {
16531 |     export type AuthenticatorId = string;
16532 |     export type AuthenticatorProtocol = "u2f"|"ctap2";
16533 |     export type Ctap2Version = "ctap2_0"|"ctap2_1";
16534 |     export type AuthenticatorTransport = "usb"|"nfc"|"ble"|"cable"|"internal";
16535 |     export interface VirtualAuthenticatorOptions {
16536 |       protocol: AuthenticatorProtocol;
16537 |       /**
16538 |        * Defaults to ctap2_0. Ignored if |protocol| == u2f.
16539 |        */
16540 |       ctap2Version?: Ctap2Version;
16541 |       transport: AuthenticatorTransport;
16542 |       /**
16543 |        * Defaults to false.
16544 |        */
16545 |       hasResidentKey?: boolean;
16546 |       /**
16547 |        * Defaults to false.
16548 |        */
16549 |       hasUserVerification?: boolean;
16550 |       /**
16551 |        * If set to true, the authenticator will support the largeBlob extension.
16552 | https://w3c.github.io/webauthn#largeBlob
16553 | Defaults to false.
16554 |        */
16555 |       hasLargeBlob?: boolean;
16556 |       /**
16557 |        * If set to true, the authenticator will support the credBlob extension.
16558 | https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension
16559 | Defaults to false.
16560 |        */
16561 |       hasCredBlob?: boolean;
16562 |       /**
16563 |        * If set to true, the authenticator will support the minPinLength extension.
16564 | https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension
16565 | Defaults to false.
16566 |        */
16567 |       hasMinPinLength?: boolean;
16568 |       /**
16569 |        * If set to true, the authenticator will support the prf extension.
16570 | https://w3c.github.io/webauthn/#prf-extension
16571 | Defaults to false.
16572 |        */
16573 |       hasPrf?: boolean;
16574 |       /**
16575 |        * If set to true, tests of user presence will succeed immediately.
16576 | Otherwise, they will not be resolved. Defaults to true.
16577 |        */
16578 |       automaticPresenceSimulation?: boolean;
16579 |       /**
16580 |        * Sets whether User Verification succeeds or fails for an authenticator.
16581 | Defaults to false.
16582 |        */
16583 |       isUserVerified?: boolean;
16584 |       /**
16585 |        * Credentials created by this authenticator will have the backup
16586 | eligibility (BE) flag set to this value. Defaults to false.
16587 | https://w3c.github.io/webauthn/#sctn-credential-backup
16588 |        */
16589 |       defaultBackupEligibility?: boolean;
16590 |       /**
16591 |        * Credentials created by this authenticator will have the backup state
16592 | (BS) flag set to this value. Defaults to false.
16593 | https://w3c.github.io/webauthn/#sctn-credential-backup
16594 |        */
16595 |       defaultBackupState?: boolean;
16596 |     }
16597 |     export interface Credential {
16598 |       credentialId: binary;
16599 |       isResidentCredential: boolean;
16600 |       /**
16601 |        * Relying Party ID the credential is scoped to. Must be set when adding a
16602 | credential.
16603 |        */
16604 |       rpId?: string;
16605 |       /**
16606 |        * The ECDSA P-256 private key in PKCS#8 format.
16607 |        */
16608 |       privateKey: binary;
16609 |       /**
16610 |        * An opaque byte sequence with a maximum size of 64 bytes mapping the
16611 | credential to a specific user.
16612 |        */
16613 |       userHandle?: binary;
16614 |       /**
16615 |        * Signature counter. This is incremented by one for each successful
16616 | assertion.
16617 | See https://w3c.github.io/webauthn/#signature-counter
16618 |        */
16619 |       signCount: number;
16620 |       /**
16621 |        * The large blob associated with the credential.
16622 | See https://w3c.github.io/webauthn/#sctn-large-blob-extension
16623 |        */
16624 |       largeBlob?: binary;
16625 |       /**
16626 |        * Assertions returned by this credential will have the backup eligibility
16627 | (BE) flag set to this value. Defaults to the authenticator's
16628 | defaultBackupEligibility value.
16629 |        */
16630 |       backupEligibility?: boolean;
16631 |       /**
16632 |        * Assertions returned by this credential will have the backup state (BS)
16633 | flag set to this value. Defaults to the authenticator's
16634 | defaultBackupState value.
16635 |        */
16636 |       backupState?: boolean;
16637 |       /**
16638 |        * The credential's user.name property. Equivalent to empty if not set.
16639 | https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
16640 |        */
16641 |       userName?: string;
16642 |       /**
16643 |        * The credential's user.displayName property. Equivalent to empty if
16644 | not set.
16645 | https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
16646 |        */
16647 |       userDisplayName?: string;
16648 |     }
16649 | 
16650 |     /**
16651 |      * Triggered when a credential is added to an authenticator.
16652 |      */
16653 |     export type credentialAddedPayload = {
16654 |       authenticatorId: AuthenticatorId;
16655 |       credential: Credential;
16656 |     }
16657 |     /**
16658 |      * Triggered when a credential is deleted, e.g. through
16659 | PublicKeyCredential.signalUnknownCredential().
16660 |      */
16661 |     export type credentialDeletedPayload = {
16662 |       authenticatorId: AuthenticatorId;
16663 |       credentialId: binary;
16664 |     }
16665 |     /**
16666 |      * Triggered when a credential is updated, e.g. through
16667 | PublicKeyCredential.signalCurrentUserDetails().
16668 |      */
16669 |     export type credentialUpdatedPayload = {
16670 |       authenticatorId: AuthenticatorId;
16671 |       credential: Credential;
16672 |     }
16673 |     /**
16674 |      * Triggered when a credential is used in a webauthn assertion.
16675 |      */
16676 |     export type credentialAssertedPayload = {
16677 |       authenticatorId: AuthenticatorId;
16678 |       credential: Credential;
16679 |     }
16680 | 
16681 |     /**
16682 |      * Enable the WebAuthn domain and start intercepting credential storage and
16683 | retrieval with a virtual authenticator.
16684 |      */
16685 |     export type enableParameters = {
16686 |       /**
16687 |        * Whether to enable the WebAuthn user interface. Enabling the UI is
16688 | recommended for debugging and demo purposes, as it is closer to the real
16689 | experience. Disabling the UI is recommended for automated testing.
16690 | Supported at the embedder's discretion if UI is available.
16691 | Defaults to false.
16692 |        */
16693 |       enableUI?: boolean;
16694 |     }
16695 |     export type enableReturnValue = {
16696 |     }
16697 |     /**
16698 |      * Disable the WebAuthn domain.
16699 |      */
16700 |     export type disableParameters = {
16701 |     }
16702 |     export type disableReturnValue = {
16703 |     }
16704 |     /**
16705 |      * Creates and adds a virtual authenticator.
16706 |      */
16707 |     export type addVirtualAuthenticatorParameters = {
16708 |       options: VirtualAuthenticatorOptions;
16709 |     }
16710 |     export type addVirtualAuthenticatorReturnValue = {
16711 |       authenticatorId: AuthenticatorId;
16712 |     }
16713 |     /**
16714 |      * Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
16715 |      */
16716 |     export type setResponseOverrideBitsParameters = {
16717 |       authenticatorId: AuthenticatorId;
16718 |       /**
16719 |        * If isBogusSignature is set, overrides the signature in the authenticator response to be zero.
16720 | Defaults to false.
16721 |        */
16722 |       isBogusSignature?: boolean;
16723 |       /**
16724 |        * If isBadUV is set, overrides the UV bit in the flags in the authenticator response to
16725 | be zero. Defaults to false.
16726 |        */
16727 |       isBadUV?: boolean;
16728 |       /**
16729 |        * If isBadUP is set, overrides the UP bit in the flags in the authenticator response to
16730 | be zero. Defaults to false.
16731 |        */
16732 |       isBadUP?: boolean;
16733 |     }
16734 |     export type setResponseOverrideBitsReturnValue = {
16735 |     }
16736 |     /**
16737 |      * Removes the given authenticator.
16738 |      */
16739 |     export type removeVirtualAuthenticatorParameters = {
16740 |       authenticatorId: AuthenticatorId;
16741 |     }
16742 |     export type removeVirtualAuthenticatorReturnValue = {
16743 |     }
16744 |     /**
16745 |      * Adds the credential to the specified authenticator.
16746 |      */
16747 |     export type addCredentialParameters = {
16748 |       authenticatorId: AuthenticatorId;
16749 |       credential: Credential;
16750 |     }
16751 |     export type addCredentialReturnValue = {
16752 |     }
16753 |     /**
16754 |      * Returns a single credential stored in the given virtual authenticator that
16755 | matches the credential ID.
16756 |      */
16757 |     export type getCredentialParameters = {
16758 |       authenticatorId: AuthenticatorId;
16759 |       credentialId: binary;
16760 |     }
16761 |     export type getCredentialReturnValue = {
16762 |       credential: Credential;
16763 |     }
16764 |     /**
16765 |      * Returns all the credentials stored in the given virtual authenticator.
16766 |      */
16767 |     export type getCredentialsParameters = {
16768 |       authenticatorId: AuthenticatorId;
16769 |     }
16770 |     export type getCredentialsReturnValue = {
16771 |       credentials: Credential[];
16772 |     }
16773 |     /**
16774 |      * Removes a credential from the authenticator.
16775 |      */
16776 |     export type removeCredentialParameters = {
16777 |       authenticatorId: AuthenticatorId;
16778 |       credentialId: binary;
16779 |     }
16780 |     export type removeCredentialReturnValue = {
16781 |     }
16782 |     /**
16783 |      * Clears all the credentials from the specified device.
16784 |      */
16785 |     export type clearCredentialsParameters = {
16786 |       authenticatorId: AuthenticatorId;
16787 |     }
16788 |     export type clearCredentialsReturnValue = {
16789 |     }
16790 |     /**
16791 |      * Sets whether User Verification succeeds or fails for an authenticator.
16792 | The default is true.
16793 |      */
16794 |     export type setUserVerifiedParameters = {
16795 |       authenticatorId: AuthenticatorId;
16796 |       isUserVerified: boolean;
16797 |     }
16798 |     export type setUserVerifiedReturnValue = {
16799 |     }
16800 |     /**
16801 |      * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
16802 | The default is true.
16803 |      */
16804 |     export type setAutomaticPresenceSimulationParameters = {
16805 |       authenticatorId: AuthenticatorId;
16806 |       enabled: boolean;
16807 |     }
16808 |     export type setAutomaticPresenceSimulationReturnValue = {
16809 |     }
16810 |     /**
16811 |      * Allows setting credential properties.
16812 | https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties
16813 |      */
16814 |     export type setCredentialPropertiesParameters = {
16815 |       authenticatorId: AuthenticatorId;
16816 |       credentialId: binary;
16817 |       backupEligibility?: boolean;
16818 |       backupState?: boolean;
16819 |     }
16820 |     export type setCredentialPropertiesReturnValue = {
16821 |     }
16822 |   }
16823 | 
16824 |   /**
16825 |    * This domain allows detailed inspection of media elements
16826 |    */
16827 |   export module Media {
16828 |     /**
16829 |      * Players will get an ID that is unique within the agent context.
16830 |      */
16831 |     export type PlayerId = string;
16832 |     export type Timestamp = number;
16833 |     /**
16834 |      * Have one type per entry in MediaLogRecord::Type
16835 | Corresponds to kMessage
16836 |      */
16837 |     export interface PlayerMessage {
16838 |       /**
16839 |        * Keep in sync with MediaLogMessageLevel
16840 | We are currently keeping the message level 'error' separate from the
16841 | PlayerError type because right now they represent different things,
16842 | this one being a DVLOG(ERROR) style log message that gets printed
16843 | based on what log level is selected in the UI, and the other is a
16844 | representation of a media::PipelineStatus object. Soon however we're
16845 | going to be moving away from using PipelineStatus for errors and
16846 | introducing a new error type which should hopefully let us integrate
16847 | the error log level into the PlayerError type.
16848 |        */
16849 |       level: "error"|"warning"|"info"|"debug";
16850 |       message: string;
16851 |     }
16852 |     /**
16853 |      * Corresponds to kMediaPropertyChange
16854 |      */
16855 |     export interface PlayerProperty {
16856 |       name: string;
16857 |       value: string;
16858 |     }
16859 |     /**
16860 |      * Corresponds to kMediaEventTriggered
16861 |      */
16862 |     export interface PlayerEvent {
16863 |       timestamp: Timestamp;
16864 |       value: string;
16865 |     }
16866 |     /**
16867 |      * Represents logged source line numbers reported in an error.
16868 | NOTE: file and line are from chromium c++ implementation code, not js.
16869 |      */
16870 |     export interface PlayerErrorSourceLocation {
16871 |       file: string;
16872 |       line: number;
16873 |     }
16874 |     /**
16875 |      * Corresponds to kMediaError
16876 |      */
16877 |     export interface PlayerError {
16878 |       errorType: string;
16879 |       /**
16880 |        * Code is the numeric enum entry for a specific set of error codes, such
16881 | as PipelineStatusCodes in media/base/pipeline_status.h
16882 |        */
16883 |       code: number;
16884 |       /**
16885 |        * A trace of where this error was caused / where it passed through.
16886 |        */
16887 |       stack: PlayerErrorSourceLocation[];
16888 |       /**
16889 |        * Errors potentially have a root cause error, ie, a DecoderError might be
16890 | caused by an WindowsError
16891 |        */
16892 |       cause: PlayerError[];
16893 |       /**
16894 |        * Extra data attached to an error, such as an HRESULT, Video Codec, etc.
16895 |        */
16896 |       data: { [key: string]: string };
16897 |     }
16898 | 
16899 |     /**
16900 |      * This can be called multiple times, and can be used to set / override /
16901 | remove player properties. A null propValue indicates removal.
16902 |      */
16903 |     export type playerPropertiesChangedPayload = {
16904 |       playerId: PlayerId;
16905 |       properties: PlayerProperty[];
16906 |     }
16907 |     /**
16908 |      * Send events as a list, allowing them to be batched on the browser for less
16909 | congestion. If batched, events must ALWAYS be in chronological order.
16910 |      */
16911 |     export type playerEventsAddedPayload = {
16912 |       playerId: PlayerId;
16913 |       events: PlayerEvent[];
16914 |     }
16915 |     /**
16916 |      * Send a list of any messages that need to be delivered.
16917 |      */
16918 |     export type playerMessagesLoggedPayload = {
16919 |       playerId: PlayerId;
16920 |       messages: PlayerMessage[];
16921 |     }
16922 |     /**
16923 |      * Send a list of any errors that need to be delivered.
16924 |      */
16925 |     export type playerErrorsRaisedPayload = {
16926 |       playerId: PlayerId;
16927 |       errors: PlayerError[];
16928 |     }
16929 |     /**
16930 |      * Called whenever a player is created, or when a new agent joins and receives
16931 | a list of active players. If an agent is restored, it will receive the full
16932 | list of player ids and all events again.
16933 |      */
16934 |     export type playersCreatedPayload = {
16935 |       players: PlayerId[];
16936 |     }
16937 | 
16938 |     /**
16939 |      * Enables the Media domain
16940 |      */
16941 |     export type enableParameters = {
16942 |     }
16943 |     export type enableReturnValue = {
16944 |     }
16945 |     /**
16946 |      * Disables the Media domain.
16947 |      */
16948 |     export type disableParameters = {
16949 |     }
16950 |     export type disableReturnValue = {
16951 |     }
16952 |   }
16953 | 
16954 |   export module DeviceAccess {
16955 |     /**
16956 |      * Device request id.
16957 |      */
16958 |     export type RequestId = string;
16959 |     /**
16960 |      * A device id.
16961 |      */
16962 |     export type DeviceId = string;
16963 |     /**
16964 |      * Device information displayed in a user prompt to select a device.
16965 |      */
16966 |     export interface PromptDevice {
16967 |       id: DeviceId;
16968 |       /**
16969 |        * Display name as it appears in a device request user prompt.
16970 |        */
16971 |       name: string;
16972 |     }
16973 | 
16974 |     /**
16975 |      * A device request opened a user prompt to select a device. Respond with the
16976 | selectPrompt or cancelPrompt command.
16977 |      */
16978 |     export type deviceRequestPromptedPayload = {
16979 |       id: RequestId;
16980 |       devices: PromptDevice[];
16981 |     }
16982 | 
16983 |     /**
16984 |      * Enable events in this domain.
16985 |      */
16986 |     export type enableParameters = {
16987 |     }
16988 |     export type enableReturnValue = {
16989 |     }
16990 |     /**
16991 |      * Disable events in this domain.
16992 |      */
16993 |     export type disableParameters = {
16994 |     }
16995 |     export type disableReturnValue = {
16996 |     }
16997 |     /**
16998 |      * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
16999 |      */
17000 |     export type selectPromptParameters = {
17001 |       id: RequestId;
17002 |       deviceId: DeviceId;
17003 |     }
17004 |     export type selectPromptReturnValue = {
17005 |     }
17006 |     /**
17007 |      * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
17008 |      */
17009 |     export type cancelPromptParameters = {
17010 |       id: RequestId;
17011 |     }
17012 |     export type cancelPromptReturnValue = {
17013 |     }
17014 |   }
17015 | 
17016 |   export module Preload {
17017 |     /**
17018 |      * Unique id
17019 |      */
17020 |     export type RuleSetId = string;
17021 |     /**
17022 |      * Corresponds to SpeculationRuleSet
17023 |      */
17024 |     export interface RuleSet {
17025 |       id: RuleSetId;
17026 |       /**
17027 |        * Identifies a document which the rule set is associated with.
17028 |        */
17029 |       loaderId: Network.LoaderId;
17030 |       /**
17031 |        * Source text of JSON representing the rule set. If it comes from
17032 | `<script>` tag, it is the textContent of the node. Note that it is
17033 | a JSON for valid case.
17034 | 
17035 | See also:
17036 | - https://wicg.github.io/nav-speculation/speculation-rules.html
17037 | - https://github.com/WICG/nav-speculation/blob/main/triggers.md
17038 |        */
17039 |       sourceText: string;
17040 |       /**
17041 |        * A speculation rule set is either added through an inline
17042 | `<script>` tag or through an external resource via the
17043 | 'Speculation-Rules' HTTP header. For the first case, we include
17044 | the BackendNodeId of the relevant `<script>` tag. For the second
17045 | case, we include the external URL where the rule set was loaded
17046 | from, and also RequestId if Network domain is enabled.
17047 | 
17048 | See also:
17049 | - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script
17050 | - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
17051 |        */
17052 |       backendNodeId?: DOM.BackendNodeId;
17053 |       url?: string;
17054 |       requestId?: Network.RequestId;
17055 |       /**
17056 |        * Error information
17057 | `errorMessage` is null iff `errorType` is null.
17058 |        */
17059 |       errorType?: RuleSetErrorType;
17060 |       /**
17061 |        * TODO(https://crbug.com/1425354): Replace this property with structured error.
17062 |        */
17063 |       errorMessage?: string;
17064 |     }
17065 |     export type RuleSetErrorType = "SourceIsNotJsonObject"|"InvalidRulesSkipped";
17066 |     /**
17067 |      * The type of preloading attempted. It corresponds to
17068 | mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
17069 | isn't being used by clients).
17070 |      */
17071 |     export type SpeculationAction = "Prefetch"|"Prerender";
17072 |     /**
17073 |      * Corresponds to mojom::SpeculationTargetHint.
17074 | See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
17075 |      */
17076 |     export type SpeculationTargetHint = "Blank"|"Self";
17077 |     /**
17078 |      * A key that identifies a preloading attempt.
17079 | 
17080 | The url used is the url specified by the trigger (i.e. the initial URL), and
17081 | not the final url that is navigated to. For example, prerendering allows
17082 | same-origin main frame navigations during the attempt, but the attempt is
17083 | still keyed with the initial URL.
17084 |      */
17085 |     export interface PreloadingAttemptKey {
17086 |       loaderId: Network.LoaderId;
17087 |       action: SpeculationAction;
17088 |       url: string;
17089 |       targetHint?: SpeculationTargetHint;
17090 |     }
17091 |     /**
17092 |      * Lists sources for a preloading attempt, specifically the ids of rule sets
17093 | that had a speculation rule that triggered the attempt, and the
17094 | BackendNodeIds of <a href> or <area href> elements that triggered the
17095 | attempt (in the case of attempts triggered by a document rule). It is
17096 | possible for multiple rule sets and links to trigger a single attempt.
17097 |      */
17098 |     export interface PreloadingAttemptSource {
17099 |       key: PreloadingAttemptKey;
17100 |       ruleSetIds: RuleSetId[];
17101 |       nodeIds: DOM.BackendNodeId[];
17102 |     }
17103 |     /**
17104 |      * List of FinalStatus reasons for Prerender2.
17105 |      */
17106 |     export type PrerenderFinalStatus = "Activated"|"Destroyed"|"LowEndDevice"|"InvalidSchemeRedirect"|"InvalidSchemeNavigation"|"NavigationRequestBlockedByCsp"|"MainFrameNavigation"|"MojoBinderPolicy"|"RendererProcessCrashed"|"RendererProcessKilled"|"Download"|"TriggerDestroyed"|"NavigationNotCommitted"|"NavigationBadHttpStatus"|"ClientCertRequested"|"NavigationRequestNetworkError"|"CancelAllHostsForTesting"|"DidFailLoad"|"Stop"|"SslCertificateError"|"LoginAuthRequested"|"UaChangeRequiresReload"|"BlockedByClient"|"AudioOutputDeviceRequested"|"MixedContent"|"TriggerBackgrounded"|"MemoryLimitExceeded"|"DataSaverEnabled"|"TriggerUrlHasEffectiveUrl"|"ActivatedBeforeStarted"|"InactivePageRestriction"|"StartFailed"|"TimeoutBackgrounded"|"CrossSiteRedirectInInitialNavigation"|"CrossSiteNavigationInInitialNavigation"|"SameSiteCrossOriginRedirectNotOptInInInitialNavigation"|"SameSiteCrossOriginNavigationNotOptInInInitialNavigation"|"ActivationNavigationParameterMismatch"|"ActivatedInBackground"|"EmbedderHostDisallowed"|"ActivationNavigationDestroyedBeforeSuccess"|"TabClosedByUserGesture"|"TabClosedWithoutUserGesture"|"PrimaryMainFrameRendererProcessCrashed"|"PrimaryMainFrameRendererProcessKilled"|"ActivationFramePolicyNotCompatible"|"PreloadingDisabled"|"BatterySaverEnabled"|"ActivatedDuringMainFrameNavigation"|"PreloadingUnsupportedByWebContents"|"CrossSiteRedirectInMainFrameNavigation"|"CrossSiteNavigationInMainFrameNavigation"|"SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation"|"SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"|"MemoryPressureOnTrigger"|"MemoryPressureAfterTriggered"|"PrerenderingDisabledByDevTools"|"SpeculationRuleRemoved"|"ActivatedWithAuxiliaryBrowsingContexts"|"MaxNumOfRunningEagerPrerendersExceeded"|"MaxNumOfRunningNonEagerPrerendersExceeded"|"MaxNumOfRunningEmbedderPrerendersExceeded"|"PrerenderingUrlHasEffectiveUrl"|"RedirectedPrerenderingUrlHasEffectiveUrl"|"ActivationUrlHasEffectiveUrl"|"JavaScriptInterfaceAdded"|"JavaScriptInterfaceRemoved"|"AllPrerenderingCanceled"|"WindowClosed"|"SlowNetwork"|"OtherPrerenderedPageActivated"|"V8OptimizerDisabled"|"PrerenderFailedDuringPrefetch";
17107 |     /**
17108 |      * Preloading status values, see also PreloadingTriggeringOutcome. This
17109 | status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
17110 |      */
17111 |     export type PreloadingStatus = "Pending"|"Running"|"Ready"|"Success"|"Failure"|"NotSupported";
17112 |     /**
17113 |      * TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and
17114 | filter out the ones that aren't necessary to the developers.
17115 |      */
17116 |     export type PrefetchStatus = "PrefetchAllowed"|"PrefetchFailedIneligibleRedirect"|"PrefetchFailedInvalidRedirect"|"PrefetchFailedMIMENotSupported"|"PrefetchFailedNetError"|"PrefetchFailedNon2XX"|"PrefetchEvictedAfterCandidateRemoved"|"PrefetchEvictedForNewerPrefetch"|"PrefetchHeldback"|"PrefetchIneligibleRetryAfter"|"PrefetchIsPrivacyDecoy"|"PrefetchIsStale"|"PrefetchNotEligibleBrowserContextOffTheRecord"|"PrefetchNotEligibleDataSaverEnabled"|"PrefetchNotEligibleExistingProxy"|"PrefetchNotEligibleHostIsNonUnique"|"PrefetchNotEligibleNonDefaultStoragePartition"|"PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy"|"PrefetchNotEligibleSchemeIsNotHttps"|"PrefetchNotEligibleUserHasCookies"|"PrefetchNotEligibleUserHasServiceWorker"|"PrefetchNotEligibleBatterySaverEnabled"|"PrefetchNotEligiblePreloadingDisabled"|"PrefetchNotFinishedInTime"|"PrefetchNotStarted"|"PrefetchNotUsedCookiesChanged"|"PrefetchProxyNotAvailable"|"PrefetchResponseUsed"|"PrefetchSuccessfulButNotUsed"|"PrefetchNotUsedProbeFailed";
17117 |     /**
17118 |      * Information of headers to be displayed when the header mismatch occurred.
17119 |      */
17120 |     export interface PrerenderMismatchedHeaders {
17121 |       headerName: string;
17122 |       initialValue?: string;
17123 |       activationValue?: string;
17124 |     }
17125 | 
17126 |     /**
17127 |      * Upsert. Currently, it is only emitted when a rule set added.
17128 |      */
17129 |     export type ruleSetUpdatedPayload = {
17130 |       ruleSet: RuleSet;
17131 |     }
17132 |     export type ruleSetRemovedPayload = {
17133 |       id: RuleSetId;
17134 |     }
17135 |     /**
17136 |      * Fired when a preload enabled state is updated.
17137 |      */
17138 |     export type preloadEnabledStateUpdatedPayload = {
17139 |       disabledByPreference: boolean;
17140 |       disabledByDataSaver: boolean;
17141 |       disabledByBatterySaver: boolean;
17142 |       disabledByHoldbackPrefetchSpeculationRules: boolean;
17143 |       disabledByHoldbackPrerenderSpeculationRules: boolean;
17144 |     }
17145 |     /**
17146 |      * Fired when a prefetch attempt is updated.
17147 |      */
17148 |     export type prefetchStatusUpdatedPayload = {
17149 |       key: PreloadingAttemptKey;
17150 |       /**
17151 |        * The frame id of the frame initiating prefetch.
17152 |        */
17153 |       initiatingFrameId: Page.FrameId;
17154 |       prefetchUrl: string;
17155 |       status: PreloadingStatus;
17156 |       prefetchStatus: PrefetchStatus;
17157 |       requestId: Network.RequestId;
17158 |     }
17159 |     /**
17160 |      * Fired when a prerender attempt is updated.
17161 |      */
17162 |     export type prerenderStatusUpdatedPayload = {
17163 |       key: PreloadingAttemptKey;
17164 |       status: PreloadingStatus;
17165 |       prerenderStatus?: PrerenderFinalStatus;
17166 |       /**
17167 |        * This is used to give users more information about the name of Mojo interface
17168 | that is incompatible with prerender and has caused the cancellation of the attempt.
17169 |        */
17170 |       disallowedMojoInterface?: string;
17171 |       mismatchedHeaders?: PrerenderMismatchedHeaders[];
17172 |     }
17173 |     /**
17174 |      * Send a list of sources for all preloading attempts in a document.
17175 |      */
17176 |     export type preloadingAttemptSourcesUpdatedPayload = {
17177 |       loaderId: Network.LoaderId;
17178 |       preloadingAttemptSources: PreloadingAttemptSource[];
17179 |     }
17180 | 
17181 |     export type enableParameters = {
17182 |     }
17183 |     export type enableReturnValue = {
17184 |     }
17185 |     export type disableParameters = {
17186 |     }
17187 |     export type disableReturnValue = {
17188 |     }
17189 |   }
17190 | 
17191 |   /**
17192 |    * This domain allows interacting with the FedCM dialog.
17193 |    */
17194 |   export module FedCm {
17195 |     /**
17196 |      * Whether this is a sign-up or sign-in action for this account, i.e.
17197 | whether this account has ever been used to sign in to this RP before.
17198 |      */
17199 |     export type LoginState = "SignIn"|"SignUp";
17200 |     /**
17201 |      * The types of FedCM dialogs.
17202 |      */
17203 |     export type DialogType = "AccountChooser"|"AutoReauthn"|"ConfirmIdpLogin"|"Error";
17204 |     /**
17205 |      * The buttons on the FedCM dialog.
17206 |      */
17207 |     export type DialogButton = "ConfirmIdpLoginContinue"|"ErrorGotIt"|"ErrorMoreDetails";
17208 |     /**
17209 |      * The URLs that each account has
17210 |      */
17211 |     export type AccountUrlType = "TermsOfService"|"PrivacyPolicy";
17212 |     /**
17213 |      * Corresponds to IdentityRequestAccount
17214 |      */
17215 |     export interface Account {
17216 |       accountId: string;
17217 |       email: string;
17218 |       name: string;
17219 |       givenName: string;
17220 |       pictureUrl: string;
17221 |       idpConfigUrl: string;
17222 |       idpLoginUrl: string;
17223 |       loginState: LoginState;
17224 |       /**
17225 |        * These two are only set if the loginState is signUp
17226 |        */
17227 |       termsOfServiceUrl?: string;
17228 |       privacyPolicyUrl?: string;
17229 |     }
17230 | 
17231 |     export type dialogShownPayload = {
17232 |       dialogId: string;
17233 |       dialogType: DialogType;
17234 |       accounts: Account[];
17235 |       /**
17236 |        * These exist primarily so that the caller can verify the
17237 | RP context was used appropriately.
17238 |        */
17239 |       title: string;
17240 |       subtitle?: string;
17241 |     }
17242 |     /**
17243 |      * Triggered when a dialog is closed, either by user action, JS abort,
17244 | or a command below.
17245 |      */
17246 |     export type dialogClosedPayload = {
17247 |       dialogId: string;
17248 |     }
17249 | 
17250 |     export type enableParameters = {
17251 |       /**
17252 |        * Allows callers to disable the promise rejection delay that would
17253 | normally happen, if this is unimportant to what's being tested.
17254 | (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
17255 |        */
17256 |       disableRejectionDelay?: boolean;
17257 |     }
17258 |     export type enableReturnValue = {
17259 |     }
17260 |     export type disableParameters = {
17261 |     }
17262 |     export type disableReturnValue = {
17263 |     }
17264 |     export type selectAccountParameters = {
17265 |       dialogId: string;
17266 |       accountIndex: number;
17267 |     }
17268 |     export type selectAccountReturnValue = {
17269 |     }
17270 |     export type clickDialogButtonParameters = {
17271 |       dialogId: string;
17272 |       dialogButton: DialogButton;
17273 |     }
17274 |     export type clickDialogButtonReturnValue = {
17275 |     }
17276 |     export type openUrlParameters = {
17277 |       dialogId: string;
17278 |       accountIndex: number;
17279 |       accountUrlType: AccountUrlType;
17280 |     }
17281 |     export type openUrlReturnValue = {
17282 |     }
17283 |     export type dismissDialogParameters = {
17284 |       dialogId: string;
17285 |       triggerCooldown?: boolean;
17286 |     }
17287 |     export type dismissDialogReturnValue = {
17288 |     }
17289 |     /**
17290 |      * Resets the cooldown time, if any, to allow the next FedCM call to show
17291 | a dialog even if one was recently dismissed by the user.
17292 |      */
17293 |     export type resetCooldownParameters = {
17294 |     }
17295 |     export type resetCooldownReturnValue = {
17296 |     }
17297 |   }
17298 | 
17299 |   /**
17300 |    * This domain allows interacting with the browser to control PWAs.
17301 |    */
17302 |   export module PWA {
17303 |     /**
17304 |      * The following types are the replica of
17305 | https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67
17306 |      */
17307 |     export interface FileHandlerAccept {
17308 |       /**
17309 |        * New name of the mimetype according to
17310 | https://www.iana.org/assignments/media-types/media-types.xhtml
17311 |        */
17312 |       mediaType: string;
17313 |       fileExtensions: string[];
17314 |     }
17315 |     export interface FileHandler {
17316 |       action: string;
17317 |       accepts: FileHandlerAccept[];
17318 |       displayName: string;
17319 |     }
17320 |     /**
17321 |      * If user prefers opening the app in browser or an app window.
17322 |      */
17323 |     export type DisplayMode = "standalone"|"browser";
17324 | 
17325 | 
17326 |     /**
17327 |      * Returns the following OS state for the given manifest id.
17328 |      */
17329 |     export type getOsAppStateParameters = {
17330 |       /**
17331 |        * The id from the webapp's manifest file, commonly it's the url of the
17332 | site installing the webapp. See
17333 | https://web.dev/learn/pwa/web-app-manifest.
17334 |        */
17335 |       manifestId: string;
17336 |     }
17337 |     export type getOsAppStateReturnValue = {
17338 |       badgeCount: number;
17339 |       fileHandlers: FileHandler[];
17340 |     }
17341 |     /**
17342 |      * Installs the given manifest identity, optionally using the given install_url
17343 | or IWA bundle location.
17344 | 
17345 | TODO(crbug.com/337872319) Support IWA to meet the following specific
17346 | requirement.
17347 | IWA-specific install description: If the manifest_id is isolated-app://,
17348 | install_url_or_bundle_url is required, and can be either an http(s) URL or
17349 | file:// URL pointing to a signed web bundle (.swbn). The .swbn file's
17350 | signing key must correspond to manifest_id. If Chrome is not in IWA dev
17351 | mode, the installation will fail, regardless of the state of the allowlist.
17352 |      */
17353 |     export type installParameters = {
17354 |       manifestId: string;
17355 |       /**
17356 |        * The location of the app or bundle overriding the one derived from the
17357 | manifestId.
17358 |        */
17359 |       installUrlOrBundleUrl?: string;
17360 |     }
17361 |     export type installReturnValue = {
17362 |     }
17363 |     /**
17364 |      * Uninstalls the given manifest_id and closes any opened app windows.
17365 |      */
17366 |     export type uninstallParameters = {
17367 |       manifestId: string;
17368 |     }
17369 |     export type uninstallReturnValue = {
17370 |     }
17371 |     /**
17372 |      * Launches the installed web app, or an url in the same web app instead of the
17373 | default start url if it is provided. Returns a page Target.TargetID which
17374 | can be used to attach to via Target.attachToTarget or similar APIs.
17375 |      */
17376 |     export type launchParameters = {
17377 |       manifestId: string;
17378 |       url?: string;
17379 |     }
17380 |     export type launchReturnValue = {
17381 |       /**
17382 |        * ID of the tab target created as a result.
17383 |        */
17384 |       targetId: Target.TargetID;
17385 |     }
17386 |     /**
17387 |      * Opens one or more local files from an installed web app identified by its
17388 | manifestId. The web app needs to have file handlers registered to process
17389 | the files. The API returns one or more page Target.TargetIDs which can be
17390 | used to attach to via Target.attachToTarget or similar APIs.
17391 | If some files in the parameters cannot be handled by the web app, they will
17392 | be ignored. If none of the files can be handled, this API returns an error.
17393 | If no files are provided as the parameter, this API also returns an error.
17394 | 
17395 | According to the definition of the file handlers in the manifest file, one
17396 | Target.TargetID may represent a page handling one or more files. The order
17397 | of the returned Target.TargetIDs is not guaranteed.
17398 | 
17399 | TODO(crbug.com/339454034): Check the existences of the input files.
17400 |      */
17401 |     export type launchFilesInAppParameters = {
17402 |       manifestId: string;
17403 |       files: string[];
17404 |     }
17405 |     export type launchFilesInAppReturnValue = {
17406 |       /**
17407 |        * IDs of the tab targets created as the result.
17408 |        */
17409 |       targetIds: Target.TargetID[];
17410 |     }
17411 |     /**
17412 |      * Opens the current page in its web app identified by the manifest id, needs
17413 | to be called on a page target. This function returns immediately without
17414 | waiting for the app to finish loading.
17415 |      */
17416 |     export type openCurrentPageInAppParameters = {
17417 |       manifestId: string;
17418 |     }
17419 |     export type openCurrentPageInAppReturnValue = {
17420 |     }
17421 |     /**
17422 |      * Changes user settings of the web app identified by its manifestId. If the
17423 | app was not installed, this command returns an error. Unset parameters will
17424 | be ignored; unrecognized values will cause an error.
17425 | 
17426 | Unlike the ones defined in the manifest files of the web apps, these
17427 | settings are provided by the browser and controlled by the users, they
17428 | impact the way the browser handling the web apps.
17429 | 
17430 | See the comment of each parameter.
17431 |      */
17432 |     export type changeAppUserSettingsParameters = {
17433 |       manifestId: string;
17434 |       /**
17435 |        * If user allows the links clicked on by the user in the app's scope, or
17436 | extended scope if the manifest has scope extensions and the flags
17437 | `DesktopPWAsLinkCapturingWithScopeExtensions` and
17438 | `WebAppEnableScopeExtensions` are enabled.
17439 | 
17440 | Note, the API does not support resetting the linkCapturing to the
17441 | initial value, uninstalling and installing the web app again will reset
17442 | it.
17443 | 
17444 | TODO(crbug.com/339453269): Setting this value on ChromeOS is not
17445 | supported yet.
17446 |        */
17447 |       linkCapturing?: boolean;
17448 |       displayMode?: DisplayMode;
17449 |     }
17450 |     export type changeAppUserSettingsReturnValue = {
17451 |     }
17452 |   }
17453 | 
17454 |   /**
17455 |    * This domain allows configuring virtual Bluetooth devices to test
17456 | the web-bluetooth API.
17457 |    */
17458 |   export module BluetoothEmulation {
17459 |     /**
17460 |      * Indicates the various states of Central.
17461 |      */
17462 |     export type CentralState = "absent"|"powered-off"|"powered-on";
17463 |     /**
17464 |      * Stores the manufacturer data
17465 |      */
17466 |     export interface ManufacturerData {
17467 |       /**
17468 |        * Company identifier
17469 | https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml
17470 | https://usb.org/developers
17471 |        */
17472 |       key: number;
17473 |       /**
17474 |        * Manufacturer-specific data
17475 |        */
17476 |       data: binary;
17477 |     }
17478 |     /**
17479 |      * Stores the byte data of the advertisement packet sent by a Bluetooth device.
17480 |      */
17481 |     export interface ScanRecord {
17482 |       name?: string;
17483 |       uuids?: string[];
17484 |       /**
17485 |        * Stores the external appearance description of the device.
17486 |        */
17487 |       appearance?: number;
17488 |       /**
17489 |        * Stores the transmission power of a broadcasting device.
17490 |        */
17491 |       txPower?: number;
17492 |       /**
17493 |        * Key is the company identifier and the value is an array of bytes of
17494 | manufacturer specific data.
17495 |        */
17496 |       manufacturerData?: ManufacturerData[];
17497 |     }
17498 |     /**
17499 |      * Stores the advertisement packet information that is sent by a Bluetooth device.
17500 |      */
17501 |     export interface ScanEntry {
17502 |       deviceAddress: string;
17503 |       rssi: number;
17504 |       scanRecord: ScanRecord;
17505 |     }
17506 | 
17507 | 
17508 |     /**
17509 |      * Enable the BluetoothEmulation domain.
17510 |      */
17511 |     export type enableParameters = {
17512 |       /**
17513 |        * State of the simulated central.
17514 |        */
17515 |       state: CentralState;
17516 |     }
17517 |     export type enableReturnValue = {
17518 |     }
17519 |     /**
17520 |      * Disable the BluetoothEmulation domain.
17521 |      */
17522 |     export type disableParameters = {
17523 |     }
17524 |     export type disableReturnValue = {
17525 |     }
17526 |     /**
17527 |      * Simulates a peripheral with |address|, |name| and |knownServiceUuids|
17528 | that has already been connected to the system.
17529 |      */
17530 |     export type simulatePreconnectedPeripheralParameters = {
17531 |       address: string;
17532 |       name: string;
17533 |       manufacturerData: ManufacturerData[];
17534 |       knownServiceUuids: string[];
17535 |     }
17536 |     export type simulatePreconnectedPeripheralReturnValue = {
17537 |     }
17538 |     /**
17539 |      * Simulates an advertisement packet described in |entry| being received by
17540 | the central.
17541 |      */
17542 |     export type simulateAdvertisementParameters = {
17543 |       entry: ScanEntry;
17544 |     }
17545 |     export type simulateAdvertisementReturnValue = {
17546 |     }
17547 |   }
17548 | 
17549 |   /**
17550 |    * This domain is deprecated - use Runtime or Log instead.
17551 |    */
17552 |   export module Console {
17553 |     /**
17554 |      * Console message.
17555 |      */
17556 |     export interface ConsoleMessage {
17557 |       /**
17558 |        * Message source.
17559 |        */
17560 |       source: "xml"|"javascript"|"network"|"console-api"|"storage"|"appcache"|"rendering"|"security"|"other"|"deprecation"|"worker";
17561 |       /**
17562 |        * Message severity.
17563 |        */
17564 |       level: "log"|"warning"|"error"|"debug"|"info";
17565 |       /**
17566 |        * Message text.
17567 |        */
17568 |       text: string;
17569 |       /**
17570 |        * URL of the message origin.
17571 |        */
17572 |       url?: string;
17573 |       /**
17574 |        * Line number in the resource that generated this message (1-based).
17575 |        */
17576 |       line?: number;
17577 |       /**
17578 |        * Column number in the resource that generated this message (1-based).
17579 |        */
17580 |       column?: number;
17581 |     }
17582 | 
17583 |     /**
17584 |      * Issued when new console message is added.
17585 |      */
17586 |     export type messageAddedPayload = {
17587 |       /**
17588 |        * Console message that has been added.
17589 |        */
17590 |       message: ConsoleMessage;
17591 |     }
17592 | 
17593 |     /**
17594 |      * Does nothing.
17595 |      */
17596 |     export type clearMessagesParameters = {
17597 |     }
17598 |     export type clearMessagesReturnValue = {
17599 |     }
17600 |     /**
17601 |      * Disables console domain, prevents further console messages from being reported to the client.
17602 |      */
17603 |     export type disableParameters = {
17604 |     }
17605 |     export type disableReturnValue = {
17606 |     }
17607 |     /**
17608 |      * Enables console domain, sends the messages collected so far to the client by means of the
17609 | `messageAdded` notification.
17610 |      */
17611 |     export type enableParameters = {
17612 |     }
17613 |     export type enableReturnValue = {
17614 |     }
17615 |   }
17616 | 
17617 |   /**
17618 |    * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
17619 | breakpoints, stepping through execution, exploring stack traces, etc.
17620 |    */
17621 |   export module Debugger {
17622 |     /**
17623 |      * Breakpoint identifier.
17624 |      */
17625 |     export type BreakpointId = string;
17626 |     /**
17627 |      * Call frame identifier.
17628 |      */
17629 |     export type CallFrameId = string;
17630 |     /**
17631 |      * Location in the source code.
17632 |      */
17633 |     export interface Location {
17634 |       /**
17635 |        * Script identifier as reported in the `Debugger.scriptParsed`.
17636 |        */
17637 |       scriptId: Runtime.ScriptId;
17638 |       /**
17639 |        * Line number in the script (0-based).
17640 |        */
17641 |       lineNumber: number;
17642 |       /**
17643 |        * Column number in the script (0-based).
17644 |        */
17645 |       columnNumber?: number;
17646 |     }
17647 |     /**
17648 |      * Location in the source code.
17649 |      */
17650 |     export interface ScriptPosition {
17651 |       lineNumber: number;
17652 |       columnNumber: number;
17653 |     }
17654 |     /**
17655 |      * Location range within one script.
17656 |      */
17657 |     export interface LocationRange {
17658 |       scriptId: Runtime.ScriptId;
17659 |       start: ScriptPosition;
17660 |       end: ScriptPosition;
17661 |     }
17662 |     /**
17663 |      * JavaScript call frame. Array of call frames form the call stack.
17664 |      */
17665 |     export interface CallFrame {
17666 |       /**
17667 |        * Call frame identifier. This identifier is only valid while the virtual machine is paused.
17668 |        */
17669 |       callFrameId: CallFrameId;
17670 |       /**
17671 |        * Name of the JavaScript function called on this call frame.
17672 |        */
17673 |       functionName: string;
17674 |       /**
17675 |        * Location in the source code.
17676 |        */
17677 |       functionLocation?: Location;
17678 |       /**
17679 |        * Location in the source code.
17680 |        */
17681 |       location: Location;
17682 |       /**
17683 |        * JavaScript script name or url.
17684 | Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
17685 | sent `Debugger.scriptParsed` event.
17686 |        */
17687 |       url: string;
17688 |       /**
17689 |        * Scope chain for this call frame.
17690 |        */
17691 |       scopeChain: Scope[];
17692 |       /**
17693 |        * `this` object for this call frame.
17694 |        */
17695 |       this: Runtime.RemoteObject;
17696 |       /**
17697 |        * The value being returned, if the function is at return point.
17698 |        */
17699 |       returnValue?: Runtime.RemoteObject;
17700 |       /**
17701 |        * Valid only while the VM is paused and indicates whether this frame
17702 | can be restarted or not. Note that a `true` value here does not
17703 | guarantee that Debugger#restartFrame with this CallFrameId will be
17704 | successful, but it is very likely.
17705 |        */
17706 |       canBeRestarted?: boolean;
17707 |     }
17708 |     /**
17709 |      * Scope description.
17710 |      */
17711 |     export interface Scope {
17712 |       /**
17713 |        * Scope type.
17714 |        */
17715 |       type: "global"|"local"|"with"|"closure"|"catch"|"block"|"script"|"eval"|"module"|"wasm-expression-stack";
17716 |       /**
17717 |        * Object representing the scope. For `global` and `with` scopes it represents the actual
17718 | object; for the rest of the scopes, it is artificial transient object enumerating scope
17719 | variables as its properties.
17720 |        */
17721 |       object: Runtime.RemoteObject;
17722 |       name?: string;
17723 |       /**
17724 |        * Location in the source code where scope starts
17725 |        */
17726 |       startLocation?: Location;
17727 |       /**
17728 |        * Location in the source code where scope ends
17729 |        */
17730 |       endLocation?: Location;
17731 |     }
17732 |     /**
17733 |      * Search match for resource.
17734 |      */
17735 |     export interface SearchMatch {
17736 |       /**
17737 |        * Line number in resource content.
17738 |        */
17739 |       lineNumber: number;
17740 |       /**
17741 |        * Line with match content.
17742 |        */
17743 |       lineContent: string;
17744 |     }
17745 |     export interface BreakLocation {
17746 |       /**
17747 |        * Script identifier as reported in the `Debugger.scriptParsed`.
17748 |        */
17749 |       scriptId: Runtime.ScriptId;
17750 |       /**
17751 |        * Line number in the script (0-based).
17752 |        */
17753 |       lineNumber: number;
17754 |       /**
17755 |        * Column number in the script (0-based).
17756 |        */
17757 |       columnNumber?: number;
17758 |       type?: "debuggerStatement"|"call"|"return";
17759 |     }
17760 |     export interface WasmDisassemblyChunk {
17761 |       /**
17762 |        * The next chunk of disassembled lines.
17763 |        */
17764 |       lines: string[];
17765 |       /**
17766 |        * The bytecode offsets describing the start of each line.
17767 |        */
17768 |       bytecodeOffsets: number[];
17769 |     }
17770 |     /**
17771 |      * Enum of possible script languages.
17772 |      */
17773 |     export type ScriptLanguage = "JavaScript"|"WebAssembly";
17774 |     /**
17775 |      * Debug symbols available for a wasm script.
17776 |      */
17777 |     export interface DebugSymbols {
17778 |       /**
17779 |        * Type of the debug symbols.
17780 |        */
17781 |       type: "SourceMap"|"EmbeddedDWARF"|"ExternalDWARF";
17782 |       /**
17783 |        * URL of the external symbol source.
17784 |        */
17785 |       externalURL?: string;
17786 |     }
17787 | 
17788 |     /**
17789 |      * Fired when breakpoint is resolved to an actual script and location.
17790 |      */
17791 |     export type breakpointResolvedPayload = {
17792 |       /**
17793 |        * Breakpoint unique identifier.
17794 |        */
17795 |       breakpointId: BreakpointId;
17796 |       /**
17797 |        * Actual breakpoint location.
17798 |        */
17799 |       location: Location;
17800 |     }
17801 |     /**
17802 |      * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
17803 |      */
17804 |     export type pausedPayload = {
17805 |       /**
17806 |        * Call stack the virtual machine stopped on.
17807 |        */
17808 |       callFrames: CallFrame[];
17809 |       /**
17810 |        * Pause reason.
17811 |        */
17812 |       reason: "ambiguous"|"assert"|"CSPViolation"|"debugCommand"|"DOM"|"EventListener"|"exception"|"instrumentation"|"OOM"|"other"|"promiseRejection"|"XHR"|"step";
17813 |       /**
17814 |        * Object containing break-specific auxiliary properties.
17815 |        */
17816 |       data?: { [key: string]: string };
17817 |       /**
17818 |        * Hit breakpoints IDs
17819 |        */
17820 |       hitBreakpoints?: string[];
17821 |       /**
17822 |        * Async stack trace, if any.
17823 |        */
17824 |       asyncStackTrace?: Runtime.StackTrace;
17825 |       /**
17826 |        * Async stack trace, if any.
17827 |        */
17828 |       asyncStackTraceId?: Runtime.StackTraceId;
17829 |       /**
17830 |        * Never present, will be removed.
17831 |        */
17832 |       asyncCallStackTraceId?: Runtime.StackTraceId;
17833 |     }
17834 |     /**
17835 |      * Fired when the virtual machine resumed execution.
17836 |      */
17837 |     export type resumedPayload = void;
17838 |     /**
17839 |      * Fired when virtual machine fails to parse the script.
17840 |      */
17841 |     export type scriptFailedToParsePayload = {
17842 |       /**
17843 |        * Identifier of the script parsed.
17844 |        */
17845 |       scriptId: Runtime.ScriptId;
17846 |       /**
17847 |        * URL or name of the script parsed (if any).
17848 |        */
17849 |       url: string;
17850 |       /**
17851 |        * Line offset of the script within the resource with given URL (for script tags).
17852 |        */
17853 |       startLine: number;
17854 |       /**
17855 |        * Column offset of the script within the resource with given URL.
17856 |        */
17857 |       startColumn: number;
17858 |       /**
17859 |        * Last line of the script.
17860 |        */
17861 |       endLine: number;
17862 |       /**
17863 |        * Length of the last line of the script.
17864 |        */
17865 |       endColumn: number;
17866 |       /**
17867 |        * Specifies script creation context.
17868 |        */
17869 |       executionContextId: Runtime.ExecutionContextId;
17870 |       /**
17871 |        * Content hash of the script, SHA-256.
17872 |        */
17873 |       hash: string;
17874 |       /**
17875 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
17876 |        */
17877 |       executionContextAuxData?: { [key: string]: string };
17878 |       /**
17879 |        * URL of source map associated with script (if any).
17880 |        */
17881 |       sourceMapURL?: string;
17882 |       /**
17883 |        * True, if this script has sourceURL.
17884 |        */
17885 |       hasSourceURL?: boolean;
17886 |       /**
17887 |        * True, if this script is ES6 module.
17888 |        */
17889 |       isModule?: boolean;
17890 |       /**
17891 |        * This script length.
17892 |        */
17893 |       length?: number;
17894 |       /**
17895 |        * JavaScript top stack frame of where the script parsed event was triggered if available.
17896 |        */
17897 |       stackTrace?: Runtime.StackTrace;
17898 |       /**
17899 |        * If the scriptLanguage is WebAssembly, the code section offset in the module.
17900 |        */
17901 |       codeOffset?: number;
17902 |       /**
17903 |        * The language of the script.
17904 |        */
17905 |       scriptLanguage?: Debugger.ScriptLanguage;
17906 |       /**
17907 |        * The name the embedder supplied for this script.
17908 |        */
17909 |       embedderName?: string;
17910 |     }
17911 |     /**
17912 |      * Fired when virtual machine parses script. This event is also fired for all known and uncollected
17913 | scripts upon enabling debugger.
17914 |      */
17915 |     export type scriptParsedPayload = {
17916 |       /**
17917 |        * Identifier of the script parsed.
17918 |        */
17919 |       scriptId: Runtime.ScriptId;
17920 |       /**
17921 |        * URL or name of the script parsed (if any).
17922 |        */
17923 |       url: string;
17924 |       /**
17925 |        * Line offset of the script within the resource with given URL (for script tags).
17926 |        */
17927 |       startLine: number;
17928 |       /**
17929 |        * Column offset of the script within the resource with given URL.
17930 |        */
17931 |       startColumn: number;
17932 |       /**
17933 |        * Last line of the script.
17934 |        */
17935 |       endLine: number;
17936 |       /**
17937 |        * Length of the last line of the script.
17938 |        */
17939 |       endColumn: number;
17940 |       /**
17941 |        * Specifies script creation context.
17942 |        */
17943 |       executionContextId: Runtime.ExecutionContextId;
17944 |       /**
17945 |        * Content hash of the script, SHA-256.
17946 |        */
17947 |       hash: string;
17948 |       /**
17949 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
17950 |        */
17951 |       executionContextAuxData?: { [key: string]: string };
17952 |       /**
17953 |        * True, if this script is generated as a result of the live edit operation.
17954 |        */
17955 |       isLiveEdit?: boolean;
17956 |       /**
17957 |        * URL of source map associated with script (if any).
17958 |        */
17959 |       sourceMapURL?: string;
17960 |       /**
17961 |        * True, if this script has sourceURL.
17962 |        */
17963 |       hasSourceURL?: boolean;
17964 |       /**
17965 |        * True, if this script is ES6 module.
17966 |        */
17967 |       isModule?: boolean;
17968 |       /**
17969 |        * This script length.
17970 |        */
17971 |       length?: number;
17972 |       /**
17973 |        * JavaScript top stack frame of where the script parsed event was triggered if available.
17974 |        */
17975 |       stackTrace?: Runtime.StackTrace;
17976 |       /**
17977 |        * If the scriptLanguage is WebAssembly, the code section offset in the module.
17978 |        */
17979 |       codeOffset?: number;
17980 |       /**
17981 |        * The language of the script.
17982 |        */
17983 |       scriptLanguage?: Debugger.ScriptLanguage;
17984 |       /**
17985 |        * If the scriptLanguage is WebAssembly, the source of debug symbols for the module.
17986 |        */
17987 |       debugSymbols?: Debugger.DebugSymbols[];
17988 |       /**
17989 |        * The name the embedder supplied for this script.
17990 |        */
17991 |       embedderName?: string;
17992 |     }
17993 | 
17994 |     /**
17995 |      * Continues execution until specific location is reached.
17996 |      */
17997 |     export type continueToLocationParameters = {
17998 |       /**
17999 |        * Location to continue to.
18000 |        */
18001 |       location: Location;
18002 |       targetCallFrames?: "any"|"current";
18003 |     }
18004 |     export type continueToLocationReturnValue = {
18005 |     }
18006 |     /**
18007 |      * Disables debugger for given page.
18008 |      */
18009 |     export type disableParameters = {
18010 |     }
18011 |     export type disableReturnValue = {
18012 |     }
18013 |     /**
18014 |      * Enables debugger for the given page. Clients should not assume that the debugging has been
18015 | enabled until the result for this command is received.
18016 |      */
18017 |     export type enableParameters = {
18018 |       /**
18019 |        * The maximum size in bytes of collected scripts (not referenced by other heap objects)
18020 | the debugger can hold. Puts no limit if parameter is omitted.
18021 |        */
18022 |       maxScriptsCacheSize?: number;
18023 |     }
18024 |     export type enableReturnValue = {
18025 |       /**
18026 |        * Unique identifier of the debugger.
18027 |        */
18028 |       debuggerId: Runtime.UniqueDebuggerId;
18029 |     }
18030 |     /**
18031 |      * Evaluates expression on a given call frame.
18032 |      */
18033 |     export type evaluateOnCallFrameParameters = {
18034 |       /**
18035 |        * Call frame identifier to evaluate on.
18036 |        */
18037 |       callFrameId: CallFrameId;
18038 |       /**
18039 |        * Expression to evaluate.
18040 |        */
18041 |       expression: string;
18042 |       /**
18043 |        * String object group name to put result into (allows rapid releasing resulting object handles
18044 | using `releaseObjectGroup`).
18045 |        */
18046 |       objectGroup?: string;
18047 |       /**
18048 |        * Specifies whether command line API should be available to the evaluated expression, defaults
18049 | to false.
18050 |        */
18051 |       includeCommandLineAPI?: boolean;
18052 |       /**
18053 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
18054 | execution. Overrides `setPauseOnException` state.
18055 |        */
18056 |       silent?: boolean;
18057 |       /**
18058 |        * Whether the result is expected to be a JSON object that should be sent by value.
18059 |        */
18060 |       returnByValue?: boolean;
18061 |       /**
18062 |        * Whether preview should be generated for the result.
18063 |        */
18064 |       generatePreview?: boolean;
18065 |       /**
18066 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
18067 |        */
18068 |       throwOnSideEffect?: boolean;
18069 |       /**
18070 |        * Terminate execution after timing out (number of milliseconds).
18071 |        */
18072 |       timeout?: Runtime.TimeDelta;
18073 |     }
18074 |     export type evaluateOnCallFrameReturnValue = {
18075 |       /**
18076 |        * Object wrapper for the evaluation result.
18077 |        */
18078 |       result: Runtime.RemoteObject;
18079 |       /**
18080 |        * Exception details.
18081 |        */
18082 |       exceptionDetails?: Runtime.ExceptionDetails;
18083 |     }
18084 |     /**
18085 |      * Returns possible locations for breakpoint. scriptId in start and end range locations should be
18086 | the same.
18087 |      */
18088 |     export type getPossibleBreakpointsParameters = {
18089 |       /**
18090 |        * Start of range to search possible breakpoint locations in.
18091 |        */
18092 |       start: Location;
18093 |       /**
18094 |        * End of range to search possible breakpoint locations in (excluding). When not specified, end
18095 | of scripts is used as end of range.
18096 |        */
18097 |       end?: Location;
18098 |       /**
18099 |        * Only consider locations which are in the same (non-nested) function as start.
18100 |        */
18101 |       restrictToFunction?: boolean;
18102 |     }
18103 |     export type getPossibleBreakpointsReturnValue = {
18104 |       /**
18105 |        * List of the possible breakpoint locations.
18106 |        */
18107 |       locations: BreakLocation[];
18108 |     }
18109 |     /**
18110 |      * Returns source for the script with given id.
18111 |      */
18112 |     export type getScriptSourceParameters = {
18113 |       /**
18114 |        * Id of the script to get source for.
18115 |        */
18116 |       scriptId: Runtime.ScriptId;
18117 |     }
18118 |     export type getScriptSourceReturnValue = {
18119 |       /**
18120 |        * Script source (empty in case of Wasm bytecode).
18121 |        */
18122 |       scriptSource: string;
18123 |       /**
18124 |        * Wasm bytecode.
18125 |        */
18126 |       bytecode?: binary;
18127 |     }
18128 |     export type disassembleWasmModuleParameters = {
18129 |       /**
18130 |        * Id of the script to disassemble
18131 |        */
18132 |       scriptId: Runtime.ScriptId;
18133 |     }
18134 |     export type disassembleWasmModuleReturnValue = {
18135 |       /**
18136 |        * For large modules, return a stream from which additional chunks of
18137 | disassembly can be read successively.
18138 |        */
18139 |       streamId?: string;
18140 |       /**
18141 |        * The total number of lines in the disassembly text.
18142 |        */
18143 |       totalNumberOfLines: number;
18144 |       /**
18145 |        * The offsets of all function bodies, in the format [start1, end1,
18146 | start2, end2, ...] where all ends are exclusive.
18147 |        */
18148 |       functionBodyOffsets: number[];
18149 |       /**
18150 |        * The first chunk of disassembly.
18151 |        */
18152 |       chunk: WasmDisassemblyChunk;
18153 |     }
18154 |     /**
18155 |      * Disassemble the next chunk of lines for the module corresponding to the
18156 | stream. If disassembly is complete, this API will invalidate the streamId
18157 | and return an empty chunk. Any subsequent calls for the now invalid stream
18158 | will return errors.
18159 |      */
18160 |     export type nextWasmDisassemblyChunkParameters = {
18161 |       streamId: string;
18162 |     }
18163 |     export type nextWasmDisassemblyChunkReturnValue = {
18164 |       /**
18165 |        * The next chunk of disassembly.
18166 |        */
18167 |       chunk: WasmDisassemblyChunk;
18168 |     }
18169 |     /**
18170 |      * This command is deprecated. Use getScriptSource instead.
18171 |      */
18172 |     export type getWasmBytecodeParameters = {
18173 |       /**
18174 |        * Id of the Wasm script to get source for.
18175 |        */
18176 |       scriptId: Runtime.ScriptId;
18177 |     }
18178 |     export type getWasmBytecodeReturnValue = {
18179 |       /**
18180 |        * Script source.
18181 |        */
18182 |       bytecode: binary;
18183 |     }
18184 |     /**
18185 |      * Returns stack trace with given `stackTraceId`.
18186 |      */
18187 |     export type getStackTraceParameters = {
18188 |       stackTraceId: Runtime.StackTraceId;
18189 |     }
18190 |     export type getStackTraceReturnValue = {
18191 |       stackTrace: Runtime.StackTrace;
18192 |     }
18193 |     /**
18194 |      * Stops on the next JavaScript statement.
18195 |      */
18196 |     export type pauseParameters = {
18197 |     }
18198 |     export type pauseReturnValue = {
18199 |     }
18200 |     export type pauseOnAsyncCallParameters = {
18201 |       /**
18202 |        * Debugger will pause when async call with given stack trace is started.
18203 |        */
18204 |       parentStackTraceId: Runtime.StackTraceId;
18205 |     }
18206 |     export type pauseOnAsyncCallReturnValue = {
18207 |     }
18208 |     /**
18209 |      * Removes JavaScript breakpoint.
18210 |      */
18211 |     export type removeBreakpointParameters = {
18212 |       breakpointId: BreakpointId;
18213 |     }
18214 |     export type removeBreakpointReturnValue = {
18215 |     }
18216 |     /**
18217 |      * Restarts particular call frame from the beginning. The old, deprecated
18218 | behavior of `restartFrame` is to stay paused and allow further CDP commands
18219 | after a restart was scheduled. This can cause problems with restarting, so
18220 | we now continue execution immediatly after it has been scheduled until we
18221 | reach the beginning of the restarted frame.
18222 | 
18223 | To stay back-wards compatible, `restartFrame` now expects a `mode`
18224 | parameter to be present. If the `mode` parameter is missing, `restartFrame`
18225 | errors out.
18226 | 
18227 | The various return values are deprecated and `callFrames` is always empty.
18228 | Use the call frames from the `Debugger#paused` events instead, that fires
18229 | once V8 pauses at the beginning of the restarted function.
18230 |      */
18231 |     export type restartFrameParameters = {
18232 |       /**
18233 |        * Call frame identifier to evaluate on.
18234 |        */
18235 |       callFrameId: CallFrameId;
18236 |       /**
18237 |        * The `mode` parameter must be present and set to 'StepInto', otherwise
18238 | `restartFrame` will error out.
18239 |        */
18240 |       mode?: "StepInto";
18241 |     }
18242 |     export type restartFrameReturnValue = {
18243 |       /**
18244 |        * New stack trace.
18245 |        */
18246 |       callFrames: CallFrame[];
18247 |       /**
18248 |        * Async stack trace, if any.
18249 |        */
18250 |       asyncStackTrace?: Runtime.StackTrace;
18251 |       /**
18252 |        * Async stack trace, if any.
18253 |        */
18254 |       asyncStackTraceId?: Runtime.StackTraceId;
18255 |     }
18256 |     /**
18257 |      * Resumes JavaScript execution.
18258 |      */
18259 |     export type resumeParameters = {
18260 |       /**
18261 |        * Set to true to terminate execution upon resuming execution. In contrast
18262 | to Runtime.terminateExecution, this will allows to execute further
18263 | JavaScript (i.e. via evaluation) until execution of the paused code
18264 | is actually resumed, at which point termination is triggered.
18265 | If execution is currently not paused, this parameter has no effect.
18266 |        */
18267 |       terminateOnResume?: boolean;
18268 |     }
18269 |     export type resumeReturnValue = {
18270 |     }
18271 |     /**
18272 |      * Searches for given string in script content.
18273 |      */
18274 |     export type searchInContentParameters = {
18275 |       /**
18276 |        * Id of the script to search in.
18277 |        */
18278 |       scriptId: Runtime.ScriptId;
18279 |       /**
18280 |        * String to search for.
18281 |        */
18282 |       query: string;
18283 |       /**
18284 |        * If true, search is case sensitive.
18285 |        */
18286 |       caseSensitive?: boolean;
18287 |       /**
18288 |        * If true, treats string parameter as regex.
18289 |        */
18290 |       isRegex?: boolean;
18291 |     }
18292 |     export type searchInContentReturnValue = {
18293 |       /**
18294 |        * List of search matches.
18295 |        */
18296 |       result: SearchMatch[];
18297 |     }
18298 |     /**
18299 |      * Enables or disables async call stacks tracking.
18300 |      */
18301 |     export type setAsyncCallStackDepthParameters = {
18302 |       /**
18303 |        * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
18304 | call stacks (default).
18305 |        */
18306 |       maxDepth: number;
18307 |     }
18308 |     export type setAsyncCallStackDepthReturnValue = {
18309 |     }
18310 |     /**
18311 |      * Replace previous blackbox execution contexts with passed ones. Forces backend to skip
18312 | stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by
18313 | performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
18314 |      */
18315 |     export type setBlackboxExecutionContextsParameters = {
18316 |       /**
18317 |        * Array of execution context unique ids for the debugger to ignore.
18318 |        */
18319 |       uniqueIds: string[];
18320 |     }
18321 |     export type setBlackboxExecutionContextsReturnValue = {
18322 |     }
18323 |     /**
18324 |      * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
18325 | scripts with url matching one of the patterns. VM will try to leave blackboxed script by
18326 | performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
18327 |      */
18328 |     export type setBlackboxPatternsParameters = {
18329 |       /**
18330 |        * Array of regexps that will be used to check script url for blackbox state.
18331 |        */
18332 |       patterns: string[];
18333 |       /**
18334 |        * If true, also ignore scripts with no source url.
18335 |        */
18336 |       skipAnonymous?: boolean;
18337 |     }
18338 |     export type setBlackboxPatternsReturnValue = {
18339 |     }
18340 |     /**
18341 |      * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
18342 | scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
18343 | Positions array contains positions where blackbox state is changed. First interval isn't
18344 | blackboxed. Array should be sorted.
18345 |      */
18346 |     export type setBlackboxedRangesParameters = {
18347 |       /**
18348 |        * Id of the script.
18349 |        */
18350 |       scriptId: Runtime.ScriptId;
18351 |       positions: ScriptPosition[];
18352 |     }
18353 |     export type setBlackboxedRangesReturnValue = {
18354 |     }
18355 |     /**
18356 |      * Sets JavaScript breakpoint at a given location.
18357 |      */
18358 |     export type setBreakpointParameters = {
18359 |       /**
18360 |        * Location to set breakpoint in.
18361 |        */
18362 |       location: Location;
18363 |       /**
18364 |        * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
18365 | breakpoint if this expression evaluates to true.
18366 |        */
18367 |       condition?: string;
18368 |     }
18369 |     export type setBreakpointReturnValue = {
18370 |       /**
18371 |        * Id of the created breakpoint for further reference.
18372 |        */
18373 |       breakpointId: BreakpointId;
18374 |       /**
18375 |        * Location this breakpoint resolved into.
18376 |        */
18377 |       actualLocation: Location;
18378 |     }
18379 |     /**
18380 |      * Sets instrumentation breakpoint.
18381 |      */
18382 |     export type setInstrumentationBreakpointParameters = {
18383 |       /**
18384 |        * Instrumentation name.
18385 |        */
18386 |       instrumentation: "beforeScriptExecution"|"beforeScriptWithSourceMapExecution";
18387 |     }
18388 |     export type setInstrumentationBreakpointReturnValue = {
18389 |       /**
18390 |        * Id of the created breakpoint for further reference.
18391 |        */
18392 |       breakpointId: BreakpointId;
18393 |     }
18394 |     /**
18395 |      * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
18396 | command is issued, all existing parsed scripts will have breakpoints resolved and returned in
18397 | `locations` property. Further matching script parsing will result in subsequent
18398 | `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
18399 |      */
18400 |     export type setBreakpointByUrlParameters = {
18401 |       /**
18402 |        * Line number to set breakpoint at.
18403 |        */
18404 |       lineNumber: number;
18405 |       /**
18406 |        * URL of the resources to set breakpoint on.
18407 |        */
18408 |       url?: string;
18409 |       /**
18410 |        * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
18411 | `urlRegex` must be specified.
18412 |        */
18413 |       urlRegex?: string;
18414 |       /**
18415 |        * Script hash of the resources to set breakpoint on.
18416 |        */
18417 |       scriptHash?: string;
18418 |       /**
18419 |        * Offset in the line to set breakpoint at.
18420 |        */
18421 |       columnNumber?: number;
18422 |       /**
18423 |        * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
18424 | breakpoint if this expression evaluates to true.
18425 |        */
18426 |       condition?: string;
18427 |     }
18428 |     export type setBreakpointByUrlReturnValue = {
18429 |       /**
18430 |        * Id of the created breakpoint for further reference.
18431 |        */
18432 |       breakpointId: BreakpointId;
18433 |       /**
18434 |        * List of the locations this breakpoint resolved into upon addition.
18435 |        */
18436 |       locations: Location[];
18437 |     }
18438 |     /**
18439 |      * Sets JavaScript breakpoint before each call to the given function.
18440 | If another function was created from the same source as a given one,
18441 | calling it will also trigger the breakpoint.
18442 |      */
18443 |     export type setBreakpointOnFunctionCallParameters = {
18444 |       /**
18445 |        * Function object id.
18446 |        */
18447 |       objectId: Runtime.RemoteObjectId;
18448 |       /**
18449 |        * Expression to use as a breakpoint condition. When specified, debugger will
18450 | stop on the breakpoint if this expression evaluates to true.
18451 |        */
18452 |       condition?: string;
18453 |     }
18454 |     export type setBreakpointOnFunctionCallReturnValue = {
18455 |       /**
18456 |        * Id of the created breakpoint for further reference.
18457 |        */
18458 |       breakpointId: BreakpointId;
18459 |     }
18460 |     /**
18461 |      * Activates / deactivates all breakpoints on the page.
18462 |      */
18463 |     export type setBreakpointsActiveParameters = {
18464 |       /**
18465 |        * New value for breakpoints active state.
18466 |        */
18467 |       active: boolean;
18468 |     }
18469 |     export type setBreakpointsActiveReturnValue = {
18470 |     }
18471 |     /**
18472 |      * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
18473 | or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
18474 |      */
18475 |     export type setPauseOnExceptionsParameters = {
18476 |       /**
18477 |        * Pause on exceptions mode.
18478 |        */
18479 |       state: "none"|"caught"|"uncaught"|"all";
18480 |     }
18481 |     export type setPauseOnExceptionsReturnValue = {
18482 |     }
18483 |     /**
18484 |      * Changes return value in top frame. Available only at return break position.
18485 |      */
18486 |     export type setReturnValueParameters = {
18487 |       /**
18488 |        * New return value.
18489 |        */
18490 |       newValue: Runtime.CallArgument;
18491 |     }
18492 |     export type setReturnValueReturnValue = {
18493 |     }
18494 |     /**
18495 |      * Edits JavaScript source live.
18496 | 
18497 | In general, functions that are currently on the stack can not be edited with
18498 | a single exception: If the edited function is the top-most stack frame and
18499 | that is the only activation of that function on the stack. In this case
18500 | the live edit will be successful and a `Debugger.restartFrame` for the
18501 | top-most function is automatically triggered.
18502 |      */
18503 |     export type setScriptSourceParameters = {
18504 |       /**
18505 |        * Id of the script to edit.
18506 |        */
18507 |       scriptId: Runtime.ScriptId;
18508 |       /**
18509 |        * New content of the script.
18510 |        */
18511 |       scriptSource: string;
18512 |       /**
18513 |        * If true the change will not actually be applied. Dry run may be used to get result
18514 | description without actually modifying the code.
18515 |        */
18516 |       dryRun?: boolean;
18517 |       /**
18518 |        * If true, then `scriptSource` is allowed to change the function on top of the stack
18519 | as long as the top-most stack frame is the only activation of that function.
18520 |        */
18521 |       allowTopFrameEditing?: boolean;
18522 |     }
18523 |     export type setScriptSourceReturnValue = {
18524 |       /**
18525 |        * New stack trace in case editing has happened while VM was stopped.
18526 |        */
18527 |       callFrames?: CallFrame[];
18528 |       /**
18529 |        * Whether current call stack  was modified after applying the changes.
18530 |        */
18531 |       stackChanged?: boolean;
18532 |       /**
18533 |        * Async stack trace, if any.
18534 |        */
18535 |       asyncStackTrace?: Runtime.StackTrace;
18536 |       /**
18537 |        * Async stack trace, if any.
18538 |        */
18539 |       asyncStackTraceId?: Runtime.StackTraceId;
18540 |       /**
18541 |        * Whether the operation was successful or not. Only `Ok` denotes a
18542 | successful live edit while the other enum variants denote why
18543 | the live edit failed.
18544 |        */
18545 |       status: "Ok"|"CompileError"|"BlockedByActiveGenerator"|"BlockedByActiveFunction"|"BlockedByTopLevelEsModuleChange";
18546 |       /**
18547 |        * Exception details if any. Only present when `status` is `CompileError`.
18548 |        */
18549 |       exceptionDetails?: Runtime.ExceptionDetails;
18550 |     }
18551 |     /**
18552 |      * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
18553 |      */
18554 |     export type setSkipAllPausesParameters = {
18555 |       /**
18556 |        * New value for skip pauses state.
18557 |        */
18558 |       skip: boolean;
18559 |     }
18560 |     export type setSkipAllPausesReturnValue = {
18561 |     }
18562 |     /**
18563 |      * Changes value of variable in a callframe. Object-based scopes are not supported and must be
18564 | mutated manually.
18565 |      */
18566 |     export type setVariableValueParameters = {
18567 |       /**
18568 |        * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
18569 | scope types are allowed. Other scopes could be manipulated manually.
18570 |        */
18571 |       scopeNumber: number;
18572 |       /**
18573 |        * Variable name.
18574 |        */
18575 |       variableName: string;
18576 |       /**
18577 |        * New variable value.
18578 |        */
18579 |       newValue: Runtime.CallArgument;
18580 |       /**
18581 |        * Id of callframe that holds variable.
18582 |        */
18583 |       callFrameId: CallFrameId;
18584 |     }
18585 |     export type setVariableValueReturnValue = {
18586 |     }
18587 |     /**
18588 |      * Steps into the function call.
18589 |      */
18590 |     export type stepIntoParameters = {
18591 |       /**
18592 |        * Debugger will pause on the execution of the first async task which was scheduled
18593 | before next pause.
18594 |        */
18595 |       breakOnAsyncCall?: boolean;
18596 |       /**
18597 |        * The skipList specifies location ranges that should be skipped on step into.
18598 |        */
18599 |       skipList?: LocationRange[];
18600 |     }
18601 |     export type stepIntoReturnValue = {
18602 |     }
18603 |     /**
18604 |      * Steps out of the function call.
18605 |      */
18606 |     export type stepOutParameters = {
18607 |     }
18608 |     export type stepOutReturnValue = {
18609 |     }
18610 |     /**
18611 |      * Steps over the statement.
18612 |      */
18613 |     export type stepOverParameters = {
18614 |       /**
18615 |        * The skipList specifies location ranges that should be skipped on step over.
18616 |        */
18617 |       skipList?: LocationRange[];
18618 |     }
18619 |     export type stepOverReturnValue = {
18620 |     }
18621 |   }
18622 | 
18623 |   export module HeapProfiler {
18624 |     /**
18625 |      * Heap snapshot object id.
18626 |      */
18627 |     export type HeapSnapshotObjectId = string;
18628 |     /**
18629 |      * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
18630 |      */
18631 |     export interface SamplingHeapProfileNode {
18632 |       /**
18633 |        * Function location.
18634 |        */
18635 |       callFrame: Runtime.CallFrame;
18636 |       /**
18637 |        * Allocations size in bytes for the node excluding children.
18638 |        */
18639 |       selfSize: number;
18640 |       /**
18641 |        * Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
18642 |        */
18643 |       id: number;
18644 |       /**
18645 |        * Child nodes.
18646 |        */
18647 |       children: SamplingHeapProfileNode[];
18648 |     }
18649 |     /**
18650 |      * A single sample from a sampling profile.
18651 |      */
18652 |     export interface SamplingHeapProfileSample {
18653 |       /**
18654 |        * Allocation size in bytes attributed to the sample.
18655 |        */
18656 |       size: number;
18657 |       /**
18658 |        * Id of the corresponding profile tree node.
18659 |        */
18660 |       nodeId: number;
18661 |       /**
18662 |        * Time-ordered sample ordinal number. It is unique across all profiles retrieved
18663 | between startSampling and stopSampling.
18664 |        */
18665 |       ordinal: number;
18666 |     }
18667 |     /**
18668 |      * Sampling profile.
18669 |      */
18670 |     export interface SamplingHeapProfile {
18671 |       head: SamplingHeapProfileNode;
18672 |       samples: SamplingHeapProfileSample[];
18673 |     }
18674 | 
18675 |     export type addHeapSnapshotChunkPayload = {
18676 |       chunk: string;
18677 |     }
18678 |     /**
18679 |      * If heap objects tracking has been started then backend may send update for one or more fragments
18680 |      */
18681 |     export type heapStatsUpdatePayload = {
18682 |       /**
18683 |        * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
18684 | index, the second integer is a total count of objects for the fragment, the third integer is
18685 | a total size of the objects for the fragment.
18686 |        */
18687 |       statsUpdate: number[];
18688 |     }
18689 |     /**
18690 |      * If heap objects tracking has been started then backend regularly sends a current value for last
18691 | seen object id and corresponding timestamp. If the were changes in the heap since last event
18692 | then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
18693 |      */
18694 |     export type lastSeenObjectIdPayload = {
18695 |       lastSeenObjectId: number;
18696 |       timestamp: number;
18697 |     }
18698 |     export type reportHeapSnapshotProgressPayload = {
18699 |       done: number;
18700 |       total: number;
18701 |       finished?: boolean;
18702 |     }
18703 |     export type resetProfilesPayload = void;
18704 | 
18705 |     /**
18706 |      * Enables console to refer to the node with given id via $x (see Command Line API for more details
18707 | $x functions).
18708 |      */
18709 |     export type addInspectedHeapObjectParameters = {
18710 |       /**
18711 |        * Heap snapshot object id to be accessible by means of $x command line API.
18712 |        */
18713 |       heapObjectId: HeapSnapshotObjectId;
18714 |     }
18715 |     export type addInspectedHeapObjectReturnValue = {
18716 |     }
18717 |     export type collectGarbageParameters = {
18718 |     }
18719 |     export type collectGarbageReturnValue = {
18720 |     }
18721 |     export type disableParameters = {
18722 |     }
18723 |     export type disableReturnValue = {
18724 |     }
18725 |     export type enableParameters = {
18726 |     }
18727 |     export type enableReturnValue = {
18728 |     }
18729 |     export type getHeapObjectIdParameters = {
18730 |       /**
18731 |        * Identifier of the object to get heap object id for.
18732 |        */
18733 |       objectId: Runtime.RemoteObjectId;
18734 |     }
18735 |     export type getHeapObjectIdReturnValue = {
18736 |       /**
18737 |        * Id of the heap snapshot object corresponding to the passed remote object id.
18738 |        */
18739 |       heapSnapshotObjectId: HeapSnapshotObjectId;
18740 |     }
18741 |     export type getObjectByHeapObjectIdParameters = {
18742 |       objectId: HeapSnapshotObjectId;
18743 |       /**
18744 |        * Symbolic group name that can be used to release multiple objects.
18745 |        */
18746 |       objectGroup?: string;
18747 |     }
18748 |     export type getObjectByHeapObjectIdReturnValue = {
18749 |       /**
18750 |        * Evaluation result.
18751 |        */
18752 |       result: Runtime.RemoteObject;
18753 |     }
18754 |     export type getSamplingProfileParameters = {
18755 |     }
18756 |     export type getSamplingProfileReturnValue = {
18757 |       /**
18758 |        * Return the sampling profile being collected.
18759 |        */
18760 |       profile: SamplingHeapProfile;
18761 |     }
18762 |     export type startSamplingParameters = {
18763 |       /**
18764 |        * Average sample interval in bytes. Poisson distribution is used for the intervals. The
18765 | default value is 32768 bytes.
18766 |        */
18767 |       samplingInterval?: number;
18768 |       /**
18769 |        * By default, the sampling heap profiler reports only objects which are
18770 | still alive when the profile is returned via getSamplingProfile or
18771 | stopSampling, which is useful for determining what functions contribute
18772 | the most to steady-state memory usage. This flag instructs the sampling
18773 | heap profiler to also include information about objects discarded by
18774 | major GC, which will show which functions cause large temporary memory
18775 | usage or long GC pauses.
18776 |        */
18777 |       includeObjectsCollectedByMajorGC?: boolean;
18778 |       /**
18779 |        * By default, the sampling heap profiler reports only objects which are
18780 | still alive when the profile is returned via getSamplingProfile or
18781 | stopSampling, which is useful for determining what functions contribute
18782 | the most to steady-state memory usage. This flag instructs the sampling
18783 | heap profiler to also include information about objects discarded by
18784 | minor GC, which is useful when tuning a latency-sensitive application
18785 | for minimal GC activity.
18786 |        */
18787 |       includeObjectsCollectedByMinorGC?: boolean;
18788 |     }
18789 |     export type startSamplingReturnValue = {
18790 |     }
18791 |     export type startTrackingHeapObjectsParameters = {
18792 |       trackAllocations?: boolean;
18793 |     }
18794 |     export type startTrackingHeapObjectsReturnValue = {
18795 |     }
18796 |     export type stopSamplingParameters = {
18797 |     }
18798 |     export type stopSamplingReturnValue = {
18799 |       /**
18800 |        * Recorded sampling heap profile.
18801 |        */
18802 |       profile: SamplingHeapProfile;
18803 |     }
18804 |     export type stopTrackingHeapObjectsParameters = {
18805 |       /**
18806 |        * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
18807 | when the tracking is stopped.
18808 |        */
18809 |       reportProgress?: boolean;
18810 |       /**
18811 |        * Deprecated in favor of `exposeInternals`.
18812 |        */
18813 |       treatGlobalObjectsAsRoots?: boolean;
18814 |       /**
18815 |        * If true, numerical values are included in the snapshot
18816 |        */
18817 |       captureNumericValue?: boolean;
18818 |       /**
18819 |        * If true, exposes internals of the snapshot.
18820 |        */
18821 |       exposeInternals?: boolean;
18822 |     }
18823 |     export type stopTrackingHeapObjectsReturnValue = {
18824 |     }
18825 |     export type takeHeapSnapshotParameters = {
18826 |       /**
18827 |        * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
18828 |        */
18829 |       reportProgress?: boolean;
18830 |       /**
18831 |        * If true, a raw snapshot without artificial roots will be generated.
18832 | Deprecated in favor of `exposeInternals`.
18833 |        */
18834 |       treatGlobalObjectsAsRoots?: boolean;
18835 |       /**
18836 |        * If true, numerical values are included in the snapshot
18837 |        */
18838 |       captureNumericValue?: boolean;
18839 |       /**
18840 |        * If true, exposes internals of the snapshot.
18841 |        */
18842 |       exposeInternals?: boolean;
18843 |     }
18844 |     export type takeHeapSnapshotReturnValue = {
18845 |     }
18846 |   }
18847 | 
18848 |   export module Profiler {
18849 |     /**
18850 |      * Profile node. Holds callsite information, execution statistics and child nodes.
18851 |      */
18852 |     export interface ProfileNode {
18853 |       /**
18854 |        * Unique id of the node.
18855 |        */
18856 |       id: number;
18857 |       /**
18858 |        * Function location.
18859 |        */
18860 |       callFrame: Runtime.CallFrame;
18861 |       /**
18862 |        * Number of samples where this node was on top of the call stack.
18863 |        */
18864 |       hitCount?: number;
18865 |       /**
18866 |        * Child node ids.
18867 |        */
18868 |       children?: number[];
18869 |       /**
18870 |        * The reason of being not optimized. The function may be deoptimized or marked as don't
18871 | optimize.
18872 |        */
18873 |       deoptReason?: string;
18874 |       /**
18875 |        * An array of source position ticks.
18876 |        */
18877 |       positionTicks?: PositionTickInfo[];
18878 |     }
18879 |     /**
18880 |      * Profile.
18881 |      */
18882 |     export interface Profile {
18883 |       /**
18884 |        * The list of profile nodes. First item is the root node.
18885 |        */
18886 |       nodes: ProfileNode[];
18887 |       /**
18888 |        * Profiling start timestamp in microseconds.
18889 |        */
18890 |       startTime: number;
18891 |       /**
18892 |        * Profiling end timestamp in microseconds.
18893 |        */
18894 |       endTime: number;
18895 |       /**
18896 |        * Ids of samples top nodes.
18897 |        */
18898 |       samples?: number[];
18899 |       /**
18900 |        * Time intervals between adjacent samples in microseconds. The first delta is relative to the
18901 | profile startTime.
18902 |        */
18903 |       timeDeltas?: number[];
18904 |     }
18905 |     /**
18906 |      * Specifies a number of samples attributed to a certain source position.
18907 |      */
18908 |     export interface PositionTickInfo {
18909 |       /**
18910 |        * Source line number (1-based).
18911 |        */
18912 |       line: number;
18913 |       /**
18914 |        * Number of samples attributed to the source line.
18915 |        */
18916 |       ticks: number;
18917 |     }
18918 |     /**
18919 |      * Coverage data for a source range.
18920 |      */
18921 |     export interface CoverageRange {
18922 |       /**
18923 |        * JavaScript script source offset for the range start.
18924 |        */
18925 |       startOffset: number;
18926 |       /**
18927 |        * JavaScript script source offset for the range end.
18928 |        */
18929 |       endOffset: number;
18930 |       /**
18931 |        * Collected execution count of the source range.
18932 |        */
18933 |       count: number;
18934 |     }
18935 |     /**
18936 |      * Coverage data for a JavaScript function.
18937 |      */
18938 |     export interface FunctionCoverage {
18939 |       /**
18940 |        * JavaScript function name.
18941 |        */
18942 |       functionName: string;
18943 |       /**
18944 |        * Source ranges inside the function with coverage data.
18945 |        */
18946 |       ranges: CoverageRange[];
18947 |       /**
18948 |        * Whether coverage data for this function has block granularity.
18949 |        */
18950 |       isBlockCoverage: boolean;
18951 |     }
18952 |     /**
18953 |      * Coverage data for a JavaScript script.
18954 |      */
18955 |     export interface ScriptCoverage {
18956 |       /**
18957 |        * JavaScript script id.
18958 |        */
18959 |       scriptId: Runtime.ScriptId;
18960 |       /**
18961 |        * JavaScript script name or url.
18962 |        */
18963 |       url: string;
18964 |       /**
18965 |        * Functions contained in the script that has coverage data.
18966 |        */
18967 |       functions: FunctionCoverage[];
18968 |     }
18969 | 
18970 |     export type consoleProfileFinishedPayload = {
18971 |       id: string;
18972 |       /**
18973 |        * Location of console.profileEnd().
18974 |        */
18975 |       location: Debugger.Location;
18976 |       profile: Profile;
18977 |       /**
18978 |        * Profile title passed as an argument to console.profile().
18979 |        */
18980 |       title?: string;
18981 |     }
18982 |     /**
18983 |      * Sent when new profile recording is started using console.profile() call.
18984 |      */
18985 |     export type consoleProfileStartedPayload = {
18986 |       id: string;
18987 |       /**
18988 |        * Location of console.profile().
18989 |        */
18990 |       location: Debugger.Location;
18991 |       /**
18992 |        * Profile title passed as an argument to console.profile().
18993 |        */
18994 |       title?: string;
18995 |     }
18996 |     /**
18997 |      * Reports coverage delta since the last poll (either from an event like this, or from
18998 | `takePreciseCoverage` for the current isolate. May only be sent if precise code
18999 | coverage has been started. This event can be trigged by the embedder to, for example,
19000 | trigger collection of coverage data immediately at a certain point in time.
19001 |      */
19002 |     export type preciseCoverageDeltaUpdatePayload = {
19003 |       /**
19004 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
19005 |        */
19006 |       timestamp: number;
19007 |       /**
19008 |        * Identifier for distinguishing coverage events.
19009 |        */
19010 |       occasion: string;
19011 |       /**
19012 |        * Coverage data for the current isolate.
19013 |        */
19014 |       result: ScriptCoverage[];
19015 |     }
19016 | 
19017 |     export type disableParameters = {
19018 |     }
19019 |     export type disableReturnValue = {
19020 |     }
19021 |     export type enableParameters = {
19022 |     }
19023 |     export type enableReturnValue = {
19024 |     }
19025 |     /**
19026 |      * Collect coverage data for the current isolate. The coverage data may be incomplete due to
19027 | garbage collection.
19028 |      */
19029 |     export type getBestEffortCoverageParameters = {
19030 |     }
19031 |     export type getBestEffortCoverageReturnValue = {
19032 |       /**
19033 |        * Coverage data for the current isolate.
19034 |        */
19035 |       result: ScriptCoverage[];
19036 |     }
19037 |     /**
19038 |      * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
19039 |      */
19040 |     export type setSamplingIntervalParameters = {
19041 |       /**
19042 |        * New sampling interval in microseconds.
19043 |        */
19044 |       interval: number;
19045 |     }
19046 |     export type setSamplingIntervalReturnValue = {
19047 |     }
19048 |     export type startParameters = {
19049 |     }
19050 |     export type startReturnValue = {
19051 |     }
19052 |     /**
19053 |      * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
19054 | coverage may be incomplete. Enabling prevents running optimized code and resets execution
19055 | counters.
19056 |      */
19057 |     export type startPreciseCoverageParameters = {
19058 |       /**
19059 |        * Collect accurate call counts beyond simple 'covered' or 'not covered'.
19060 |        */
19061 |       callCount?: boolean;
19062 |       /**
19063 |        * Collect block-based coverage.
19064 |        */
19065 |       detailed?: boolean;
19066 |       /**
19067 |        * Allow the backend to send updates on its own initiative
19068 |        */
19069 |       allowTriggeredUpdates?: boolean;
19070 |     }
19071 |     export type startPreciseCoverageReturnValue = {
19072 |       /**
19073 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
19074 |        */
19075 |       timestamp: number;
19076 |     }
19077 |     export type stopParameters = {
19078 |     }
19079 |     export type stopReturnValue = {
19080 |       /**
19081 |        * Recorded profile.
19082 |        */
19083 |       profile: Profile;
19084 |     }
19085 |     /**
19086 |      * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
19087 | executing optimized code.
19088 |      */
19089 |     export type stopPreciseCoverageParameters = {
19090 |     }
19091 |     export type stopPreciseCoverageReturnValue = {
19092 |     }
19093 |     /**
19094 |      * Collect coverage data for the current isolate, and resets execution counters. Precise code
19095 | coverage needs to have started.
19096 |      */
19097 |     export type takePreciseCoverageParameters = {
19098 |     }
19099 |     export type takePreciseCoverageReturnValue = {
19100 |       /**
19101 |        * Coverage data for the current isolate.
19102 |        */
19103 |       result: ScriptCoverage[];
19104 |       /**
19105 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
19106 |        */
19107 |       timestamp: number;
19108 |     }
19109 |   }
19110 | 
19111 |   /**
19112 |    * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
19113 | Evaluation results are returned as mirror object that expose object type, string representation
19114 | and unique identifier that can be used for further object reference. Original objects are
19115 | maintained in memory unless they are either explicitly released or are released along with the
19116 | other objects in their object group.
19117 |    */
19118 |   export module Runtime {
19119 |     /**
19120 |      * Unique script identifier.
19121 |      */
19122 |     export type ScriptId = string;
19123 |     /**
19124 |      * Represents options for serialization. Overrides `generatePreview` and `returnByValue`.
19125 |      */
19126 |     export interface SerializationOptions {
19127 |       serialization: "deep"|"json"|"idOnly";
19128 |       /**
19129 |        * Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
19130 |        */
19131 |       maxDepth?: number;
19132 |       /**
19133 |        * Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM
19134 | serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`.
19135 | Values can be only of type string or integer.
19136 |        */
19137 |       additionalParameters?: { [key: string]: string };
19138 |     }
19139 |     /**
19140 |      * Represents deep serialized value.
19141 |      */
19142 |     export interface DeepSerializedValue {
19143 |       type: "undefined"|"null"|"string"|"number"|"boolean"|"bigint"|"regexp"|"date"|"symbol"|"array"|"object"|"function"|"map"|"set"|"weakmap"|"weakset"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"node"|"window"|"generator";
19144 |       value?: any;
19145 |       objectId?: string;
19146 |       /**
19147 |        * Set if value reference met more then once during serialization. In such
19148 | case, value is provided only to one of the serialized values. Unique
19149 | per value in the scope of one CDP call.
19150 |        */
19151 |       weakLocalObjectReference?: number;
19152 |     }
19153 |     /**
19154 |      * Unique object identifier.
19155 |      */
19156 |     export type RemoteObjectId = string;
19157 |     /**
19158 |      * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
19159 | `-Infinity`, and bigint literals.
19160 |      */
19161 |     export type UnserializableValue = string;
19162 |     /**
19163 |      * Mirror object referencing original JavaScript object.
19164 |      */
19165 |     export interface RemoteObject {
19166 |       /**
19167 |        * Object type.
19168 |        */
19169 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"bigint";
19170 |       /**
19171 |        * Object subtype hint. Specified for `object` type values only.
19172 | NOTE: If you change anything here, make sure to also update
19173 | `subtype` in `ObjectPreview` and `PropertyPreview` below.
19174 |        */
19175 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
19176 |       /**
19177 |        * Object class (constructor) name. Specified for `object` type values only.
19178 |        */
19179 |       className?: string;
19180 |       /**
19181 |        * Remote object value in case of primitive values or JSON values (if it was requested).
19182 |        */
19183 |       value?: any;
19184 |       /**
19185 |        * Primitive value which can not be JSON-stringified does not have `value`, but gets this
19186 | property.
19187 |        */
19188 |       unserializableValue?: UnserializableValue;
19189 |       /**
19190 |        * String representation of the object.
19191 |        */
19192 |       description?: string;
19193 |       /**
19194 |        * Deep serialized value.
19195 |        */
19196 |       deepSerializedValue?: DeepSerializedValue;
19197 |       /**
19198 |        * Unique object identifier (for non-primitive values).
19199 |        */
19200 |       objectId?: RemoteObjectId;
19201 |       /**
19202 |        * Preview containing abbreviated property values. Specified for `object` type values only.
19203 |        */
19204 |       preview?: ObjectPreview;
19205 |       customPreview?: CustomPreview;
19206 |     }
19207 |     export interface CustomPreview {
19208 |       /**
19209 |        * The JSON-stringified result of formatter.header(object, config) call.
19210 | It contains json ML array that represents RemoteObject.
19211 |        */
19212 |       header: string;
19213 |       /**
19214 |        * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
19215 | contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
19216 | The result value is json ML array.
19217 |        */
19218 |       bodyGetterId?: RemoteObjectId;
19219 |     }
19220 |     /**
19221 |      * Object containing abbreviated remote object value.
19222 |      */
19223 |     export interface ObjectPreview {
19224 |       /**
19225 |        * Object type.
19226 |        */
19227 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"bigint";
19228 |       /**
19229 |        * Object subtype hint. Specified for `object` type values only.
19230 |        */
19231 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
19232 |       /**
19233 |        * String representation of the object.
19234 |        */
19235 |       description?: string;
19236 |       /**
19237 |        * True iff some of the properties or entries of the original object did not fit.
19238 |        */
19239 |       overflow: boolean;
19240 |       /**
19241 |        * List of the properties.
19242 |        */
19243 |       properties: PropertyPreview[];
19244 |       /**
19245 |        * List of the entries. Specified for `map` and `set` subtype values only.
19246 |        */
19247 |       entries?: EntryPreview[];
19248 |     }
19249 |     export interface PropertyPreview {
19250 |       /**
19251 |        * Property name.
19252 |        */
19253 |       name: string;
19254 |       /**
19255 |        * Object type. Accessor means that the property itself is an accessor property.
19256 |        */
19257 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"accessor"|"bigint";
19258 |       /**
19259 |        * User-friendly property value string.
19260 |        */
19261 |       value?: string;
19262 |       /**
19263 |        * Nested value preview.
19264 |        */
19265 |       valuePreview?: ObjectPreview;
19266 |       /**
19267 |        * Object subtype hint. Specified for `object` type values only.
19268 |        */
19269 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue";
19270 |     }
19271 |     export interface EntryPreview {
19272 |       /**
19273 |        * Preview of the key. Specified for map-like collection entries.
19274 |        */
19275 |       key?: ObjectPreview;
19276 |       /**
19277 |        * Preview of the value.
19278 |        */
19279 |       value: ObjectPreview;
19280 |     }
19281 |     /**
19282 |      * Object property descriptor.
19283 |      */
19284 |     export interface PropertyDescriptor {
19285 |       /**
19286 |        * Property name or symbol description.
19287 |        */
19288 |       name: string;
19289 |       /**
19290 |        * The value associated with the property.
19291 |        */
19292 |       value?: RemoteObject;
19293 |       /**
19294 |        * True if the value associated with the property may be changed (data descriptors only).
19295 |        */
19296 |       writable?: boolean;
19297 |       /**
19298 |        * A function which serves as a getter for the property, or `undefined` if there is no getter
19299 | (accessor descriptors only).
19300 |        */
19301 |       get?: RemoteObject;
19302 |       /**
19303 |        * A function which serves as a setter for the property, or `undefined` if there is no setter
19304 | (accessor descriptors only).
19305 |        */
19306 |       set?: RemoteObject;
19307 |       /**
19308 |        * True if the type of this property descriptor may be changed and if the property may be
19309 | deleted from the corresponding object.
19310 |        */
19311 |       configurable: boolean;
19312 |       /**
19313 |        * True if this property shows up during enumeration of the properties on the corresponding
19314 | object.
19315 |        */
19316 |       enumerable: boolean;
19317 |       /**
19318 |        * True if the result was thrown during the evaluation.
19319 |        */
19320 |       wasThrown?: boolean;
19321 |       /**
19322 |        * True if the property is owned for the object.
19323 |        */
19324 |       isOwn?: boolean;
19325 |       /**
19326 |        * Property symbol object, if the property is of the `symbol` type.
19327 |        */
19328 |       symbol?: RemoteObject;
19329 |     }
19330 |     /**
19331 |      * Object internal property descriptor. This property isn't normally visible in JavaScript code.
19332 |      */
19333 |     export interface InternalPropertyDescriptor {
19334 |       /**
19335 |        * Conventional property name.
19336 |        */
19337 |       name: string;
19338 |       /**
19339 |        * The value associated with the property.
19340 |        */
19341 |       value?: RemoteObject;
19342 |     }
19343 |     /**
19344 |      * Object private field descriptor.
19345 |      */
19346 |     export interface PrivatePropertyDescriptor {
19347 |       /**
19348 |        * Private property name.
19349 |        */
19350 |       name: string;
19351 |       /**
19352 |        * The value associated with the private property.
19353 |        */
19354 |       value?: RemoteObject;
19355 |       /**
19356 |        * A function which serves as a getter for the private property,
19357 | or `undefined` if there is no getter (accessor descriptors only).
19358 |        */
19359 |       get?: RemoteObject;
19360 |       /**
19361 |        * A function which serves as a setter for the private property,
19362 | or `undefined` if there is no setter (accessor descriptors only).
19363 |        */
19364 |       set?: RemoteObject;
19365 |     }
19366 |     /**
19367 |      * Represents function call argument. Either remote object id `objectId`, primitive `value`,
19368 | unserializable primitive value or neither of (for undefined) them should be specified.
19369 |      */
19370 |     export interface CallArgument {
19371 |       /**
19372 |        * Primitive value or serializable javascript object.
19373 |        */
19374 |       value?: any;
19375 |       /**
19376 |        * Primitive value which can not be JSON-stringified.
19377 |        */
19378 |       unserializableValue?: UnserializableValue;
19379 |       /**
19380 |        * Remote object handle.
19381 |        */
19382 |       objectId?: RemoteObjectId;
19383 |     }
19384 |     /**
19385 |      * Id of an execution context.
19386 |      */
19387 |     export type ExecutionContextId = number;
19388 |     /**
19389 |      * Description of an isolated world.
19390 |      */
19391 |     export interface ExecutionContextDescription {
19392 |       /**
19393 |        * Unique id of the execution context. It can be used to specify in which execution context
19394 | script evaluation should be performed.
19395 |        */
19396 |       id: ExecutionContextId;
19397 |       /**
19398 |        * Execution context origin.
19399 |        */
19400 |       origin: string;
19401 |       /**
19402 |        * Human readable name describing given context.
19403 |        */
19404 |       name: string;
19405 |       /**
19406 |        * A system-unique execution context identifier. Unlike the id, this is unique across
19407 | multiple processes, so can be reliably used to identify specific context while backend
19408 | performs a cross-process navigation.
19409 |        */
19410 |       uniqueId: string;
19411 |       /**
19412 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
19413 |        */
19414 |       auxData?: { [key: string]: string };
19415 |     }
19416 |     /**
19417 |      * Detailed information about exception (or error) that was thrown during script compilation or
19418 | execution.
19419 |      */
19420 |     export interface ExceptionDetails {
19421 |       /**
19422 |        * Exception id.
19423 |        */
19424 |       exceptionId: number;
19425 |       /**
19426 |        * Exception text, which should be used together with exception object when available.
19427 |        */
19428 |       text: string;
19429 |       /**
19430 |        * Line number of the exception location (0-based).
19431 |        */
19432 |       lineNumber: number;
19433 |       /**
19434 |        * Column number of the exception location (0-based).
19435 |        */
19436 |       columnNumber: number;
19437 |       /**
19438 |        * Script ID of the exception location.
19439 |        */
19440 |       scriptId?: ScriptId;
19441 |       /**
19442 |        * URL of the exception location, to be used when the script was not reported.
19443 |        */
19444 |       url?: string;
19445 |       /**
19446 |        * JavaScript stack trace if available.
19447 |        */
19448 |       stackTrace?: StackTrace;
19449 |       /**
19450 |        * Exception object if available.
19451 |        */
19452 |       exception?: RemoteObject;
19453 |       /**
19454 |        * Identifier of the context where exception happened.
19455 |        */
19456 |       executionContextId?: ExecutionContextId;
19457 |       /**
19458 |        * Dictionary with entries of meta data that the client associated
19459 | with this exception, such as information about associated network
19460 | requests, etc.
19461 |        */
19462 |       exceptionMetaData?: { [key: string]: string };
19463 |     }
19464 |     /**
19465 |      * Number of milliseconds since epoch.
19466 |      */
19467 |     export type Timestamp = number;
19468 |     /**
19469 |      * Number of milliseconds.
19470 |      */
19471 |     export type TimeDelta = number;
19472 |     /**
19473 |      * Stack entry for runtime errors and assertions.
19474 |      */
19475 |     export interface CallFrame {
19476 |       /**
19477 |        * JavaScript function name.
19478 |        */
19479 |       functionName: string;
19480 |       /**
19481 |        * JavaScript script id.
19482 |        */
19483 |       scriptId: ScriptId;
19484 |       /**
19485 |        * JavaScript script name or url.
19486 |        */
19487 |       url: string;
19488 |       /**
19489 |        * JavaScript script line number (0-based).
19490 |        */
19491 |       lineNumber: number;
19492 |       /**
19493 |        * JavaScript script column number (0-based).
19494 |        */
19495 |       columnNumber: number;
19496 |     }
19497 |     /**
19498 |      * Call frames for assertions or error messages.
19499 |      */
19500 |     export interface StackTrace {
19501 |       /**
19502 |        * String label of this stack trace. For async traces this may be a name of the function that
19503 | initiated the async call.
19504 |        */
19505 |       description?: string;
19506 |       /**
19507 |        * JavaScript function name.
19508 |        */
19509 |       callFrames: CallFrame[];
19510 |       /**
19511 |        * Asynchronous JavaScript stack trace that preceded this stack, if available.
19512 |        */
19513 |       parent?: StackTrace;
19514 |       /**
19515 |        * Asynchronous JavaScript stack trace that preceded this stack, if available.
19516 |        */
19517 |       parentId?: StackTraceId;
19518 |     }
19519 |     /**
19520 |      * Unique identifier of current debugger.
19521 |      */
19522 |     export type UniqueDebuggerId = string;
19523 |     /**
19524 |      * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
19525 | allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
19526 |      */
19527 |     export interface StackTraceId {
19528 |       id: string;
19529 |       debuggerId?: UniqueDebuggerId;
19530 |     }
19531 | 
19532 |     /**
19533 |      * Notification is issued every time when binding is called.
19534 |      */
19535 |     export type bindingCalledPayload = {
19536 |       name: string;
19537 |       payload: string;
19538 |       /**
19539 |        * Identifier of the context where the call was made.
19540 |        */
19541 |       executionContextId: ExecutionContextId;
19542 |     }
19543 |     /**
19544 |      * Issued when console API was called.
19545 |      */
19546 |     export type consoleAPICalledPayload = {
19547 |       /**
19548 |        * Type of the call.
19549 |        */
19550 |       type: "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd";
19551 |       /**
19552 |        * Call arguments.
19553 |        */
19554 |       args: RemoteObject[];
19555 |       /**
19556 |        * Identifier of the context where the call was made.
19557 |        */
19558 |       executionContextId: ExecutionContextId;
19559 |       /**
19560 |        * Call timestamp.
19561 |        */
19562 |       timestamp: Timestamp;
19563 |       /**
19564 |        * Stack trace captured when the call was made. The async stack chain is automatically reported for
19565 | the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
19566 | chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
19567 |        */
19568 |       stackTrace?: StackTrace;
19569 |       /**
19570 |        * Console context descriptor for calls on non-default console context (not console.*):
19571 | 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
19572 | on named context.
19573 |        */
19574 |       context?: string;
19575 |     }
19576 |     /**
19577 |      * Issued when unhandled exception was revoked.
19578 |      */
19579 |     export type exceptionRevokedPayload = {
19580 |       /**
19581 |        * Reason describing why exception was revoked.
19582 |        */
19583 |       reason: string;
19584 |       /**
19585 |        * The id of revoked exception, as reported in `exceptionThrown`.
19586 |        */
19587 |       exceptionId: number;
19588 |     }
19589 |     /**
19590 |      * Issued when exception was thrown and unhandled.
19591 |      */
19592 |     export type exceptionThrownPayload = {
19593 |       /**
19594 |        * Timestamp of the exception.
19595 |        */
19596 |       timestamp: Timestamp;
19597 |       exceptionDetails: ExceptionDetails;
19598 |     }
19599 |     /**
19600 |      * Issued when new execution context is created.
19601 |      */
19602 |     export type executionContextCreatedPayload = {
19603 |       /**
19604 |        * A newly created execution context.
19605 |        */
19606 |       context: ExecutionContextDescription;
19607 |     }
19608 |     /**
19609 |      * Issued when execution context is destroyed.
19610 |      */
19611 |     export type executionContextDestroyedPayload = {
19612 |       /**
19613 |        * Id of the destroyed context
19614 |        */
19615 |       executionContextId: ExecutionContextId;
19616 |       /**
19617 |        * Unique Id of the destroyed context
19618 |        */
19619 |       executionContextUniqueId: string;
19620 |     }
19621 |     /**
19622 |      * Issued when all executionContexts were cleared in browser
19623 |      */
19624 |     export type executionContextsClearedPayload = void;
19625 |     /**
19626 |      * Issued when object should be inspected (for example, as a result of inspect() command line API
19627 | call).
19628 |      */
19629 |     export type inspectRequestedPayload = {
19630 |       object: RemoteObject;
19631 |       hints: { [key: string]: string };
19632 |       /**
19633 |        * Identifier of the context where the call was made.
19634 |        */
19635 |       executionContextId?: ExecutionContextId;
19636 |     }
19637 | 
19638 |     /**
19639 |      * Add handler to promise with given promise object id.
19640 |      */
19641 |     export type awaitPromiseParameters = {
19642 |       /**
19643 |        * Identifier of the promise.
19644 |        */
19645 |       promiseObjectId: RemoteObjectId;
19646 |       /**
19647 |        * Whether the result is expected to be a JSON object that should be sent by value.
19648 |        */
19649 |       returnByValue?: boolean;
19650 |       /**
19651 |        * Whether preview should be generated for the result.
19652 |        */
19653 |       generatePreview?: boolean;
19654 |     }
19655 |     export type awaitPromiseReturnValue = {
19656 |       /**
19657 |        * Promise result. Will contain rejected value if promise was rejected.
19658 |        */
19659 |       result: RemoteObject;
19660 |       /**
19661 |        * Exception details if stack strace is available.
19662 |        */
19663 |       exceptionDetails?: ExceptionDetails;
19664 |     }
19665 |     /**
19666 |      * Calls function with given declaration on the given object. Object group of the result is
19667 | inherited from the target object.
19668 |      */
19669 |     export type callFunctionOnParameters = {
19670 |       /**
19671 |        * Declaration of the function to call.
19672 |        */
19673 |       functionDeclaration: string;
19674 |       /**
19675 |        * Identifier of the object to call function on. Either objectId or executionContextId should
19676 | be specified.
19677 |        */
19678 |       objectId?: RemoteObjectId;
19679 |       /**
19680 |        * Call arguments. All call arguments must belong to the same JavaScript world as the target
19681 | object.
19682 |        */
19683 |       arguments?: CallArgument[];
19684 |       /**
19685 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
19686 | execution. Overrides `setPauseOnException` state.
19687 |        */
19688 |       silent?: boolean;
19689 |       /**
19690 |        * Whether the result is expected to be a JSON object which should be sent by value.
19691 | Can be overriden by `serializationOptions`.
19692 |        */
19693 |       returnByValue?: boolean;
19694 |       /**
19695 |        * Whether preview should be generated for the result.
19696 |        */
19697 |       generatePreview?: boolean;
19698 |       /**
19699 |        * Whether execution should be treated as initiated by user in the UI.
19700 |        */
19701 |       userGesture?: boolean;
19702 |       /**
19703 |        * Whether execution should `await` for resulting value and return once awaited promise is
19704 | resolved.
19705 |        */
19706 |       awaitPromise?: boolean;
19707 |       /**
19708 |        * Specifies execution context which global object will be used to call function on. Either
19709 | executionContextId or objectId should be specified.
19710 |        */
19711 |       executionContextId?: ExecutionContextId;
19712 |       /**
19713 |        * Symbolic group name that can be used to release multiple objects. If objectGroup is not
19714 | specified and objectId is, objectGroup will be inherited from object.
19715 |        */
19716 |       objectGroup?: string;
19717 |       /**
19718 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
19719 |        */
19720 |       throwOnSideEffect?: boolean;
19721 |       /**
19722 |        * An alternative way to specify the execution context to call function on.
19723 | Compared to contextId that may be reused across processes, this is guaranteed to be
19724 | system-unique, so it can be used to prevent accidental function call
19725 | in context different than intended (e.g. as a result of navigation across process
19726 | boundaries).
19727 | This is mutually exclusive with `executionContextId`.
19728 |        */
19729 |       uniqueContextId?: string;
19730 |       /**
19731 |        * Specifies the result serialization. If provided, overrides
19732 | `generatePreview` and `returnByValue`.
19733 |        */
19734 |       serializationOptions?: SerializationOptions;
19735 |     }
19736 |     export type callFunctionOnReturnValue = {
19737 |       /**
19738 |        * Call result.
19739 |        */
19740 |       result: RemoteObject;
19741 |       /**
19742 |        * Exception details.
19743 |        */
19744 |       exceptionDetails?: ExceptionDetails;
19745 |     }
19746 |     /**
19747 |      * Compiles expression.
19748 |      */
19749 |     export type compileScriptParameters = {
19750 |       /**
19751 |        * Expression to compile.
19752 |        */
19753 |       expression: string;
19754 |       /**
19755 |        * Source url to be set for the script.
19756 |        */
19757 |       sourceURL: string;
19758 |       /**
19759 |        * Specifies whether the compiled script should be persisted.
19760 |        */
19761 |       persistScript: boolean;
19762 |       /**
19763 |        * Specifies in which execution context to perform script run. If the parameter is omitted the
19764 | evaluation will be performed in the context of the inspected page.
19765 |        */
19766 |       executionContextId?: ExecutionContextId;
19767 |     }
19768 |     export type compileScriptReturnValue = {
19769 |       /**
19770 |        * Id of the script.
19771 |        */
19772 |       scriptId?: ScriptId;
19773 |       /**
19774 |        * Exception details.
19775 |        */
19776 |       exceptionDetails?: ExceptionDetails;
19777 |     }
19778 |     /**
19779 |      * Disables reporting of execution contexts creation.
19780 |      */
19781 |     export type disableParameters = {
19782 |     }
19783 |     export type disableReturnValue = {
19784 |     }
19785 |     /**
19786 |      * Discards collected exceptions and console API calls.
19787 |      */
19788 |     export type discardConsoleEntriesParameters = {
19789 |     }
19790 |     export type discardConsoleEntriesReturnValue = {
19791 |     }
19792 |     /**
19793 |      * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
19794 | When the reporting gets enabled the event will be sent immediately for each existing execution
19795 | context.
19796 |      */
19797 |     export type enableParameters = {
19798 |     }
19799 |     export type enableReturnValue = {
19800 |     }
19801 |     /**
19802 |      * Evaluates expression on global object.
19803 |      */
19804 |     export type evaluateParameters = {
19805 |       /**
19806 |        * Expression to evaluate.
19807 |        */
19808 |       expression: string;
19809 |       /**
19810 |        * Symbolic group name that can be used to release multiple objects.
19811 |        */
19812 |       objectGroup?: string;
19813 |       /**
19814 |        * Determines whether Command Line API should be available during the evaluation.
19815 |        */
19816 |       includeCommandLineAPI?: boolean;
19817 |       /**
19818 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
19819 | execution. Overrides `setPauseOnException` state.
19820 |        */
19821 |       silent?: boolean;
19822 |       /**
19823 |        * Specifies in which execution context to perform evaluation. If the parameter is omitted the
19824 | evaluation will be performed in the context of the inspected page.
19825 | This is mutually exclusive with `uniqueContextId`, which offers an
19826 | alternative way to identify the execution context that is more reliable
19827 | in a multi-process environment.
19828 |        */
19829 |       contextId?: ExecutionContextId;
19830 |       /**
19831 |        * Whether the result is expected to be a JSON object that should be sent by value.
19832 |        */
19833 |       returnByValue?: boolean;
19834 |       /**
19835 |        * Whether preview should be generated for the result.
19836 |        */
19837 |       generatePreview?: boolean;
19838 |       /**
19839 |        * Whether execution should be treated as initiated by user in the UI.
19840 |        */
19841 |       userGesture?: boolean;
19842 |       /**
19843 |        * Whether execution should `await` for resulting value and return once awaited promise is
19844 | resolved.
19845 |        */
19846 |       awaitPromise?: boolean;
19847 |       /**
19848 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
19849 | This implies `disableBreaks` below.
19850 |        */
19851 |       throwOnSideEffect?: boolean;
19852 |       /**
19853 |        * Terminate execution after timing out (number of milliseconds).
19854 |        */
19855 |       timeout?: TimeDelta;
19856 |       /**
19857 |        * Disable breakpoints during execution.
19858 |        */
19859 |       disableBreaks?: boolean;
19860 |       /**
19861 |        * Setting this flag to true enables `let` re-declaration and top-level `await`.
19862 | Note that `let` variables can only be re-declared if they originate from
19863 | `replMode` themselves.
19864 |        */
19865 |       replMode?: boolean;
19866 |       /**
19867 |        * The Content Security Policy (CSP) for the target might block 'unsafe-eval'
19868 | which includes eval(), Function(), setTimeout() and setInterval()
19869 | when called with non-callable arguments. This flag bypasses CSP for this
19870 | evaluation and allows unsafe-eval. Defaults to true.
19871 |        */
19872 |       allowUnsafeEvalBlockedByCSP?: boolean;
19873 |       /**
19874 |        * An alternative way to specify the execution context to evaluate in.
19875 | Compared to contextId that may be reused across processes, this is guaranteed to be
19876 | system-unique, so it can be used to prevent accidental evaluation of the expression
19877 | in context different than intended (e.g. as a result of navigation across process
19878 | boundaries).
19879 | This is mutually exclusive with `contextId`.
19880 |        */
19881 |       uniqueContextId?: string;
19882 |       /**
19883 |        * Specifies the result serialization. If provided, overrides
19884 | `generatePreview` and `returnByValue`.
19885 |        */
19886 |       serializationOptions?: SerializationOptions;
19887 |     }
19888 |     export type evaluateReturnValue = {
19889 |       /**
19890 |        * Evaluation result.
19891 |        */
19892 |       result: RemoteObject;
19893 |       /**
19894 |        * Exception details.
19895 |        */
19896 |       exceptionDetails?: ExceptionDetails;
19897 |     }
19898 |     /**
19899 |      * Returns the isolate id.
19900 |      */
19901 |     export type getIsolateIdParameters = {
19902 |     }
19903 |     export type getIsolateIdReturnValue = {
19904 |       /**
19905 |        * The isolate id.
19906 |        */
19907 |       id: string;
19908 |     }
19909 |     /**
19910 |      * Returns the JavaScript heap usage.
19911 | It is the total usage of the corresponding isolate not scoped to a particular Runtime.
19912 |      */
19913 |     export type getHeapUsageParameters = {
19914 |     }
19915 |     export type getHeapUsageReturnValue = {
19916 |       /**
19917 |        * Used heap size in bytes.
19918 |        */
19919 |       usedSize: number;
19920 |       /**
19921 |        * Allocated heap size in bytes.
19922 |        */
19923 |       totalSize: number;
19924 |     }
19925 |     /**
19926 |      * Returns properties of a given object. Object group of the result is inherited from the target
19927 | object.
19928 |      */
19929 |     export type getPropertiesParameters = {
19930 |       /**
19931 |        * Identifier of the object to return properties for.
19932 |        */
19933 |       objectId: RemoteObjectId;
19934 |       /**
19935 |        * If true, returns properties belonging only to the element itself, not to its prototype
19936 | chain.
19937 |        */
19938 |       ownProperties?: boolean;
19939 |       /**
19940 |        * If true, returns accessor properties (with getter/setter) only; internal properties are not
19941 | returned either.
19942 |        */
19943 |       accessorPropertiesOnly?: boolean;
19944 |       /**
19945 |        * Whether preview should be generated for the results.
19946 |        */
19947 |       generatePreview?: boolean;
19948 |       /**
19949 |        * If true, returns non-indexed properties only.
19950 |        */
19951 |       nonIndexedPropertiesOnly?: boolean;
19952 |     }
19953 |     export type getPropertiesReturnValue = {
19954 |       /**
19955 |        * Object properties.
19956 |        */
19957 |       result: PropertyDescriptor[];
19958 |       /**
19959 |        * Internal object properties (only of the element itself).
19960 |        */
19961 |       internalProperties?: InternalPropertyDescriptor[];
19962 |       /**
19963 |        * Object private properties.
19964 |        */
19965 |       privateProperties?: PrivatePropertyDescriptor[];
19966 |       /**
19967 |        * Exception details.
19968 |        */
19969 |       exceptionDetails?: ExceptionDetails;
19970 |     }
19971 |     /**
19972 |      * Returns all let, const and class variables from global scope.
19973 |      */
19974 |     export type globalLexicalScopeNamesParameters = {
19975 |       /**
19976 |        * Specifies in which execution context to lookup global scope variables.
19977 |        */
19978 |       executionContextId?: ExecutionContextId;
19979 |     }
19980 |     export type globalLexicalScopeNamesReturnValue = {
19981 |       names: string[];
19982 |     }
19983 |     export type queryObjectsParameters = {
19984 |       /**
19985 |        * Identifier of the prototype to return objects for.
19986 |        */
19987 |       prototypeObjectId: RemoteObjectId;
19988 |       /**
19989 |        * Symbolic group name that can be used to release the results.
19990 |        */
19991 |       objectGroup?: string;
19992 |     }
19993 |     export type queryObjectsReturnValue = {
19994 |       /**
19995 |        * Array with objects.
19996 |        */
19997 |       objects: RemoteObject;
19998 |     }
19999 |     /**
20000 |      * Releases remote object with given id.
20001 |      */
20002 |     export type releaseObjectParameters = {
20003 |       /**
20004 |        * Identifier of the object to release.
20005 |        */
20006 |       objectId: RemoteObjectId;
20007 |     }
20008 |     export type releaseObjectReturnValue = {
20009 |     }
20010 |     /**
20011 |      * Releases all remote objects that belong to a given group.
20012 |      */
20013 |     export type releaseObjectGroupParameters = {
20014 |       /**
20015 |        * Symbolic object group name.
20016 |        */
20017 |       objectGroup: string;
20018 |     }
20019 |     export type releaseObjectGroupReturnValue = {
20020 |     }
20021 |     /**
20022 |      * Tells inspected instance to run if it was waiting for debugger to attach.
20023 |      */
20024 |     export type runIfWaitingForDebuggerParameters = {
20025 |     }
20026 |     export type runIfWaitingForDebuggerReturnValue = {
20027 |     }
20028 |     /**
20029 |      * Runs script with given id in a given context.
20030 |      */
20031 |     export type runScriptParameters = {
20032 |       /**
20033 |        * Id of the script to run.
20034 |        */
20035 |       scriptId: ScriptId;
20036 |       /**
20037 |        * Specifies in which execution context to perform script run. If the parameter is omitted the
20038 | evaluation will be performed in the context of the inspected page.
20039 |        */
20040 |       executionContextId?: ExecutionContextId;
20041 |       /**
20042 |        * Symbolic group name that can be used to release multiple objects.
20043 |        */
20044 |       objectGroup?: string;
20045 |       /**
20046 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
20047 | execution. Overrides `setPauseOnException` state.
20048 |        */
20049 |       silent?: boolean;
20050 |       /**
20051 |        * Determines whether Command Line API should be available during the evaluation.
20052 |        */
20053 |       includeCommandLineAPI?: boolean;
20054 |       /**
20055 |        * Whether the result is expected to be a JSON object which should be sent by value.
20056 |        */
20057 |       returnByValue?: boolean;
20058 |       /**
20059 |        * Whether preview should be generated for the result.
20060 |        */
20061 |       generatePreview?: boolean;
20062 |       /**
20063 |        * Whether execution should `await` for resulting value and return once awaited promise is
20064 | resolved.
20065 |        */
20066 |       awaitPromise?: boolean;
20067 |     }
20068 |     export type runScriptReturnValue = {
20069 |       /**
20070 |        * Run result.
20071 |        */
20072 |       result: RemoteObject;
20073 |       /**
20074 |        * Exception details.
20075 |        */
20076 |       exceptionDetails?: ExceptionDetails;
20077 |     }
20078 |     /**
20079 |      * Enables or disables async call stacks tracking.
20080 |      */
20081 |     export type setAsyncCallStackDepthParameters = {
20082 |       /**
20083 |        * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
20084 | call stacks (default).
20085 |        */
20086 |       maxDepth: number;
20087 |     }
20088 |     export type setAsyncCallStackDepthReturnValue = {
20089 |     }
20090 |     export type setCustomObjectFormatterEnabledParameters = {
20091 |       enabled: boolean;
20092 |     }
20093 |     export type setCustomObjectFormatterEnabledReturnValue = {
20094 |     }
20095 |     export type setMaxCallStackSizeToCaptureParameters = {
20096 |       size: number;
20097 |     }
20098 |     export type setMaxCallStackSizeToCaptureReturnValue = {
20099 |     }
20100 |     /**
20101 |      * Terminate current or next JavaScript execution.
20102 | Will cancel the termination when the outer-most script execution ends.
20103 |      */
20104 |     export type terminateExecutionParameters = {
20105 |     }
20106 |     export type terminateExecutionReturnValue = {
20107 |     }
20108 |     /**
20109 |      * If executionContextId is empty, adds binding with the given name on the
20110 | global objects of all inspected contexts, including those created later,
20111 | bindings survive reloads.
20112 | Binding function takes exactly one argument, this argument should be string,
20113 | in case of any other input, function throws an exception.
20114 | Each binding function call produces Runtime.bindingCalled notification.
20115 |      */
20116 |     export type addBindingParameters = {
20117 |       name: string;
20118 |       /**
20119 |        * If specified, the binding would only be exposed to the specified
20120 | execution context. If omitted and `executionContextName` is not set,
20121 | the binding is exposed to all execution contexts of the target.
20122 | This parameter is mutually exclusive with `executionContextName`.
20123 | Deprecated in favor of `executionContextName` due to an unclear use case
20124 | and bugs in implementation (crbug.com/1169639). `executionContextId` will be
20125 | removed in the future.
20126 |        */
20127 |       executionContextId?: ExecutionContextId;
20128 |       /**
20129 |        * If specified, the binding is exposed to the executionContext with
20130 | matching name, even for contexts created after the binding is added.
20131 | See also `ExecutionContext.name` and `worldName` parameter to
20132 | `Page.addScriptToEvaluateOnNewDocument`.
20133 | This parameter is mutually exclusive with `executionContextId`.
20134 |        */
20135 |       executionContextName?: string;
20136 |     }
20137 |     export type addBindingReturnValue = {
20138 |     }
20139 |     /**
20140 |      * This method does not remove binding function from global object but
20141 | unsubscribes current runtime agent from Runtime.bindingCalled notifications.
20142 |      */
20143 |     export type removeBindingParameters = {
20144 |       name: string;
20145 |     }
20146 |     export type removeBindingReturnValue = {
20147 |     }
20148 |     /**
20149 |      * This method tries to lookup and populate exception details for a
20150 | JavaScript Error object.
20151 | Note that the stackTrace portion of the resulting exceptionDetails will
20152 | only be populated if the Runtime domain was enabled at the time when the
20153 | Error was thrown.
20154 |      */
20155 |     export type getExceptionDetailsParameters = {
20156 |       /**
20157 |        * The error object for which to resolve the exception details.
20158 |        */
20159 |       errorObjectId: RemoteObjectId;
20160 |     }
20161 |     export type getExceptionDetailsReturnValue = {
20162 |       exceptionDetails?: ExceptionDetails;
20163 |     }
20164 |   }
20165 | 
20166 |   /**
20167 |    * This domain is deprecated.
20168 |    */
20169 |   export module Schema {
20170 |     /**
20171 |      * Description of the protocol domain.
20172 |      */
20173 |     export interface Domain {
20174 |       /**
20175 |        * Domain name.
20176 |        */
20177 |       name: string;
20178 |       /**
20179 |        * Domain version.
20180 |        */
20181 |       version: string;
20182 |     }
20183 | 
20184 | 
20185 |     /**
20186 |      * Returns supported domains.
20187 |      */
20188 |     export type getDomainsParameters = {
20189 |     }
20190 |     export type getDomainsReturnValue = {
20191 |       /**
20192 |        * List of supported domains.
20193 |        */
20194 |       domains: Domain[];
20195 |     }
20196 |   }
20197 | 
20198 |   export interface Events {
20199 |     "Accessibility.loadComplete": Accessibility.loadCompletePayload;
20200 |     "Accessibility.nodesUpdated": Accessibility.nodesUpdatedPayload;
20201 |     "Animation.animationCanceled": Animation.animationCanceledPayload;
20202 |     "Animation.animationCreated": Animation.animationCreatedPayload;
20203 |     "Animation.animationStarted": Animation.animationStartedPayload;
20204 |     "Animation.animationUpdated": Animation.animationUpdatedPayload;
20205 |     "Audits.issueAdded": Audits.issueAddedPayload;
20206 |     "Autofill.addressFormFilled": Autofill.addressFormFilledPayload;
20207 |     "BackgroundService.recordingStateChanged": BackgroundService.recordingStateChangedPayload;
20208 |     "BackgroundService.backgroundServiceEventReceived": BackgroundService.backgroundServiceEventReceivedPayload;
20209 |     "Browser.downloadWillBegin": Browser.downloadWillBeginPayload;
20210 |     "Browser.downloadProgress": Browser.downloadProgressPayload;
20211 |     "CSS.fontsUpdated": CSS.fontsUpdatedPayload;
20212 |     "CSS.mediaQueryResultChanged": CSS.mediaQueryResultChangedPayload;
20213 |     "CSS.styleSheetAdded": CSS.styleSheetAddedPayload;
20214 |     "CSS.styleSheetChanged": CSS.styleSheetChangedPayload;
20215 |     "CSS.styleSheetRemoved": CSS.styleSheetRemovedPayload;
20216 |     "Cast.sinksUpdated": Cast.sinksUpdatedPayload;
20217 |     "Cast.issueUpdated": Cast.issueUpdatedPayload;
20218 |     "DOM.attributeModified": DOM.attributeModifiedPayload;
20219 |     "DOM.attributeRemoved": DOM.attributeRemovedPayload;
20220 |     "DOM.characterDataModified": DOM.characterDataModifiedPayload;
20221 |     "DOM.childNodeCountUpdated": DOM.childNodeCountUpdatedPayload;
20222 |     "DOM.childNodeInserted": DOM.childNodeInsertedPayload;
20223 |     "DOM.childNodeRemoved": DOM.childNodeRemovedPayload;
20224 |     "DOM.distributedNodesUpdated": DOM.distributedNodesUpdatedPayload;
20225 |     "DOM.documentUpdated": DOM.documentUpdatedPayload;
20226 |     "DOM.inlineStyleInvalidated": DOM.inlineStyleInvalidatedPayload;
20227 |     "DOM.pseudoElementAdded": DOM.pseudoElementAddedPayload;
20228 |     "DOM.topLayerElementsUpdated": DOM.topLayerElementsUpdatedPayload;
20229 |     "DOM.scrollableFlagUpdated": DOM.scrollableFlagUpdatedPayload;
20230 |     "DOM.pseudoElementRemoved": DOM.pseudoElementRemovedPayload;
20231 |     "DOM.setChildNodes": DOM.setChildNodesPayload;
20232 |     "DOM.shadowRootPopped": DOM.shadowRootPoppedPayload;
20233 |     "DOM.shadowRootPushed": DOM.shadowRootPushedPayload;
20234 |     "DOMStorage.domStorageItemAdded": DOMStorage.domStorageItemAddedPayload;
20235 |     "DOMStorage.domStorageItemRemoved": DOMStorage.domStorageItemRemovedPayload;
20236 |     "DOMStorage.domStorageItemUpdated": DOMStorage.domStorageItemUpdatedPayload;
20237 |     "DOMStorage.domStorageItemsCleared": DOMStorage.domStorageItemsClearedPayload;
20238 |     "Database.addDatabase": Database.addDatabasePayload;
20239 |     "Emulation.virtualTimeBudgetExpired": Emulation.virtualTimeBudgetExpiredPayload;
20240 |     "Input.dragIntercepted": Input.dragInterceptedPayload;
20241 |     "Inspector.detached": Inspector.detachedPayload;
20242 |     "Inspector.targetCrashed": Inspector.targetCrashedPayload;
20243 |     "Inspector.targetReloadedAfterCrash": Inspector.targetReloadedAfterCrashPayload;
20244 |     "LayerTree.layerPainted": LayerTree.layerPaintedPayload;
20245 |     "LayerTree.layerTreeDidChange": LayerTree.layerTreeDidChangePayload;
20246 |     "Log.entryAdded": Log.entryAddedPayload;
20247 |     "Network.dataReceived": Network.dataReceivedPayload;
20248 |     "Network.eventSourceMessageReceived": Network.eventSourceMessageReceivedPayload;
20249 |     "Network.loadingFailed": Network.loadingFailedPayload;
20250 |     "Network.loadingFinished": Network.loadingFinishedPayload;
20251 |     "Network.requestIntercepted": Network.requestInterceptedPayload;
20252 |     "Network.requestServedFromCache": Network.requestServedFromCachePayload;
20253 |     "Network.requestWillBeSent": Network.requestWillBeSentPayload;
20254 |     "Network.resourceChangedPriority": Network.resourceChangedPriorityPayload;
20255 |     "Network.signedExchangeReceived": Network.signedExchangeReceivedPayload;
20256 |     "Network.responseReceived": Network.responseReceivedPayload;
20257 |     "Network.webSocketClosed": Network.webSocketClosedPayload;
20258 |     "Network.webSocketCreated": Network.webSocketCreatedPayload;
20259 |     "Network.webSocketFrameError": Network.webSocketFrameErrorPayload;
20260 |     "Network.webSocketFrameReceived": Network.webSocketFrameReceivedPayload;
20261 |     "Network.webSocketFrameSent": Network.webSocketFrameSentPayload;
20262 |     "Network.webSocketHandshakeResponseReceived": Network.webSocketHandshakeResponseReceivedPayload;
20263 |     "Network.webSocketWillSendHandshakeRequest": Network.webSocketWillSendHandshakeRequestPayload;
20264 |     "Network.webTransportCreated": Network.webTransportCreatedPayload;
20265 |     "Network.webTransportConnectionEstablished": Network.webTransportConnectionEstablishedPayload;
20266 |     "Network.webTransportClosed": Network.webTransportClosedPayload;
20267 |     "Network.requestWillBeSentExtraInfo": Network.requestWillBeSentExtraInfoPayload;
20268 |     "Network.responseReceivedExtraInfo": Network.responseReceivedExtraInfoPayload;
20269 |     "Network.responseReceivedEarlyHints": Network.responseReceivedEarlyHintsPayload;
20270 |     "Network.trustTokenOperationDone": Network.trustTokenOperationDonePayload;
20271 |     "Network.policyUpdated": Network.policyUpdatedPayload;
20272 |     "Network.subresourceWebBundleMetadataReceived": Network.subresourceWebBundleMetadataReceivedPayload;
20273 |     "Network.subresourceWebBundleMetadataError": Network.subresourceWebBundleMetadataErrorPayload;
20274 |     "Network.subresourceWebBundleInnerResponseParsed": Network.subresourceWebBundleInnerResponseParsedPayload;
20275 |     "Network.subresourceWebBundleInnerResponseError": Network.subresourceWebBundleInnerResponseErrorPayload;
20276 |     "Network.reportingApiReportAdded": Network.reportingApiReportAddedPayload;
20277 |     "Network.reportingApiReportUpdated": Network.reportingApiReportUpdatedPayload;
20278 |     "Network.reportingApiEndpointsChangedForOrigin": Network.reportingApiEndpointsChangedForOriginPayload;
20279 |     "Overlay.inspectNodeRequested": Overlay.inspectNodeRequestedPayload;
20280 |     "Overlay.nodeHighlightRequested": Overlay.nodeHighlightRequestedPayload;
20281 |     "Overlay.screenshotRequested": Overlay.screenshotRequestedPayload;
20282 |     "Overlay.inspectModeCanceled": Overlay.inspectModeCanceledPayload;
20283 |     "Page.domContentEventFired": Page.domContentEventFiredPayload;
20284 |     "Page.fileChooserOpened": Page.fileChooserOpenedPayload;
20285 |     "Page.frameAttached": Page.frameAttachedPayload;
20286 |     "Page.frameClearedScheduledNavigation": Page.frameClearedScheduledNavigationPayload;
20287 |     "Page.frameDetached": Page.frameDetachedPayload;
20288 |     "Page.frameSubtreeWillBeDetached": Page.frameSubtreeWillBeDetachedPayload;
20289 |     "Page.frameNavigated": Page.frameNavigatedPayload;
20290 |     "Page.documentOpened": Page.documentOpenedPayload;
20291 |     "Page.frameResized": Page.frameResizedPayload;
20292 |     "Page.frameRequestedNavigation": Page.frameRequestedNavigationPayload;
20293 |     "Page.frameScheduledNavigation": Page.frameScheduledNavigationPayload;
20294 |     "Page.frameStartedLoading": Page.frameStartedLoadingPayload;
20295 |     "Page.frameStoppedLoading": Page.frameStoppedLoadingPayload;
20296 |     "Page.downloadWillBegin": Page.downloadWillBeginPayload;
20297 |     "Page.downloadProgress": Page.downloadProgressPayload;
20298 |     "Page.interstitialHidden": Page.interstitialHiddenPayload;
20299 |     "Page.interstitialShown": Page.interstitialShownPayload;
20300 |     "Page.javascriptDialogClosed": Page.javascriptDialogClosedPayload;
20301 |     "Page.javascriptDialogOpening": Page.javascriptDialogOpeningPayload;
20302 |     "Page.lifecycleEvent": Page.lifecycleEventPayload;
20303 |     "Page.backForwardCacheNotUsed": Page.backForwardCacheNotUsedPayload;
20304 |     "Page.loadEventFired": Page.loadEventFiredPayload;
20305 |     "Page.navigatedWithinDocument": Page.navigatedWithinDocumentPayload;
20306 |     "Page.screencastFrame": Page.screencastFramePayload;
20307 |     "Page.screencastVisibilityChanged": Page.screencastVisibilityChangedPayload;
20308 |     "Page.windowOpen": Page.windowOpenPayload;
20309 |     "Page.compilationCacheProduced": Page.compilationCacheProducedPayload;
20310 |     "Performance.metrics": Performance.metricsPayload;
20311 |     "PerformanceTimeline.timelineEventAdded": PerformanceTimeline.timelineEventAddedPayload;
20312 |     "Security.certificateError": Security.certificateErrorPayload;
20313 |     "Security.visibleSecurityStateChanged": Security.visibleSecurityStateChangedPayload;
20314 |     "Security.securityStateChanged": Security.securityStateChangedPayload;
20315 |     "ServiceWorker.workerErrorReported": ServiceWorker.workerErrorReportedPayload;
20316 |     "ServiceWorker.workerRegistrationUpdated": ServiceWorker.workerRegistrationUpdatedPayload;
20317 |     "ServiceWorker.workerVersionUpdated": ServiceWorker.workerVersionUpdatedPayload;
20318 |     "Storage.cacheStorageContentUpdated": Storage.cacheStorageContentUpdatedPayload;
20319 |     "Storage.cacheStorageListUpdated": Storage.cacheStorageListUpdatedPayload;
20320 |     "Storage.indexedDBContentUpdated": Storage.indexedDBContentUpdatedPayload;
20321 |     "Storage.indexedDBListUpdated": Storage.indexedDBListUpdatedPayload;
20322 |     "Storage.interestGroupAccessed": Storage.interestGroupAccessedPayload;
20323 |     "Storage.interestGroupAuctionEventOccurred": Storage.interestGroupAuctionEventOccurredPayload;
20324 |     "Storage.interestGroupAuctionNetworkRequestCreated": Storage.interestGroupAuctionNetworkRequestCreatedPayload;
20325 |     "Storage.sharedStorageAccessed": Storage.sharedStorageAccessedPayload;
20326 |     "Storage.storageBucketCreatedOrUpdated": Storage.storageBucketCreatedOrUpdatedPayload;
20327 |     "Storage.storageBucketDeleted": Storage.storageBucketDeletedPayload;
20328 |     "Storage.attributionReportingSourceRegistered": Storage.attributionReportingSourceRegisteredPayload;
20329 |     "Storage.attributionReportingTriggerRegistered": Storage.attributionReportingTriggerRegisteredPayload;
20330 |     "Target.attachedToTarget": Target.attachedToTargetPayload;
20331 |     "Target.detachedFromTarget": Target.detachedFromTargetPayload;
20332 |     "Target.receivedMessageFromTarget": Target.receivedMessageFromTargetPayload;
20333 |     "Target.targetCreated": Target.targetCreatedPayload;
20334 |     "Target.targetDestroyed": Target.targetDestroyedPayload;
20335 |     "Target.targetCrashed": Target.targetCrashedPayload;
20336 |     "Target.targetInfoChanged": Target.targetInfoChangedPayload;
20337 |     "Tethering.accepted": Tethering.acceptedPayload;
20338 |     "Tracing.bufferUsage": Tracing.bufferUsagePayload;
20339 |     "Tracing.dataCollected": Tracing.dataCollectedPayload;
20340 |     "Tracing.tracingComplete": Tracing.tracingCompletePayload;
20341 |     "Fetch.requestPaused": Fetch.requestPausedPayload;
20342 |     "Fetch.authRequired": Fetch.authRequiredPayload;
20343 |     "WebAudio.contextCreated": WebAudio.contextCreatedPayload;
20344 |     "WebAudio.contextWillBeDestroyed": WebAudio.contextWillBeDestroyedPayload;
20345 |     "WebAudio.contextChanged": WebAudio.contextChangedPayload;
20346 |     "WebAudio.audioListenerCreated": WebAudio.audioListenerCreatedPayload;
20347 |     "WebAudio.audioListenerWillBeDestroyed": WebAudio.audioListenerWillBeDestroyedPayload;
20348 |     "WebAudio.audioNodeCreated": WebAudio.audioNodeCreatedPayload;
20349 |     "WebAudio.audioNodeWillBeDestroyed": WebAudio.audioNodeWillBeDestroyedPayload;
20350 |     "WebAudio.audioParamCreated": WebAudio.audioParamCreatedPayload;
20351 |     "WebAudio.audioParamWillBeDestroyed": WebAudio.audioParamWillBeDestroyedPayload;
20352 |     "WebAudio.nodesConnected": WebAudio.nodesConnectedPayload;
20353 |     "WebAudio.nodesDisconnected": WebAudio.nodesDisconnectedPayload;
20354 |     "WebAudio.nodeParamConnected": WebAudio.nodeParamConnectedPayload;
20355 |     "WebAudio.nodeParamDisconnected": WebAudio.nodeParamDisconnectedPayload;
20356 |     "WebAuthn.credentialAdded": WebAuthn.credentialAddedPayload;
20357 |     "WebAuthn.credentialDeleted": WebAuthn.credentialDeletedPayload;
20358 |     "WebAuthn.credentialUpdated": WebAuthn.credentialUpdatedPayload;
20359 |     "WebAuthn.credentialAsserted": WebAuthn.credentialAssertedPayload;
20360 |     "Media.playerPropertiesChanged": Media.playerPropertiesChangedPayload;
20361 |     "Media.playerEventsAdded": Media.playerEventsAddedPayload;
20362 |     "Media.playerMessagesLogged": Media.playerMessagesLoggedPayload;
20363 |     "Media.playerErrorsRaised": Media.playerErrorsRaisedPayload;
20364 |     "Media.playersCreated": Media.playersCreatedPayload;
20365 |     "DeviceAccess.deviceRequestPrompted": DeviceAccess.deviceRequestPromptedPayload;
20366 |     "Preload.ruleSetUpdated": Preload.ruleSetUpdatedPayload;
20367 |     "Preload.ruleSetRemoved": Preload.ruleSetRemovedPayload;
20368 |     "Preload.preloadEnabledStateUpdated": Preload.preloadEnabledStateUpdatedPayload;
20369 |     "Preload.prefetchStatusUpdated": Preload.prefetchStatusUpdatedPayload;
20370 |     "Preload.prerenderStatusUpdated": Preload.prerenderStatusUpdatedPayload;
20371 |     "Preload.preloadingAttemptSourcesUpdated": Preload.preloadingAttemptSourcesUpdatedPayload;
20372 |     "FedCm.dialogShown": FedCm.dialogShownPayload;
20373 |     "FedCm.dialogClosed": FedCm.dialogClosedPayload;
20374 |     "Console.messageAdded": Console.messageAddedPayload;
20375 |     "Debugger.breakpointResolved": Debugger.breakpointResolvedPayload;
20376 |     "Debugger.paused": Debugger.pausedPayload;
20377 |     "Debugger.resumed": Debugger.resumedPayload;
20378 |     "Debugger.scriptFailedToParse": Debugger.scriptFailedToParsePayload;
20379 |     "Debugger.scriptParsed": Debugger.scriptParsedPayload;
20380 |     "HeapProfiler.addHeapSnapshotChunk": HeapProfiler.addHeapSnapshotChunkPayload;
20381 |     "HeapProfiler.heapStatsUpdate": HeapProfiler.heapStatsUpdatePayload;
20382 |     "HeapProfiler.lastSeenObjectId": HeapProfiler.lastSeenObjectIdPayload;
20383 |     "HeapProfiler.reportHeapSnapshotProgress": HeapProfiler.reportHeapSnapshotProgressPayload;
20384 |     "HeapProfiler.resetProfiles": HeapProfiler.resetProfilesPayload;
20385 |     "Profiler.consoleProfileFinished": Profiler.consoleProfileFinishedPayload;
20386 |     "Profiler.consoleProfileStarted": Profiler.consoleProfileStartedPayload;
20387 |     "Profiler.preciseCoverageDeltaUpdate": Profiler.preciseCoverageDeltaUpdatePayload;
20388 |     "Runtime.bindingCalled": Runtime.bindingCalledPayload;
20389 |     "Runtime.consoleAPICalled": Runtime.consoleAPICalledPayload;
20390 |     "Runtime.exceptionRevoked": Runtime.exceptionRevokedPayload;
20391 |     "Runtime.exceptionThrown": Runtime.exceptionThrownPayload;
20392 |     "Runtime.executionContextCreated": Runtime.executionContextCreatedPayload;
20393 |     "Runtime.executionContextDestroyed": Runtime.executionContextDestroyedPayload;
20394 |     "Runtime.executionContextsCleared": Runtime.executionContextsClearedPayload;
20395 |     "Runtime.inspectRequested": Runtime.inspectRequestedPayload;
20396 |   }
20397 |   export interface CommandParameters {
20398 |     "Accessibility.disable": Accessibility.disableParameters;
20399 |     "Accessibility.enable": Accessibility.enableParameters;
20400 |     "Accessibility.getPartialAXTree": Accessibility.getPartialAXTreeParameters;
20401 |     "Accessibility.getFullAXTree": Accessibility.getFullAXTreeParameters;
20402 |     "Accessibility.getRootAXNode": Accessibility.getRootAXNodeParameters;
20403 |     "Accessibility.getAXNodeAndAncestors": Accessibility.getAXNodeAndAncestorsParameters;
20404 |     "Accessibility.getChildAXNodes": Accessibility.getChildAXNodesParameters;
20405 |     "Accessibility.queryAXTree": Accessibility.queryAXTreeParameters;
20406 |     "Animation.disable": Animation.disableParameters;
20407 |     "Animation.enable": Animation.enableParameters;
20408 |     "Animation.getCurrentTime": Animation.getCurrentTimeParameters;
20409 |     "Animation.getPlaybackRate": Animation.getPlaybackRateParameters;
20410 |     "Animation.releaseAnimations": Animation.releaseAnimationsParameters;
20411 |     "Animation.resolveAnimation": Animation.resolveAnimationParameters;
20412 |     "Animation.seekAnimations": Animation.seekAnimationsParameters;
20413 |     "Animation.setPaused": Animation.setPausedParameters;
20414 |     "Animation.setPlaybackRate": Animation.setPlaybackRateParameters;
20415 |     "Animation.setTiming": Animation.setTimingParameters;
20416 |     "Audits.getEncodedResponse": Audits.getEncodedResponseParameters;
20417 |     "Audits.disable": Audits.disableParameters;
20418 |     "Audits.enable": Audits.enableParameters;
20419 |     "Audits.checkContrast": Audits.checkContrastParameters;
20420 |     "Audits.checkFormsIssues": Audits.checkFormsIssuesParameters;
20421 |     "Extensions.loadUnpacked": Extensions.loadUnpackedParameters;
20422 |     "Extensions.getStorageItems": Extensions.getStorageItemsParameters;
20423 |     "Extensions.removeStorageItems": Extensions.removeStorageItemsParameters;
20424 |     "Extensions.clearStorageItems": Extensions.clearStorageItemsParameters;
20425 |     "Extensions.setStorageItems": Extensions.setStorageItemsParameters;
20426 |     "Autofill.trigger": Autofill.triggerParameters;
20427 |     "Autofill.setAddresses": Autofill.setAddressesParameters;
20428 |     "Autofill.disable": Autofill.disableParameters;
20429 |     "Autofill.enable": Autofill.enableParameters;
20430 |     "BackgroundService.startObserving": BackgroundService.startObservingParameters;
20431 |     "BackgroundService.stopObserving": BackgroundService.stopObservingParameters;
20432 |     "BackgroundService.setRecording": BackgroundService.setRecordingParameters;
20433 |     "BackgroundService.clearEvents": BackgroundService.clearEventsParameters;
20434 |     "Browser.setPermission": Browser.setPermissionParameters;
20435 |     "Browser.grantPermissions": Browser.grantPermissionsParameters;
20436 |     "Browser.resetPermissions": Browser.resetPermissionsParameters;
20437 |     "Browser.setDownloadBehavior": Browser.setDownloadBehaviorParameters;
20438 |     "Browser.cancelDownload": Browser.cancelDownloadParameters;
20439 |     "Browser.close": Browser.closeParameters;
20440 |     "Browser.crash": Browser.crashParameters;
20441 |     "Browser.crashGpuProcess": Browser.crashGpuProcessParameters;
20442 |     "Browser.getVersion": Browser.getVersionParameters;
20443 |     "Browser.getBrowserCommandLine": Browser.getBrowserCommandLineParameters;
20444 |     "Browser.getHistograms": Browser.getHistogramsParameters;
20445 |     "Browser.getHistogram": Browser.getHistogramParameters;
20446 |     "Browser.getWindowBounds": Browser.getWindowBoundsParameters;
20447 |     "Browser.getWindowForTarget": Browser.getWindowForTargetParameters;
20448 |     "Browser.setWindowBounds": Browser.setWindowBoundsParameters;
20449 |     "Browser.setDockTile": Browser.setDockTileParameters;
20450 |     "Browser.executeBrowserCommand": Browser.executeBrowserCommandParameters;
20451 |     "Browser.addPrivacySandboxEnrollmentOverride": Browser.addPrivacySandboxEnrollmentOverrideParameters;
20452 |     "CSS.addRule": CSS.addRuleParameters;
20453 |     "CSS.collectClassNames": CSS.collectClassNamesParameters;
20454 |     "CSS.createStyleSheet": CSS.createStyleSheetParameters;
20455 |     "CSS.disable": CSS.disableParameters;
20456 |     "CSS.enable": CSS.enableParameters;
20457 |     "CSS.forcePseudoState": CSS.forcePseudoStateParameters;
20458 |     "CSS.getBackgroundColors": CSS.getBackgroundColorsParameters;
20459 |     "CSS.getComputedStyleForNode": CSS.getComputedStyleForNodeParameters;
20460 |     "CSS.getInlineStylesForNode": CSS.getInlineStylesForNodeParameters;
20461 |     "CSS.getMatchedStylesForNode": CSS.getMatchedStylesForNodeParameters;
20462 |     "CSS.getMediaQueries": CSS.getMediaQueriesParameters;
20463 |     "CSS.getPlatformFontsForNode": CSS.getPlatformFontsForNodeParameters;
20464 |     "CSS.getStyleSheetText": CSS.getStyleSheetTextParameters;
20465 |     "CSS.getLayersForNode": CSS.getLayersForNodeParameters;
20466 |     "CSS.getLocationForSelector": CSS.getLocationForSelectorParameters;
20467 |     "CSS.trackComputedStyleUpdates": CSS.trackComputedStyleUpdatesParameters;
20468 |     "CSS.takeComputedStyleUpdates": CSS.takeComputedStyleUpdatesParameters;
20469 |     "CSS.setEffectivePropertyValueForNode": CSS.setEffectivePropertyValueForNodeParameters;
20470 |     "CSS.setPropertyRulePropertyName": CSS.setPropertyRulePropertyNameParameters;
20471 |     "CSS.setKeyframeKey": CSS.setKeyframeKeyParameters;
20472 |     "CSS.setMediaText": CSS.setMediaTextParameters;
20473 |     "CSS.setContainerQueryText": CSS.setContainerQueryTextParameters;
20474 |     "CSS.setSupportsText": CSS.setSupportsTextParameters;
20475 |     "CSS.setScopeText": CSS.setScopeTextParameters;
20476 |     "CSS.setRuleSelector": CSS.setRuleSelectorParameters;
20477 |     "CSS.setStyleSheetText": CSS.setStyleSheetTextParameters;
20478 |     "CSS.setStyleTexts": CSS.setStyleTextsParameters;
20479 |     "CSS.startRuleUsageTracking": CSS.startRuleUsageTrackingParameters;
20480 |     "CSS.stopRuleUsageTracking": CSS.stopRuleUsageTrackingParameters;
20481 |     "CSS.takeCoverageDelta": CSS.takeCoverageDeltaParameters;
20482 |     "CSS.setLocalFontsEnabled": CSS.setLocalFontsEnabledParameters;
20483 |     "CacheStorage.deleteCache": CacheStorage.deleteCacheParameters;
20484 |     "CacheStorage.deleteEntry": CacheStorage.deleteEntryParameters;
20485 |     "CacheStorage.requestCacheNames": CacheStorage.requestCacheNamesParameters;
20486 |     "CacheStorage.requestCachedResponse": CacheStorage.requestCachedResponseParameters;
20487 |     "CacheStorage.requestEntries": CacheStorage.requestEntriesParameters;
20488 |     "Cast.enable": Cast.enableParameters;
20489 |     "Cast.disable": Cast.disableParameters;
20490 |     "Cast.setSinkToUse": Cast.setSinkToUseParameters;
20491 |     "Cast.startDesktopMirroring": Cast.startDesktopMirroringParameters;
20492 |     "Cast.startTabMirroring": Cast.startTabMirroringParameters;
20493 |     "Cast.stopCasting": Cast.stopCastingParameters;
20494 |     "DOM.collectClassNamesFromSubtree": DOM.collectClassNamesFromSubtreeParameters;
20495 |     "DOM.copyTo": DOM.copyToParameters;
20496 |     "DOM.describeNode": DOM.describeNodeParameters;
20497 |     "DOM.scrollIntoViewIfNeeded": DOM.scrollIntoViewIfNeededParameters;
20498 |     "DOM.disable": DOM.disableParameters;
20499 |     "DOM.discardSearchResults": DOM.discardSearchResultsParameters;
20500 |     "DOM.enable": DOM.enableParameters;
20501 |     "DOM.focus": DOM.focusParameters;
20502 |     "DOM.getAttributes": DOM.getAttributesParameters;
20503 |     "DOM.getBoxModel": DOM.getBoxModelParameters;
20504 |     "DOM.getContentQuads": DOM.getContentQuadsParameters;
20505 |     "DOM.getDocument": DOM.getDocumentParameters;
20506 |     "DOM.getFlattenedDocument": DOM.getFlattenedDocumentParameters;
20507 |     "DOM.getNodesForSubtreeByStyle": DOM.getNodesForSubtreeByStyleParameters;
20508 |     "DOM.getNodeForLocation": DOM.getNodeForLocationParameters;
20509 |     "DOM.getOuterHTML": DOM.getOuterHTMLParameters;
20510 |     "DOM.getRelayoutBoundary": DOM.getRelayoutBoundaryParameters;
20511 |     "DOM.getSearchResults": DOM.getSearchResultsParameters;
20512 |     "DOM.hideHighlight": DOM.hideHighlightParameters;
20513 |     "DOM.highlightNode": DOM.highlightNodeParameters;
20514 |     "DOM.highlightRect": DOM.highlightRectParameters;
20515 |     "DOM.markUndoableState": DOM.markUndoableStateParameters;
20516 |     "DOM.moveTo": DOM.moveToParameters;
20517 |     "DOM.performSearch": DOM.performSearchParameters;
20518 |     "DOM.pushNodeByPathToFrontend": DOM.pushNodeByPathToFrontendParameters;
20519 |     "DOM.pushNodesByBackendIdsToFrontend": DOM.pushNodesByBackendIdsToFrontendParameters;
20520 |     "DOM.querySelector": DOM.querySelectorParameters;
20521 |     "DOM.querySelectorAll": DOM.querySelectorAllParameters;
20522 |     "DOM.getTopLayerElements": DOM.getTopLayerElementsParameters;
20523 |     "DOM.getElementByRelation": DOM.getElementByRelationParameters;
20524 |     "DOM.redo": DOM.redoParameters;
20525 |     "DOM.removeAttribute": DOM.removeAttributeParameters;
20526 |     "DOM.removeNode": DOM.removeNodeParameters;
20527 |     "DOM.requestChildNodes": DOM.requestChildNodesParameters;
20528 |     "DOM.requestNode": DOM.requestNodeParameters;
20529 |     "DOM.resolveNode": DOM.resolveNodeParameters;
20530 |     "DOM.setAttributeValue": DOM.setAttributeValueParameters;
20531 |     "DOM.setAttributesAsText": DOM.setAttributesAsTextParameters;
20532 |     "DOM.setFileInputFiles": DOM.setFileInputFilesParameters;
20533 |     "DOM.setNodeStackTracesEnabled": DOM.setNodeStackTracesEnabledParameters;
20534 |     "DOM.getNodeStackTraces": DOM.getNodeStackTracesParameters;
20535 |     "DOM.getFileInfo": DOM.getFileInfoParameters;
20536 |     "DOM.getDetachedDomNodes": DOM.getDetachedDomNodesParameters;
20537 |     "DOM.setInspectedNode": DOM.setInspectedNodeParameters;
20538 |     "DOM.setNodeName": DOM.setNodeNameParameters;
20539 |     "DOM.setNodeValue": DOM.setNodeValueParameters;
20540 |     "DOM.setOuterHTML": DOM.setOuterHTMLParameters;
20541 |     "DOM.undo": DOM.undoParameters;
20542 |     "DOM.getFrameOwner": DOM.getFrameOwnerParameters;
20543 |     "DOM.getContainerForNode": DOM.getContainerForNodeParameters;
20544 |     "DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerParameters;
20545 |     "DOM.getAnchorElement": DOM.getAnchorElementParameters;
20546 |     "DOMDebugger.getEventListeners": DOMDebugger.getEventListenersParameters;
20547 |     "DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointParameters;
20548 |     "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointParameters;
20549 |     "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointParameters;
20550 |     "DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointParameters;
20551 |     "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationParameters;
20552 |     "DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointParameters;
20553 |     "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointParameters;
20554 |     "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointParameters;
20555 |     "DOMDebugger.setXHRBreakpoint": DOMDebugger.setXHRBreakpointParameters;
20556 |     "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.setInstrumentationBreakpointParameters;
20557 |     "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.removeInstrumentationBreakpointParameters;
20558 |     "EventBreakpoints.disable": EventBreakpoints.disableParameters;
20559 |     "DOMSnapshot.disable": DOMSnapshot.disableParameters;
20560 |     "DOMSnapshot.enable": DOMSnapshot.enableParameters;
20561 |     "DOMSnapshot.getSnapshot": DOMSnapshot.getSnapshotParameters;
20562 |     "DOMSnapshot.captureSnapshot": DOMSnapshot.captureSnapshotParameters;
20563 |     "DOMStorage.clear": DOMStorage.clearParameters;
20564 |     "DOMStorage.disable": DOMStorage.disableParameters;
20565 |     "DOMStorage.enable": DOMStorage.enableParameters;
20566 |     "DOMStorage.getDOMStorageItems": DOMStorage.getDOMStorageItemsParameters;
20567 |     "DOMStorage.removeDOMStorageItem": DOMStorage.removeDOMStorageItemParameters;
20568 |     "DOMStorage.setDOMStorageItem": DOMStorage.setDOMStorageItemParameters;
20569 |     "Database.disable": Database.disableParameters;
20570 |     "Database.enable": Database.enableParameters;
20571 |     "Database.executeSQL": Database.executeSQLParameters;
20572 |     "Database.getDatabaseTableNames": Database.getDatabaseTableNamesParameters;
20573 |     "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.clearDeviceOrientationOverrideParameters;
20574 |     "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.setDeviceOrientationOverrideParameters;
20575 |     "Emulation.canEmulate": Emulation.canEmulateParameters;
20576 |     "Emulation.clearDeviceMetricsOverride": Emulation.clearDeviceMetricsOverrideParameters;
20577 |     "Emulation.clearGeolocationOverride": Emulation.clearGeolocationOverrideParameters;
20578 |     "Emulation.resetPageScaleFactor": Emulation.resetPageScaleFactorParameters;
20579 |     "Emulation.setFocusEmulationEnabled": Emulation.setFocusEmulationEnabledParameters;
20580 |     "Emulation.setAutoDarkModeOverride": Emulation.setAutoDarkModeOverrideParameters;
20581 |     "Emulation.setCPUThrottlingRate": Emulation.setCPUThrottlingRateParameters;
20582 |     "Emulation.setDefaultBackgroundColorOverride": Emulation.setDefaultBackgroundColorOverrideParameters;
20583 |     "Emulation.setDeviceMetricsOverride": Emulation.setDeviceMetricsOverrideParameters;
20584 |     "Emulation.setDevicePostureOverride": Emulation.setDevicePostureOverrideParameters;
20585 |     "Emulation.clearDevicePostureOverride": Emulation.clearDevicePostureOverrideParameters;
20586 |     "Emulation.setScrollbarsHidden": Emulation.setScrollbarsHiddenParameters;
20587 |     "Emulation.setDocumentCookieDisabled": Emulation.setDocumentCookieDisabledParameters;
20588 |     "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseParameters;
20589 |     "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaParameters;
20590 |     "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyParameters;
20591 |     "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideParameters;
20592 |     "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationParameters;
20593 |     "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledParameters;
20594 |     "Emulation.setSensorOverrideReadings": Emulation.setSensorOverrideReadingsParameters;
20595 |     "Emulation.setPressureSourceOverrideEnabled": Emulation.setPressureSourceOverrideEnabledParameters;
20596 |     "Emulation.setPressureStateOverride": Emulation.setPressureStateOverrideParameters;
20597 |     "Emulation.setIdleOverride": Emulation.setIdleOverrideParameters;
20598 |     "Emulation.clearIdleOverride": Emulation.clearIdleOverrideParameters;
20599 |     "Emulation.setNavigatorOverrides": Emulation.setNavigatorOverridesParameters;
20600 |     "Emulation.setPageScaleFactor": Emulation.setPageScaleFactorParameters;
20601 |     "Emulation.setScriptExecutionDisabled": Emulation.setScriptExecutionDisabledParameters;
20602 |     "Emulation.setTouchEmulationEnabled": Emulation.setTouchEmulationEnabledParameters;
20603 |     "Emulation.setVirtualTimePolicy": Emulation.setVirtualTimePolicyParameters;
20604 |     "Emulation.setLocaleOverride": Emulation.setLocaleOverrideParameters;
20605 |     "Emulation.setTimezoneOverride": Emulation.setTimezoneOverrideParameters;
20606 |     "Emulation.setVisibleSize": Emulation.setVisibleSizeParameters;
20607 |     "Emulation.setDisabledImageTypes": Emulation.setDisabledImageTypesParameters;
20608 |     "Emulation.setHardwareConcurrencyOverride": Emulation.setHardwareConcurrencyOverrideParameters;
20609 |     "Emulation.setUserAgentOverride": Emulation.setUserAgentOverrideParameters;
20610 |     "Emulation.setAutomationOverride": Emulation.setAutomationOverrideParameters;
20611 |     "HeadlessExperimental.beginFrame": HeadlessExperimental.beginFrameParameters;
20612 |     "HeadlessExperimental.disable": HeadlessExperimental.disableParameters;
20613 |     "HeadlessExperimental.enable": HeadlessExperimental.enableParameters;
20614 |     "IO.close": IO.closeParameters;
20615 |     "IO.read": IO.readParameters;
20616 |     "IO.resolveBlob": IO.resolveBlobParameters;
20617 |     "FileSystem.getDirectory": FileSystem.getDirectoryParameters;
20618 |     "IndexedDB.clearObjectStore": IndexedDB.clearObjectStoreParameters;
20619 |     "IndexedDB.deleteDatabase": IndexedDB.deleteDatabaseParameters;
20620 |     "IndexedDB.deleteObjectStoreEntries": IndexedDB.deleteObjectStoreEntriesParameters;
20621 |     "IndexedDB.disable": IndexedDB.disableParameters;
20622 |     "IndexedDB.enable": IndexedDB.enableParameters;
20623 |     "IndexedDB.requestData": IndexedDB.requestDataParameters;
20624 |     "IndexedDB.getMetadata": IndexedDB.getMetadataParameters;
20625 |     "IndexedDB.requestDatabase": IndexedDB.requestDatabaseParameters;
20626 |     "IndexedDB.requestDatabaseNames": IndexedDB.requestDatabaseNamesParameters;
20627 |     "Input.dispatchDragEvent": Input.dispatchDragEventParameters;
20628 |     "Input.dispatchKeyEvent": Input.dispatchKeyEventParameters;
20629 |     "Input.insertText": Input.insertTextParameters;
20630 |     "Input.imeSetComposition": Input.imeSetCompositionParameters;
20631 |     "Input.dispatchMouseEvent": Input.dispatchMouseEventParameters;
20632 |     "Input.dispatchTouchEvent": Input.dispatchTouchEventParameters;
20633 |     "Input.cancelDragging": Input.cancelDraggingParameters;
20634 |     "Input.emulateTouchFromMouseEvent": Input.emulateTouchFromMouseEventParameters;
20635 |     "Input.setIgnoreInputEvents": Input.setIgnoreInputEventsParameters;
20636 |     "Input.setInterceptDrags": Input.setInterceptDragsParameters;
20637 |     "Input.synthesizePinchGesture": Input.synthesizePinchGestureParameters;
20638 |     "Input.synthesizeScrollGesture": Input.synthesizeScrollGestureParameters;
20639 |     "Input.synthesizeTapGesture": Input.synthesizeTapGestureParameters;
20640 |     "Inspector.disable": Inspector.disableParameters;
20641 |     "Inspector.enable": Inspector.enableParameters;
20642 |     "LayerTree.compositingReasons": LayerTree.compositingReasonsParameters;
20643 |     "LayerTree.disable": LayerTree.disableParameters;
20644 |     "LayerTree.enable": LayerTree.enableParameters;
20645 |     "LayerTree.loadSnapshot": LayerTree.loadSnapshotParameters;
20646 |     "LayerTree.makeSnapshot": LayerTree.makeSnapshotParameters;
20647 |     "LayerTree.profileSnapshot": LayerTree.profileSnapshotParameters;
20648 |     "LayerTree.releaseSnapshot": LayerTree.releaseSnapshotParameters;
20649 |     "LayerTree.replaySnapshot": LayerTree.replaySnapshotParameters;
20650 |     "LayerTree.snapshotCommandLog": LayerTree.snapshotCommandLogParameters;
20651 |     "Log.clear": Log.clearParameters;
20652 |     "Log.disable": Log.disableParameters;
20653 |     "Log.enable": Log.enableParameters;
20654 |     "Log.startViolationsReport": Log.startViolationsReportParameters;
20655 |     "Log.stopViolationsReport": Log.stopViolationsReportParameters;
20656 |     "Memory.getDOMCounters": Memory.getDOMCountersParameters;
20657 |     "Memory.getDOMCountersForLeakDetection": Memory.getDOMCountersForLeakDetectionParameters;
20658 |     "Memory.prepareForLeakDetection": Memory.prepareForLeakDetectionParameters;
20659 |     "Memory.forciblyPurgeJavaScriptMemory": Memory.forciblyPurgeJavaScriptMemoryParameters;
20660 |     "Memory.setPressureNotificationsSuppressed": Memory.setPressureNotificationsSuppressedParameters;
20661 |     "Memory.simulatePressureNotification": Memory.simulatePressureNotificationParameters;
20662 |     "Memory.startSampling": Memory.startSamplingParameters;
20663 |     "Memory.stopSampling": Memory.stopSamplingParameters;
20664 |     "Memory.getAllTimeSamplingProfile": Memory.getAllTimeSamplingProfileParameters;
20665 |     "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileParameters;
20666 |     "Memory.getSamplingProfile": Memory.getSamplingProfileParameters;
20667 |     "Network.setAcceptedEncodings": Network.setAcceptedEncodingsParameters;
20668 |     "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideParameters;
20669 |     "Network.canClearBrowserCache": Network.canClearBrowserCacheParameters;
20670 |     "Network.canClearBrowserCookies": Network.canClearBrowserCookiesParameters;
20671 |     "Network.canEmulateNetworkConditions": Network.canEmulateNetworkConditionsParameters;
20672 |     "Network.clearBrowserCache": Network.clearBrowserCacheParameters;
20673 |     "Network.clearBrowserCookies": Network.clearBrowserCookiesParameters;
20674 |     "Network.continueInterceptedRequest": Network.continueInterceptedRequestParameters;
20675 |     "Network.deleteCookies": Network.deleteCookiesParameters;
20676 |     "Network.disable": Network.disableParameters;
20677 |     "Network.emulateNetworkConditions": Network.emulateNetworkConditionsParameters;
20678 |     "Network.enable": Network.enableParameters;
20679 |     "Network.getAllCookies": Network.getAllCookiesParameters;
20680 |     "Network.getCertificate": Network.getCertificateParameters;
20681 |     "Network.getCookies": Network.getCookiesParameters;
20682 |     "Network.getResponseBody": Network.getResponseBodyParameters;
20683 |     "Network.getRequestPostData": Network.getRequestPostDataParameters;
20684 |     "Network.getResponseBodyForInterception": Network.getResponseBodyForInterceptionParameters;
20685 |     "Network.takeResponseBodyForInterceptionAsStream": Network.takeResponseBodyForInterceptionAsStreamParameters;
20686 |     "Network.replayXHR": Network.replayXHRParameters;
20687 |     "Network.searchInResponseBody": Network.searchInResponseBodyParameters;
20688 |     "Network.setBlockedURLs": Network.setBlockedURLsParameters;
20689 |     "Network.setBypassServiceWorker": Network.setBypassServiceWorkerParameters;
20690 |     "Network.setCacheDisabled": Network.setCacheDisabledParameters;
20691 |     "Network.setCookie": Network.setCookieParameters;
20692 |     "Network.setCookies": Network.setCookiesParameters;
20693 |     "Network.setExtraHTTPHeaders": Network.setExtraHTTPHeadersParameters;
20694 |     "Network.setAttachDebugStack": Network.setAttachDebugStackParameters;
20695 |     "Network.setRequestInterception": Network.setRequestInterceptionParameters;
20696 |     "Network.setUserAgentOverride": Network.setUserAgentOverrideParameters;
20697 |     "Network.streamResourceContent": Network.streamResourceContentParameters;
20698 |     "Network.getSecurityIsolationStatus": Network.getSecurityIsolationStatusParameters;
20699 |     "Network.enableReportingApi": Network.enableReportingApiParameters;
20700 |     "Network.loadNetworkResource": Network.loadNetworkResourceParameters;
20701 |     "Overlay.disable": Overlay.disableParameters;
20702 |     "Overlay.enable": Overlay.enableParameters;
20703 |     "Overlay.getHighlightObjectForTest": Overlay.getHighlightObjectForTestParameters;
20704 |     "Overlay.getGridHighlightObjectsForTest": Overlay.getGridHighlightObjectsForTestParameters;
20705 |     "Overlay.getSourceOrderHighlightObjectForTest": Overlay.getSourceOrderHighlightObjectForTestParameters;
20706 |     "Overlay.hideHighlight": Overlay.hideHighlightParameters;
20707 |     "Overlay.highlightFrame": Overlay.highlightFrameParameters;
20708 |     "Overlay.highlightNode": Overlay.highlightNodeParameters;
20709 |     "Overlay.highlightQuad": Overlay.highlightQuadParameters;
20710 |     "Overlay.highlightRect": Overlay.highlightRectParameters;
20711 |     "Overlay.highlightSourceOrder": Overlay.highlightSourceOrderParameters;
20712 |     "Overlay.setInspectMode": Overlay.setInspectModeParameters;
20713 |     "Overlay.setShowAdHighlights": Overlay.setShowAdHighlightsParameters;
20714 |     "Overlay.setPausedInDebuggerMessage": Overlay.setPausedInDebuggerMessageParameters;
20715 |     "Overlay.setShowDebugBorders": Overlay.setShowDebugBordersParameters;
20716 |     "Overlay.setShowFPSCounter": Overlay.setShowFPSCounterParameters;
20717 |     "Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysParameters;
20718 |     "Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysParameters;
20719 |     "Overlay.setShowScrollSnapOverlays": Overlay.setShowScrollSnapOverlaysParameters;
20720 |     "Overlay.setShowContainerQueryOverlays": Overlay.setShowContainerQueryOverlaysParameters;
20721 |     "Overlay.setShowPaintRects": Overlay.setShowPaintRectsParameters;
20722 |     "Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsParameters;
20723 |     "Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsParameters;
20724 |     "Overlay.setShowHitTestBorders": Overlay.setShowHitTestBordersParameters;
20725 |     "Overlay.setShowWebVitals": Overlay.setShowWebVitalsParameters;
20726 |     "Overlay.setShowViewportSizeOnResize": Overlay.setShowViewportSizeOnResizeParameters;
20727 |     "Overlay.setShowHinge": Overlay.setShowHingeParameters;
20728 |     "Overlay.setShowIsolatedElements": Overlay.setShowIsolatedElementsParameters;
20729 |     "Overlay.setShowWindowControlsOverlay": Overlay.setShowWindowControlsOverlayParameters;
20730 |     "Page.addScriptToEvaluateOnLoad": Page.addScriptToEvaluateOnLoadParameters;
20731 |     "Page.addScriptToEvaluateOnNewDocument": Page.addScriptToEvaluateOnNewDocumentParameters;
20732 |     "Page.bringToFront": Page.bringToFrontParameters;
20733 |     "Page.captureScreenshot": Page.captureScreenshotParameters;
20734 |     "Page.captureSnapshot": Page.captureSnapshotParameters;
20735 |     "Page.clearDeviceMetricsOverride": Page.clearDeviceMetricsOverrideParameters;
20736 |     "Page.clearDeviceOrientationOverride": Page.clearDeviceOrientationOverrideParameters;
20737 |     "Page.clearGeolocationOverride": Page.clearGeolocationOverrideParameters;
20738 |     "Page.createIsolatedWorld": Page.createIsolatedWorldParameters;
20739 |     "Page.deleteCookie": Page.deleteCookieParameters;
20740 |     "Page.disable": Page.disableParameters;
20741 |     "Page.enable": Page.enableParameters;
20742 |     "Page.getAppManifest": Page.getAppManifestParameters;
20743 |     "Page.getInstallabilityErrors": Page.getInstallabilityErrorsParameters;
20744 |     "Page.getManifestIcons": Page.getManifestIconsParameters;
20745 |     "Page.getAppId": Page.getAppIdParameters;
20746 |     "Page.getAdScriptId": Page.getAdScriptIdParameters;
20747 |     "Page.getFrameTree": Page.getFrameTreeParameters;
20748 |     "Page.getLayoutMetrics": Page.getLayoutMetricsParameters;
20749 |     "Page.getNavigationHistory": Page.getNavigationHistoryParameters;
20750 |     "Page.resetNavigationHistory": Page.resetNavigationHistoryParameters;
20751 |     "Page.getResourceContent": Page.getResourceContentParameters;
20752 |     "Page.getResourceTree": Page.getResourceTreeParameters;
20753 |     "Page.handleJavaScriptDialog": Page.handleJavaScriptDialogParameters;
20754 |     "Page.navigate": Page.navigateParameters;
20755 |     "Page.navigateToHistoryEntry": Page.navigateToHistoryEntryParameters;
20756 |     "Page.printToPDF": Page.printToPDFParameters;
20757 |     "Page.reload": Page.reloadParameters;
20758 |     "Page.removeScriptToEvaluateOnLoad": Page.removeScriptToEvaluateOnLoadParameters;
20759 |     "Page.removeScriptToEvaluateOnNewDocument": Page.removeScriptToEvaluateOnNewDocumentParameters;
20760 |     "Page.screencastFrameAck": Page.screencastFrameAckParameters;
20761 |     "Page.searchInResource": Page.searchInResourceParameters;
20762 |     "Page.setAdBlockingEnabled": Page.setAdBlockingEnabledParameters;
20763 |     "Page.setBypassCSP": Page.setBypassCSPParameters;
20764 |     "Page.getPermissionsPolicyState": Page.getPermissionsPolicyStateParameters;
20765 |     "Page.getOriginTrials": Page.getOriginTrialsParameters;
20766 |     "Page.setDeviceMetricsOverride": Page.setDeviceMetricsOverrideParameters;
20767 |     "Page.setDeviceOrientationOverride": Page.setDeviceOrientationOverrideParameters;
20768 |     "Page.setFontFamilies": Page.setFontFamiliesParameters;
20769 |     "Page.setFontSizes": Page.setFontSizesParameters;
20770 |     "Page.setDocumentContent": Page.setDocumentContentParameters;
20771 |     "Page.setDownloadBehavior": Page.setDownloadBehaviorParameters;
20772 |     "Page.setGeolocationOverride": Page.setGeolocationOverrideParameters;
20773 |     "Page.setLifecycleEventsEnabled": Page.setLifecycleEventsEnabledParameters;
20774 |     "Page.setTouchEmulationEnabled": Page.setTouchEmulationEnabledParameters;
20775 |     "Page.startScreencast": Page.startScreencastParameters;
20776 |     "Page.stopLoading": Page.stopLoadingParameters;
20777 |     "Page.crash": Page.crashParameters;
20778 |     "Page.close": Page.closeParameters;
20779 |     "Page.setWebLifecycleState": Page.setWebLifecycleStateParameters;
20780 |     "Page.stopScreencast": Page.stopScreencastParameters;
20781 |     "Page.produceCompilationCache": Page.produceCompilationCacheParameters;
20782 |     "Page.addCompilationCache": Page.addCompilationCacheParameters;
20783 |     "Page.clearCompilationCache": Page.clearCompilationCacheParameters;
20784 |     "Page.setSPCTransactionMode": Page.setSPCTransactionModeParameters;
20785 |     "Page.setRPHRegistrationMode": Page.setRPHRegistrationModeParameters;
20786 |     "Page.generateTestReport": Page.generateTestReportParameters;
20787 |     "Page.waitForDebugger": Page.waitForDebuggerParameters;
20788 |     "Page.setInterceptFileChooserDialog": Page.setInterceptFileChooserDialogParameters;
20789 |     "Page.setPrerenderingAllowed": Page.setPrerenderingAllowedParameters;
20790 |     "Performance.disable": Performance.disableParameters;
20791 |     "Performance.enable": Performance.enableParameters;
20792 |     "Performance.setTimeDomain": Performance.setTimeDomainParameters;
20793 |     "Performance.getMetrics": Performance.getMetricsParameters;
20794 |     "PerformanceTimeline.enable": PerformanceTimeline.enableParameters;
20795 |     "Security.disable": Security.disableParameters;
20796 |     "Security.enable": Security.enableParameters;
20797 |     "Security.setIgnoreCertificateErrors": Security.setIgnoreCertificateErrorsParameters;
20798 |     "Security.handleCertificateError": Security.handleCertificateErrorParameters;
20799 |     "Security.setOverrideCertificateErrors": Security.setOverrideCertificateErrorsParameters;
20800 |     "ServiceWorker.deliverPushMessage": ServiceWorker.deliverPushMessageParameters;
20801 |     "ServiceWorker.disable": ServiceWorker.disableParameters;
20802 |     "ServiceWorker.dispatchSyncEvent": ServiceWorker.dispatchSyncEventParameters;
20803 |     "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.dispatchPeriodicSyncEventParameters;
20804 |     "ServiceWorker.enable": ServiceWorker.enableParameters;
20805 |     "ServiceWorker.inspectWorker": ServiceWorker.inspectWorkerParameters;
20806 |     "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.setForceUpdateOnPageLoadParameters;
20807 |     "ServiceWorker.skipWaiting": ServiceWorker.skipWaitingParameters;
20808 |     "ServiceWorker.startWorker": ServiceWorker.startWorkerParameters;
20809 |     "ServiceWorker.stopAllWorkers": ServiceWorker.stopAllWorkersParameters;
20810 |     "ServiceWorker.stopWorker": ServiceWorker.stopWorkerParameters;
20811 |     "ServiceWorker.unregister": ServiceWorker.unregisterParameters;
20812 |     "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationParameters;
20813 |     "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameParameters;
20814 |     "Storage.clearDataForOrigin": Storage.clearDataForOriginParameters;
20815 |     "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyParameters;
20816 |     "Storage.getCookies": Storage.getCookiesParameters;
20817 |     "Storage.setCookies": Storage.setCookiesParameters;
20818 |     "Storage.clearCookies": Storage.clearCookiesParameters;
20819 |     "Storage.getUsageAndQuota": Storage.getUsageAndQuotaParameters;
20820 |     "Storage.overrideQuotaForOrigin": Storage.overrideQuotaForOriginParameters;
20821 |     "Storage.trackCacheStorageForOrigin": Storage.trackCacheStorageForOriginParameters;
20822 |     "Storage.trackCacheStorageForStorageKey": Storage.trackCacheStorageForStorageKeyParameters;
20823 |     "Storage.trackIndexedDBForOrigin": Storage.trackIndexedDBForOriginParameters;
20824 |     "Storage.trackIndexedDBForStorageKey": Storage.trackIndexedDBForStorageKeyParameters;
20825 |     "Storage.untrackCacheStorageForOrigin": Storage.untrackCacheStorageForOriginParameters;
20826 |     "Storage.untrackCacheStorageForStorageKey": Storage.untrackCacheStorageForStorageKeyParameters;
20827 |     "Storage.untrackIndexedDBForOrigin": Storage.untrackIndexedDBForOriginParameters;
20828 |     "Storage.untrackIndexedDBForStorageKey": Storage.untrackIndexedDBForStorageKeyParameters;
20829 |     "Storage.getTrustTokens": Storage.getTrustTokensParameters;
20830 |     "Storage.clearTrustTokens": Storage.clearTrustTokensParameters;
20831 |     "Storage.getInterestGroupDetails": Storage.getInterestGroupDetailsParameters;
20832 |     "Storage.setInterestGroupTracking": Storage.setInterestGroupTrackingParameters;
20833 |     "Storage.setInterestGroupAuctionTracking": Storage.setInterestGroupAuctionTrackingParameters;
20834 |     "Storage.getSharedStorageMetadata": Storage.getSharedStorageMetadataParameters;
20835 |     "Storage.getSharedStorageEntries": Storage.getSharedStorageEntriesParameters;
20836 |     "Storage.setSharedStorageEntry": Storage.setSharedStorageEntryParameters;
20837 |     "Storage.deleteSharedStorageEntry": Storage.deleteSharedStorageEntryParameters;
20838 |     "Storage.clearSharedStorageEntries": Storage.clearSharedStorageEntriesParameters;
20839 |     "Storage.resetSharedStorageBudget": Storage.resetSharedStorageBudgetParameters;
20840 |     "Storage.setSharedStorageTracking": Storage.setSharedStorageTrackingParameters;
20841 |     "Storage.setStorageBucketTracking": Storage.setStorageBucketTrackingParameters;
20842 |     "Storage.deleteStorageBucket": Storage.deleteStorageBucketParameters;
20843 |     "Storage.runBounceTrackingMitigations": Storage.runBounceTrackingMitigationsParameters;
20844 |     "Storage.setAttributionReportingLocalTestingMode": Storage.setAttributionReportingLocalTestingModeParameters;
20845 |     "Storage.setAttributionReportingTracking": Storage.setAttributionReportingTrackingParameters;
20846 |     "Storage.sendPendingAttributionReports": Storage.sendPendingAttributionReportsParameters;
20847 |     "Storage.getRelatedWebsiteSets": Storage.getRelatedWebsiteSetsParameters;
20848 |     "SystemInfo.getInfo": SystemInfo.getInfoParameters;
20849 |     "SystemInfo.getFeatureState": SystemInfo.getFeatureStateParameters;
20850 |     "SystemInfo.getProcessInfo": SystemInfo.getProcessInfoParameters;
20851 |     "Target.activateTarget": Target.activateTargetParameters;
20852 |     "Target.attachToTarget": Target.attachToTargetParameters;
20853 |     "Target.attachToBrowserTarget": Target.attachToBrowserTargetParameters;
20854 |     "Target.closeTarget": Target.closeTargetParameters;
20855 |     "Target.exposeDevToolsProtocol": Target.exposeDevToolsProtocolParameters;
20856 |     "Target.createBrowserContext": Target.createBrowserContextParameters;
20857 |     "Target.getBrowserContexts": Target.getBrowserContextsParameters;
20858 |     "Target.createTarget": Target.createTargetParameters;
20859 |     "Target.detachFromTarget": Target.detachFromTargetParameters;
20860 |     "Target.disposeBrowserContext": Target.disposeBrowserContextParameters;
20861 |     "Target.getTargetInfo": Target.getTargetInfoParameters;
20862 |     "Target.getTargets": Target.getTargetsParameters;
20863 |     "Target.sendMessageToTarget": Target.sendMessageToTargetParameters;
20864 |     "Target.setAutoAttach": Target.setAutoAttachParameters;
20865 |     "Target.autoAttachRelated": Target.autoAttachRelatedParameters;
20866 |     "Target.setDiscoverTargets": Target.setDiscoverTargetsParameters;
20867 |     "Target.setRemoteLocations": Target.setRemoteLocationsParameters;
20868 |     "Tethering.bind": Tethering.bindParameters;
20869 |     "Tethering.unbind": Tethering.unbindParameters;
20870 |     "Tracing.end": Tracing.endParameters;
20871 |     "Tracing.getCategories": Tracing.getCategoriesParameters;
20872 |     "Tracing.recordClockSyncMarker": Tracing.recordClockSyncMarkerParameters;
20873 |     "Tracing.requestMemoryDump": Tracing.requestMemoryDumpParameters;
20874 |     "Tracing.start": Tracing.startParameters;
20875 |     "Fetch.disable": Fetch.disableParameters;
20876 |     "Fetch.enable": Fetch.enableParameters;
20877 |     "Fetch.failRequest": Fetch.failRequestParameters;
20878 |     "Fetch.fulfillRequest": Fetch.fulfillRequestParameters;
20879 |     "Fetch.continueRequest": Fetch.continueRequestParameters;
20880 |     "Fetch.continueWithAuth": Fetch.continueWithAuthParameters;
20881 |     "Fetch.continueResponse": Fetch.continueResponseParameters;
20882 |     "Fetch.getResponseBody": Fetch.getResponseBodyParameters;
20883 |     "Fetch.takeResponseBodyAsStream": Fetch.takeResponseBodyAsStreamParameters;
20884 |     "WebAudio.enable": WebAudio.enableParameters;
20885 |     "WebAudio.disable": WebAudio.disableParameters;
20886 |     "WebAudio.getRealtimeData": WebAudio.getRealtimeDataParameters;
20887 |     "WebAuthn.enable": WebAuthn.enableParameters;
20888 |     "WebAuthn.disable": WebAuthn.disableParameters;
20889 |     "WebAuthn.addVirtualAuthenticator": WebAuthn.addVirtualAuthenticatorParameters;
20890 |     "WebAuthn.setResponseOverrideBits": WebAuthn.setResponseOverrideBitsParameters;
20891 |     "WebAuthn.removeVirtualAuthenticator": WebAuthn.removeVirtualAuthenticatorParameters;
20892 |     "WebAuthn.addCredential": WebAuthn.addCredentialParameters;
20893 |     "WebAuthn.getCredential": WebAuthn.getCredentialParameters;
20894 |     "WebAuthn.getCredentials": WebAuthn.getCredentialsParameters;
20895 |     "WebAuthn.removeCredential": WebAuthn.removeCredentialParameters;
20896 |     "WebAuthn.clearCredentials": WebAuthn.clearCredentialsParameters;
20897 |     "WebAuthn.setUserVerified": WebAuthn.setUserVerifiedParameters;
20898 |     "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.setAutomaticPresenceSimulationParameters;
20899 |     "WebAuthn.setCredentialProperties": WebAuthn.setCredentialPropertiesParameters;
20900 |     "Media.enable": Media.enableParameters;
20901 |     "Media.disable": Media.disableParameters;
20902 |     "DeviceAccess.enable": DeviceAccess.enableParameters;
20903 |     "DeviceAccess.disable": DeviceAccess.disableParameters;
20904 |     "DeviceAccess.selectPrompt": DeviceAccess.selectPromptParameters;
20905 |     "DeviceAccess.cancelPrompt": DeviceAccess.cancelPromptParameters;
20906 |     "Preload.enable": Preload.enableParameters;
20907 |     "Preload.disable": Preload.disableParameters;
20908 |     "FedCm.enable": FedCm.enableParameters;
20909 |     "FedCm.disable": FedCm.disableParameters;
20910 |     "FedCm.selectAccount": FedCm.selectAccountParameters;
20911 |     "FedCm.clickDialogButton": FedCm.clickDialogButtonParameters;
20912 |     "FedCm.openUrl": FedCm.openUrlParameters;
20913 |     "FedCm.dismissDialog": FedCm.dismissDialogParameters;
20914 |     "FedCm.resetCooldown": FedCm.resetCooldownParameters;
20915 |     "PWA.getOsAppState": PWA.getOsAppStateParameters;
20916 |     "PWA.install": PWA.installParameters;
20917 |     "PWA.uninstall": PWA.uninstallParameters;
20918 |     "PWA.launch": PWA.launchParameters;
20919 |     "PWA.launchFilesInApp": PWA.launchFilesInAppParameters;
20920 |     "PWA.openCurrentPageInApp": PWA.openCurrentPageInAppParameters;
20921 |     "PWA.changeAppUserSettings": PWA.changeAppUserSettingsParameters;
20922 |     "BluetoothEmulation.enable": BluetoothEmulation.enableParameters;
20923 |     "BluetoothEmulation.disable": BluetoothEmulation.disableParameters;
20924 |     "BluetoothEmulation.simulatePreconnectedPeripheral": BluetoothEmulation.simulatePreconnectedPeripheralParameters;
20925 |     "BluetoothEmulation.simulateAdvertisement": BluetoothEmulation.simulateAdvertisementParameters;
20926 |     "Console.clearMessages": Console.clearMessagesParameters;
20927 |     "Console.disable": Console.disableParameters;
20928 |     "Console.enable": Console.enableParameters;
20929 |     "Debugger.continueToLocation": Debugger.continueToLocationParameters;
20930 |     "Debugger.disable": Debugger.disableParameters;
20931 |     "Debugger.enable": Debugger.enableParameters;
20932 |     "Debugger.evaluateOnCallFrame": Debugger.evaluateOnCallFrameParameters;
20933 |     "Debugger.getPossibleBreakpoints": Debugger.getPossibleBreakpointsParameters;
20934 |     "Debugger.getScriptSource": Debugger.getScriptSourceParameters;
20935 |     "Debugger.disassembleWasmModule": Debugger.disassembleWasmModuleParameters;
20936 |     "Debugger.nextWasmDisassemblyChunk": Debugger.nextWasmDisassemblyChunkParameters;
20937 |     "Debugger.getWasmBytecode": Debugger.getWasmBytecodeParameters;
20938 |     "Debugger.getStackTrace": Debugger.getStackTraceParameters;
20939 |     "Debugger.pause": Debugger.pauseParameters;
20940 |     "Debugger.pauseOnAsyncCall": Debugger.pauseOnAsyncCallParameters;
20941 |     "Debugger.removeBreakpoint": Debugger.removeBreakpointParameters;
20942 |     "Debugger.restartFrame": Debugger.restartFrameParameters;
20943 |     "Debugger.resume": Debugger.resumeParameters;
20944 |     "Debugger.searchInContent": Debugger.searchInContentParameters;
20945 |     "Debugger.setAsyncCallStackDepth": Debugger.setAsyncCallStackDepthParameters;
20946 |     "Debugger.setBlackboxExecutionContexts": Debugger.setBlackboxExecutionContextsParameters;
20947 |     "Debugger.setBlackboxPatterns": Debugger.setBlackboxPatternsParameters;
20948 |     "Debugger.setBlackboxedRanges": Debugger.setBlackboxedRangesParameters;
20949 |     "Debugger.setBreakpoint": Debugger.setBreakpointParameters;
20950 |     "Debugger.setInstrumentationBreakpoint": Debugger.setInstrumentationBreakpointParameters;
20951 |     "Debugger.setBreakpointByUrl": Debugger.setBreakpointByUrlParameters;
20952 |     "Debugger.setBreakpointOnFunctionCall": Debugger.setBreakpointOnFunctionCallParameters;
20953 |     "Debugger.setBreakpointsActive": Debugger.setBreakpointsActiveParameters;
20954 |     "Debugger.setPauseOnExceptions": Debugger.setPauseOnExceptionsParameters;
20955 |     "Debugger.setReturnValue": Debugger.setReturnValueParameters;
20956 |     "Debugger.setScriptSource": Debugger.setScriptSourceParameters;
20957 |     "Debugger.setSkipAllPauses": Debugger.setSkipAllPausesParameters;
20958 |     "Debugger.setVariableValue": Debugger.setVariableValueParameters;
20959 |     "Debugger.stepInto": Debugger.stepIntoParameters;
20960 |     "Debugger.stepOut": Debugger.stepOutParameters;
20961 |     "Debugger.stepOver": Debugger.stepOverParameters;
20962 |     "HeapProfiler.addInspectedHeapObject": HeapProfiler.addInspectedHeapObjectParameters;
20963 |     "HeapProfiler.collectGarbage": HeapProfiler.collectGarbageParameters;
20964 |     "HeapProfiler.disable": HeapProfiler.disableParameters;
20965 |     "HeapProfiler.enable": HeapProfiler.enableParameters;
20966 |     "HeapProfiler.getHeapObjectId": HeapProfiler.getHeapObjectIdParameters;
20967 |     "HeapProfiler.getObjectByHeapObjectId": HeapProfiler.getObjectByHeapObjectIdParameters;
20968 |     "HeapProfiler.getSamplingProfile": HeapProfiler.getSamplingProfileParameters;
20969 |     "HeapProfiler.startSampling": HeapProfiler.startSamplingParameters;
20970 |     "HeapProfiler.startTrackingHeapObjects": HeapProfiler.startTrackingHeapObjectsParameters;
20971 |     "HeapProfiler.stopSampling": HeapProfiler.stopSamplingParameters;
20972 |     "HeapProfiler.stopTrackingHeapObjects": HeapProfiler.stopTrackingHeapObjectsParameters;
20973 |     "HeapProfiler.takeHeapSnapshot": HeapProfiler.takeHeapSnapshotParameters;
20974 |     "Profiler.disable": Profiler.disableParameters;
20975 |     "Profiler.enable": Profiler.enableParameters;
20976 |     "Profiler.getBestEffortCoverage": Profiler.getBestEffortCoverageParameters;
20977 |     "Profiler.setSamplingInterval": Profiler.setSamplingIntervalParameters;
20978 |     "Profiler.start": Profiler.startParameters;
20979 |     "Profiler.startPreciseCoverage": Profiler.startPreciseCoverageParameters;
20980 |     "Profiler.stop": Profiler.stopParameters;
20981 |     "Profiler.stopPreciseCoverage": Profiler.stopPreciseCoverageParameters;
20982 |     "Profiler.takePreciseCoverage": Profiler.takePreciseCoverageParameters;
20983 |     "Runtime.awaitPromise": Runtime.awaitPromiseParameters;
20984 |     "Runtime.callFunctionOn": Runtime.callFunctionOnParameters;
20985 |     "Runtime.compileScript": Runtime.compileScriptParameters;
20986 |     "Runtime.disable": Runtime.disableParameters;
20987 |     "Runtime.discardConsoleEntries": Runtime.discardConsoleEntriesParameters;
20988 |     "Runtime.enable": Runtime.enableParameters;
20989 |     "Runtime.evaluate": Runtime.evaluateParameters;
20990 |     "Runtime.getIsolateId": Runtime.getIsolateIdParameters;
20991 |     "Runtime.getHeapUsage": Runtime.getHeapUsageParameters;
20992 |     "Runtime.getProperties": Runtime.getPropertiesParameters;
20993 |     "Runtime.globalLexicalScopeNames": Runtime.globalLexicalScopeNamesParameters;
20994 |     "Runtime.queryObjects": Runtime.queryObjectsParameters;
20995 |     "Runtime.releaseObject": Runtime.releaseObjectParameters;
20996 |     "Runtime.releaseObjectGroup": Runtime.releaseObjectGroupParameters;
20997 |     "Runtime.runIfWaitingForDebugger": Runtime.runIfWaitingForDebuggerParameters;
20998 |     "Runtime.runScript": Runtime.runScriptParameters;
20999 |     "Runtime.setAsyncCallStackDepth": Runtime.setAsyncCallStackDepthParameters;
21000 |     "Runtime.setCustomObjectFormatterEnabled": Runtime.setCustomObjectFormatterEnabledParameters;
21001 |     "Runtime.setMaxCallStackSizeToCapture": Runtime.setMaxCallStackSizeToCaptureParameters;
21002 |     "Runtime.terminateExecution": Runtime.terminateExecutionParameters;
21003 |     "Runtime.addBinding": Runtime.addBindingParameters;
21004 |     "Runtime.removeBinding": Runtime.removeBindingParameters;
21005 |     "Runtime.getExceptionDetails": Runtime.getExceptionDetailsParameters;
21006 |     "Schema.getDomains": Schema.getDomainsParameters;
21007 |   }
21008 |   export interface CommandReturnValues {
21009 |     "Accessibility.disable": Accessibility.disableReturnValue;
21010 |     "Accessibility.enable": Accessibility.enableReturnValue;
21011 |     "Accessibility.getPartialAXTree": Accessibility.getPartialAXTreeReturnValue;
21012 |     "Accessibility.getFullAXTree": Accessibility.getFullAXTreeReturnValue;
21013 |     "Accessibility.getRootAXNode": Accessibility.getRootAXNodeReturnValue;
21014 |     "Accessibility.getAXNodeAndAncestors": Accessibility.getAXNodeAndAncestorsReturnValue;
21015 |     "Accessibility.getChildAXNodes": Accessibility.getChildAXNodesReturnValue;
21016 |     "Accessibility.queryAXTree": Accessibility.queryAXTreeReturnValue;
21017 |     "Animation.disable": Animation.disableReturnValue;
21018 |     "Animation.enable": Animation.enableReturnValue;
21019 |     "Animation.getCurrentTime": Animation.getCurrentTimeReturnValue;
21020 |     "Animation.getPlaybackRate": Animation.getPlaybackRateReturnValue;
21021 |     "Animation.releaseAnimations": Animation.releaseAnimationsReturnValue;
21022 |     "Animation.resolveAnimation": Animation.resolveAnimationReturnValue;
21023 |     "Animation.seekAnimations": Animation.seekAnimationsReturnValue;
21024 |     "Animation.setPaused": Animation.setPausedReturnValue;
21025 |     "Animation.setPlaybackRate": Animation.setPlaybackRateReturnValue;
21026 |     "Animation.setTiming": Animation.setTimingReturnValue;
21027 |     "Audits.getEncodedResponse": Audits.getEncodedResponseReturnValue;
21028 |     "Audits.disable": Audits.disableReturnValue;
21029 |     "Audits.enable": Audits.enableReturnValue;
21030 |     "Audits.checkContrast": Audits.checkContrastReturnValue;
21031 |     "Audits.checkFormsIssues": Audits.checkFormsIssuesReturnValue;
21032 |     "Extensions.loadUnpacked": Extensions.loadUnpackedReturnValue;
21033 |     "Extensions.getStorageItems": Extensions.getStorageItemsReturnValue;
21034 |     "Extensions.removeStorageItems": Extensions.removeStorageItemsReturnValue;
21035 |     "Extensions.clearStorageItems": Extensions.clearStorageItemsReturnValue;
21036 |     "Extensions.setStorageItems": Extensions.setStorageItemsReturnValue;
21037 |     "Autofill.trigger": Autofill.triggerReturnValue;
21038 |     "Autofill.setAddresses": Autofill.setAddressesReturnValue;
21039 |     "Autofill.disable": Autofill.disableReturnValue;
21040 |     "Autofill.enable": Autofill.enableReturnValue;
21041 |     "BackgroundService.startObserving": BackgroundService.startObservingReturnValue;
21042 |     "BackgroundService.stopObserving": BackgroundService.stopObservingReturnValue;
21043 |     "BackgroundService.setRecording": BackgroundService.setRecordingReturnValue;
21044 |     "BackgroundService.clearEvents": BackgroundService.clearEventsReturnValue;
21045 |     "Browser.setPermission": Browser.setPermissionReturnValue;
21046 |     "Browser.grantPermissions": Browser.grantPermissionsReturnValue;
21047 |     "Browser.resetPermissions": Browser.resetPermissionsReturnValue;
21048 |     "Browser.setDownloadBehavior": Browser.setDownloadBehaviorReturnValue;
21049 |     "Browser.cancelDownload": Browser.cancelDownloadReturnValue;
21050 |     "Browser.close": Browser.closeReturnValue;
21051 |     "Browser.crash": Browser.crashReturnValue;
21052 |     "Browser.crashGpuProcess": Browser.crashGpuProcessReturnValue;
21053 |     "Browser.getVersion": Browser.getVersionReturnValue;
21054 |     "Browser.getBrowserCommandLine": Browser.getBrowserCommandLineReturnValue;
21055 |     "Browser.getHistograms": Browser.getHistogramsReturnValue;
21056 |     "Browser.getHistogram": Browser.getHistogramReturnValue;
21057 |     "Browser.getWindowBounds": Browser.getWindowBoundsReturnValue;
21058 |     "Browser.getWindowForTarget": Browser.getWindowForTargetReturnValue;
21059 |     "Browser.setWindowBounds": Browser.setWindowBoundsReturnValue;
21060 |     "Browser.setDockTile": Browser.setDockTileReturnValue;
21061 |     "Browser.executeBrowserCommand": Browser.executeBrowserCommandReturnValue;
21062 |     "Browser.addPrivacySandboxEnrollmentOverride": Browser.addPrivacySandboxEnrollmentOverrideReturnValue;
21063 |     "CSS.addRule": CSS.addRuleReturnValue;
21064 |     "CSS.collectClassNames": CSS.collectClassNamesReturnValue;
21065 |     "CSS.createStyleSheet": CSS.createStyleSheetReturnValue;
21066 |     "CSS.disable": CSS.disableReturnValue;
21067 |     "CSS.enable": CSS.enableReturnValue;
21068 |     "CSS.forcePseudoState": CSS.forcePseudoStateReturnValue;
21069 |     "CSS.getBackgroundColors": CSS.getBackgroundColorsReturnValue;
21070 |     "CSS.getComputedStyleForNode": CSS.getComputedStyleForNodeReturnValue;
21071 |     "CSS.getInlineStylesForNode": CSS.getInlineStylesForNodeReturnValue;
21072 |     "CSS.getMatchedStylesForNode": CSS.getMatchedStylesForNodeReturnValue;
21073 |     "CSS.getMediaQueries": CSS.getMediaQueriesReturnValue;
21074 |     "CSS.getPlatformFontsForNode": CSS.getPlatformFontsForNodeReturnValue;
21075 |     "CSS.getStyleSheetText": CSS.getStyleSheetTextReturnValue;
21076 |     "CSS.getLayersForNode": CSS.getLayersForNodeReturnValue;
21077 |     "CSS.getLocationForSelector": CSS.getLocationForSelectorReturnValue;
21078 |     "CSS.trackComputedStyleUpdates": CSS.trackComputedStyleUpdatesReturnValue;
21079 |     "CSS.takeComputedStyleUpdates": CSS.takeComputedStyleUpdatesReturnValue;
21080 |     "CSS.setEffectivePropertyValueForNode": CSS.setEffectivePropertyValueForNodeReturnValue;
21081 |     "CSS.setPropertyRulePropertyName": CSS.setPropertyRulePropertyNameReturnValue;
21082 |     "CSS.setKeyframeKey": CSS.setKeyframeKeyReturnValue;
21083 |     "CSS.setMediaText": CSS.setMediaTextReturnValue;
21084 |     "CSS.setContainerQueryText": CSS.setContainerQueryTextReturnValue;
21085 |     "CSS.setSupportsText": CSS.setSupportsTextReturnValue;
21086 |     "CSS.setScopeText": CSS.setScopeTextReturnValue;
21087 |     "CSS.setRuleSelector": CSS.setRuleSelectorReturnValue;
21088 |     "CSS.setStyleSheetText": CSS.setStyleSheetTextReturnValue;
21089 |     "CSS.setStyleTexts": CSS.setStyleTextsReturnValue;
21090 |     "CSS.startRuleUsageTracking": CSS.startRuleUsageTrackingReturnValue;
21091 |     "CSS.stopRuleUsageTracking": CSS.stopRuleUsageTrackingReturnValue;
21092 |     "CSS.takeCoverageDelta": CSS.takeCoverageDeltaReturnValue;
21093 |     "CSS.setLocalFontsEnabled": CSS.setLocalFontsEnabledReturnValue;
21094 |     "CacheStorage.deleteCache": CacheStorage.deleteCacheReturnValue;
21095 |     "CacheStorage.deleteEntry": CacheStorage.deleteEntryReturnValue;
21096 |     "CacheStorage.requestCacheNames": CacheStorage.requestCacheNamesReturnValue;
21097 |     "CacheStorage.requestCachedResponse": CacheStorage.requestCachedResponseReturnValue;
21098 |     "CacheStorage.requestEntries": CacheStorage.requestEntriesReturnValue;
21099 |     "Cast.enable": Cast.enableReturnValue;
21100 |     "Cast.disable": Cast.disableReturnValue;
21101 |     "Cast.setSinkToUse": Cast.setSinkToUseReturnValue;
21102 |     "Cast.startDesktopMirroring": Cast.startDesktopMirroringReturnValue;
21103 |     "Cast.startTabMirroring": Cast.startTabMirroringReturnValue;
21104 |     "Cast.stopCasting": Cast.stopCastingReturnValue;
21105 |     "DOM.collectClassNamesFromSubtree": DOM.collectClassNamesFromSubtreeReturnValue;
21106 |     "DOM.copyTo": DOM.copyToReturnValue;
21107 |     "DOM.describeNode": DOM.describeNodeReturnValue;
21108 |     "DOM.scrollIntoViewIfNeeded": DOM.scrollIntoViewIfNeededReturnValue;
21109 |     "DOM.disable": DOM.disableReturnValue;
21110 |     "DOM.discardSearchResults": DOM.discardSearchResultsReturnValue;
21111 |     "DOM.enable": DOM.enableReturnValue;
21112 |     "DOM.focus": DOM.focusReturnValue;
21113 |     "DOM.getAttributes": DOM.getAttributesReturnValue;
21114 |     "DOM.getBoxModel": DOM.getBoxModelReturnValue;
21115 |     "DOM.getContentQuads": DOM.getContentQuadsReturnValue;
21116 |     "DOM.getDocument": DOM.getDocumentReturnValue;
21117 |     "DOM.getFlattenedDocument": DOM.getFlattenedDocumentReturnValue;
21118 |     "DOM.getNodesForSubtreeByStyle": DOM.getNodesForSubtreeByStyleReturnValue;
21119 |     "DOM.getNodeForLocation": DOM.getNodeForLocationReturnValue;
21120 |     "DOM.getOuterHTML": DOM.getOuterHTMLReturnValue;
21121 |     "DOM.getRelayoutBoundary": DOM.getRelayoutBoundaryReturnValue;
21122 |     "DOM.getSearchResults": DOM.getSearchResultsReturnValue;
21123 |     "DOM.hideHighlight": DOM.hideHighlightReturnValue;
21124 |     "DOM.highlightNode": DOM.highlightNodeReturnValue;
21125 |     "DOM.highlightRect": DOM.highlightRectReturnValue;
21126 |     "DOM.markUndoableState": DOM.markUndoableStateReturnValue;
21127 |     "DOM.moveTo": DOM.moveToReturnValue;
21128 |     "DOM.performSearch": DOM.performSearchReturnValue;
21129 |     "DOM.pushNodeByPathToFrontend": DOM.pushNodeByPathToFrontendReturnValue;
21130 |     "DOM.pushNodesByBackendIdsToFrontend": DOM.pushNodesByBackendIdsToFrontendReturnValue;
21131 |     "DOM.querySelector": DOM.querySelectorReturnValue;
21132 |     "DOM.querySelectorAll": DOM.querySelectorAllReturnValue;
21133 |     "DOM.getTopLayerElements": DOM.getTopLayerElementsReturnValue;
21134 |     "DOM.getElementByRelation": DOM.getElementByRelationReturnValue;
21135 |     "DOM.redo": DOM.redoReturnValue;
21136 |     "DOM.removeAttribute": DOM.removeAttributeReturnValue;
21137 |     "DOM.removeNode": DOM.removeNodeReturnValue;
21138 |     "DOM.requestChildNodes": DOM.requestChildNodesReturnValue;
21139 |     "DOM.requestNode": DOM.requestNodeReturnValue;
21140 |     "DOM.resolveNode": DOM.resolveNodeReturnValue;
21141 |     "DOM.setAttributeValue": DOM.setAttributeValueReturnValue;
21142 |     "DOM.setAttributesAsText": DOM.setAttributesAsTextReturnValue;
21143 |     "DOM.setFileInputFiles": DOM.setFileInputFilesReturnValue;
21144 |     "DOM.setNodeStackTracesEnabled": DOM.setNodeStackTracesEnabledReturnValue;
21145 |     "DOM.getNodeStackTraces": DOM.getNodeStackTracesReturnValue;
21146 |     "DOM.getFileInfo": DOM.getFileInfoReturnValue;
21147 |     "DOM.getDetachedDomNodes": DOM.getDetachedDomNodesReturnValue;
21148 |     "DOM.setInspectedNode": DOM.setInspectedNodeReturnValue;
21149 |     "DOM.setNodeName": DOM.setNodeNameReturnValue;
21150 |     "DOM.setNodeValue": DOM.setNodeValueReturnValue;
21151 |     "DOM.setOuterHTML": DOM.setOuterHTMLReturnValue;
21152 |     "DOM.undo": DOM.undoReturnValue;
21153 |     "DOM.getFrameOwner": DOM.getFrameOwnerReturnValue;
21154 |     "DOM.getContainerForNode": DOM.getContainerForNodeReturnValue;
21155 |     "DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerReturnValue;
21156 |     "DOM.getAnchorElement": DOM.getAnchorElementReturnValue;
21157 |     "DOMDebugger.getEventListeners": DOMDebugger.getEventListenersReturnValue;
21158 |     "DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointReturnValue;
21159 |     "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointReturnValue;
21160 |     "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointReturnValue;
21161 |     "DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointReturnValue;
21162 |     "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationReturnValue;
21163 |     "DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointReturnValue;
21164 |     "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointReturnValue;
21165 |     "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointReturnValue;
21166 |     "DOMDebugger.setXHRBreakpoint": DOMDebugger.setXHRBreakpointReturnValue;
21167 |     "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.setInstrumentationBreakpointReturnValue;
21168 |     "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.removeInstrumentationBreakpointReturnValue;
21169 |     "EventBreakpoints.disable": EventBreakpoints.disableReturnValue;
21170 |     "DOMSnapshot.disable": DOMSnapshot.disableReturnValue;
21171 |     "DOMSnapshot.enable": DOMSnapshot.enableReturnValue;
21172 |     "DOMSnapshot.getSnapshot": DOMSnapshot.getSnapshotReturnValue;
21173 |     "DOMSnapshot.captureSnapshot": DOMSnapshot.captureSnapshotReturnValue;
21174 |     "DOMStorage.clear": DOMStorage.clearReturnValue;
21175 |     "DOMStorage.disable": DOMStorage.disableReturnValue;
21176 |     "DOMStorage.enable": DOMStorage.enableReturnValue;
21177 |     "DOMStorage.getDOMStorageItems": DOMStorage.getDOMStorageItemsReturnValue;
21178 |     "DOMStorage.removeDOMStorageItem": DOMStorage.removeDOMStorageItemReturnValue;
21179 |     "DOMStorage.setDOMStorageItem": DOMStorage.setDOMStorageItemReturnValue;
21180 |     "Database.disable": Database.disableReturnValue;
21181 |     "Database.enable": Database.enableReturnValue;
21182 |     "Database.executeSQL": Database.executeSQLReturnValue;
21183 |     "Database.getDatabaseTableNames": Database.getDatabaseTableNamesReturnValue;
21184 |     "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.clearDeviceOrientationOverrideReturnValue;
21185 |     "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.setDeviceOrientationOverrideReturnValue;
21186 |     "Emulation.canEmulate": Emulation.canEmulateReturnValue;
21187 |     "Emulation.clearDeviceMetricsOverride": Emulation.clearDeviceMetricsOverrideReturnValue;
21188 |     "Emulation.clearGeolocationOverride": Emulation.clearGeolocationOverrideReturnValue;
21189 |     "Emulation.resetPageScaleFactor": Emulation.resetPageScaleFactorReturnValue;
21190 |     "Emulation.setFocusEmulationEnabled": Emulation.setFocusEmulationEnabledReturnValue;
21191 |     "Emulation.setAutoDarkModeOverride": Emulation.setAutoDarkModeOverrideReturnValue;
21192 |     "Emulation.setCPUThrottlingRate": Emulation.setCPUThrottlingRateReturnValue;
21193 |     "Emulation.setDefaultBackgroundColorOverride": Emulation.setDefaultBackgroundColorOverrideReturnValue;
21194 |     "Emulation.setDeviceMetricsOverride": Emulation.setDeviceMetricsOverrideReturnValue;
21195 |     "Emulation.setDevicePostureOverride": Emulation.setDevicePostureOverrideReturnValue;
21196 |     "Emulation.clearDevicePostureOverride": Emulation.clearDevicePostureOverrideReturnValue;
21197 |     "Emulation.setScrollbarsHidden": Emulation.setScrollbarsHiddenReturnValue;
21198 |     "Emulation.setDocumentCookieDisabled": Emulation.setDocumentCookieDisabledReturnValue;
21199 |     "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseReturnValue;
21200 |     "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaReturnValue;
21201 |     "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyReturnValue;
21202 |     "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideReturnValue;
21203 |     "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationReturnValue;
21204 |     "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledReturnValue;
21205 |     "Emulation.setSensorOverrideReadings": Emulation.setSensorOverrideReadingsReturnValue;
21206 |     "Emulation.setPressureSourceOverrideEnabled": Emulation.setPressureSourceOverrideEnabledReturnValue;
21207 |     "Emulation.setPressureStateOverride": Emulation.setPressureStateOverrideReturnValue;
21208 |     "Emulation.setIdleOverride": Emulation.setIdleOverrideReturnValue;
21209 |     "Emulation.clearIdleOverride": Emulation.clearIdleOverrideReturnValue;
21210 |     "Emulation.setNavigatorOverrides": Emulation.setNavigatorOverridesReturnValue;
21211 |     "Emulation.setPageScaleFactor": Emulation.setPageScaleFactorReturnValue;
21212 |     "Emulation.setScriptExecutionDisabled": Emulation.setScriptExecutionDisabledReturnValue;
21213 |     "Emulation.setTouchEmulationEnabled": Emulation.setTouchEmulationEnabledReturnValue;
21214 |     "Emulation.setVirtualTimePolicy": Emulation.setVirtualTimePolicyReturnValue;
21215 |     "Emulation.setLocaleOverride": Emulation.setLocaleOverrideReturnValue;
21216 |     "Emulation.setTimezoneOverride": Emulation.setTimezoneOverrideReturnValue;
21217 |     "Emulation.setVisibleSize": Emulation.setVisibleSizeReturnValue;
21218 |     "Emulation.setDisabledImageTypes": Emulation.setDisabledImageTypesReturnValue;
21219 |     "Emulation.setHardwareConcurrencyOverride": Emulation.setHardwareConcurrencyOverrideReturnValue;
21220 |     "Emulation.setUserAgentOverride": Emulation.setUserAgentOverrideReturnValue;
21221 |     "Emulation.setAutomationOverride": Emulation.setAutomationOverrideReturnValue;
21222 |     "HeadlessExperimental.beginFrame": HeadlessExperimental.beginFrameReturnValue;
21223 |     "HeadlessExperimental.disable": HeadlessExperimental.disableReturnValue;
21224 |     "HeadlessExperimental.enable": HeadlessExperimental.enableReturnValue;
21225 |     "IO.close": IO.closeReturnValue;
21226 |     "IO.read": IO.readReturnValue;
21227 |     "IO.resolveBlob": IO.resolveBlobReturnValue;
21228 |     "FileSystem.getDirectory": FileSystem.getDirectoryReturnValue;
21229 |     "IndexedDB.clearObjectStore": IndexedDB.clearObjectStoreReturnValue;
21230 |     "IndexedDB.deleteDatabase": IndexedDB.deleteDatabaseReturnValue;
21231 |     "IndexedDB.deleteObjectStoreEntries": IndexedDB.deleteObjectStoreEntriesReturnValue;
21232 |     "IndexedDB.disable": IndexedDB.disableReturnValue;
21233 |     "IndexedDB.enable": IndexedDB.enableReturnValue;
21234 |     "IndexedDB.requestData": IndexedDB.requestDataReturnValue;
21235 |     "IndexedDB.getMetadata": IndexedDB.getMetadataReturnValue;
21236 |     "IndexedDB.requestDatabase": IndexedDB.requestDatabaseReturnValue;
21237 |     "IndexedDB.requestDatabaseNames": IndexedDB.requestDatabaseNamesReturnValue;
21238 |     "Input.dispatchDragEvent": Input.dispatchDragEventReturnValue;
21239 |     "Input.dispatchKeyEvent": Input.dispatchKeyEventReturnValue;
21240 |     "Input.insertText": Input.insertTextReturnValue;
21241 |     "Input.imeSetComposition": Input.imeSetCompositionReturnValue;
21242 |     "Input.dispatchMouseEvent": Input.dispatchMouseEventReturnValue;
21243 |     "Input.dispatchTouchEvent": Input.dispatchTouchEventReturnValue;
21244 |     "Input.cancelDragging": Input.cancelDraggingReturnValue;
21245 |     "Input.emulateTouchFromMouseEvent": Input.emulateTouchFromMouseEventReturnValue;
21246 |     "Input.setIgnoreInputEvents": Input.setIgnoreInputEventsReturnValue;
21247 |     "Input.setInterceptDrags": Input.setInterceptDragsReturnValue;
21248 |     "Input.synthesizePinchGesture": Input.synthesizePinchGestureReturnValue;
21249 |     "Input.synthesizeScrollGesture": Input.synthesizeScrollGestureReturnValue;
21250 |     "Input.synthesizeTapGesture": Input.synthesizeTapGestureReturnValue;
21251 |     "Inspector.disable": Inspector.disableReturnValue;
21252 |     "Inspector.enable": Inspector.enableReturnValue;
21253 |     "LayerTree.compositingReasons": LayerTree.compositingReasonsReturnValue;
21254 |     "LayerTree.disable": LayerTree.disableReturnValue;
21255 |     "LayerTree.enable": LayerTree.enableReturnValue;
21256 |     "LayerTree.loadSnapshot": LayerTree.loadSnapshotReturnValue;
21257 |     "LayerTree.makeSnapshot": LayerTree.makeSnapshotReturnValue;
21258 |     "LayerTree.profileSnapshot": LayerTree.profileSnapshotReturnValue;
21259 |     "LayerTree.releaseSnapshot": LayerTree.releaseSnapshotReturnValue;
21260 |     "LayerTree.replaySnapshot": LayerTree.replaySnapshotReturnValue;
21261 |     "LayerTree.snapshotCommandLog": LayerTree.snapshotCommandLogReturnValue;
21262 |     "Log.clear": Log.clearReturnValue;
21263 |     "Log.disable": Log.disableReturnValue;
21264 |     "Log.enable": Log.enableReturnValue;
21265 |     "Log.startViolationsReport": Log.startViolationsReportReturnValue;
21266 |     "Log.stopViolationsReport": Log.stopViolationsReportReturnValue;
21267 |     "Memory.getDOMCounters": Memory.getDOMCountersReturnValue;
21268 |     "Memory.getDOMCountersForLeakDetection": Memory.getDOMCountersForLeakDetectionReturnValue;
21269 |     "Memory.prepareForLeakDetection": Memory.prepareForLeakDetectionReturnValue;
21270 |     "Memory.forciblyPurgeJavaScriptMemory": Memory.forciblyPurgeJavaScriptMemoryReturnValue;
21271 |     "Memory.setPressureNotificationsSuppressed": Memory.setPressureNotificationsSuppressedReturnValue;
21272 |     "Memory.simulatePressureNotification": Memory.simulatePressureNotificationReturnValue;
21273 |     "Memory.startSampling": Memory.startSamplingReturnValue;
21274 |     "Memory.stopSampling": Memory.stopSamplingReturnValue;
21275 |     "Memory.getAllTimeSamplingProfile": Memory.getAllTimeSamplingProfileReturnValue;
21276 |     "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileReturnValue;
21277 |     "Memory.getSamplingProfile": Memory.getSamplingProfileReturnValue;
21278 |     "Network.setAcceptedEncodings": Network.setAcceptedEncodingsReturnValue;
21279 |     "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideReturnValue;
21280 |     "Network.canClearBrowserCache": Network.canClearBrowserCacheReturnValue;
21281 |     "Network.canClearBrowserCookies": Network.canClearBrowserCookiesReturnValue;
21282 |     "Network.canEmulateNetworkConditions": Network.canEmulateNetworkConditionsReturnValue;
21283 |     "Network.clearBrowserCache": Network.clearBrowserCacheReturnValue;
21284 |     "Network.clearBrowserCookies": Network.clearBrowserCookiesReturnValue;
21285 |     "Network.continueInterceptedRequest": Network.continueInterceptedRequestReturnValue;
21286 |     "Network.deleteCookies": Network.deleteCookiesReturnValue;
21287 |     "Network.disable": Network.disableReturnValue;
21288 |     "Network.emulateNetworkConditions": Network.emulateNetworkConditionsReturnValue;
21289 |     "Network.enable": Network.enableReturnValue;
21290 |     "Network.getAllCookies": Network.getAllCookiesReturnValue;
21291 |     "Network.getCertificate": Network.getCertificateReturnValue;
21292 |     "Network.getCookies": Network.getCookiesReturnValue;
21293 |     "Network.getResponseBody": Network.getResponseBodyReturnValue;
21294 |     "Network.getRequestPostData": Network.getRequestPostDataReturnValue;
21295 |     "Network.getResponseBodyForInterception": Network.getResponseBodyForInterceptionReturnValue;
21296 |     "Network.takeResponseBodyForInterceptionAsStream": Network.takeResponseBodyForInterceptionAsStreamReturnValue;
21297 |     "Network.replayXHR": Network.replayXHRReturnValue;
21298 |     "Network.searchInResponseBody": Network.searchInResponseBodyReturnValue;
21299 |     "Network.setBlockedURLs": Network.setBlockedURLsReturnValue;
21300 |     "Network.setBypassServiceWorker": Network.setBypassServiceWorkerReturnValue;
21301 |     "Network.setCacheDisabled": Network.setCacheDisabledReturnValue;
21302 |     "Network.setCookie": Network.setCookieReturnValue;
21303 |     "Network.setCookies": Network.setCookiesReturnValue;
21304 |     "Network.setExtraHTTPHeaders": Network.setExtraHTTPHeadersReturnValue;
21305 |     "Network.setAttachDebugStack": Network.setAttachDebugStackReturnValue;
21306 |     "Network.setRequestInterception": Network.setRequestInterceptionReturnValue;
21307 |     "Network.setUserAgentOverride": Network.setUserAgentOverrideReturnValue;
21308 |     "Network.streamResourceContent": Network.streamResourceContentReturnValue;
21309 |     "Network.getSecurityIsolationStatus": Network.getSecurityIsolationStatusReturnValue;
21310 |     "Network.enableReportingApi": Network.enableReportingApiReturnValue;
21311 |     "Network.loadNetworkResource": Network.loadNetworkResourceReturnValue;
21312 |     "Overlay.disable": Overlay.disableReturnValue;
21313 |     "Overlay.enable": Overlay.enableReturnValue;
21314 |     "Overlay.getHighlightObjectForTest": Overlay.getHighlightObjectForTestReturnValue;
21315 |     "Overlay.getGridHighlightObjectsForTest": Overlay.getGridHighlightObjectsForTestReturnValue;
21316 |     "Overlay.getSourceOrderHighlightObjectForTest": Overlay.getSourceOrderHighlightObjectForTestReturnValue;
21317 |     "Overlay.hideHighlight": Overlay.hideHighlightReturnValue;
21318 |     "Overlay.highlightFrame": Overlay.highlightFrameReturnValue;
21319 |     "Overlay.highlightNode": Overlay.highlightNodeReturnValue;
21320 |     "Overlay.highlightQuad": Overlay.highlightQuadReturnValue;
21321 |     "Overlay.highlightRect": Overlay.highlightRectReturnValue;
21322 |     "Overlay.highlightSourceOrder": Overlay.highlightSourceOrderReturnValue;
21323 |     "Overlay.setInspectMode": Overlay.setInspectModeReturnValue;
21324 |     "Overlay.setShowAdHighlights": Overlay.setShowAdHighlightsReturnValue;
21325 |     "Overlay.setPausedInDebuggerMessage": Overlay.setPausedInDebuggerMessageReturnValue;
21326 |     "Overlay.setShowDebugBorders": Overlay.setShowDebugBordersReturnValue;
21327 |     "Overlay.setShowFPSCounter": Overlay.setShowFPSCounterReturnValue;
21328 |     "Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysReturnValue;
21329 |     "Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysReturnValue;
21330 |     "Overlay.setShowScrollSnapOverlays": Overlay.setShowScrollSnapOverlaysReturnValue;
21331 |     "Overlay.setShowContainerQueryOverlays": Overlay.setShowContainerQueryOverlaysReturnValue;
21332 |     "Overlay.setShowPaintRects": Overlay.setShowPaintRectsReturnValue;
21333 |     "Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsReturnValue;
21334 |     "Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsReturnValue;
21335 |     "Overlay.setShowHitTestBorders": Overlay.setShowHitTestBordersReturnValue;
21336 |     "Overlay.setShowWebVitals": Overlay.setShowWebVitalsReturnValue;
21337 |     "Overlay.setShowViewportSizeOnResize": Overlay.setShowViewportSizeOnResizeReturnValue;
21338 |     "Overlay.setShowHinge": Overlay.setShowHingeReturnValue;
21339 |     "Overlay.setShowIsolatedElements": Overlay.setShowIsolatedElementsReturnValue;
21340 |     "Overlay.setShowWindowControlsOverlay": Overlay.setShowWindowControlsOverlayReturnValue;
21341 |     "Page.addScriptToEvaluateOnLoad": Page.addScriptToEvaluateOnLoadReturnValue;
21342 |     "Page.addScriptToEvaluateOnNewDocument": Page.addScriptToEvaluateOnNewDocumentReturnValue;
21343 |     "Page.bringToFront": Page.bringToFrontReturnValue;
21344 |     "Page.captureScreenshot": Page.captureScreenshotReturnValue;
21345 |     "Page.captureSnapshot": Page.captureSnapshotReturnValue;
21346 |     "Page.clearDeviceMetricsOverride": Page.clearDeviceMetricsOverrideReturnValue;
21347 |     "Page.clearDeviceOrientationOverride": Page.clearDeviceOrientationOverrideReturnValue;
21348 |     "Page.clearGeolocationOverride": Page.clearGeolocationOverrideReturnValue;
21349 |     "Page.createIsolatedWorld": Page.createIsolatedWorldReturnValue;
21350 |     "Page.deleteCookie": Page.deleteCookieReturnValue;
21351 |     "Page.disable": Page.disableReturnValue;
21352 |     "Page.enable": Page.enableReturnValue;
21353 |     "Page.getAppManifest": Page.getAppManifestReturnValue;
21354 |     "Page.getInstallabilityErrors": Page.getInstallabilityErrorsReturnValue;
21355 |     "Page.getManifestIcons": Page.getManifestIconsReturnValue;
21356 |     "Page.getAppId": Page.getAppIdReturnValue;
21357 |     "Page.getAdScriptId": Page.getAdScriptIdReturnValue;
21358 |     "Page.getFrameTree": Page.getFrameTreeReturnValue;
21359 |     "Page.getLayoutMetrics": Page.getLayoutMetricsReturnValue;
21360 |     "Page.getNavigationHistory": Page.getNavigationHistoryReturnValue;
21361 |     "Page.resetNavigationHistory": Page.resetNavigationHistoryReturnValue;
21362 |     "Page.getResourceContent": Page.getResourceContentReturnValue;
21363 |     "Page.getResourceTree": Page.getResourceTreeReturnValue;
21364 |     "Page.handleJavaScriptDialog": Page.handleJavaScriptDialogReturnValue;
21365 |     "Page.navigate": Page.navigateReturnValue;
21366 |     "Page.navigateToHistoryEntry": Page.navigateToHistoryEntryReturnValue;
21367 |     "Page.printToPDF": Page.printToPDFReturnValue;
21368 |     "Page.reload": Page.reloadReturnValue;
21369 |     "Page.removeScriptToEvaluateOnLoad": Page.removeScriptToEvaluateOnLoadReturnValue;
21370 |     "Page.removeScriptToEvaluateOnNewDocument": Page.removeScriptToEvaluateOnNewDocumentReturnValue;
21371 |     "Page.screencastFrameAck": Page.screencastFrameAckReturnValue;
21372 |     "Page.searchInResource": Page.searchInResourceReturnValue;
21373 |     "Page.setAdBlockingEnabled": Page.setAdBlockingEnabledReturnValue;
21374 |     "Page.setBypassCSP": Page.setBypassCSPReturnValue;
21375 |     "Page.getPermissionsPolicyState": Page.getPermissionsPolicyStateReturnValue;
21376 |     "Page.getOriginTrials": Page.getOriginTrialsReturnValue;
21377 |     "Page.setDeviceMetricsOverride": Page.setDeviceMetricsOverrideReturnValue;
21378 |     "Page.setDeviceOrientationOverride": Page.setDeviceOrientationOverrideReturnValue;
21379 |     "Page.setFontFamilies": Page.setFontFamiliesReturnValue;
21380 |     "Page.setFontSizes": Page.setFontSizesReturnValue;
21381 |     "Page.setDocumentContent": Page.setDocumentContentReturnValue;
21382 |     "Page.setDownloadBehavior": Page.setDownloadBehaviorReturnValue;
21383 |     "Page.setGeolocationOverride": Page.setGeolocationOverrideReturnValue;
21384 |     "Page.setLifecycleEventsEnabled": Page.setLifecycleEventsEnabledReturnValue;
21385 |     "Page.setTouchEmulationEnabled": Page.setTouchEmulationEnabledReturnValue;
21386 |     "Page.startScreencast": Page.startScreencastReturnValue;
21387 |     "Page.stopLoading": Page.stopLoadingReturnValue;
21388 |     "Page.crash": Page.crashReturnValue;
21389 |     "Page.close": Page.closeReturnValue;
21390 |     "Page.setWebLifecycleState": Page.setWebLifecycleStateReturnValue;
21391 |     "Page.stopScreencast": Page.stopScreencastReturnValue;
21392 |     "Page.produceCompilationCache": Page.produceCompilationCacheReturnValue;
21393 |     "Page.addCompilationCache": Page.addCompilationCacheReturnValue;
21394 |     "Page.clearCompilationCache": Page.clearCompilationCacheReturnValue;
21395 |     "Page.setSPCTransactionMode": Page.setSPCTransactionModeReturnValue;
21396 |     "Page.setRPHRegistrationMode": Page.setRPHRegistrationModeReturnValue;
21397 |     "Page.generateTestReport": Page.generateTestReportReturnValue;
21398 |     "Page.waitForDebugger": Page.waitForDebuggerReturnValue;
21399 |     "Page.setInterceptFileChooserDialog": Page.setInterceptFileChooserDialogReturnValue;
21400 |     "Page.setPrerenderingAllowed": Page.setPrerenderingAllowedReturnValue;
21401 |     "Performance.disable": Performance.disableReturnValue;
21402 |     "Performance.enable": Performance.enableReturnValue;
21403 |     "Performance.setTimeDomain": Performance.setTimeDomainReturnValue;
21404 |     "Performance.getMetrics": Performance.getMetricsReturnValue;
21405 |     "PerformanceTimeline.enable": PerformanceTimeline.enableReturnValue;
21406 |     "Security.disable": Security.disableReturnValue;
21407 |     "Security.enable": Security.enableReturnValue;
21408 |     "Security.setIgnoreCertificateErrors": Security.setIgnoreCertificateErrorsReturnValue;
21409 |     "Security.handleCertificateError": Security.handleCertificateErrorReturnValue;
21410 |     "Security.setOverrideCertificateErrors": Security.setOverrideCertificateErrorsReturnValue;
21411 |     "ServiceWorker.deliverPushMessage": ServiceWorker.deliverPushMessageReturnValue;
21412 |     "ServiceWorker.disable": ServiceWorker.disableReturnValue;
21413 |     "ServiceWorker.dispatchSyncEvent": ServiceWorker.dispatchSyncEventReturnValue;
21414 |     "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.dispatchPeriodicSyncEventReturnValue;
21415 |     "ServiceWorker.enable": ServiceWorker.enableReturnValue;
21416 |     "ServiceWorker.inspectWorker": ServiceWorker.inspectWorkerReturnValue;
21417 |     "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.setForceUpdateOnPageLoadReturnValue;
21418 |     "ServiceWorker.skipWaiting": ServiceWorker.skipWaitingReturnValue;
21419 |     "ServiceWorker.startWorker": ServiceWorker.startWorkerReturnValue;
21420 |     "ServiceWorker.stopAllWorkers": ServiceWorker.stopAllWorkersReturnValue;
21421 |     "ServiceWorker.stopWorker": ServiceWorker.stopWorkerReturnValue;
21422 |     "ServiceWorker.unregister": ServiceWorker.unregisterReturnValue;
21423 |     "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationReturnValue;
21424 |     "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameReturnValue;
21425 |     "Storage.clearDataForOrigin": Storage.clearDataForOriginReturnValue;
21426 |     "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyReturnValue;
21427 |     "Storage.getCookies": Storage.getCookiesReturnValue;
21428 |     "Storage.setCookies": Storage.setCookiesReturnValue;
21429 |     "Storage.clearCookies": Storage.clearCookiesReturnValue;
21430 |     "Storage.getUsageAndQuota": Storage.getUsageAndQuotaReturnValue;
21431 |     "Storage.overrideQuotaForOrigin": Storage.overrideQuotaForOriginReturnValue;
21432 |     "Storage.trackCacheStorageForOrigin": Storage.trackCacheStorageForOriginReturnValue;
21433 |     "Storage.trackCacheStorageForStorageKey": Storage.trackCacheStorageForStorageKeyReturnValue;
21434 |     "Storage.trackIndexedDBForOrigin": Storage.trackIndexedDBForOriginReturnValue;
21435 |     "Storage.trackIndexedDBForStorageKey": Storage.trackIndexedDBForStorageKeyReturnValue;
21436 |     "Storage.untrackCacheStorageForOrigin": Storage.untrackCacheStorageForOriginReturnValue;
21437 |     "Storage.untrackCacheStorageForStorageKey": Storage.untrackCacheStorageForStorageKeyReturnValue;
21438 |     "Storage.untrackIndexedDBForOrigin": Storage.untrackIndexedDBForOriginReturnValue;
21439 |     "Storage.untrackIndexedDBForStorageKey": Storage.untrackIndexedDBForStorageKeyReturnValue;
21440 |     "Storage.getTrustTokens": Storage.getTrustTokensReturnValue;
21441 |     "Storage.clearTrustTokens": Storage.clearTrustTokensReturnValue;
21442 |     "Storage.getInterestGroupDetails": Storage.getInterestGroupDetailsReturnValue;
21443 |     "Storage.setInterestGroupTracking": Storage.setInterestGroupTrackingReturnValue;
21444 |     "Storage.setInterestGroupAuctionTracking": Storage.setInterestGroupAuctionTrackingReturnValue;
21445 |     "Storage.getSharedStorageMetadata": Storage.getSharedStorageMetadataReturnValue;
21446 |     "Storage.getSharedStorageEntries": Storage.getSharedStorageEntriesReturnValue;
21447 |     "Storage.setSharedStorageEntry": Storage.setSharedStorageEntryReturnValue;
21448 |     "Storage.deleteSharedStorageEntry": Storage.deleteSharedStorageEntryReturnValue;
21449 |     "Storage.clearSharedStorageEntries": Storage.clearSharedStorageEntriesReturnValue;
21450 |     "Storage.resetSharedStorageBudget": Storage.resetSharedStorageBudgetReturnValue;
21451 |     "Storage.setSharedStorageTracking": Storage.setSharedStorageTrackingReturnValue;
21452 |     "Storage.setStorageBucketTracking": Storage.setStorageBucketTrackingReturnValue;
21453 |     "Storage.deleteStorageBucket": Storage.deleteStorageBucketReturnValue;
21454 |     "Storage.runBounceTrackingMitigations": Storage.runBounceTrackingMitigationsReturnValue;
21455 |     "Storage.setAttributionReportingLocalTestingMode": Storage.setAttributionReportingLocalTestingModeReturnValue;
21456 |     "Storage.setAttributionReportingTracking": Storage.setAttributionReportingTrackingReturnValue;
21457 |     "Storage.sendPendingAttributionReports": Storage.sendPendingAttributionReportsReturnValue;
21458 |     "Storage.getRelatedWebsiteSets": Storage.getRelatedWebsiteSetsReturnValue;
21459 |     "SystemInfo.getInfo": SystemInfo.getInfoReturnValue;
21460 |     "SystemInfo.getFeatureState": SystemInfo.getFeatureStateReturnValue;
21461 |     "SystemInfo.getProcessInfo": SystemInfo.getProcessInfoReturnValue;
21462 |     "Target.activateTarget": Target.activateTargetReturnValue;
21463 |     "Target.attachToTarget": Target.attachToTargetReturnValue;
21464 |     "Target.attachToBrowserTarget": Target.attachToBrowserTargetReturnValue;
21465 |     "Target.closeTarget": Target.closeTargetReturnValue;
21466 |     "Target.exposeDevToolsProtocol": Target.exposeDevToolsProtocolReturnValue;
21467 |     "Target.createBrowserContext": Target.createBrowserContextReturnValue;
21468 |     "Target.getBrowserContexts": Target.getBrowserContextsReturnValue;
21469 |     "Target.createTarget": Target.createTargetReturnValue;
21470 |     "Target.detachFromTarget": Target.detachFromTargetReturnValue;
21471 |     "Target.disposeBrowserContext": Target.disposeBrowserContextReturnValue;
21472 |     "Target.getTargetInfo": Target.getTargetInfoReturnValue;
21473 |     "Target.getTargets": Target.getTargetsReturnValue;
21474 |     "Target.sendMessageToTarget": Target.sendMessageToTargetReturnValue;
21475 |     "Target.setAutoAttach": Target.setAutoAttachReturnValue;
21476 |     "Target.autoAttachRelated": Target.autoAttachRelatedReturnValue;
21477 |     "Target.setDiscoverTargets": Target.setDiscoverTargetsReturnValue;
21478 |     "Target.setRemoteLocations": Target.setRemoteLocationsReturnValue;
21479 |     "Tethering.bind": Tethering.bindReturnValue;
21480 |     "Tethering.unbind": Tethering.unbindReturnValue;
21481 |     "Tracing.end": Tracing.endReturnValue;
21482 |     "Tracing.getCategories": Tracing.getCategoriesReturnValue;
21483 |     "Tracing.recordClockSyncMarker": Tracing.recordClockSyncMarkerReturnValue;
21484 |     "Tracing.requestMemoryDump": Tracing.requestMemoryDumpReturnValue;
21485 |     "Tracing.start": Tracing.startReturnValue;
21486 |     "Fetch.disable": Fetch.disableReturnValue;
21487 |     "Fetch.enable": Fetch.enableReturnValue;
21488 |     "Fetch.failRequest": Fetch.failRequestReturnValue;
21489 |     "Fetch.fulfillRequest": Fetch.fulfillRequestReturnValue;
21490 |     "Fetch.continueRequest": Fetch.continueRequestReturnValue;
21491 |     "Fetch.continueWithAuth": Fetch.continueWithAuthReturnValue;
21492 |     "Fetch.continueResponse": Fetch.continueResponseReturnValue;
21493 |     "Fetch.getResponseBody": Fetch.getResponseBodyReturnValue;
21494 |     "Fetch.takeResponseBodyAsStream": Fetch.takeResponseBodyAsStreamReturnValue;
21495 |     "WebAudio.enable": WebAudio.enableReturnValue;
21496 |     "WebAudio.disable": WebAudio.disableReturnValue;
21497 |     "WebAudio.getRealtimeData": WebAudio.getRealtimeDataReturnValue;
21498 |     "WebAuthn.enable": WebAuthn.enableReturnValue;
21499 |     "WebAuthn.disable": WebAuthn.disableReturnValue;
21500 |     "WebAuthn.addVirtualAuthenticator": WebAuthn.addVirtualAuthenticatorReturnValue;
21501 |     "WebAuthn.setResponseOverrideBits": WebAuthn.setResponseOverrideBitsReturnValue;
21502 |     "WebAuthn.removeVirtualAuthenticator": WebAuthn.removeVirtualAuthenticatorReturnValue;
21503 |     "WebAuthn.addCredential": WebAuthn.addCredentialReturnValue;
21504 |     "WebAuthn.getCredential": WebAuthn.getCredentialReturnValue;
21505 |     "WebAuthn.getCredentials": WebAuthn.getCredentialsReturnValue;
21506 |     "WebAuthn.removeCredential": WebAuthn.removeCredentialReturnValue;
21507 |     "WebAuthn.clearCredentials": WebAuthn.clearCredentialsReturnValue;
21508 |     "WebAuthn.setUserVerified": WebAuthn.setUserVerifiedReturnValue;
21509 |     "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.setAutomaticPresenceSimulationReturnValue;
21510 |     "WebAuthn.setCredentialProperties": WebAuthn.setCredentialPropertiesReturnValue;
21511 |     "Media.enable": Media.enableReturnValue;
21512 |     "Media.disable": Media.disableReturnValue;
21513 |     "DeviceAccess.enable": DeviceAccess.enableReturnValue;
21514 |     "DeviceAccess.disable": DeviceAccess.disableReturnValue;
21515 |     "DeviceAccess.selectPrompt": DeviceAccess.selectPromptReturnValue;
21516 |     "DeviceAccess.cancelPrompt": DeviceAccess.cancelPromptReturnValue;
21517 |     "Preload.enable": Preload.enableReturnValue;
21518 |     "Preload.disable": Preload.disableReturnValue;
21519 |     "FedCm.enable": FedCm.enableReturnValue;
21520 |     "FedCm.disable": FedCm.disableReturnValue;
21521 |     "FedCm.selectAccount": FedCm.selectAccountReturnValue;
21522 |     "FedCm.clickDialogButton": FedCm.clickDialogButtonReturnValue;
21523 |     "FedCm.openUrl": FedCm.openUrlReturnValue;
21524 |     "FedCm.dismissDialog": FedCm.dismissDialogReturnValue;
21525 |     "FedCm.resetCooldown": FedCm.resetCooldownReturnValue;
21526 |     "PWA.getOsAppState": PWA.getOsAppStateReturnValue;
21527 |     "PWA.install": PWA.installReturnValue;
21528 |     "PWA.uninstall": PWA.uninstallReturnValue;
21529 |     "PWA.launch": PWA.launchReturnValue;
21530 |     "PWA.launchFilesInApp": PWA.launchFilesInAppReturnValue;
21531 |     "PWA.openCurrentPageInApp": PWA.openCurrentPageInAppReturnValue;
21532 |     "PWA.changeAppUserSettings": PWA.changeAppUserSettingsReturnValue;
21533 |     "BluetoothEmulation.enable": BluetoothEmulation.enableReturnValue;
21534 |     "BluetoothEmulation.disable": BluetoothEmulation.disableReturnValue;
21535 |     "BluetoothEmulation.simulatePreconnectedPeripheral": BluetoothEmulation.simulatePreconnectedPeripheralReturnValue;
21536 |     "BluetoothEmulation.simulateAdvertisement": BluetoothEmulation.simulateAdvertisementReturnValue;
21537 |     "Console.clearMessages": Console.clearMessagesReturnValue;
21538 |     "Console.disable": Console.disableReturnValue;
21539 |     "Console.enable": Console.enableReturnValue;
21540 |     "Debugger.continueToLocation": Debugger.continueToLocationReturnValue;
21541 |     "Debugger.disable": Debugger.disableReturnValue;
21542 |     "Debugger.enable": Debugger.enableReturnValue;
21543 |     "Debugger.evaluateOnCallFrame": Debugger.evaluateOnCallFrameReturnValue;
21544 |     "Debugger.getPossibleBreakpoints": Debugger.getPossibleBreakpointsReturnValue;
21545 |     "Debugger.getScriptSource": Debugger.getScriptSourceReturnValue;
21546 |     "Debugger.disassembleWasmModule": Debugger.disassembleWasmModuleReturnValue;
21547 |     "Debugger.nextWasmDisassemblyChunk": Debugger.nextWasmDisassemblyChunkReturnValue;
21548 |     "Debugger.getWasmBytecode": Debugger.getWasmBytecodeReturnValue;
21549 |     "Debugger.getStackTrace": Debugger.getStackTraceReturnValue;
21550 |     "Debugger.pause": Debugger.pauseReturnValue;
21551 |     "Debugger.pauseOnAsyncCall": Debugger.pauseOnAsyncCallReturnValue;
21552 |     "Debugger.removeBreakpoint": Debugger.removeBreakpointReturnValue;
21553 |     "Debugger.restartFrame": Debugger.restartFrameReturnValue;
21554 |     "Debugger.resume": Debugger.resumeReturnValue;
21555 |     "Debugger.searchInContent": Debugger.searchInContentReturnValue;
21556 |     "Debugger.setAsyncCallStackDepth": Debugger.setAsyncCallStackDepthReturnValue;
21557 |     "Debugger.setBlackboxExecutionContexts": Debugger.setBlackboxExecutionContextsReturnValue;
21558 |     "Debugger.setBlackboxPatterns": Debugger.setBlackboxPatternsReturnValue;
21559 |     "Debugger.setBlackboxedRanges": Debugger.setBlackboxedRangesReturnValue;
21560 |     "Debugger.setBreakpoint": Debugger.setBreakpointReturnValue;
21561 |     "Debugger.setInstrumentationBreakpoint": Debugger.setInstrumentationBreakpointReturnValue;
21562 |     "Debugger.setBreakpointByUrl": Debugger.setBreakpointByUrlReturnValue;
21563 |     "Debugger.setBreakpointOnFunctionCall": Debugger.setBreakpointOnFunctionCallReturnValue;
21564 |     "Debugger.setBreakpointsActive": Debugger.setBreakpointsActiveReturnValue;
21565 |     "Debugger.setPauseOnExceptions": Debugger.setPauseOnExceptionsReturnValue;
21566 |     "Debugger.setReturnValue": Debugger.setReturnValueReturnValue;
21567 |     "Debugger.setScriptSource": Debugger.setScriptSourceReturnValue;
21568 |     "Debugger.setSkipAllPauses": Debugger.setSkipAllPausesReturnValue;
21569 |     "Debugger.setVariableValue": Debugger.setVariableValueReturnValue;
21570 |     "Debugger.stepInto": Debugger.stepIntoReturnValue;
21571 |     "Debugger.stepOut": Debugger.stepOutReturnValue;
21572 |     "Debugger.stepOver": Debugger.stepOverReturnValue;
21573 |     "HeapProfiler.addInspectedHeapObject": HeapProfiler.addInspectedHeapObjectReturnValue;
21574 |     "HeapProfiler.collectGarbage": HeapProfiler.collectGarbageReturnValue;
21575 |     "HeapProfiler.disable": HeapProfiler.disableReturnValue;
21576 |     "HeapProfiler.enable": HeapProfiler.enableReturnValue;
21577 |     "HeapProfiler.getHeapObjectId": HeapProfiler.getHeapObjectIdReturnValue;
21578 |     "HeapProfiler.getObjectByHeapObjectId": HeapProfiler.getObjectByHeapObjectIdReturnValue;
21579 |     "HeapProfiler.getSamplingProfile": HeapProfiler.getSamplingProfileReturnValue;
21580 |     "HeapProfiler.startSampling": HeapProfiler.startSamplingReturnValue;
21581 |     "HeapProfiler.startTrackingHeapObjects": HeapProfiler.startTrackingHeapObjectsReturnValue;
21582 |     "HeapProfiler.stopSampling": HeapProfiler.stopSamplingReturnValue;
21583 |     "HeapProfiler.stopTrackingHeapObjects": HeapProfiler.stopTrackingHeapObjectsReturnValue;
21584 |     "HeapProfiler.takeHeapSnapshot": HeapProfiler.takeHeapSnapshotReturnValue;
21585 |     "Profiler.disable": Profiler.disableReturnValue;
21586 |     "Profiler.enable": Profiler.enableReturnValue;
21587 |     "Profiler.getBestEffortCoverage": Profiler.getBestEffortCoverageReturnValue;
21588 |     "Profiler.setSamplingInterval": Profiler.setSamplingIntervalReturnValue;
21589 |     "Profiler.start": Profiler.startReturnValue;
21590 |     "Profiler.startPreciseCoverage": Profiler.startPreciseCoverageReturnValue;
21591 |     "Profiler.stop": Profiler.stopReturnValue;
21592 |     "Profiler.stopPreciseCoverage": Profiler.stopPreciseCoverageReturnValue;
21593 |     "Profiler.takePreciseCoverage": Profiler.takePreciseCoverageReturnValue;
21594 |     "Runtime.awaitPromise": Runtime.awaitPromiseReturnValue;
21595 |     "Runtime.callFunctionOn": Runtime.callFunctionOnReturnValue;
21596 |     "Runtime.compileScript": Runtime.compileScriptReturnValue;
21597 |     "Runtime.disable": Runtime.disableReturnValue;
21598 |     "Runtime.discardConsoleEntries": Runtime.discardConsoleEntriesReturnValue;
21599 |     "Runtime.enable": Runtime.enableReturnValue;
21600 |     "Runtime.evaluate": Runtime.evaluateReturnValue;
21601 |     "Runtime.getIsolateId": Runtime.getIsolateIdReturnValue;
21602 |     "Runtime.getHeapUsage": Runtime.getHeapUsageReturnValue;
21603 |     "Runtime.getProperties": Runtime.getPropertiesReturnValue;
21604 |     "Runtime.globalLexicalScopeNames": Runtime.globalLexicalScopeNamesReturnValue;
21605 |     "Runtime.queryObjects": Runtime.queryObjectsReturnValue;
21606 |     "Runtime.releaseObject": Runtime.releaseObjectReturnValue;
21607 |     "Runtime.releaseObjectGroup": Runtime.releaseObjectGroupReturnValue;
21608 |     "Runtime.runIfWaitingForDebugger": Runtime.runIfWaitingForDebuggerReturnValue;
21609 |     "Runtime.runScript": Runtime.runScriptReturnValue;
21610 |     "Runtime.setAsyncCallStackDepth": Runtime.setAsyncCallStackDepthReturnValue;
21611 |     "Runtime.setCustomObjectFormatterEnabled": Runtime.setCustomObjectFormatterEnabledReturnValue;
21612 |     "Runtime.setMaxCallStackSizeToCapture": Runtime.setMaxCallStackSizeToCaptureReturnValue;
21613 |     "Runtime.terminateExecution": Runtime.terminateExecutionReturnValue;
21614 |     "Runtime.addBinding": Runtime.addBindingReturnValue;
21615 |     "Runtime.removeBinding": Runtime.removeBindingReturnValue;
21616 |     "Runtime.getExceptionDetails": Runtime.getExceptionDetailsReturnValue;
21617 |     "Schema.getDomains": Schema.getDomainsReturnValue;
21618 |   }
21619 | }


------------------------------------------------------------
[10] اسم الملف: structs.d.ts
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/types/structs.d.ts
------------------------------------------------------------
0001 | /**
0002 |  * Copyright (c) Microsoft Corporation.
0003 |  *
0004 |  * Licensed under the Apache License, Version 2.0 (the "License");
0005 |  * you may not use this file except in compliance with the License.
0006 |  * You may obtain a copy of the License at
0007 |  *
0008 |  * http://www.apache.org/licenses/LICENSE-2.0
0009 |  *
0010 |  * Unless required by applicable law or agreed to in writing, software
0011 |  * distributed under the License is distributed on an "AS IS" BASIS,
0012 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 |  * See the License for the specific language governing permissions and
0014 |  * limitations under the License.
0015 |  */
0016 | 
0017 | import { JSHandle, ElementHandle, Frame, Page, BrowserContext } from './types';
0018 | 
0019 | /**
0020 |  * Can be converted to JSON
0021 |  */
0022 | export type Serializable = any;
0023 | /**
0024 |  * Can be converted to JSON, but may also contain JSHandles.
0025 |  */
0026 | export type EvaluationArgument = {};
0027 | 
0028 | export type NoHandles<Arg> = Arg extends JSHandle ? never : (Arg extends object ? { [Key in keyof Arg]: NoHandles<Arg[Key]> } : Arg);
0029 | export type Unboxed<Arg> =
0030 |   Arg extends ElementHandle<infer T> ? T :
0031 |   Arg extends JSHandle<infer T> ? T :
0032 |   Arg extends NoHandles<Arg> ? Arg :
0033 |   Arg extends [infer A0] ? [Unboxed<A0>] :
0034 |   Arg extends [infer A0, infer A1] ? [Unboxed<A0>, Unboxed<A1>] :
0035 |   Arg extends [infer A0, infer A1, infer A2] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>] :
0036 |   Arg extends [infer A0, infer A1, infer A2, infer A3] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>, Unboxed<A3>] :
0037 |   Arg extends Array<infer T> ? Array<Unboxed<T>> :
0038 |   Arg extends object ? { [Key in keyof Arg]: Unboxed<Arg[Key]> } :
0039 |   Arg;
0040 | export type PageFunction0<R> = string | (() => R | Promise<R>);
0041 | export type PageFunction<Arg, R> = string | ((arg: Unboxed<Arg>) => R | Promise<R>);
0042 | export type PageFunctionOn<On, Arg2, R> = string | ((on: On, arg2: Unboxed<Arg2>) => R | Promise<R>);
0043 | export type SmartHandle<T> = [T] extends [Node] ? ElementHandle<T> : JSHandle<T>;
0044 | export type ElementHandleForTag<K extends keyof HTMLElementTagNameMap> = ElementHandle<HTMLElementTagNameMap[K]>;
0045 | export type BindingSource = { context: BrowserContext, page: Page, frame: Frame };


------------------------------------------------------------
[11] اسم الملف: reinstall_msedge_beta_linux.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_beta_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old beta if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-beta[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-beta
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0036 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0037 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0038 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
0039 | rm /tmp/microsoft.gpg
0040 | apt-get update && apt-get install -y microsoft-edge-beta
0041 | 
0042 | microsoft-edge-beta --version


------------------------------------------------------------
[12] اسم الملف: reinstall_chrome_beta_linux.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_beta_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | if [[ $(arch) == "aarch64" ]]; then
0006 |   echo "ERROR: not supported on Linux Arm64"
0007 |   exit 1
0008 | fi
0009 | 
0010 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0011 |   if [[ ! -f "/etc/os-release" ]]; then
0012 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0013 |     exit 1
0014 |   fi
0015 | 
0016 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0017 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0018 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0019 |     exit 1
0020 |   fi
0021 | fi
0022 | 
0023 | # 1. make sure to remove old beta if any.
0024 | if dpkg --get-selections | grep -q "^google-chrome-beta[[:space:]]*install$" >/dev/null; then
0025 |   apt-get remove -y google-chrome-beta
0026 | fi
0027 | 
0028 | # 2. Update apt lists (needed to install curl and chrome dependencies)
0029 | apt-get update
0030 | 
0031 | # 3. Install curl to download chrome
0032 | if ! command -v curl >/dev/null; then
0033 |   apt-get install -y curl
0034 | fi
0035 | 
0036 | # 4. download chrome beta from dl.google.com and install it.
0037 | cd /tmp
0038 | curl -O https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
0039 | apt-get install -y ./google-chrome-beta_current_amd64.deb
0040 | rm -rf ./google-chrome-beta_current_amd64.deb
0041 | cd -
0042 | google-chrome-beta --version


------------------------------------------------------------
[13] اسم الملف: reinstall_msedge_beta_mac.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_beta_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl -o ./msedge_beta.pkg -k "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_beta.pkg -target /
0010 | rm -rf /tmp/msedge_beta.pkg
0011 | /Applications/Microsoft\ Edge\ Beta.app/Contents/MacOS/Microsoft\ Edge\ Beta --version


------------------------------------------------------------
[14] اسم الملف: reinstall_msedge_stable_mac.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_stable_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl -o ./msedge_stable.pkg -k "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_stable.pkg -target /
0010 | rm -rf /tmp/msedge_stable.pkg
0011 | /Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --version


------------------------------------------------------------
[15] اسم الملف: reinstall_chrome_stable_mac.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_stable_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | rm -rf "/Applications/Google Chrome.app"
0006 | cd /tmp
0007 | curl -o ./googlechrome.dmg -k https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg
0008 | hdiutil attach -nobrowse -quiet -noautofsck -noautoopen -mountpoint /Volumes/googlechrome.dmg ./googlechrome.dmg
0009 | cp -pR "/Volumes/googlechrome.dmg/Google Chrome.app" /Applications
0010 | hdiutil detach /Volumes/googlechrome.dmg
0011 | rm -rf /tmp/googlechrome.dmg
0012 | /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version


------------------------------------------------------------
[16] اسم الملف: reinstall_msedge_stable_linux.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_stable_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old stable if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-stable[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-stable
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0036 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0037 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0038 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-stable.list'
0039 | rm /tmp/microsoft.gpg
0040 | apt-get update && apt-get install -y microsoft-edge-stable
0041 | 
0042 | microsoft-edge-stable --version


------------------------------------------------------------
[17] اسم الملف: reinstall_chrome_beta_mac.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_beta_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | rm -rf "/Applications/Google Chrome Beta.app"
0006 | cd /tmp
0007 | curl -o ./googlechromebeta.dmg -k https://dl.google.com/chrome/mac/universal/beta/googlechromebeta.dmg
0008 | hdiutil attach -nobrowse -quiet -noautofsck -noautoopen -mountpoint /Volumes/googlechromebeta.dmg ./googlechromebeta.dmg
0009 | cp -pR "/Volumes/googlechromebeta.dmg/Google Chrome Beta.app" /Applications
0010 | hdiutil detach /Volumes/googlechromebeta.dmg
0011 | rm -rf /tmp/googlechromebeta.dmg
0012 | 
0013 | /Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --version


------------------------------------------------------------
[18] اسم الملف: reinstall_msedge_dev_linux.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_dev_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old dev if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-dev[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-dev
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0036 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0037 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0038 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
0039 | rm /tmp/microsoft.gpg
0040 | apt-get update && apt-get install -y microsoft-edge-dev
0041 | 
0042 | microsoft-edge-dev --version


------------------------------------------------------------
[19] اسم الملف: reinstall_chrome_stable_linux.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_stable_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | if [[ $(arch) == "aarch64" ]]; then
0006 |   echo "ERROR: not supported on Linux Arm64"
0007 |   exit 1
0008 | fi
0009 | 
0010 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0011 |   if [[ ! -f "/etc/os-release" ]]; then
0012 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0013 |     exit 1
0014 |   fi
0015 | 
0016 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0017 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0018 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0019 |     exit 1
0020 |   fi
0021 | fi
0022 | 
0023 | # 1. make sure to remove old stable if any.
0024 | if dpkg --get-selections | grep -q "^google-chrome[[:space:]]*install$" >/dev/null; then
0025 |   apt-get remove -y google-chrome
0026 | fi
0027 | 
0028 | # 2. Update apt lists (needed to install curl and chrome dependencies)
0029 | apt-get update
0030 | 
0031 | # 3. Install curl to download chrome
0032 | if ! command -v curl >/dev/null; then
0033 |   apt-get install -y curl
0034 | fi
0035 | 
0036 | # 4. download chrome stable from dl.google.com and install it.
0037 | cd /tmp
0038 | curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
0039 | apt-get install -y ./google-chrome-stable_current_amd64.deb
0040 | rm -rf ./google-chrome-stable_current_amd64.deb
0041 | cd -
0042 | google-chrome --version


------------------------------------------------------------
[20] اسم الملف: reinstall_msedge_dev_mac.sh
المسار: ./scraper/venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_dev_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl -o ./msedge_dev.pkg -k "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_dev.pkg -target /
0010 | rm -rf /tmp/msedge_dev.pkg
0011 | /Applications/Microsoft\ Edge\ Dev.app/Contents/MacOS/Microsoft\ Edge\ Dev --version


------------------------------------------------------------
[21] اسم الملف: index.d.ts
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/index.d.ts
------------------------------------------------------------
0001 | /**
0002 |  * Copyright (c) Microsoft Corporation.
0003 |  *
0004 |  * Licensed under the Apache License, Version 2.0 (the "License");
0005 |  * you may not use this file except in compliance with the License.
0006 |  * You may obtain a copy of the License at
0007 |  *
0008 |  * http://www.apache.org/licenses/LICENSE-2.0
0009 |  *
0010 |  * Unless required by applicable law or agreed to in writing, software
0011 |  * distributed under the License is distributed on an "AS IS" BASIS,
0012 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 |  * See the License for the specific language governing permissions and
0014 |  * limitations under the License.
0015 |  */
0016 | 
0017 | export * from './types/types';


------------------------------------------------------------
[22] اسم الملف: types.d.ts
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/types/types.d.ts
------------------------------------------------------------
0001 | // This file is generated by /utils/generate_types/index.js
0002 | /**
0003 |  * Copyright (c) Microsoft Corporation.
0004 |  *
0005 |  * Licensed under the Apache License, Version 2.0 (the "License");
0006 |  * you may not use this file except in compliance with the License.
0007 |  * You may obtain a copy of the License at
0008 |  *
0009 |  * http://www.apache.org/licenses/LICENSE-2.0
0010 |  *
0011 |  * Unless required by applicable law or agreed to in writing, software
0012 |  * distributed under the License is distributed on an "AS IS" BASIS,
0013 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014 |  * See the License for the specific language governing permissions and
0015 |  * limitations under the License.
0016 |  */
0017 | import { ChildProcess } from 'child_process';
0018 | import { Readable } from 'stream';
0019 | import { ReadStream } from 'fs';
0020 | import { Protocol } from './protocol';
0021 | import { Serializable, EvaluationArgument, PageFunction, PageFunctionOn, SmartHandle, ElementHandleForTag, BindingSource } from './structs';
0022 | 
0023 | type PageWaitForSelectorOptionsNotHidden = PageWaitForSelectorOptions & {
0024 |   state?: 'visible'|'attached';
0025 | };
0026 | type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelectorOptions & {
0027 |   state?: 'visible'|'attached';
0028 | };
0029 | 
0030 | /**
0031 |  * Page provides methods to interact with a single tab in a [Browser](https://playwright.dev/docs/api/class-browser),
0032 |  * or an [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One
0033 |  * [Browser](https://playwright.dev/docs/api/class-browser) instance might have multiple
0034 |  * [Page](https://playwright.dev/docs/api/class-page) instances.
0035 |  *
0036 |  * This example creates a page, navigates it to a URL, and then saves a screenshot:
0037 |  *
0038 |  * ```js
0039 |  * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0040 |  *
0041 |  * (async () => {
0042 |  *   const browser = await webkit.launch();
0043 |  *   const context = await browser.newContext();
0044 |  *   const page = await context.newPage();
0045 |  *   await page.goto('https://example.com');
0046 |  *   await page.screenshot({ path: 'screenshot.png' });
0047 |  *   await browser.close();
0048 |  * })();
0049 |  * ```
0050 |  *
0051 |  * The Page class emits various events (described below) which can be handled using any of Node's native
0052 |  * [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) methods, such as `on`, `once` or
0053 |  * `removeListener`.
0054 |  *
0055 |  * This example logs a message for a single page `load` event:
0056 |  *
0057 |  * ```js
0058 |  * page.once('load', () => console.log('Page loaded!'));
0059 |  * ```
0060 |  *
0061 |  * To unsubscribe from events use the `removeListener` method:
0062 |  *
0063 |  * ```js
0064 |  * function logRequest(interceptedRequest) {
0065 |  *   console.log('A request was made:', interceptedRequest.url());
0066 |  * }
0067 |  * page.on('request', logRequest);
0068 |  * // Sometime later...
0069 |  * page.removeListener('request', logRequest);
0070 |  * ```
0071 |  *
0072 |  */
0073 | export interface Page {
0074 |   /**
0075 |    * Returns the value of the
0076 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
0077 |    *
0078 |    * If the function passed to the
0079 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
0080 |    * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
0081 |    * the promise to resolve and return its value.
0082 |    *
0083 |    * If the function passed to the
0084 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
0085 |    * non-[Serializable] value, then
0086 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
0087 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
0088 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
0089 |    *
0090 |    * **Usage**
0091 |    *
0092 |    * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
0093 |    *
0094 |    * ```js
0095 |    * const result = await page.evaluate(([x, y]) => {
0096 |    *   return Promise.resolve(x * y);
0097 |    * }, [7, 8]);
0098 |    * console.log(result); // prints "56"
0099 |    * ```
0100 |    *
0101 |    * A string can also be passed in instead of a function:
0102 |    *
0103 |    * ```js
0104 |    * console.log(await page.evaluate('1 + 2')); // prints "3"
0105 |    * const x = 10;
0106 |    * console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
0107 |    * ```
0108 |    *
0109 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
0110 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
0111 |    *
0112 |    * ```js
0113 |    * const bodyHandle = await page.evaluate('document.body');
0114 |    * const html = await page.evaluate<string, HTMLElement>(([body, suffix]) =>
0115 |    *   body.innerHTML + suffix, [bodyHandle, 'hello']
0116 |    * );
0117 |    * await bodyHandle.dispose();
0118 |    * ```
0119 |    *
0120 |    * @param pageFunction Function to be evaluated in the page context.
0121 |    * @param arg Optional argument to pass to
0122 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
0123 |    */
0124 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
0125 |   /**
0126 |    * Returns the value of the
0127 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
0128 |    *
0129 |    * If the function passed to the
0130 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
0131 |    * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
0132 |    * the promise to resolve and return its value.
0133 |    *
0134 |    * If the function passed to the
0135 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
0136 |    * non-[Serializable] value, then
0137 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
0138 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
0139 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
0140 |    *
0141 |    * **Usage**
0142 |    *
0143 |    * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
0144 |    *
0145 |    * ```js
0146 |    * const result = await page.evaluate(([x, y]) => {
0147 |    *   return Promise.resolve(x * y);
0148 |    * }, [7, 8]);
0149 |    * console.log(result); // prints "56"
0150 |    * ```
0151 |    *
0152 |    * A string can also be passed in instead of a function:
0153 |    *
0154 |    * ```js
0155 |    * console.log(await page.evaluate('1 + 2')); // prints "3"
0156 |    * const x = 10;
0157 |    * console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
0158 |    * ```
0159 |    *
0160 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
0161 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
0162 |    *
0163 |    * ```js
0164 |    * const bodyHandle = await page.evaluate('document.body');
0165 |    * const html = await page.evaluate<string, HTMLElement>(([body, suffix]) =>
0166 |    *   body.innerHTML + suffix, [bodyHandle, 'hello']
0167 |    * );
0168 |    * await bodyHandle.dispose();
0169 |    * ```
0170 |    *
0171 |    * @param pageFunction Function to be evaluated in the page context.
0172 |    * @param arg Optional argument to pass to
0173 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
0174 |    */
0175 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
0176 | 
0177 |   /**
0178 |    * Returns the value of the
0179 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
0180 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0181 |    *
0182 |    * The only difference between
0183 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
0184 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
0185 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0186 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0187 |    *
0188 |    * If the function passed to the
0189 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0190 |    * a [Promise], then
0191 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
0192 |    * wait for the promise to resolve and return its value.
0193 |    *
0194 |    * **Usage**
0195 |    *
0196 |    * ```js
0197 |    * // Handle for the window object.
0198 |    * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window));
0199 |    * ```
0200 |    *
0201 |    * A string can also be passed in instead of a function:
0202 |    *
0203 |    * ```js
0204 |    * const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
0205 |    * ```
0206 |    *
0207 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
0208 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
0209 |    *
0210 |    * ```js
0211 |    * const aHandle = await page.evaluateHandle(() => document.body);
0212 |    * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
0213 |    * console.log(await resultHandle.jsonValue());
0214 |    * await resultHandle.dispose();
0215 |    * ```
0216 |    *
0217 |    * @param pageFunction Function to be evaluated in the page context.
0218 |    * @param arg Optional argument to pass to
0219 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
0220 |    */
0221 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
0222 |   /**
0223 |    * Returns the value of the
0224 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
0225 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0226 |    *
0227 |    * The only difference between
0228 |    * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
0229 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
0230 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0231 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
0232 |    *
0233 |    * If the function passed to the
0234 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
0235 |    * a [Promise], then
0236 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
0237 |    * wait for the promise to resolve and return its value.
0238 |    *
0239 |    * **Usage**
0240 |    *
0241 |    * ```js
0242 |    * // Handle for the window object.
0243 |    * const aWindowHandle = await page.evaluateHandle(() => Promise.resolve(window));
0244 |    * ```
0245 |    *
0246 |    * A string can also be passed in instead of a function:
0247 |    *
0248 |    * ```js
0249 |    * const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
0250 |    * ```
0251 |    *
0252 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
0253 |    * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
0254 |    *
0255 |    * ```js
0256 |    * const aHandle = await page.evaluateHandle(() => document.body);
0257 |    * const resultHandle = await page.evaluateHandle(body => body.innerHTML, aHandle);
0258 |    * console.log(await resultHandle.jsonValue());
0259 |    * await resultHandle.dispose();
0260 |    * ```
0261 |    *
0262 |    * @param pageFunction Function to be evaluated in the page context.
0263 |    * @param arg Optional argument to pass to
0264 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
0265 |    */
0266 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
0267 | 
0268 |   /**
0269 |    * Adds a script which would be evaluated in one of the following scenarios:
0270 |    * - Whenever the page is navigated.
0271 |    * - Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the
0272 |    *   newly attached frame.
0273 |    *
0274 |    * The script is evaluated after the document was created but before any of its scripts were run. This is useful to
0275 |    * amend the JavaScript environment, e.g. to seed `Math.random`.
0276 |    *
0277 |    * **Usage**
0278 |    *
0279 |    * An example of overriding `Math.random` before the page loads:
0280 |    *
0281 |    * ```js
0282 |    * // preload.js
0283 |    * Math.random = () => 42;
0284 |    * ```
0285 |    *
0286 |    * ```js
0287 |    * // In your playwright script, assuming the preload.js file is in same directory
0288 |    * await page.addInitScript({ path: './preload.js' });
0289 |    * ```
0290 |    *
0291 |    * ```js
0292 |    * await page.addInitScript(mock => {
0293 |    *   window.mock = mock;
0294 |    * }, mock);
0295 |    * ```
0296 |    *
0297 |    * **NOTE** The order of evaluation of multiple scripts installed via
0298 |    * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
0299 |    * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
0300 |    * defined.
0301 |    *
0302 |    * @param script Script to be evaluated in the page.
0303 |    * @param arg Optional argument to pass to
0304 |    * [`script`](https://playwright.dev/docs/api/class-page#page-add-init-script-option-script) (only supported when
0305 |    * passing a function).
0306 |    */
0307 |   addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
0308 | 
0309 |   /**
0310 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0311 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0312 |    *
0313 |    * The method finds an element matching the specified selector within the page. If no elements match the selector, the
0314 |    * return value resolves to `null`. To wait for an element on the page, use
0315 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for).
0316 |    * @param selector A selector to query for.
0317 |    * @param options
0318 |    */
0319 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
0320 |   /**
0321 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0322 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0323 |    *
0324 |    * The method finds an element matching the specified selector within the page. If no elements match the selector, the
0325 |    * return value resolves to `null`. To wait for an element on the page, use
0326 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for).
0327 |    * @param selector A selector to query for.
0328 |    * @param options
0329 |    */
0330 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
0331 | 
0332 |   /**
0333 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0334 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0335 |    *
0336 |    * The method finds all elements matching the specified selector within the page. If no elements match the selector,
0337 |    * the return value resolves to `[]`.
0338 |    * @param selector A selector to query for.
0339 |    */
0340 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
0341 |   /**
0342 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
0343 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
0344 |    *
0345 |    * The method finds all elements matching the specified selector within the page. If no elements match the selector,
0346 |    * the return value resolves to `[]`.
0347 |    * @param selector A selector to query for.
0348 |    */
0349 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
0350 | 
0351 |   /**
0352 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0353 |    * Use
0354 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0355 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0356 |    *
0357 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0358 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0359 |    * elements match the selector, the method throws an error. Returns the value of
0360 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0361 |    *
0362 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0363 |    * [Promise], then
0364 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0365 |    * would wait for the promise to resolve and return its value.
0366 |    *
0367 |    * **Usage**
0368 |    *
0369 |    * ```js
0370 |    * const searchValue = await page.$eval('#search', el => el.value);
0371 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0372 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0373 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0374 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0375 |    * ```
0376 |    *
0377 |    * @param selector A selector to query for.
0378 |    * @param pageFunction Function to be evaluated in the page context.
0379 |    * @param arg Optional argument to pass to
0380 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0381 |    * @param options
0382 |    */
0383 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
0384 |   /**
0385 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0386 |    * Use
0387 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0388 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0389 |    *
0390 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0391 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0392 |    * elements match the selector, the method throws an error. Returns the value of
0393 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0394 |    *
0395 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0396 |    * [Promise], then
0397 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0398 |    * would wait for the promise to resolve and return its value.
0399 |    *
0400 |    * **Usage**
0401 |    *
0402 |    * ```js
0403 |    * const searchValue = await page.$eval('#search', el => el.value);
0404 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0405 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0406 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0407 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0408 |    * ```
0409 |    *
0410 |    * @param selector A selector to query for.
0411 |    * @param pageFunction Function to be evaluated in the page context.
0412 |    * @param arg Optional argument to pass to
0413 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0414 |    * @param options
0415 |    */
0416 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
0417 |   /**
0418 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0419 |    * Use
0420 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0421 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0422 |    *
0423 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0424 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0425 |    * elements match the selector, the method throws an error. Returns the value of
0426 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0427 |    *
0428 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0429 |    * [Promise], then
0430 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0431 |    * would wait for the promise to resolve and return its value.
0432 |    *
0433 |    * **Usage**
0434 |    *
0435 |    * ```js
0436 |    * const searchValue = await page.$eval('#search', el => el.value);
0437 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0438 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0439 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0440 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0441 |    * ```
0442 |    *
0443 |    * @param selector A selector to query for.
0444 |    * @param pageFunction Function to be evaluated in the page context.
0445 |    * @param arg Optional argument to pass to
0446 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0447 |    * @param options
0448 |    */
0449 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
0450 |   /**
0451 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
0452 |    * Use
0453 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
0454 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
0455 |    *
0456 |    * The method finds an element matching the specified selector within the page and passes it as a first argument to
0457 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
0458 |    * elements match the selector, the method throws an error. Returns the value of
0459 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0460 |    *
0461 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
0462 |    * [Promise], then
0463 |    * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
0464 |    * would wait for the promise to resolve and return its value.
0465 |    *
0466 |    * **Usage**
0467 |    *
0468 |    * ```js
0469 |    * const searchValue = await page.$eval('#search', el => el.value);
0470 |    * const preloadHref = await page.$eval('link[rel=preload]', el => el.href);
0471 |    * const html = await page.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
0472 |    * // In TypeScript, this example requires an explicit type annotation (HTMLLinkElement) on el:
0473 |    * const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement) => el.href);
0474 |    * ```
0475 |    *
0476 |    * @param selector A selector to query for.
0477 |    * @param pageFunction Function to be evaluated in the page context.
0478 |    * @param arg Optional argument to pass to
0479 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
0480 |    * @param options
0481 |    */
0482 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
0483 | 
0484 |   /**
0485 |    * **NOTE** In most cases,
0486 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0487 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0488 |    * job.
0489 |    *
0490 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0491 |    * elements as a first argument to
0492 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0493 |    * the result of
0494 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0495 |    * invocation.
0496 |    *
0497 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0498 |    * a [Promise], then
0499 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0500 |    * would wait for the promise to resolve and return its value.
0501 |    *
0502 |    * **Usage**
0503 |    *
0504 |    * ```js
0505 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0506 |    * ```
0507 |    *
0508 |    * @param selector A selector to query for.
0509 |    * @param pageFunction Function to be evaluated in the page context.
0510 |    * @param arg Optional argument to pass to
0511 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0512 |    */
0513 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
0514 |   /**
0515 |    * **NOTE** In most cases,
0516 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0517 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0518 |    * job.
0519 |    *
0520 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0521 |    * elements as a first argument to
0522 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0523 |    * the result of
0524 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0525 |    * invocation.
0526 |    *
0527 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0528 |    * a [Promise], then
0529 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0530 |    * would wait for the promise to resolve and return its value.
0531 |    *
0532 |    * **Usage**
0533 |    *
0534 |    * ```js
0535 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0536 |    * ```
0537 |    *
0538 |    * @param selector A selector to query for.
0539 |    * @param pageFunction Function to be evaluated in the page context.
0540 |    * @param arg Optional argument to pass to
0541 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0542 |    */
0543 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
0544 |   /**
0545 |    * **NOTE** In most cases,
0546 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0547 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0548 |    * job.
0549 |    *
0550 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0551 |    * elements as a first argument to
0552 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0553 |    * the result of
0554 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0555 |    * invocation.
0556 |    *
0557 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0558 |    * a [Promise], then
0559 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0560 |    * would wait for the promise to resolve and return its value.
0561 |    *
0562 |    * **Usage**
0563 |    *
0564 |    * ```js
0565 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0566 |    * ```
0567 |    *
0568 |    * @param selector A selector to query for.
0569 |    * @param pageFunction Function to be evaluated in the page context.
0570 |    * @param arg Optional argument to pass to
0571 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0572 |    */
0573 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
0574 |   /**
0575 |    * **NOTE** In most cases,
0576 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
0577 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
0578 |    * job.
0579 |    *
0580 |    * The method finds all elements matching the specified selector within the page and passes an array of matched
0581 |    * elements as a first argument to
0582 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
0583 |    * the result of
0584 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
0585 |    * invocation.
0586 |    *
0587 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
0588 |    * a [Promise], then
0589 |    * [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
0590 |    * would wait for the promise to resolve and return its value.
0591 |    *
0592 |    * **Usage**
0593 |    *
0594 |    * ```js
0595 |    * const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10);
0596 |    * ```
0597 |    *
0598 |    * @param selector A selector to query for.
0599 |    * @param pageFunction Function to be evaluated in the page context.
0600 |    * @param arg Optional argument to pass to
0601 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
0602 |    */
0603 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
0604 | 
0605 |   /**
0606 |    * Returns when the
0607 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
0608 |    * truthy value. It resolves to a JSHandle of the truthy value.
0609 |    *
0610 |    * **Usage**
0611 |    *
0612 |    * The
0613 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0614 |    * can be used to observe viewport size change:
0615 |    *
0616 |    * ```js
0617 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0618 |    *
0619 |    * (async () => {
0620 |    *   const browser = await webkit.launch();
0621 |    *   const page = await browser.newPage();
0622 |    *   const watchDog = page.waitForFunction(() => window.innerWidth < 100);
0623 |    *   await page.setViewportSize({ width: 50, height: 50 });
0624 |    *   await watchDog;
0625 |    *   await browser.close();
0626 |    * })();
0627 |    * ```
0628 |    *
0629 |    * To pass an argument to the predicate of
0630 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0631 |    * function:
0632 |    *
0633 |    * ```js
0634 |    * const selector = '.foo';
0635 |    * await page.waitForFunction(selector => !!document.querySelector(selector), selector);
0636 |    * ```
0637 |    *
0638 |    * @param pageFunction Function to be evaluated in the page context.
0639 |    * @param arg Optional argument to pass to
0640 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
0641 |    * @param options
0642 |    */
0643 |   waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
0644 |   /**
0645 |    * Returns when the
0646 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
0647 |    * truthy value. It resolves to a JSHandle of the truthy value.
0648 |    *
0649 |    * **Usage**
0650 |    *
0651 |    * The
0652 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0653 |    * can be used to observe viewport size change:
0654 |    *
0655 |    * ```js
0656 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0657 |    *
0658 |    * (async () => {
0659 |    *   const browser = await webkit.launch();
0660 |    *   const page = await browser.newPage();
0661 |    *   const watchDog = page.waitForFunction(() => window.innerWidth < 100);
0662 |    *   await page.setViewportSize({ width: 50, height: 50 });
0663 |    *   await watchDog;
0664 |    *   await browser.close();
0665 |    * })();
0666 |    * ```
0667 |    *
0668 |    * To pass an argument to the predicate of
0669 |    * [page.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-wait-for-function)
0670 |    * function:
0671 |    *
0672 |    * ```js
0673 |    * const selector = '.foo';
0674 |    * await page.waitForFunction(selector => !!document.querySelector(selector), selector);
0675 |    * ```
0676 |    *
0677 |    * @param pageFunction Function to be evaluated in the page context.
0678 |    * @param arg Optional argument to pass to
0679 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
0680 |    * @param options
0681 |    */
0682 |   waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
0683 | 
0684 |   /**
0685 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0686 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0687 |    * about [locators](https://playwright.dev/docs/locators).
0688 |    *
0689 |    * Returns when element specified by selector satisfies
0690 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0691 |    * waiting for `hidden` or `detached`.
0692 |    *
0693 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0694 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0695 |    * wait-for-selector-free.
0696 |    *
0697 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0698 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0699 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0700 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0701 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0702 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0703 |    * function will throw.
0704 |    *
0705 |    * **Usage**
0706 |    *
0707 |    * This method works across navigations:
0708 |    *
0709 |    * ```js
0710 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0711 |    *
0712 |    * (async () => {
0713 |    *   const browser = await chromium.launch();
0714 |    *   const page = await browser.newPage();
0715 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0716 |    *     await page.goto(currentURL);
0717 |    *     const element = await page.waitForSelector('img');
0718 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0719 |    *   }
0720 |    *   await browser.close();
0721 |    * })();
0722 |    * ```
0723 |    *
0724 |    * @param selector A selector to query for.
0725 |    * @param options
0726 |    */
0727 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
0728 |   /**
0729 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0730 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0731 |    * about [locators](https://playwright.dev/docs/locators).
0732 |    *
0733 |    * Returns when element specified by selector satisfies
0734 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0735 |    * waiting for `hidden` or `detached`.
0736 |    *
0737 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0738 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0739 |    * wait-for-selector-free.
0740 |    *
0741 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0742 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0743 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0744 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0745 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0746 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0747 |    * function will throw.
0748 |    *
0749 |    * **Usage**
0750 |    *
0751 |    * This method works across navigations:
0752 |    *
0753 |    * ```js
0754 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0755 |    *
0756 |    * (async () => {
0757 |    *   const browser = await chromium.launch();
0758 |    *   const page = await browser.newPage();
0759 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0760 |    *     await page.goto(currentURL);
0761 |    *     const element = await page.waitForSelector('img');
0762 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0763 |    *   }
0764 |    *   await browser.close();
0765 |    * })();
0766 |    * ```
0767 |    *
0768 |    * @param selector A selector to query for.
0769 |    * @param options
0770 |    */
0771 |   waitForSelector(selector: string, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
0772 |   /**
0773 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0774 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0775 |    * about [locators](https://playwright.dev/docs/locators).
0776 |    *
0777 |    * Returns when element specified by selector satisfies
0778 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0779 |    * waiting for `hidden` or `detached`.
0780 |    *
0781 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0782 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0783 |    * wait-for-selector-free.
0784 |    *
0785 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0786 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0787 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0788 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0789 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0790 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0791 |    * function will throw.
0792 |    *
0793 |    * **Usage**
0794 |    *
0795 |    * This method works across navigations:
0796 |    *
0797 |    * ```js
0798 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0799 |    *
0800 |    * (async () => {
0801 |    *   const browser = await chromium.launch();
0802 |    *   const page = await browser.newPage();
0803 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0804 |    *     await page.goto(currentURL);
0805 |    *     const element = await page.waitForSelector('img');
0806 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0807 |    *   }
0808 |    *   await browser.close();
0809 |    * })();
0810 |    * ```
0811 |    *
0812 |    * @param selector A selector to query for.
0813 |    * @param options
0814 |    */
0815 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: PageWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
0816 |   /**
0817 |    * **NOTE** Use web assertions that assert visibility or a locator-based
0818 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
0819 |    * about [locators](https://playwright.dev/docs/locators).
0820 |    *
0821 |    * Returns when element specified by selector satisfies
0822 |    * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
0823 |    * waiting for `hidden` or `detached`.
0824 |    *
0825 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
0826 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
0827 |    * wait-for-selector-free.
0828 |    *
0829 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
0830 |    * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
0831 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
0832 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
0833 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
0834 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
0835 |    * function will throw.
0836 |    *
0837 |    * **Usage**
0838 |    *
0839 |    * This method works across navigations:
0840 |    *
0841 |    * ```js
0842 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
0843 |    *
0844 |    * (async () => {
0845 |    *   const browser = await chromium.launch();
0846 |    *   const page = await browser.newPage();
0847 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
0848 |    *     await page.goto(currentURL);
0849 |    *     const element = await page.waitForSelector('img');
0850 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
0851 |    *   }
0852 |    *   await browser.close();
0853 |    * })();
0854 |    * ```
0855 |    *
0856 |    * @param selector A selector to query for.
0857 |    * @param options
0858 |    */
0859 |   waitForSelector(selector: string, options: PageWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
0860 | 
0861 |   /**
0862 |    * The method adds a function called
0863 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
0864 |    * every frame in this page. When called, the function executes
0865 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
0866 |    * [Promise] which resolves to the return value of
0867 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
0868 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
0869 |    * it will be awaited.
0870 |    *
0871 |    * The first argument of the
0872 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
0873 |    * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
0874 |    *
0875 |    * See
0876 |    * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
0877 |    * for the context-wide version.
0878 |    *
0879 |    * **NOTE** Functions installed via
0880 |    * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
0881 |    * survive navigations.
0882 |    *
0883 |    * **Usage**
0884 |    *
0885 |    * An example of exposing page URL to all frames in a page:
0886 |    *
0887 |    * ```js
0888 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0889 |    *
0890 |    * (async () => {
0891 |    *   const browser = await webkit.launch({ headless: false });
0892 |    *   const context = await browser.newContext();
0893 |    *   const page = await context.newPage();
0894 |    *   await page.exposeBinding('pageURL', ({ page }) => page.url());
0895 |    *   await page.setContent(`
0896 |    *     <script>
0897 |    *       async function onClick() {
0898 |    *         document.querySelector('div').textContent = await window.pageURL();
0899 |    *       }
0900 |    *     </script>
0901 |    *     <button onclick="onClick()">Click me</button>
0902 |    *     <div></div>
0903 |    *   `);
0904 |    *   await page.click('button');
0905 |    * })();
0906 |    * ```
0907 |    *
0908 |    * @param name Name of the function on the window object.
0909 |    * @param callback Callback function that will be called in the Playwright's context.
0910 |    * @param options
0911 |    */
0912 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
0913 |   /**
0914 |    * The method adds a function called
0915 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
0916 |    * every frame in this page. When called, the function executes
0917 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
0918 |    * [Promise] which resolves to the return value of
0919 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
0920 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
0921 |    * it will be awaited.
0922 |    *
0923 |    * The first argument of the
0924 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
0925 |    * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
0926 |    *
0927 |    * See
0928 |    * [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
0929 |    * for the context-wide version.
0930 |    *
0931 |    * **NOTE** Functions installed via
0932 |    * [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
0933 |    * survive navigations.
0934 |    *
0935 |    * **Usage**
0936 |    *
0937 |    * An example of exposing page URL to all frames in a page:
0938 |    *
0939 |    * ```js
0940 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
0941 |    *
0942 |    * (async () => {
0943 |    *   const browser = await webkit.launch({ headless: false });
0944 |    *   const context = await browser.newContext();
0945 |    *   const page = await context.newPage();
0946 |    *   await page.exposeBinding('pageURL', ({ page }) => page.url());
0947 |    *   await page.setContent(`
0948 |    *     <script>
0949 |    *       async function onClick() {
0950 |    *         document.querySelector('div').textContent = await window.pageURL();
0951 |    *       }
0952 |    *     </script>
0953 |    *     <button onclick="onClick()">Click me</button>
0954 |    *     <div></div>
0955 |    *   `);
0956 |    *   await page.click('button');
0957 |    * })();
0958 |    * ```
0959 |    *
0960 |    * @param name Name of the function on the window object.
0961 |    * @param callback Callback function that will be called in the Playwright's context.
0962 |    * @param options
0963 |    */
0964 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, ...args: any[]) => any, options?: { handle?: boolean }): Promise<void>;
0965 | 
0966 |   /**
0967 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
0968 |    * async listeners to complete or to ignore subsequent errors from these listeners.
0969 |    *
0970 |    * **Usage**
0971 |    *
0972 |    * ```js
0973 |    * page.on('request', async request => {
0974 |    *   const response = await request.response();
0975 |    *   const body = await response.body();
0976 |    *   console.log(body.byteLength);
0977 |    * });
0978 |    * await page.goto('https://playwright.dev', { waitUntil: 'domcontentloaded' });
0979 |    * // Waits for all the reported 'request' events to resolve.
0980 |    * await page.removeAllListeners('request', { behavior: 'wait' });
0981 |    * ```
0982 |    *
0983 |    * @param type
0984 |    * @param options
0985 |    */
0986 |   removeAllListeners(type?: string): this;
0987 |   /**
0988 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
0989 |    * async listeners to complete or to ignore subsequent errors from these listeners.
0990 |    *
0991 |    * **Usage**
0992 |    *
0993 |    * ```js
0994 |    * page.on('request', async request => {
0995 |    *   const response = await request.response();
0996 |    *   const body = await response.body();
0997 |    *   console.log(body.byteLength);
0998 |    * });
0999 |    * await page.goto('https://playwright.dev', { waitUntil: 'domcontentloaded' });
1000 |    * // Waits for all the reported 'request' events to resolve.
1001 |    * await page.removeAllListeners('request', { behavior: 'wait' });
1002 |    * ```
1003 |    *
1004 |    * @param type
1005 |    * @param options
1006 |    */
1007 |   removeAllListeners(type: string | undefined, options: {
1008 |     /**
1009 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
1010 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
1011 |      * - `'wait'` - wait for current listener calls (if any) to finish
1012 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
1013 |      */
1014 |     behavior?: 'wait'|'ignoreErrors'|'default'
1015 |   }): Promise<void>;
1016 |   /**
1017 |    * Emitted when the page closes.
1018 |    */
1019 |   on(event: 'close', listener: (page: Page) => any): this;
1020 | 
1021 |   /**
1022 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1023 |    *
1024 |    * The arguments passed into `console.log` are available on the
1025 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1026 |    *
1027 |    * **Usage**
1028 |    *
1029 |    * ```js
1030 |    * page.on('console', async msg => {
1031 |    *   const values = [];
1032 |    *   for (const arg of msg.args())
1033 |    *     values.push(await arg.jsonValue());
1034 |    *   console.log(...values);
1035 |    * });
1036 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1037 |    * ```
1038 |    *
1039 |    */
1040 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1041 | 
1042 |   /**
1043 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1044 |    * crashes, ongoing and subsequent operations will throw.
1045 |    *
1046 |    * The most common way to deal with crashes is to catch an exception:
1047 |    *
1048 |    * ```js
1049 |    * try {
1050 |    *   // Crash might happen during a click.
1051 |    *   await page.click('button');
1052 |    *   // Or while waiting for an event.
1053 |    *   await page.waitForEvent('popup');
1054 |    * } catch (e) {
1055 |    *   // When the page crashes, exception message contains 'crash'.
1056 |    * }
1057 |    * ```
1058 |    *
1059 |    */
1060 |   on(event: 'crash', listener: (page: Page) => any): this;
1061 | 
1062 |   /**
1063 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1064 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1065 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1066 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1067 |    * dialog, and actions like click will never finish.
1068 |    *
1069 |    * **Usage**
1070 |    *
1071 |    * ```js
1072 |    * page.on('dialog', dialog => dialog.accept());
1073 |    * ```
1074 |    *
1075 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1076 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1077 |    * listeners are present, all dialogs are automatically dismissed.
1078 |    *
1079 |    */
1080 |   on(event: 'dialog', listener: (dialog: Dialog) => any): this;
1081 | 
1082 |   /**
1083 |    * Emitted when the JavaScript
1084 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1085 |    */
1086 |   on(event: 'domcontentloaded', listener: (page: Page) => any): this;
1087 | 
1088 |   /**
1089 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1090 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1091 |    */
1092 |   on(event: 'download', listener: (download: Download) => any): this;
1093 | 
1094 |   /**
1095 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1096 |    * respond to it via setting the input files using
1097 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1098 |    * that can be uploaded after that.
1099 |    *
1100 |    * ```js
1101 |    * page.on('filechooser', async fileChooser => {
1102 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1103 |    * });
1104 |    * ```
1105 |    *
1106 |    */
1107 |   on(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1108 | 
1109 |   /**
1110 |    * Emitted when a frame is attached.
1111 |    */
1112 |   on(event: 'frameattached', listener: (frame: Frame) => any): this;
1113 | 
1114 |   /**
1115 |    * Emitted when a frame is detached.
1116 |    */
1117 |   on(event: 'framedetached', listener: (frame: Frame) => any): this;
1118 | 
1119 |   /**
1120 |    * Emitted when a frame is navigated to a new url.
1121 |    */
1122 |   on(event: 'framenavigated', listener: (frame: Frame) => any): this;
1123 | 
1124 |   /**
1125 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1126 |    */
1127 |   on(event: 'load', listener: (page: Page) => any): this;
1128 | 
1129 |   /**
1130 |    * Emitted when an uncaught exception happens within the page.
1131 |    *
1132 |    * ```js
1133 |    * // Log all uncaught errors to the terminal
1134 |    * page.on('pageerror', exception => {
1135 |    *   console.log(`Uncaught exception: "${exception}"`);
1136 |    * });
1137 |    *
1138 |    * // Navigate to a page with an exception.
1139 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1140 |    * ```
1141 |    *
1142 |    */
1143 |   on(event: 'pageerror', listener: (error: Error) => any): this;
1144 | 
1145 |   /**
1146 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1147 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1148 |    * only for popups relevant to this page.
1149 |    *
1150 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1151 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1152 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1153 |    * to this network request, use
1154 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1155 |    * and
1156 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1157 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1158 |    *
1159 |    * ```js
1160 |    * // Start waiting for popup before clicking. Note no await.
1161 |    * const popupPromise = page.waitForEvent('popup');
1162 |    * await page.getByText('open the popup').click();
1163 |    * const popup = await popupPromise;
1164 |    * console.log(await popup.evaluate('location.href'));
1165 |    * ```
1166 |    *
1167 |    * **NOTE** Use
1168 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1169 |    * wait until the page gets to a particular state (you should not need it in most cases).
1170 |    *
1171 |    */
1172 |   on(event: 'popup', listener: (page: Page) => any): this;
1173 | 
1174 |   /**
1175 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1176 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1177 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1178 |    */
1179 |   on(event: 'request', listener: (request: Request) => any): this;
1180 | 
1181 |   /**
1182 |    * Emitted when a request fails, for example by timing out.
1183 |    *
1184 |    * ```js
1185 |    * page.on('requestfailed', request => {
1186 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1187 |    * });
1188 |    * ```
1189 |    *
1190 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1191 |    * will complete with
1192 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1193 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1194 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1195 |    * error net::ERR_FAILED.
1196 |    *
1197 |    */
1198 |   on(event: 'requestfailed', listener: (request: Request) => any): this;
1199 | 
1200 |   /**
1201 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1202 |    * sequence of events is `request`, `response` and `requestfinished`.
1203 |    */
1204 |   on(event: 'requestfinished', listener: (request: Request) => any): this;
1205 | 
1206 |   /**
1207 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1208 |    * events is `request`, `response` and `requestfinished`.
1209 |    */
1210 |   on(event: 'response', listener: (response: Response) => any): this;
1211 | 
1212 |   /**
1213 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1214 |    */
1215 |   on(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1216 | 
1217 |   /**
1218 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1219 |    * by the page.
1220 |    */
1221 |   on(event: 'worker', listener: (worker: Worker) => any): this;
1222 | 
1223 |   /**
1224 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1225 |    */
1226 |   once(event: 'close', listener: (page: Page) => any): this;
1227 | 
1228 |   /**
1229 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1230 |    */
1231 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1232 | 
1233 |   /**
1234 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1235 |    */
1236 |   once(event: 'crash', listener: (page: Page) => any): this;
1237 | 
1238 |   /**
1239 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1240 |    */
1241 |   once(event: 'dialog', listener: (dialog: Dialog) => any): this;
1242 | 
1243 |   /**
1244 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1245 |    */
1246 |   once(event: 'domcontentloaded', listener: (page: Page) => any): this;
1247 | 
1248 |   /**
1249 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1250 |    */
1251 |   once(event: 'download', listener: (download: Download) => any): this;
1252 | 
1253 |   /**
1254 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1255 |    */
1256 |   once(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1257 | 
1258 |   /**
1259 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1260 |    */
1261 |   once(event: 'frameattached', listener: (frame: Frame) => any): this;
1262 | 
1263 |   /**
1264 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1265 |    */
1266 |   once(event: 'framedetached', listener: (frame: Frame) => any): this;
1267 | 
1268 |   /**
1269 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1270 |    */
1271 |   once(event: 'framenavigated', listener: (frame: Frame) => any): this;
1272 | 
1273 |   /**
1274 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1275 |    */
1276 |   once(event: 'load', listener: (page: Page) => any): this;
1277 | 
1278 |   /**
1279 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1280 |    */
1281 |   once(event: 'pageerror', listener: (error: Error) => any): this;
1282 | 
1283 |   /**
1284 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1285 |    */
1286 |   once(event: 'popup', listener: (page: Page) => any): this;
1287 | 
1288 |   /**
1289 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1290 |    */
1291 |   once(event: 'request', listener: (request: Request) => any): this;
1292 | 
1293 |   /**
1294 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1295 |    */
1296 |   once(event: 'requestfailed', listener: (request: Request) => any): this;
1297 | 
1298 |   /**
1299 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1300 |    */
1301 |   once(event: 'requestfinished', listener: (request: Request) => any): this;
1302 | 
1303 |   /**
1304 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1305 |    */
1306 |   once(event: 'response', listener: (response: Response) => any): this;
1307 | 
1308 |   /**
1309 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1310 |    */
1311 |   once(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1312 | 
1313 |   /**
1314 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
1315 |    */
1316 |   once(event: 'worker', listener: (worker: Worker) => any): this;
1317 | 
1318 |   /**
1319 |    * Emitted when the page closes.
1320 |    */
1321 |   addListener(event: 'close', listener: (page: Page) => any): this;
1322 | 
1323 |   /**
1324 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1325 |    *
1326 |    * The arguments passed into `console.log` are available on the
1327 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1328 |    *
1329 |    * **Usage**
1330 |    *
1331 |    * ```js
1332 |    * page.on('console', async msg => {
1333 |    *   const values = [];
1334 |    *   for (const arg of msg.args())
1335 |    *     values.push(await arg.jsonValue());
1336 |    *   console.log(...values);
1337 |    * });
1338 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1339 |    * ```
1340 |    *
1341 |    */
1342 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1343 | 
1344 |   /**
1345 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1346 |    * crashes, ongoing and subsequent operations will throw.
1347 |    *
1348 |    * The most common way to deal with crashes is to catch an exception:
1349 |    *
1350 |    * ```js
1351 |    * try {
1352 |    *   // Crash might happen during a click.
1353 |    *   await page.click('button');
1354 |    *   // Or while waiting for an event.
1355 |    *   await page.waitForEvent('popup');
1356 |    * } catch (e) {
1357 |    *   // When the page crashes, exception message contains 'crash'.
1358 |    * }
1359 |    * ```
1360 |    *
1361 |    */
1362 |   addListener(event: 'crash', listener: (page: Page) => any): this;
1363 | 
1364 |   /**
1365 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1366 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1367 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1368 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1369 |    * dialog, and actions like click will never finish.
1370 |    *
1371 |    * **Usage**
1372 |    *
1373 |    * ```js
1374 |    * page.on('dialog', dialog => dialog.accept());
1375 |    * ```
1376 |    *
1377 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1378 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1379 |    * listeners are present, all dialogs are automatically dismissed.
1380 |    *
1381 |    */
1382 |   addListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1383 | 
1384 |   /**
1385 |    * Emitted when the JavaScript
1386 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1387 |    */
1388 |   addListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1389 | 
1390 |   /**
1391 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1392 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1393 |    */
1394 |   addListener(event: 'download', listener: (download: Download) => any): this;
1395 | 
1396 |   /**
1397 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1398 |    * respond to it via setting the input files using
1399 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1400 |    * that can be uploaded after that.
1401 |    *
1402 |    * ```js
1403 |    * page.on('filechooser', async fileChooser => {
1404 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1405 |    * });
1406 |    * ```
1407 |    *
1408 |    */
1409 |   addListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1410 | 
1411 |   /**
1412 |    * Emitted when a frame is attached.
1413 |    */
1414 |   addListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1415 | 
1416 |   /**
1417 |    * Emitted when a frame is detached.
1418 |    */
1419 |   addListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1420 | 
1421 |   /**
1422 |    * Emitted when a frame is navigated to a new url.
1423 |    */
1424 |   addListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1425 | 
1426 |   /**
1427 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1428 |    */
1429 |   addListener(event: 'load', listener: (page: Page) => any): this;
1430 | 
1431 |   /**
1432 |    * Emitted when an uncaught exception happens within the page.
1433 |    *
1434 |    * ```js
1435 |    * // Log all uncaught errors to the terminal
1436 |    * page.on('pageerror', exception => {
1437 |    *   console.log(`Uncaught exception: "${exception}"`);
1438 |    * });
1439 |    *
1440 |    * // Navigate to a page with an exception.
1441 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1442 |    * ```
1443 |    *
1444 |    */
1445 |   addListener(event: 'pageerror', listener: (error: Error) => any): this;
1446 | 
1447 |   /**
1448 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1449 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1450 |    * only for popups relevant to this page.
1451 |    *
1452 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1453 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1454 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1455 |    * to this network request, use
1456 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1457 |    * and
1458 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1459 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1460 |    *
1461 |    * ```js
1462 |    * // Start waiting for popup before clicking. Note no await.
1463 |    * const popupPromise = page.waitForEvent('popup');
1464 |    * await page.getByText('open the popup').click();
1465 |    * const popup = await popupPromise;
1466 |    * console.log(await popup.evaluate('location.href'));
1467 |    * ```
1468 |    *
1469 |    * **NOTE** Use
1470 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1471 |    * wait until the page gets to a particular state (you should not need it in most cases).
1472 |    *
1473 |    */
1474 |   addListener(event: 'popup', listener: (page: Page) => any): this;
1475 | 
1476 |   /**
1477 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1478 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1479 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1480 |    */
1481 |   addListener(event: 'request', listener: (request: Request) => any): this;
1482 | 
1483 |   /**
1484 |    * Emitted when a request fails, for example by timing out.
1485 |    *
1486 |    * ```js
1487 |    * page.on('requestfailed', request => {
1488 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1489 |    * });
1490 |    * ```
1491 |    *
1492 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1493 |    * will complete with
1494 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1495 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1496 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1497 |    * error net::ERR_FAILED.
1498 |    *
1499 |    */
1500 |   addListener(event: 'requestfailed', listener: (request: Request) => any): this;
1501 | 
1502 |   /**
1503 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1504 |    * sequence of events is `request`, `response` and `requestfinished`.
1505 |    */
1506 |   addListener(event: 'requestfinished', listener: (request: Request) => any): this;
1507 | 
1508 |   /**
1509 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1510 |    * events is `request`, `response` and `requestfinished`.
1511 |    */
1512 |   addListener(event: 'response', listener: (response: Response) => any): this;
1513 | 
1514 |   /**
1515 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1516 |    */
1517 |   addListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1518 | 
1519 |   /**
1520 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1521 |    * by the page.
1522 |    */
1523 |   addListener(event: 'worker', listener: (worker: Worker) => any): this;
1524 | 
1525 |   /**
1526 |    * Removes an event listener added by `on` or `addListener`.
1527 |    */
1528 |   removeListener(event: 'close', listener: (page: Page) => any): this;
1529 | 
1530 |   /**
1531 |    * Removes an event listener added by `on` or `addListener`.
1532 |    */
1533 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1534 | 
1535 |   /**
1536 |    * Removes an event listener added by `on` or `addListener`.
1537 |    */
1538 |   removeListener(event: 'crash', listener: (page: Page) => any): this;
1539 | 
1540 |   /**
1541 |    * Removes an event listener added by `on` or `addListener`.
1542 |    */
1543 |   removeListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1544 | 
1545 |   /**
1546 |    * Removes an event listener added by `on` or `addListener`.
1547 |    */
1548 |   removeListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1549 | 
1550 |   /**
1551 |    * Removes an event listener added by `on` or `addListener`.
1552 |    */
1553 |   removeListener(event: 'download', listener: (download: Download) => any): this;
1554 | 
1555 |   /**
1556 |    * Removes an event listener added by `on` or `addListener`.
1557 |    */
1558 |   removeListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1559 | 
1560 |   /**
1561 |    * Removes an event listener added by `on` or `addListener`.
1562 |    */
1563 |   removeListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1564 | 
1565 |   /**
1566 |    * Removes an event listener added by `on` or `addListener`.
1567 |    */
1568 |   removeListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1569 | 
1570 |   /**
1571 |    * Removes an event listener added by `on` or `addListener`.
1572 |    */
1573 |   removeListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1574 | 
1575 |   /**
1576 |    * Removes an event listener added by `on` or `addListener`.
1577 |    */
1578 |   removeListener(event: 'load', listener: (page: Page) => any): this;
1579 | 
1580 |   /**
1581 |    * Removes an event listener added by `on` or `addListener`.
1582 |    */
1583 |   removeListener(event: 'pageerror', listener: (error: Error) => any): this;
1584 | 
1585 |   /**
1586 |    * Removes an event listener added by `on` or `addListener`.
1587 |    */
1588 |   removeListener(event: 'popup', listener: (page: Page) => any): this;
1589 | 
1590 |   /**
1591 |    * Removes an event listener added by `on` or `addListener`.
1592 |    */
1593 |   removeListener(event: 'request', listener: (request: Request) => any): this;
1594 | 
1595 |   /**
1596 |    * Removes an event listener added by `on` or `addListener`.
1597 |    */
1598 |   removeListener(event: 'requestfailed', listener: (request: Request) => any): this;
1599 | 
1600 |   /**
1601 |    * Removes an event listener added by `on` or `addListener`.
1602 |    */
1603 |   removeListener(event: 'requestfinished', listener: (request: Request) => any): this;
1604 | 
1605 |   /**
1606 |    * Removes an event listener added by `on` or `addListener`.
1607 |    */
1608 |   removeListener(event: 'response', listener: (response: Response) => any): this;
1609 | 
1610 |   /**
1611 |    * Removes an event listener added by `on` or `addListener`.
1612 |    */
1613 |   removeListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1614 | 
1615 |   /**
1616 |    * Removes an event listener added by `on` or `addListener`.
1617 |    */
1618 |   removeListener(event: 'worker', listener: (worker: Worker) => any): this;
1619 | 
1620 |   /**
1621 |    * Removes an event listener added by `on` or `addListener`.
1622 |    */
1623 |   off(event: 'close', listener: (page: Page) => any): this;
1624 | 
1625 |   /**
1626 |    * Removes an event listener added by `on` or `addListener`.
1627 |    */
1628 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1629 | 
1630 |   /**
1631 |    * Removes an event listener added by `on` or `addListener`.
1632 |    */
1633 |   off(event: 'crash', listener: (page: Page) => any): this;
1634 | 
1635 |   /**
1636 |    * Removes an event listener added by `on` or `addListener`.
1637 |    */
1638 |   off(event: 'dialog', listener: (dialog: Dialog) => any): this;
1639 | 
1640 |   /**
1641 |    * Removes an event listener added by `on` or `addListener`.
1642 |    */
1643 |   off(event: 'domcontentloaded', listener: (page: Page) => any): this;
1644 | 
1645 |   /**
1646 |    * Removes an event listener added by `on` or `addListener`.
1647 |    */
1648 |   off(event: 'download', listener: (download: Download) => any): this;
1649 | 
1650 |   /**
1651 |    * Removes an event listener added by `on` or `addListener`.
1652 |    */
1653 |   off(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1654 | 
1655 |   /**
1656 |    * Removes an event listener added by `on` or `addListener`.
1657 |    */
1658 |   off(event: 'frameattached', listener: (frame: Frame) => any): this;
1659 | 
1660 |   /**
1661 |    * Removes an event listener added by `on` or `addListener`.
1662 |    */
1663 |   off(event: 'framedetached', listener: (frame: Frame) => any): this;
1664 | 
1665 |   /**
1666 |    * Removes an event listener added by `on` or `addListener`.
1667 |    */
1668 |   off(event: 'framenavigated', listener: (frame: Frame) => any): this;
1669 | 
1670 |   /**
1671 |    * Removes an event listener added by `on` or `addListener`.
1672 |    */
1673 |   off(event: 'load', listener: (page: Page) => any): this;
1674 | 
1675 |   /**
1676 |    * Removes an event listener added by `on` or `addListener`.
1677 |    */
1678 |   off(event: 'pageerror', listener: (error: Error) => any): this;
1679 | 
1680 |   /**
1681 |    * Removes an event listener added by `on` or `addListener`.
1682 |    */
1683 |   off(event: 'popup', listener: (page: Page) => any): this;
1684 | 
1685 |   /**
1686 |    * Removes an event listener added by `on` or `addListener`.
1687 |    */
1688 |   off(event: 'request', listener: (request: Request) => any): this;
1689 | 
1690 |   /**
1691 |    * Removes an event listener added by `on` or `addListener`.
1692 |    */
1693 |   off(event: 'requestfailed', listener: (request: Request) => any): this;
1694 | 
1695 |   /**
1696 |    * Removes an event listener added by `on` or `addListener`.
1697 |    */
1698 |   off(event: 'requestfinished', listener: (request: Request) => any): this;
1699 | 
1700 |   /**
1701 |    * Removes an event listener added by `on` or `addListener`.
1702 |    */
1703 |   off(event: 'response', listener: (response: Response) => any): this;
1704 | 
1705 |   /**
1706 |    * Removes an event listener added by `on` or `addListener`.
1707 |    */
1708 |   off(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1709 | 
1710 |   /**
1711 |    * Removes an event listener added by `on` or `addListener`.
1712 |    */
1713 |   off(event: 'worker', listener: (worker: Worker) => any): this;
1714 | 
1715 |   /**
1716 |    * Emitted when the page closes.
1717 |    */
1718 |   prependListener(event: 'close', listener: (page: Page) => any): this;
1719 | 
1720 |   /**
1721 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
1722 |    *
1723 |    * The arguments passed into `console.log` are available on the
1724 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
1725 |    *
1726 |    * **Usage**
1727 |    *
1728 |    * ```js
1729 |    * page.on('console', async msg => {
1730 |    *   const values = [];
1731 |    *   for (const arg of msg.args())
1732 |    *     values.push(await arg.jsonValue());
1733 |    *   console.log(...values);
1734 |    * });
1735 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
1736 |    * ```
1737 |    *
1738 |    */
1739 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
1740 | 
1741 |   /**
1742 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
1743 |    * crashes, ongoing and subsequent operations will throw.
1744 |    *
1745 |    * The most common way to deal with crashes is to catch an exception:
1746 |    *
1747 |    * ```js
1748 |    * try {
1749 |    *   // Crash might happen during a click.
1750 |    *   await page.click('button');
1751 |    *   // Or while waiting for an event.
1752 |    *   await page.waitForEvent('popup');
1753 |    * } catch (e) {
1754 |    *   // When the page crashes, exception message contains 'crash'.
1755 |    * }
1756 |    * ```
1757 |    *
1758 |    */
1759 |   prependListener(event: 'crash', listener: (page: Page) => any): this;
1760 | 
1761 |   /**
1762 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
1763 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
1764 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
1765 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
1766 |    * dialog, and actions like click will never finish.
1767 |    *
1768 |    * **Usage**
1769 |    *
1770 |    * ```js
1771 |    * page.on('dialog', dialog => dialog.accept());
1772 |    * ```
1773 |    *
1774 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
1775 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
1776 |    * listeners are present, all dialogs are automatically dismissed.
1777 |    *
1778 |    */
1779 |   prependListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
1780 | 
1781 |   /**
1782 |    * Emitted when the JavaScript
1783 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
1784 |    */
1785 |   prependListener(event: 'domcontentloaded', listener: (page: Page) => any): this;
1786 | 
1787 |   /**
1788 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
1789 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
1790 |    */
1791 |   prependListener(event: 'download', listener: (download: Download) => any): this;
1792 | 
1793 |   /**
1794 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
1795 |    * respond to it via setting the input files using
1796 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
1797 |    * that can be uploaded after that.
1798 |    *
1799 |    * ```js
1800 |    * page.on('filechooser', async fileChooser => {
1801 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
1802 |    * });
1803 |    * ```
1804 |    *
1805 |    */
1806 |   prependListener(event: 'filechooser', listener: (fileChooser: FileChooser) => any): this;
1807 | 
1808 |   /**
1809 |    * Emitted when a frame is attached.
1810 |    */
1811 |   prependListener(event: 'frameattached', listener: (frame: Frame) => any): this;
1812 | 
1813 |   /**
1814 |    * Emitted when a frame is detached.
1815 |    */
1816 |   prependListener(event: 'framedetached', listener: (frame: Frame) => any): this;
1817 | 
1818 |   /**
1819 |    * Emitted when a frame is navigated to a new url.
1820 |    */
1821 |   prependListener(event: 'framenavigated', listener: (frame: Frame) => any): this;
1822 | 
1823 |   /**
1824 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
1825 |    */
1826 |   prependListener(event: 'load', listener: (page: Page) => any): this;
1827 | 
1828 |   /**
1829 |    * Emitted when an uncaught exception happens within the page.
1830 |    *
1831 |    * ```js
1832 |    * // Log all uncaught errors to the terminal
1833 |    * page.on('pageerror', exception => {
1834 |    *   console.log(`Uncaught exception: "${exception}"`);
1835 |    * });
1836 |    *
1837 |    * // Navigate to a page with an exception.
1838 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
1839 |    * ```
1840 |    *
1841 |    */
1842 |   prependListener(event: 'pageerror', listener: (error: Error) => any): this;
1843 | 
1844 |   /**
1845 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
1846 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
1847 |    * only for popups relevant to this page.
1848 |    *
1849 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
1850 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
1851 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
1852 |    * to this network request, use
1853 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
1854 |    * and
1855 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
1856 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
1857 |    *
1858 |    * ```js
1859 |    * // Start waiting for popup before clicking. Note no await.
1860 |    * const popupPromise = page.waitForEvent('popup');
1861 |    * await page.getByText('open the popup').click();
1862 |    * const popup = await popupPromise;
1863 |    * console.log(await popup.evaluate('location.href'));
1864 |    * ```
1865 |    *
1866 |    * **NOTE** Use
1867 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
1868 |    * wait until the page gets to a particular state (you should not need it in most cases).
1869 |    *
1870 |    */
1871 |   prependListener(event: 'popup', listener: (page: Page) => any): this;
1872 | 
1873 |   /**
1874 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
1875 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
1876 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
1877 |    */
1878 |   prependListener(event: 'request', listener: (request: Request) => any): this;
1879 | 
1880 |   /**
1881 |    * Emitted when a request fails, for example by timing out.
1882 |    *
1883 |    * ```js
1884 |    * page.on('requestfailed', request => {
1885 |    *   console.log(request.url() + ' ' + request.failure().errorText);
1886 |    * });
1887 |    * ```
1888 |    *
1889 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
1890 |    * will complete with
1891 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
1892 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
1893 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
1894 |    * error net::ERR_FAILED.
1895 |    *
1896 |    */
1897 |   prependListener(event: 'requestfailed', listener: (request: Request) => any): this;
1898 | 
1899 |   /**
1900 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
1901 |    * sequence of events is `request`, `response` and `requestfinished`.
1902 |    */
1903 |   prependListener(event: 'requestfinished', listener: (request: Request) => any): this;
1904 | 
1905 |   /**
1906 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
1907 |    * events is `request`, `response` and `requestfinished`.
1908 |    */
1909 |   prependListener(event: 'response', listener: (response: Response) => any): this;
1910 | 
1911 |   /**
1912 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
1913 |    */
1914 |   prependListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
1915 | 
1916 |   /**
1917 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
1918 |    * by the page.
1919 |    */
1920 |   prependListener(event: 'worker', listener: (worker: Worker) => any): this;
1921 | 
1922 |   /**
1923 |    * When testing a web page, sometimes unexpected overlays like a "Sign up" dialog appear and block actions you want to
1924 |    * automate, e.g. clicking a button. These overlays don't always show up in the same way or at the same time, making
1925 |    * them tricky to handle in automated tests.
1926 |    *
1927 |    * This method lets you set up a special function, called a handler, that activates when it detects that overlay is
1928 |    * visible. The handler's job is to remove the overlay, allowing your test to continue as if the overlay wasn't there.
1929 |    *
1930 |    * Things to keep in mind:
1931 |    * - When an overlay is shown predictably, we recommend explicitly waiting for it in your test and dismissing it as
1932 |    *   a part of your normal test flow, instead of using
1933 |    *   [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler).
1934 |    * - Playwright checks for the overlay every time before executing or retrying an action that requires an
1935 |    *   [actionability check](https://playwright.dev/docs/actionability), or before performing an auto-waiting assertion check. When overlay
1936 |    *   is visible, Playwright calls the handler first, and then proceeds with the action/assertion. Note that the
1937 |    *   handler is only called when you perform an action/assertion - if the overlay becomes visible but you don't
1938 |    *   perform any actions, the handler will not be triggered.
1939 |    * - After executing the handler, Playwright will ensure that overlay that triggered the handler is not visible
1940 |    *   anymore. You can opt-out of this behavior with
1941 |    *   [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after).
1942 |    * - The execution time of the handler counts towards the timeout of the action/assertion that executed the handler.
1943 |    *   If your handler takes too long, it might cause timeouts.
1944 |    * - You can register multiple handlers. However, only a single handler will be running at a time. Make sure the
1945 |    *   actions within a handler don't depend on another handler.
1946 |    *
1947 |    * **NOTE** Running the handler will alter your page state mid-test. For example it will change the currently focused
1948 |    * element and move the mouse. Make sure that actions that run after the handler are self-contained and do not rely on
1949 |    * the focus and mouse state being unchanged.
1950 |    *
1951 |    * For example, consider a test that calls
1952 |    * [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) followed by
1953 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press). If your handler
1954 |    * clicks a button between these two actions, the focused element most likely will be wrong, and key press will happen
1955 |    * on the unexpected element. Use
1956 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press) instead to avoid this
1957 |    * problem.
1958 |    *
1959 |    * Another example is a series of mouse actions, where
1960 |    * [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move) is followed by
1961 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down). Again, when the handler runs
1962 |    * between these two actions, the mouse position will be wrong during the mouse down. Prefer self-contained actions
1963 |    * like [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) that do not rely on
1964 |    * the state being unchanged by a handler.
1965 |    *
1966 |    * **Usage**
1967 |    *
1968 |    * An example that closes a "Sign up to the newsletter" dialog when it appears:
1969 |    *
1970 |    * ```js
1971 |    * // Setup the handler.
1972 |    * await page.addLocatorHandler(page.getByText('Sign up to the newsletter'), async () => {
1973 |    *   await page.getByRole('button', { name: 'No thanks' }).click();
1974 |    * });
1975 |    *
1976 |    * // Write the test as usual.
1977 |    * await page.goto('https://example.com');
1978 |    * await page.getByRole('button', { name: 'Start here' }).click();
1979 |    * ```
1980 |    *
1981 |    * An example that skips the "Confirm your security details" page when it is shown:
1982 |    *
1983 |    * ```js
1984 |    * // Setup the handler.
1985 |    * await page.addLocatorHandler(page.getByText('Confirm your security details'), async () => {
1986 |    *   await page.getByRole('button', { name: 'Remind me later' }).click();
1987 |    * });
1988 |    *
1989 |    * // Write the test as usual.
1990 |    * await page.goto('https://example.com');
1991 |    * await page.getByRole('button', { name: 'Start here' }).click();
1992 |    * ```
1993 |    *
1994 |    * An example with a custom callback on every actionability check. It uses a `<body>` locator that is always visible,
1995 |    * so the handler is called before every actionability check. It is important to specify
1996 |    * [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after), because
1997 |    * the handler does not hide the `<body>` element.
1998 |    *
1999 |    * ```js
2000 |    * // Setup the handler.
2001 |    * await page.addLocatorHandler(page.locator('body'), async () => {
2002 |    *   await page.evaluate(() => window.removeObstructionsForTestIfNeeded());
2003 |    * }, { noWaitAfter: true });
2004 |    *
2005 |    * // Write the test as usual.
2006 |    * await page.goto('https://example.com');
2007 |    * await page.getByRole('button', { name: 'Start here' }).click();
2008 |    * ```
2009 |    *
2010 |    * Handler takes the original locator as an argument. You can also automatically remove the handler after a number of
2011 |    * invocations by setting [`times`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-times):
2012 |    *
2013 |    * ```js
2014 |    * await page.addLocatorHandler(page.getByLabel('Close'), async locator => {
2015 |    *   await locator.click();
2016 |    * }, { times: 1 });
2017 |    * ```
2018 |    *
2019 |    * @param locator Locator that triggers the handler.
2020 |    * @param handler Function that should be run once
2021 |    * [`locator`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-locator) appears. This
2022 |    * function should get rid of the element that blocks actions like click.
2023 |    * @param options
2024 |    */
2025 |   addLocatorHandler(locator: Locator, handler: ((locator: Locator) => Promise<any>), options?: {
2026 |     /**
2027 |      * By default, after calling the handler Playwright will wait until the overlay becomes hidden, and only then
2028 |      * Playwright will continue with the action/assertion that triggered the handler. This option allows to opt-out of
2029 |      * this behavior, so that overlay can stay visible after the handler has run.
2030 |      */
2031 |     noWaitAfter?: boolean;
2032 | 
2033 |     /**
2034 |      * Specifies the maximum number of times this handler should be called. Unlimited by default.
2035 |      */
2036 |     times?: number;
2037 |   }): Promise<void>;
2038 | 
2039 |   /**
2040 |    * Adds a `<script>` tag into the page with the desired url or content. Returns the added tag when the script's onload
2041 |    * fires or when the script content was injected into frame.
2042 |    * @param options
2043 |    */
2044 |   addScriptTag(options?: {
2045 |     /**
2046 |      * Raw JavaScript content to be injected into frame.
2047 |      */
2048 |     content?: string;
2049 | 
2050 |     /**
2051 |      * Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
2052 |      * to the current working directory.
2053 |      */
2054 |     path?: string;
2055 | 
2056 |     /**
2057 |      * Script type. Use 'module' in order to load a JavaScript ES6 module. See
2058 |      * [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
2059 |      */
2060 |     type?: string;
2061 | 
2062 |     /**
2063 |      * URL of a script to be added.
2064 |      */
2065 |     url?: string;
2066 |   }): Promise<ElementHandle>;
2067 | 
2068 |   /**
2069 |    * Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
2070 |    * content. Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
2071 |    * @param options
2072 |    */
2073 |   addStyleTag(options?: {
2074 |     /**
2075 |      * Raw CSS content to be injected into frame.
2076 |      */
2077 |     content?: string;
2078 | 
2079 |     /**
2080 |      * Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
2081 |      * current working directory.
2082 |      */
2083 |     path?: string;
2084 | 
2085 |     /**
2086 |      * URL of the `<link>` tag.
2087 |      */
2088 |     url?: string;
2089 |   }): Promise<ElementHandle>;
2090 | 
2091 |   /**
2092 |    * Brings page to front (activates tab).
2093 |    */
2094 |   bringToFront(): Promise<void>;
2095 | 
2096 |   /**
2097 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
2098 |    * Read more about [locators](https://playwright.dev/docs/locators).
2099 |    *
2100 |    * This method checks an element matching
2101 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector) by performing the following
2102 |    * steps:
2103 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector).
2104 |    *    If there is none, wait until a matching element is attached to the DOM.
2105 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
2106 |    *    already checked, this method returns immediately.
2107 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2108 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-check-option-force) option is set. If the element
2109 |    *    is detached during the checks, the whole action is retried.
2110 |    * 1. Scroll the element into view if needed.
2111 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
2112 |    *    element.
2113 |    * 1. Ensure that the element is now checked. If not, this method throws.
2114 |    *
2115 |    * When all steps combined have not finished during the specified
2116 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-check-option-timeout), this method throws a
2117 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2118 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2119 |    * used.
2120 |    * @param options
2121 |    */
2122 |   check(selector: string, options?: {
2123 |     /**
2124 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2125 |      */
2126 |     force?: boolean;
2127 | 
2128 |     /**
2129 |      * This option has no effect.
2130 |      * @deprecated This option has no effect.
2131 |      */
2132 |     noWaitAfter?: boolean;
2133 | 
2134 |     /**
2135 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2136 |      * the element.
2137 |      */
2138 |     position?: {
2139 |       x: number;
2140 | 
2141 |       y: number;
2142 |     };
2143 | 
2144 |     /**
2145 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2146 |      * element, the call throws an exception.
2147 |      */
2148 |     strict?: boolean;
2149 | 
2150 |     /**
2151 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2152 |      * option in the config, or by using the
2153 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2154 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2155 |      */
2156 |     timeout?: number;
2157 | 
2158 |     /**
2159 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2160 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
2161 |      */
2162 |     trial?: boolean;
2163 |   }): Promise<void>;
2164 | 
2165 |   /**
2166 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
2167 |    * Read more about [locators](https://playwright.dev/docs/locators).
2168 |    *
2169 |    * This method clicks an element matching
2170 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector) by performing the following
2171 |    * steps:
2172 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector).
2173 |    *    If there is none, wait until a matching element is attached to the DOM.
2174 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2175 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-click-option-force) option is set. If the element
2176 |    *    is detached during the checks, the whole action is retried.
2177 |    * 1. Scroll the element into view if needed.
2178 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
2179 |    *    element, or the specified
2180 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-click-option-position).
2181 |    * 1. Wait for initiated navigations to either succeed or fail, unless
2182 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-click-option-no-wait-after) option is set.
2183 |    *
2184 |    * When all steps combined have not finished during the specified
2185 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-click-option-timeout), this method throws a
2186 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2187 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2188 |    * used.
2189 |    * @param options
2190 |    */
2191 |   click(selector: string, options?: {
2192 |     /**
2193 |      * Defaults to `left`.
2194 |      */
2195 |     button?: "left"|"right"|"middle";
2196 | 
2197 |     /**
2198 |      * defaults to 1. See [UIEvent.detail].
2199 |      */
2200 |     clickCount?: number;
2201 | 
2202 |     /**
2203 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
2204 |      */
2205 |     delay?: number;
2206 | 
2207 |     /**
2208 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2209 |      */
2210 |     force?: boolean;
2211 | 
2212 |     /**
2213 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
2214 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
2215 |      * "Control" on Windows and Linux and to "Meta" on macOS.
2216 |      */
2217 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
2218 | 
2219 |     /**
2220 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
2221 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
2222 |      * navigating to inaccessible pages. Defaults to `false`.
2223 |      * @deprecated This option will default to `true` in the future.
2224 |      */
2225 |     noWaitAfter?: boolean;
2226 | 
2227 |     /**
2228 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2229 |      * the element.
2230 |      */
2231 |     position?: {
2232 |       x: number;
2233 | 
2234 |       y: number;
2235 |     };
2236 | 
2237 |     /**
2238 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2239 |      * element, the call throws an exception.
2240 |      */
2241 |     strict?: boolean;
2242 | 
2243 |     /**
2244 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2245 |      * option in the config, or by using the
2246 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2247 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2248 |      */
2249 |     timeout?: number;
2250 | 
2251 |     /**
2252 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2253 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
2254 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
2255 |      * are pressed.
2256 |      */
2257 |     trial?: boolean;
2258 |   }): Promise<void>;
2259 | 
2260 |   /**
2261 |    * If [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `false`,
2262 |    * does not run any unload handlers and waits for the page to be closed. If
2263 |    * [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `true` the
2264 |    * method will run unload handlers, but will **not** wait for the page to close.
2265 |    *
2266 |    * By default, `page.close()` **does not** run `beforeunload` handlers.
2267 |    *
2268 |    * **NOTE** if [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is
2269 |    * passed as true, a `beforeunload` dialog might be summoned and should be handled manually via
2270 |    * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
2271 |    *
2272 |    * @param options
2273 |    */
2274 |   close(options?: {
2275 |     /**
2276 |      * The reason to be reported to the operations interrupted by the page closure.
2277 |      */
2278 |     reason?: string;
2279 | 
2280 |     /**
2281 |      * Defaults to `false`. Whether to run the
2282 |      * [before unload](https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload) page handlers.
2283 |      */
2284 |     runBeforeUnload?: boolean;
2285 |   }): Promise<void>;
2286 | 
2287 |   /**
2288 |    * Returns up to (currently) 200 last console messages from this page. See
2289 |    * [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console) for more details.
2290 |    */
2291 |   consoleMessages(): Promise<Array<ConsoleMessage>>;
2292 | 
2293 |   /**
2294 |    * Gets the full HTML contents of the page, including the doctype.
2295 |    */
2296 |   content(): Promise<string>;
2297 | 
2298 |   /**
2299 |    * Get the browser context that the page belongs to.
2300 |    */
2301 |   context(): BrowserContext;
2302 | 
2303 |   /**
2304 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
2305 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2306 |    *
2307 |    * This method double clicks an element matching
2308 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector) by performing the following
2309 |    * steps:
2310 |    * 1. Find an element matching
2311 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector). If there is none,
2312 |    *    wait until a matching element is attached to the DOM.
2313 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
2314 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-dblclick-option-force) option is set. If the
2315 |    *    element is detached during the checks, the whole action is retried.
2316 |    * 1. Scroll the element into view if needed.
2317 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
2318 |    *    element, or the specified
2319 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-dblclick-option-position).
2320 |    *
2321 |    * When all steps combined have not finished during the specified
2322 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-dblclick-option-timeout), this method throws a
2323 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
2324 |    *
2325 |    * **NOTE** `page.dblclick()` dispatches two `click` events and a single `dblclick` event.
2326 |    *
2327 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2328 |    * used.
2329 |    * @param options
2330 |    */
2331 |   dblclick(selector: string, options?: {
2332 |     /**
2333 |      * Defaults to `left`.
2334 |      */
2335 |     button?: "left"|"right"|"middle";
2336 | 
2337 |     /**
2338 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
2339 |      */
2340 |     delay?: number;
2341 | 
2342 |     /**
2343 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2344 |      */
2345 |     force?: boolean;
2346 | 
2347 |     /**
2348 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
2349 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
2350 |      * "Control" on Windows and Linux and to "Meta" on macOS.
2351 |      */
2352 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
2353 | 
2354 |     /**
2355 |      * This option has no effect.
2356 |      * @deprecated This option has no effect.
2357 |      */
2358 |     noWaitAfter?: boolean;
2359 | 
2360 |     /**
2361 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
2362 |      * the element.
2363 |      */
2364 |     position?: {
2365 |       x: number;
2366 | 
2367 |       y: number;
2368 |     };
2369 | 
2370 |     /**
2371 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2372 |      * element, the call throws an exception.
2373 |      */
2374 |     strict?: boolean;
2375 | 
2376 |     /**
2377 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2378 |      * option in the config, or by using the
2379 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2380 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2381 |      */
2382 |     timeout?: number;
2383 | 
2384 |     /**
2385 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2386 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
2387 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
2388 |      * are pressed.
2389 |      */
2390 |     trial?: boolean;
2391 |   }): Promise<void>;
2392 | 
2393 |   /**
2394 |    * **NOTE** Use locator-based
2395 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
2396 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2397 |    *
2398 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
2399 |    * `click` is dispatched. This is equivalent to calling
2400 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
2401 |    *
2402 |    * **Usage**
2403 |    *
2404 |    * ```js
2405 |    * await page.dispatchEvent('button#submit', 'click');
2406 |    * ```
2407 |    *
2408 |    * Under the hood, it creates an instance of an event based on the given
2409 |    * [`type`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-type), initializes it with
2410 |    * [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) properties and
2411 |    * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
2412 |    *
2413 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) is
2414 |    * event-specific, please refer to the events documentation for the lists of initial properties:
2415 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
2416 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
2417 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
2418 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
2419 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
2420 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
2421 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
2422 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
2423 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
2424 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
2425 |    *
2426 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
2427 |    *
2428 |    * ```js
2429 |    * // Note you can only create DataTransfer in Chromium and Firefox
2430 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
2431 |    * await page.dispatchEvent('#source', 'dragstart', { dataTransfer });
2432 |    * ```
2433 |    *
2434 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2435 |    * used.
2436 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
2437 |    * @param eventInit Optional event-specific initialization properties.
2438 |    * @param options
2439 |    */
2440 |   dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
2441 |     /**
2442 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2443 |      * element, the call throws an exception.
2444 |      */
2445 |     strict?: boolean;
2446 | 
2447 |     /**
2448 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2449 |      * option in the config, or by using the
2450 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2451 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2452 |      */
2453 |     timeout?: number;
2454 |   }): Promise<void>;
2455 | 
2456 |   /**
2457 |    * This method drags the source element to the target element. It will first move to the source element, perform a
2458 |    * `mousedown`, then move to the target element and perform a `mouseup`.
2459 |    *
2460 |    * **Usage**
2461 |    *
2462 |    * ```js
2463 |    * await page.dragAndDrop('#source', '#target');
2464 |    * // or specify exact positions relative to the top-left corners of the elements:
2465 |    * await page.dragAndDrop('#source', '#target', {
2466 |    *   sourcePosition: { x: 34, y: 7 },
2467 |    *   targetPosition: { x: 10, y: 20 },
2468 |    * });
2469 |    * ```
2470 |    *
2471 |    * @param source A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
2472 |    * be used.
2473 |    * @param target A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
2474 |    * will be used.
2475 |    * @param options
2476 |    */
2477 |   dragAndDrop(source: string, target: string, options?: {
2478 |     /**
2479 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2480 |      */
2481 |     force?: boolean;
2482 | 
2483 |     /**
2484 |      * This option has no effect.
2485 |      * @deprecated This option has no effect.
2486 |      */
2487 |     noWaitAfter?: boolean;
2488 | 
2489 |     /**
2490 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
2491 |      * specified, some visible point of the element is used.
2492 |      */
2493 |     sourcePosition?: {
2494 |       x: number;
2495 | 
2496 |       y: number;
2497 |     };
2498 | 
2499 |     /**
2500 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between the `mousedown` and `mouseup`
2501 |      * of the drag. When set to 1, emits a single `mousemove` event at the destination location.
2502 |      */
2503 |     steps?: number;
2504 | 
2505 |     /**
2506 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2507 |      * element, the call throws an exception.
2508 |      */
2509 |     strict?: boolean;
2510 | 
2511 |     /**
2512 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
2513 |      * specified, some visible point of the element is used.
2514 |      */
2515 |     targetPosition?: {
2516 |       x: number;
2517 | 
2518 |       y: number;
2519 |     };
2520 | 
2521 |     /**
2522 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2523 |      * option in the config, or by using the
2524 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2525 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2526 |      */
2527 |     timeout?: number;
2528 | 
2529 |     /**
2530 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
2531 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
2532 |      */
2533 |     trial?: boolean;
2534 |   }): Promise<void>;
2535 | 
2536 |   /**
2537 |    * This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
2538 |    * feature, using the `colorScheme` argument.
2539 |    *
2540 |    * **Usage**
2541 |    *
2542 |    * ```js
2543 |    * await page.evaluate(() => matchMedia('screen').matches);
2544 |    * // → true
2545 |    * await page.evaluate(() => matchMedia('print').matches);
2546 |    * // → false
2547 |    *
2548 |    * await page.emulateMedia({ media: 'print' });
2549 |    * await page.evaluate(() => matchMedia('screen').matches);
2550 |    * // → false
2551 |    * await page.evaluate(() => matchMedia('print').matches);
2552 |    * // → true
2553 |    *
2554 |    * await page.emulateMedia({});
2555 |    * await page.evaluate(() => matchMedia('screen').matches);
2556 |    * // → true
2557 |    * await page.evaluate(() => matchMedia('print').matches);
2558 |    * // → false
2559 |    * ```
2560 |    *
2561 |    * ```js
2562 |    * await page.emulateMedia({ colorScheme: 'dark' });
2563 |    * await page.evaluate(() => matchMedia('(prefers-color-scheme: dark)').matches);
2564 |    * // → true
2565 |    * await page.evaluate(() => matchMedia('(prefers-color-scheme: light)').matches);
2566 |    * // → false
2567 |    * ```
2568 |    *
2569 |    * @param options
2570 |    */
2571 |   emulateMedia(options?: {
2572 |     /**
2573 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
2574 |      * media feature, supported values are `'light'` and `'dark'`. Passing `null` disables color scheme emulation.
2575 |      * `'no-preference'` is deprecated.
2576 |      */
2577 |     colorScheme?: null|"light"|"dark"|"no-preference";
2578 | 
2579 |     /**
2580 |      * Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. Passing `null`
2581 |      * disables contrast emulation.
2582 |      */
2583 |     contrast?: null|"no-preference"|"more";
2584 | 
2585 |     /**
2586 |      * Emulates `'forced-colors'` media feature, supported values are `'active'` and `'none'`. Passing `null` disables
2587 |      * forced colors emulation.
2588 |      */
2589 |     forcedColors?: null|"active"|"none";
2590 | 
2591 |     /**
2592 |      * Changes the CSS media type of the page. The only allowed values are `'screen'`, `'print'` and `null`. Passing
2593 |      * `null` disables CSS media emulation.
2594 |      */
2595 |     media?: null|"screen"|"print";
2596 | 
2597 |     /**
2598 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. Passing
2599 |      * `null` disables reduced motion emulation.
2600 |      */
2601 |     reducedMotion?: null|"reduce"|"no-preference";
2602 |   }): Promise<void>;
2603 | 
2604 |   /**
2605 |    * The method adds a function called
2606 |    * [`name`](https://playwright.dev/docs/api/class-page#page-expose-function-option-name) on the `window` object of
2607 |    * every frame in the page. When called, the function executes
2608 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) and returns a
2609 |    * [Promise] which resolves to the return value of
2610 |    * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback).
2611 |    *
2612 |    * If the [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) returns a
2613 |    * [Promise], it will be awaited.
2614 |    *
2615 |    * See
2616 |    * [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function)
2617 |    * for context-wide exposed function.
2618 |    *
2619 |    * **NOTE** Functions installed via
2620 |    * [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) survive
2621 |    * navigations.
2622 |    *
2623 |    * **Usage**
2624 |    *
2625 |    * An example of adding a `sha256` function to the page:
2626 |    *
2627 |    * ```js
2628 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
2629 |    * const crypto = require('crypto');
2630 |    *
2631 |    * (async () => {
2632 |    *   const browser = await webkit.launch({ headless: false });
2633 |    *   const page = await browser.newPage();
2634 |    *   await page.exposeFunction('sha256', text =>
2635 |    *     crypto.createHash('sha256').update(text).digest('hex'),
2636 |    *   );
2637 |    *   await page.setContent(`
2638 |    *     <script>
2639 |    *       async function onClick() {
2640 |    *         document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
2641 |    *       }
2642 |    *     </script>
2643 |    *     <button onclick="onClick()">Click me</button>
2644 |    *     <div></div>
2645 |    *   `);
2646 |    *   await page.click('button');
2647 |    * })();
2648 |    * ```
2649 |    *
2650 |    * @param name Name of the function on the window object
2651 |    * @param callback Callback function which will be called in Playwright's context.
2652 |    */
2653 |   exposeFunction(name: string, callback: Function): Promise<void>;
2654 | 
2655 |   /**
2656 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
2657 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2658 |    *
2659 |    * This method waits for an element matching
2660 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-fill-option-selector), waits for
2661 |    * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
2662 |    * filling. Note that you can pass an empty string to clear the input field.
2663 |    *
2664 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
2665 |    * error. However, if the element is inside the `<label>` element that has an associated
2666 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
2667 |    * instead.
2668 |    *
2669 |    * To send fine-grained keyboard events, use
2670 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
2671 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2672 |    * used.
2673 |    * @param value Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
2674 |    * @param options
2675 |    */
2676 |   fill(selector: string, value: string, options?: {
2677 |     /**
2678 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
2679 |      */
2680 |     force?: boolean;
2681 | 
2682 |     /**
2683 |      * This option has no effect.
2684 |      * @deprecated This option has no effect.
2685 |      */
2686 |     noWaitAfter?: boolean;
2687 | 
2688 |     /**
2689 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2690 |      * element, the call throws an exception.
2691 |      */
2692 |     strict?: boolean;
2693 | 
2694 |     /**
2695 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2696 |      * option in the config, or by using the
2697 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2698 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2699 |      */
2700 |     timeout?: number;
2701 |   }): Promise<void>;
2702 | 
2703 |   /**
2704 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
2705 |    * Read more about [locators](https://playwright.dev/docs/locators).
2706 |    *
2707 |    * This method fetches an element with
2708 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector) and focuses it. If there's no
2709 |    * element matching [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector), the method
2710 |    * waits until a matching element appears in the DOM.
2711 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2712 |    * used.
2713 |    * @param options
2714 |    */
2715 |   focus(selector: string, options?: {
2716 |     /**
2717 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2718 |      * element, the call throws an exception.
2719 |      */
2720 |     strict?: boolean;
2721 | 
2722 |     /**
2723 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2724 |      * option in the config, or by using the
2725 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2726 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2727 |      */
2728 |     timeout?: number;
2729 |   }): Promise<void>;
2730 | 
2731 |   /**
2732 |    * Returns frame matching the specified criteria. Either `name` or `url` must be specified.
2733 |    *
2734 |    * **Usage**
2735 |    *
2736 |    * ```js
2737 |    * const frame = page.frame('frame-name');
2738 |    * ```
2739 |    *
2740 |    * ```js
2741 |    * const frame = page.frame({ url: /.*domain.*\/ });
2742 |    * ```
2743 |    *
2744 |    * @param frameSelector Frame name or other frame lookup options.
2745 |    */
2746 |   frame(frameSelector: string|{
2747 |     /**
2748 |      * Frame name specified in the `iframe`'s `name` attribute. Optional.
2749 |      */
2750 |     name?: string;
2751 | 
2752 |     /**
2753 |      * A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object. Optional.
2754 |      */
2755 |     url?: string|RegExp|((url: URL) => boolean);
2756 |   }): null|Frame;
2757 | 
2758 |   /**
2759 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
2760 |    * in that iframe.
2761 |    *
2762 |    * **Usage**
2763 |    *
2764 |    * Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
2765 |    * id="my-frame">`:
2766 |    *
2767 |    * ```js
2768 |    * const locator = page.frameLocator('#my-iframe').getByText('Submit');
2769 |    * await locator.click();
2770 |    * ```
2771 |    *
2772 |    * @param selector A selector to use when resolving DOM element.
2773 |    */
2774 |   frameLocator(selector: string): FrameLocator;
2775 | 
2776 |   /**
2777 |    * An array of all frames attached to the page.
2778 |    */
2779 |   frames(): Array<Frame>;
2780 | 
2781 |   /**
2782 |    * **NOTE** Use locator-based
2783 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
2784 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
2785 |    *
2786 |    * Returns element attribute value.
2787 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
2788 |    * used.
2789 |    * @param name Attribute name to get the value for.
2790 |    * @param options
2791 |    */
2792 |   getAttribute(selector: string, name: string, options?: {
2793 |     /**
2794 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2795 |      * element, the call throws an exception.
2796 |      */
2797 |     strict?: boolean;
2798 | 
2799 |     /**
2800 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2801 |      * option in the config, or by using the
2802 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2803 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
2804 |      */
2805 |     timeout?: number;
2806 |   }): Promise<null|string>;
2807 | 
2808 |   /**
2809 |    * Allows locating elements by their alt text.
2810 |    *
2811 |    * **Usage**
2812 |    *
2813 |    * For example, this method will find the image by alt text "Playwright logo":
2814 |    *
2815 |    * ```html
2816 |    * <img alt='Playwright logo'>
2817 |    * ```
2818 |    *
2819 |    * ```js
2820 |    * await page.getByAltText('Playwright logo').click();
2821 |    * ```
2822 |    *
2823 |    * @param text Text to locate the element for.
2824 |    * @param options
2825 |    */
2826 |   getByAltText(text: string|RegExp, options?: {
2827 |     /**
2828 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2829 |      * regular expression. Note that exact match still trims whitespace.
2830 |      */
2831 |     exact?: boolean;
2832 |   }): Locator;
2833 | 
2834 |   /**
2835 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
2836 |    * `aria-label` attribute.
2837 |    *
2838 |    * **Usage**
2839 |    *
2840 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
2841 |    *
2842 |    * ```html
2843 |    * <input aria-label="Username">
2844 |    * <label for="password-input">Password:</label>
2845 |    * <input id="password-input">
2846 |    * ```
2847 |    *
2848 |    * ```js
2849 |    * await page.getByLabel('Username').fill('john');
2850 |    * await page.getByLabel('Password').fill('secret');
2851 |    * ```
2852 |    *
2853 |    * @param text Text to locate the element for.
2854 |    * @param options
2855 |    */
2856 |   getByLabel(text: string|RegExp, options?: {
2857 |     /**
2858 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2859 |      * regular expression. Note that exact match still trims whitespace.
2860 |      */
2861 |     exact?: boolean;
2862 |   }): Locator;
2863 | 
2864 |   /**
2865 |    * Allows locating input elements by the placeholder text.
2866 |    *
2867 |    * **Usage**
2868 |    *
2869 |    * For example, consider the following DOM structure.
2870 |    *
2871 |    * ```html
2872 |    * <input type="email" placeholder="name@example.com" />
2873 |    * ```
2874 |    *
2875 |    * You can fill the input after locating it by the placeholder text:
2876 |    *
2877 |    * ```js
2878 |    * await page
2879 |    *     .getByPlaceholder('name@example.com')
2880 |    *     .fill('playwright@microsoft.com');
2881 |    * ```
2882 |    *
2883 |    * @param text Text to locate the element for.
2884 |    * @param options
2885 |    */
2886 |   getByPlaceholder(text: string|RegExp, options?: {
2887 |     /**
2888 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
2889 |      * regular expression. Note that exact match still trims whitespace.
2890 |      */
2891 |     exact?: boolean;
2892 |   }): Locator;
2893 | 
2894 |   /**
2895 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
2896 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
2897 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
2898 |    *
2899 |    * **Usage**
2900 |    *
2901 |    * Consider the following DOM structure.
2902 |    *
2903 |    * ```html
2904 |    * <h3>Sign up</h3>
2905 |    * <label>
2906 |    *   <input type="checkbox" /> Subscribe
2907 |    * </label>
2908 |    * <br/>
2909 |    * <button>Submit</button>
2910 |    * ```
2911 |    *
2912 |    * You can locate each element by it's implicit role:
2913 |    *
2914 |    * ```js
2915 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
2916 |    *
2917 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
2918 |    *
2919 |    * await page.getByRole('button', { name: /submit/i }).click();
2920 |    * ```
2921 |    *
2922 |    * **Details**
2923 |    *
2924 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
2925 |    * about the ARIA guidelines.
2926 |    *
2927 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
2928 |    * that is recognized by the role selector. You can find all the
2929 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
2930 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
2931 |    * @param role Required aria role.
2932 |    * @param options
2933 |    */
2934 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
2935 |     /**
2936 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
2937 |      *
2938 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
2939 |      */
2940 |     checked?: boolean;
2941 | 
2942 |     /**
2943 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
2944 |      *
2945 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
2946 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
2947 |      *
2948 |      */
2949 |     disabled?: boolean;
2950 | 
2951 |     /**
2952 |      * Whether [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is matched exactly:
2953 |      * case-sensitive and whole-string. Defaults to false. Ignored when
2954 |      * [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is a regular expression. Note
2955 |      * that exact match still trims whitespace.
2956 |      */
2957 |     exact?: boolean;
2958 | 
2959 |     /**
2960 |      * An attribute that is usually set by `aria-expanded`.
2961 |      *
2962 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
2963 |      */
2964 |     expanded?: boolean;
2965 | 
2966 |     /**
2967 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
2968 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
2969 |      *
2970 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
2971 |      */
2972 |     includeHidden?: boolean;
2973 | 
2974 |     /**
2975 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
2976 |      * for `<h1>-<h6>` elements.
2977 |      *
2978 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
2979 |      */
2980 |     level?: number;
2981 | 
2982 |     /**
2983 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
2984 |      * case-insensitive and searches for a substring, use
2985 |      * [`exact`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-exact) to control this behavior.
2986 |      *
2987 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
2988 |      */
2989 |     name?: string|RegExp;
2990 | 
2991 |     /**
2992 |      * An attribute that is usually set by `aria-pressed`.
2993 |      *
2994 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
2995 |      */
2996 |     pressed?: boolean;
2997 | 
2998 |     /**
2999 |      * An attribute that is usually set by `aria-selected`.
3000 |      *
3001 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
3002 |      */
3003 |     selected?: boolean;
3004 |   }): Locator;
3005 | 
3006 |   /**
3007 |    * Locate element by the test id.
3008 |    *
3009 |    * **Usage**
3010 |    *
3011 |    * Consider the following DOM structure.
3012 |    *
3013 |    * ```html
3014 |    * <button data-testid="directions">Itinéraire</button>
3015 |    * ```
3016 |    *
3017 |    * You can locate the element by it's test id:
3018 |    *
3019 |    * ```js
3020 |    * await page.getByTestId('directions').click();
3021 |    * ```
3022 |    *
3023 |    * **Details**
3024 |    *
3025 |    * By default, the `data-testid` attribute is used as a test id. Use
3026 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
3027 |    * to configure a different test id attribute if necessary.
3028 |    *
3029 |    * ```js
3030 |    * // Set custom test id attribute from @playwright/test config:
3031 |    * import { defineConfig } from '@playwright/test';
3032 |    *
3033 |    * export default defineConfig({
3034 |    *   use: {
3035 |    *     testIdAttribute: 'data-pw'
3036 |    *   },
3037 |    * });
3038 |    * ```
3039 |    *
3040 |    * @param testId Id to locate the element by.
3041 |    */
3042 |   getByTestId(testId: string|RegExp): Locator;
3043 | 
3044 |   /**
3045 |    * Allows locating elements that contain given text.
3046 |    *
3047 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
3048 |    * match by another criteria, like an accessible role, and then filter by the text content.
3049 |    *
3050 |    * **Usage**
3051 |    *
3052 |    * Consider the following DOM structure:
3053 |    *
3054 |    * ```html
3055 |    * <div>Hello <span>world</span></div>
3056 |    * <div>Hello</div>
3057 |    * ```
3058 |    *
3059 |    * You can locate by text substring, exact string, or a regular expression:
3060 |    *
3061 |    * ```js
3062 |    * // Matches <span>
3063 |    * page.getByText('world');
3064 |    *
3065 |    * // Matches first <div>
3066 |    * page.getByText('Hello world');
3067 |    *
3068 |    * // Matches second <div>
3069 |    * page.getByText('Hello', { exact: true });
3070 |    *
3071 |    * // Matches both <div>s
3072 |    * page.getByText(/Hello/);
3073 |    *
3074 |    * // Matches second <div>
3075 |    * page.getByText(/^hello$/i);
3076 |    * ```
3077 |    *
3078 |    * **Details**
3079 |    *
3080 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
3081 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
3082 |    *
3083 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
3084 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
3085 |    * @param text Text to locate the element for.
3086 |    * @param options
3087 |    */
3088 |   getByText(text: string|RegExp, options?: {
3089 |     /**
3090 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
3091 |      * regular expression. Note that exact match still trims whitespace.
3092 |      */
3093 |     exact?: boolean;
3094 |   }): Locator;
3095 | 
3096 |   /**
3097 |    * Allows locating elements by their title attribute.
3098 |    *
3099 |    * **Usage**
3100 |    *
3101 |    * Consider the following DOM structure.
3102 |    *
3103 |    * ```html
3104 |    * <span title='Issues count'>25 issues</span>
3105 |    * ```
3106 |    *
3107 |    * You can check the issues count after locating it by the title text:
3108 |    *
3109 |    * ```js
3110 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
3111 |    * ```
3112 |    *
3113 |    * @param text Text to locate the element for.
3114 |    * @param options
3115 |    */
3116 |   getByTitle(text: string|RegExp, options?: {
3117 |     /**
3118 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
3119 |      * regular expression. Note that exact match still trims whitespace.
3120 |      */
3121 |     exact?: boolean;
3122 |   }): Locator;
3123 | 
3124 |   /**
3125 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
3126 |    * the last redirect. If cannot go back, returns `null`.
3127 |    *
3128 |    * Navigate to the previous page in history.
3129 |    * @param options
3130 |    */
3131 |   goBack(options?: {
3132 |     /**
3133 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3134 |      * `navigationTimeout` option in the config, or by using the
3135 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3136 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3137 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3138 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3139 |      */
3140 |     timeout?: number;
3141 | 
3142 |     /**
3143 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3144 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3145 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3146 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3147 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3148 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3149 |      *   loading.
3150 |      */
3151 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3152 |   }): Promise<null|Response>;
3153 | 
3154 |   /**
3155 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
3156 |    * the last redirect. If cannot go forward, returns `null`.
3157 |    *
3158 |    * Navigate to the next page in history.
3159 |    * @param options
3160 |    */
3161 |   goForward(options?: {
3162 |     /**
3163 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3164 |      * `navigationTimeout` option in the config, or by using the
3165 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3166 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3167 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3168 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3169 |      */
3170 |     timeout?: number;
3171 | 
3172 |     /**
3173 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3174 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3175 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3176 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3177 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3178 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3179 |      *   loading.
3180 |      */
3181 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3182 |   }): Promise<null|Response>;
3183 | 
3184 |   /**
3185 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the first
3186 |    * non-redirect response.
3187 |    *
3188 |    * The method will throw an error if:
3189 |    * - there's an SSL error (e.g. in case of self-signed certificates).
3190 |    * - target URL is invalid.
3191 |    * - the [`timeout`](https://playwright.dev/docs/api/class-page#page-goto-option-timeout) is exceeded during
3192 |    *   navigation.
3193 |    * - the remote server does not respond or is unreachable.
3194 |    * - the main resource failed to load.
3195 |    *
3196 |    * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
3197 |    * "Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
3198 |    * [response.status()](https://playwright.dev/docs/api/class-response#response-status).
3199 |    *
3200 |    * **NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
3201 |    * to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
3202 |    *
3203 |    * **NOTE** Headless mode doesn't support navigation to a PDF document. See the
3204 |    * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
3205 |    *
3206 |    * @param url URL to navigate page to. The url should include scheme, e.g. `https://`. When a
3207 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
3208 |    * options was provided and the passed URL is a path, it gets merged via the
3209 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
3210 |    * @param options
3211 |    */
3212 |   goto(url: string, options?: {
3213 |     /**
3214 |      * Referer header value. If provided it will take preference over the referer header value set by
3215 |      * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
3216 |      */
3217 |     referer?: string;
3218 | 
3219 |     /**
3220 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3221 |      * `navigationTimeout` option in the config, or by using the
3222 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3223 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3224 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3225 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3226 |      */
3227 |     timeout?: number;
3228 | 
3229 |     /**
3230 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3231 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3232 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3233 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3234 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3235 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3236 |      *   loading.
3237 |      */
3238 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3239 |   }): Promise<null|Response>;
3240 | 
3241 |   /**
3242 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
3243 |    * Read more about [locators](https://playwright.dev/docs/locators).
3244 |    *
3245 |    * This method hovers over an element matching
3246 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector) by performing the following
3247 |    * steps:
3248 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector).
3249 |    *    If there is none, wait until a matching element is attached to the DOM.
3250 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
3251 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-hover-option-force) option is set. If the element
3252 |    *    is detached during the checks, the whole action is retried.
3253 |    * 1. Scroll the element into view if needed.
3254 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
3255 |    *    element, or the specified
3256 |    *    [`position`](https://playwright.dev/docs/api/class-page#page-hover-option-position).
3257 |    *
3258 |    * When all steps combined have not finished during the specified
3259 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-hover-option-timeout), this method throws a
3260 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
3261 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3262 |    * used.
3263 |    * @param options
3264 |    */
3265 |   hover(selector: string, options?: {
3266 |     /**
3267 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
3268 |      */
3269 |     force?: boolean;
3270 | 
3271 |     /**
3272 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
3273 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
3274 |      * "Control" on Windows and Linux and to "Meta" on macOS.
3275 |      */
3276 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
3277 | 
3278 |     /**
3279 |      * This option has no effect.
3280 |      * @deprecated This option has no effect.
3281 |      */
3282 |     noWaitAfter?: boolean;
3283 | 
3284 |     /**
3285 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
3286 |      * the element.
3287 |      */
3288 |     position?: {
3289 |       x: number;
3290 | 
3291 |       y: number;
3292 |     };
3293 | 
3294 |     /**
3295 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3296 |      * element, the call throws an exception.
3297 |      */
3298 |     strict?: boolean;
3299 | 
3300 |     /**
3301 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3302 |      * option in the config, or by using the
3303 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3304 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3305 |      */
3306 |     timeout?: number;
3307 | 
3308 |     /**
3309 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
3310 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
3311 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
3312 |      * are pressed.
3313 |      */
3314 |     trial?: boolean;
3315 |   }): Promise<void>;
3316 | 
3317 |   /**
3318 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
3319 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3320 |    *
3321 |    * Returns `element.innerHTML`.
3322 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3323 |    * used.
3324 |    * @param options
3325 |    */
3326 |   innerHTML(selector: string, options?: {
3327 |     /**
3328 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3329 |      * element, the call throws an exception.
3330 |      */
3331 |     strict?: boolean;
3332 | 
3333 |     /**
3334 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3335 |      * option in the config, or by using the
3336 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3337 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3338 |      */
3339 |     timeout?: number;
3340 |   }): Promise<string>;
3341 | 
3342 |   /**
3343 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
3344 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3345 |    *
3346 |    * Returns `element.innerText`.
3347 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3348 |    * used.
3349 |    * @param options
3350 |    */
3351 |   innerText(selector: string, options?: {
3352 |     /**
3353 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3354 |      * element, the call throws an exception.
3355 |      */
3356 |     strict?: boolean;
3357 | 
3358 |     /**
3359 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3360 |      * option in the config, or by using the
3361 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3362 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3363 |      */
3364 |     timeout?: number;
3365 |   }): Promise<string>;
3366 | 
3367 |   /**
3368 |    * **NOTE** Use locator-based
3369 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
3370 |    * more about [locators](https://playwright.dev/docs/locators).
3371 |    *
3372 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
3373 |    *
3374 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
3375 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
3376 |    * control.
3377 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3378 |    * used.
3379 |    * @param options
3380 |    */
3381 |   inputValue(selector: string, options?: {
3382 |     /**
3383 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3384 |      * element, the call throws an exception.
3385 |      */
3386 |     strict?: boolean;
3387 | 
3388 |     /**
3389 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3390 |      * option in the config, or by using the
3391 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3392 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3393 |      */
3394 |     timeout?: number;
3395 |   }): Promise<string>;
3396 | 
3397 |   /**
3398 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
3399 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3400 |    *
3401 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
3402 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3403 |    * used.
3404 |    * @param options
3405 |    */
3406 |   isChecked(selector: string, options?: {
3407 |     /**
3408 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3409 |      * element, the call throws an exception.
3410 |      */
3411 |     strict?: boolean;
3412 | 
3413 |     /**
3414 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3415 |      * option in the config, or by using the
3416 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3417 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3418 |      */
3419 |     timeout?: number;
3420 |   }): Promise<boolean>;
3421 | 
3422 |   /**
3423 |    * Indicates that the page has been closed.
3424 |    */
3425 |   isClosed(): boolean;
3426 | 
3427 |   /**
3428 |    * **NOTE** Use locator-based
3429 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
3430 |    * more about [locators](https://playwright.dev/docs/locators).
3431 |    *
3432 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
3433 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3434 |    * used.
3435 |    * @param options
3436 |    */
3437 |   isDisabled(selector: string, options?: {
3438 |     /**
3439 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3440 |      * element, the call throws an exception.
3441 |      */
3442 |     strict?: boolean;
3443 | 
3444 |     /**
3445 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3446 |      * option in the config, or by using the
3447 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3448 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3449 |      */
3450 |     timeout?: number;
3451 |   }): Promise<boolean>;
3452 | 
3453 |   /**
3454 |    * **NOTE** Use locator-based
3455 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
3456 |    * more about [locators](https://playwright.dev/docs/locators).
3457 |    *
3458 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
3459 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3460 |    * used.
3461 |    * @param options
3462 |    */
3463 |   isEditable(selector: string, options?: {
3464 |     /**
3465 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3466 |      * element, the call throws an exception.
3467 |      */
3468 |     strict?: boolean;
3469 | 
3470 |     /**
3471 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3472 |      * option in the config, or by using the
3473 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3474 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3475 |      */
3476 |     timeout?: number;
3477 |   }): Promise<boolean>;
3478 | 
3479 |   /**
3480 |    * **NOTE** Use locator-based [locator.isEnabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-enabled)
3481 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3482 |    *
3483 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
3484 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3485 |    * used.
3486 |    * @param options
3487 |    */
3488 |   isEnabled(selector: string, options?: {
3489 |     /**
3490 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3491 |      * element, the call throws an exception.
3492 |      */
3493 |     strict?: boolean;
3494 | 
3495 |     /**
3496 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3497 |      * option in the config, or by using the
3498 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3499 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3500 |      */
3501 |     timeout?: number;
3502 |   }): Promise<boolean>;
3503 | 
3504 |   /**
3505 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
3506 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3507 |    *
3508 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
3509 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-is-hidden-option-selector) that does not match any
3510 |    * elements is considered hidden.
3511 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3512 |    * used.
3513 |    * @param options
3514 |    */
3515 |   isHidden(selector: string, options?: {
3516 |     /**
3517 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3518 |      * element, the call throws an exception.
3519 |      */
3520 |     strict?: boolean;
3521 | 
3522 |     /**
3523 |      * @deprecated This option is ignored.
3524 |      * [page.isHidden(selector[, options])](https://playwright.dev/docs/api/class-page#page-is-hidden) does not wait for
3525 |      * the element to become hidden and returns immediately.
3526 |      */
3527 |     timeout?: number;
3528 |   }): Promise<boolean>;
3529 | 
3530 |   /**
3531 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
3532 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3533 |    *
3534 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
3535 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-is-visible-option-selector) that does not match any
3536 |    * elements is considered not visible.
3537 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3538 |    * used.
3539 |    * @param options
3540 |    */
3541 |   isVisible(selector: string, options?: {
3542 |     /**
3543 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3544 |      * element, the call throws an exception.
3545 |      */
3546 |     strict?: boolean;
3547 | 
3548 |     /**
3549 |      * @deprecated This option is ignored.
3550 |      * [page.isVisible(selector[, options])](https://playwright.dev/docs/api/class-page#page-is-visible) does not wait for
3551 |      * the element to become visible and returns immediately.
3552 |      */
3553 |     timeout?: number;
3554 |   }): Promise<boolean>;
3555 | 
3556 |   /**
3557 |    * The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
3558 |    * to the element immediately before performing an action, so a series of actions on the same locator can in fact be
3559 |    * performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
3560 |    *
3561 |    * [Learn more about locators](https://playwright.dev/docs/locators).
3562 |    * @param selector A selector to use when resolving DOM element.
3563 |    * @param options
3564 |    */
3565 |   locator(selector: string, options?: {
3566 |     /**
3567 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
3568 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
3569 |      *
3570 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
3571 |      * the document root. For example, you can find `content` that has `div` in
3572 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
3573 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
3574 |      *
3575 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
3576 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
3577 |      */
3578 |     has?: Locator;
3579 | 
3580 |     /**
3581 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
3582 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
3583 |      *
3584 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
3585 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
3586 |      */
3587 |     hasNot?: Locator;
3588 | 
3589 |     /**
3590 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
3591 |      * When passed a [string], matching is case-insensitive and searches for a substring.
3592 |      */
3593 |     hasNotText?: string|RegExp;
3594 | 
3595 |     /**
3596 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
3597 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
3598 |      * `<article><div>Playwright</div></article>`.
3599 |      */
3600 |     hasText?: string|RegExp;
3601 |   }): Locator;
3602 | 
3603 |   /**
3604 |    * The page's main frame. Page is guaranteed to have a main frame which persists during navigations.
3605 |    */
3606 |   mainFrame(): Frame;
3607 | 
3608 |   /**
3609 |    * Returns the opener for popup pages and `null` for others. If the opener has been closed already the returns `null`.
3610 |    */
3611 |   opener(): Promise<null|Page>;
3612 | 
3613 |   /**
3614 |    * Returns up to (currently) 200 last page errors from this page. See
3615 |    * [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) for more details.
3616 |    */
3617 |   pageErrors(): Promise<Array<Error>>;
3618 | 
3619 |   /**
3620 |    * Pauses script execution. Playwright will stop executing the script and wait for the user to either press the
3621 |    * 'Resume' button in the page overlay or to call `playwright.resume()` in the DevTools console.
3622 |    *
3623 |    * User can inspect selectors or perform manual steps while paused. Resume will continue running the original script
3624 |    * from the place it was paused.
3625 |    *
3626 |    * **NOTE** This method requires Playwright to be started in a headed mode, with a falsy
3627 |    * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-headless) option.
3628 |    *
3629 |    */
3630 |   pause(): Promise<void>;
3631 | 
3632 |   /**
3633 |    * Returns the PDF buffer.
3634 |    *
3635 |    * `page.pdf()` generates a pdf of the page with `print` css media. To generate a pdf with `screen` media, call
3636 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) before calling
3637 |    * `page.pdf()`:
3638 |    *
3639 |    * **NOTE** By default, `page.pdf()` generates a pdf with modified colors for printing. Use the
3640 |    * [`-webkit-print-color-adjust`](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust)
3641 |    * property to force rendering of exact colors.
3642 |    *
3643 |    * **Usage**
3644 |    *
3645 |    * ```js
3646 |    * // Generates a PDF with 'screen' media type.
3647 |    * await page.emulateMedia({ media: 'screen' });
3648 |    * await page.pdf({ path: 'page.pdf' });
3649 |    * ```
3650 |    *
3651 |    * The [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width),
3652 |    * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height), and
3653 |    * [`margin`](https://playwright.dev/docs/api/class-page#page-pdf-option-margin) options accept values labeled with
3654 |    * units. Unlabeled values are treated as pixels.
3655 |    *
3656 |    * A few examples:
3657 |    * - `page.pdf({width: 100})` - prints with width set to 100 pixels
3658 |    * - `page.pdf({width: '100px'})` - prints with width set to 100 pixels
3659 |    * - `page.pdf({width: '10cm'})` - prints with width set to 10 centimeters.
3660 |    *
3661 |    * All possible units are:
3662 |    * - `px` - pixel
3663 |    * - `in` - inch
3664 |    * - `cm` - centimeter
3665 |    * - `mm` - millimeter
3666 |    *
3667 |    * The [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options are:
3668 |    * - `Letter`: 8.5in x 11in
3669 |    * - `Legal`: 8.5in x 14in
3670 |    * - `Tabloid`: 11in x 17in
3671 |    * - `Ledger`: 17in x 11in
3672 |    * - `A0`: 33.1in x 46.8in
3673 |    * - `A1`: 23.4in x 33.1in
3674 |    * - `A2`: 16.54in x 23.4in
3675 |    * - `A3`: 11.7in x 16.54in
3676 |    * - `A4`: 8.27in x 11.7in
3677 |    * - `A5`: 5.83in x 8.27in
3678 |    * - `A6`: 4.13in x 5.83in
3679 |    *
3680 |    * **NOTE** [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template) and
3681 |    * [`footerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-footer-template) markup have the
3682 |    * following limitations: > 1. Script tags inside templates are not evaluated. > 2. Page styles are not visible inside
3683 |    * templates.
3684 |    *
3685 |    * @param options
3686 |    */
3687 |   pdf(options?: {
3688 |     /**
3689 |      * Display header and footer. Defaults to `false`.
3690 |      */
3691 |     displayHeaderFooter?: boolean;
3692 | 
3693 |     /**
3694 |      * HTML template for the print footer. Should use the same format as the
3695 |      * [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template).
3696 |      */
3697 |     footerTemplate?: string;
3698 | 
3699 |     /**
3700 |      * Paper format. If set, takes priority over
3701 |      * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) or
3702 |      * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) options. Defaults to 'Letter'.
3703 |      */
3704 |     format?: string;
3705 | 
3706 |     /**
3707 |      * HTML template for the print header. Should be valid HTML markup with following classes used to inject printing
3708 |      * values into them:
3709 |      * - `'date'` formatted print date
3710 |      * - `'title'` document title
3711 |      * - `'url'` document location
3712 |      * - `'pageNumber'` current page number
3713 |      * - `'totalPages'` total pages in the document
3714 |      */
3715 |     headerTemplate?: string;
3716 | 
3717 |     /**
3718 |      * Paper height, accepts values labeled with units.
3719 |      */
3720 |     height?: string|number;
3721 | 
3722 |     /**
3723 |      * Paper orientation. Defaults to `false`.
3724 |      */
3725 |     landscape?: boolean;
3726 | 
3727 |     /**
3728 |      * Paper margins, defaults to none.
3729 |      */
3730 |     margin?: {
3731 |       /**
3732 |        * Top margin, accepts values labeled with units. Defaults to `0`.
3733 |        */
3734 |       top?: string|number;
3735 | 
3736 |       /**
3737 |        * Right margin, accepts values labeled with units. Defaults to `0`.
3738 |        */
3739 |       right?: string|number;
3740 | 
3741 |       /**
3742 |        * Bottom margin, accepts values labeled with units. Defaults to `0`.
3743 |        */
3744 |       bottom?: string|number;
3745 | 
3746 |       /**
3747 |        * Left margin, accepts values labeled with units. Defaults to `0`.
3748 |        */
3749 |       left?: string|number;
3750 |     };
3751 | 
3752 |     /**
3753 |      * Whether or not to embed the document outline into the PDF. Defaults to `false`.
3754 |      */
3755 |     outline?: boolean;
3756 | 
3757 |     /**
3758 |      * Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
3759 |      */
3760 |     pageRanges?: string;
3761 | 
3762 |     /**
3763 |      * The file path to save the PDF to. If [`path`](https://playwright.dev/docs/api/class-page#page-pdf-option-path) is a
3764 |      * relative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't
3765 |      * be saved to the disk.
3766 |      */
3767 |     path?: string;
3768 | 
3769 |     /**
3770 |      * Give any CSS `@page` size declared in the page priority over what is declared in
3771 |      * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) and
3772 |      * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) or
3773 |      * [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options. Defaults to `false`, which
3774 |      * will scale the content to fit the paper size.
3775 |      */
3776 |     preferCSSPageSize?: boolean;
3777 | 
3778 |     /**
3779 |      * Print background graphics. Defaults to `false`.
3780 |      */
3781 |     printBackground?: boolean;
3782 | 
3783 |     /**
3784 |      * Scale of the webpage rendering. Defaults to `1`. Scale amount must be between 0.1 and 2.
3785 |      */
3786 |     scale?: number;
3787 | 
3788 |     /**
3789 |      * Whether or not to generate tagged (accessible) PDF. Defaults to `false`.
3790 |      */
3791 |     tagged?: boolean;
3792 | 
3793 |     /**
3794 |      * Paper width, accepts values labeled with units.
3795 |      */
3796 |     width?: string|number;
3797 |   }): Promise<Buffer>;
3798 | 
3799 |   /**
3800 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
3801 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
3802 |    *
3803 |    * Focuses the element, and then uses
3804 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
3805 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
3806 |    *
3807 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) can specify the intended
3808 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
3809 |    * to generate the text for. A superset of the
3810 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) values can be found
3811 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
3812 |    *
3813 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
3814 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
3815 |    * etc.
3816 |    *
3817 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
3818 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
3819 |    *
3820 |    * Holding down `Shift` will type the text that corresponds to the
3821 |    * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) in the upper case.
3822 |    *
3823 |    * If [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) is a single character, it is
3824 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
3825 |    *
3826 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
3827 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
3828 |    *
3829 |    * **Usage**
3830 |    *
3831 |    * ```js
3832 |    * const page = await browser.newPage();
3833 |    * await page.goto('https://keycode.info');
3834 |    * await page.press('body', 'A');
3835 |    * await page.screenshot({ path: 'A.png' });
3836 |    * await page.press('body', 'ArrowLeft');
3837 |    * await page.screenshot({ path: 'ArrowLeft.png' });
3838 |    * await page.press('body', 'Shift+O');
3839 |    * await page.screenshot({ path: 'O.png' });
3840 |    * await browser.close();
3841 |    * ```
3842 |    *
3843 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3844 |    * used.
3845 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
3846 |    * @param options
3847 |    */
3848 |   press(selector: string, key: string, options?: {
3849 |     /**
3850 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
3851 |      */
3852 |     delay?: number;
3853 | 
3854 |     /**
3855 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
3856 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
3857 |      * navigating to inaccessible pages. Defaults to `false`.
3858 |      * @deprecated This option will default to `true` in the future.
3859 |      */
3860 |     noWaitAfter?: boolean;
3861 | 
3862 |     /**
3863 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3864 |      * element, the call throws an exception.
3865 |      */
3866 |     strict?: boolean;
3867 | 
3868 |     /**
3869 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
3870 |      * option in the config, or by using the
3871 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3872 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3873 |      */
3874 |     timeout?: number;
3875 |   }): Promise<void>;
3876 | 
3877 |   /**
3878 |    * This method reloads the current page, in the same way as if the user had triggered a browser refresh. Returns the
3879 |    * main resource response. In case of multiple redirects, the navigation will resolve with the response of the last
3880 |    * redirect.
3881 |    * @param options
3882 |    */
3883 |   reload(options?: {
3884 |     /**
3885 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3886 |      * `navigationTimeout` option in the config, or by using the
3887 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
3888 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
3889 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
3890 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
3891 |      */
3892 |     timeout?: number;
3893 | 
3894 |     /**
3895 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
3896 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
3897 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
3898 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
3899 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
3900 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
3901 |      *   loading.
3902 |      */
3903 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
3904 |   }): Promise<null|Response>;
3905 | 
3906 |   /**
3907 |    * Removes all locator handlers added by
3908 |    * [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
3909 |    * for a specific locator.
3910 |    * @param locator Locator passed to
3911 |    * [page.addLocatorHandler(locator, handler[, options])](https://playwright.dev/docs/api/class-page#page-add-locator-handler).
3912 |    */
3913 |   removeLocatorHandler(locator: Locator): Promise<void>;
3914 | 
3915 |   /**
3916 |    * Request the page to perform garbage collection. Note that there is no guarantee that all unreachable objects will
3917 |    * be collected.
3918 |    *
3919 |    * This is useful to help detect memory leaks. For example, if your page has a large object `'suspect'` that might be
3920 |    * leaked, you can check that it does not leak by using a
3921 |    * [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef).
3922 |    *
3923 |    * ```js
3924 |    * // 1. In your page, save a WeakRef for the "suspect".
3925 |    * await page.evaluate(() => globalThis.suspectWeakRef = new WeakRef(suspect));
3926 |    * // 2. Request garbage collection.
3927 |    * await page.requestGC();
3928 |    * // 3. Check that weak ref does not deref to the original object.
3929 |    * expect(await page.evaluate(() => !globalThis.suspectWeakRef.deref())).toBe(true);
3930 |    * ```
3931 |    *
3932 |    */
3933 |   requestGC(): Promise<void>;
3934 | 
3935 |   /**
3936 |    * Returns up to (currently) 100 last network request from this page. See
3937 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) for more details.
3938 |    *
3939 |    * Returned requests should be accessed immediately, otherwise they might be collected to prevent unbounded memory
3940 |    * growth as new requests come in. Once collected, retrieving most information about the request is impossible.
3941 |    *
3942 |    * Note that requests reported through the
3943 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) request are not collected, so
3944 |    * there is a trade off between efficient memory usage with
3945 |    * [page.requests()](https://playwright.dev/docs/api/class-page#page-requests) and the amount of available information
3946 |    * reported through [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
3947 |    */
3948 |   requests(): Promise<Array<Request>>;
3949 | 
3950 |   /**
3951 |    * Routing provides the capability to modify network requests that are made by a page.
3952 |    *
3953 |    * Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or
3954 |    * aborted.
3955 |    *
3956 |    * **NOTE** The handler will only be called for the first url if the response is a redirect.
3957 |    *
3958 |    * **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
3959 |    * intercept requests intercepted by Service Worker. See [this](https://github.com/microsoft/playwright/issues/1090)
3960 |    * issue. We recommend disabling Service Workers when using request interception by setting
3961 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
3962 |    * `'block'`.
3963 |    *
3964 |    * **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
3965 |    * intercept the first request of a popup page. Use
3966 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
3967 |    * instead.
3968 |    *
3969 |    * **Usage**
3970 |    *
3971 |    * An example of a naive handler that aborts all image requests:
3972 |    *
3973 |    * ```js
3974 |    * const page = await browser.newPage();
3975 |    * await page.route('**\/*.{png,jpg,jpeg}', route => route.abort());
3976 |    * await page.goto('https://example.com');
3977 |    * await browser.close();
3978 |    * ```
3979 |    *
3980 |    * or the same snippet using a regex pattern instead:
3981 |    *
3982 |    * ```js
3983 |    * const page = await browser.newPage();
3984 |    * await page.route(/(\.png$)|(\.jpg$)/, route => route.abort());
3985 |    * await page.goto('https://example.com');
3986 |    * await browser.close();
3987 |    * ```
3988 |    *
3989 |    * It is possible to examine the request to decide the route action. For example, mocking all requests that contain
3990 |    * some post data, and leaving all other requests as is:
3991 |    *
3992 |    * ```js
3993 |    * await page.route('/api/**', async route => {
3994 |    *   if (route.request().postData().includes('my-string'))
3995 |    *     await route.fulfill({ body: 'mocked-data' });
3996 |    *   else
3997 |    *     await route.continue();
3998 |    * });
3999 |    * ```
4000 |    *
4001 |    * Page routes take precedence over browser context routes (set up with
4002 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route))
4003 |    * when request matches both handlers.
4004 |    *
4005 |    * To remove a route with its handler you can use
4006 |    * [page.unroute(url[, handler])](https://playwright.dev/docs/api/class-page#page-unroute).
4007 |    *
4008 |    * **NOTE** Enabling routing disables http cache.
4009 |    *
4010 |    * @param url A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If
4011 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) is set in the
4012 |    * context options and the provided URL is a string that does not start with `*`, it is resolved using the
4013 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
4014 |    * @param handler handler function to route the request.
4015 |    * @param options
4016 |    */
4017 |   route(url: string|RegExp|((url: URL) => boolean), handler: ((route: Route, request: Request) => Promise<any>|any), options?: {
4018 |     /**
4019 |      * How often a route should be used. By default it will be used every time.
4020 |      */
4021 |     times?: number;
4022 |   }): Promise<void>;
4023 | 
4024 |   /**
4025 |    * If specified the network requests that are made in the page will be served from the HAR file. Read more about
4026 |    * [Replaying from HAR](https://playwright.dev/docs/mock#replaying-from-har).
4027 |    *
4028 |    * Playwright will not serve requests intercepted by Service Worker from the HAR file. See
4029 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
4030 |    * using request interception by setting
4031 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
4032 |    * `'block'`.
4033 |    * @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
4034 |    * relative path, then it is resolved relative to the current working directory.
4035 |    * @param options
4036 |    */
4037 |   routeFromHAR(har: string, options?: {
4038 |     /**
4039 |      * - If set to 'abort' any request not found in the HAR file will be aborted.
4040 |      * - If set to 'fallback' missing requests will be sent to the network.
4041 |      *
4042 |      * Defaults to abort.
4043 |      */
4044 |     notFound?: "abort"|"fallback";
4045 | 
4046 |     /**
4047 |      * If specified, updates the given HAR with the actual network information instead of serving from file. The file is
4048 |      * written to disk when
4049 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) is
4050 |      * called.
4051 |      */
4052 |     update?: boolean;
4053 | 
4054 |     /**
4055 |      * Optional setting to control resource content management. If `attach` is specified, resources are persisted as
4056 |      * separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
4057 |      */
4058 |     updateContent?: "embed"|"attach";
4059 | 
4060 |     /**
4061 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
4062 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
4063 |      * `minimal`.
4064 |      */
4065 |     updateMode?: "full"|"minimal";
4066 | 
4067 |     /**
4068 |      * A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
4069 |      * pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
4070 |      */
4071 |     url?: string|RegExp;
4072 |   }): Promise<void>;
4073 | 
4074 |   /**
4075 |    * This method allows to modify websocket connections that are made by the page.
4076 |    *
4077 |    * Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
4078 |    * method before navigating the page.
4079 |    *
4080 |    * **Usage**
4081 |    *
4082 |    * Below is an example of a simple mock that responds to a single message. See
4083 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
4084 |    *
4085 |    * ```js
4086 |    * await page.routeWebSocket('/ws', ws => {
4087 |    *   ws.onMessage(message => {
4088 |    *     if (message === 'request')
4089 |    *       ws.send('response');
4090 |    *   });
4091 |    * });
4092 |    * ```
4093 |    *
4094 |    * @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
4095 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
4096 |    * @param handler Handler function to route the WebSocket.
4097 |    */
4098 |   routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
4099 | 
4100 |   /**
4101 |    * Returns the buffer with the captured screenshot.
4102 |    * @param options
4103 |    */
4104 |   screenshot(options?: PageScreenshotOptions): Promise<Buffer>;
4105 | 
4106 |   /**
4107 |    * **NOTE** Use locator-based
4108 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
4109 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4110 |    *
4111 |    * This method waits for an element matching
4112 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-select-option-option-selector), waits for
4113 |    * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
4114 |    * element and selects these options.
4115 |    *
4116 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
4117 |    * the `<label>` element that has an associated
4118 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
4119 |    * instead.
4120 |    *
4121 |    * Returns the array of option values that have been successfully selected.
4122 |    *
4123 |    * Triggers a `change` and `input` event once all the provided options have been selected.
4124 |    *
4125 |    * **Usage**
4126 |    *
4127 |    * ```js
4128 |    * // Single selection matching the value or label
4129 |    * page.selectOption('select#colors', 'blue');
4130 |    *
4131 |    * // single selection matching the label
4132 |    * page.selectOption('select#colors', { label: 'Blue' });
4133 |    *
4134 |    * // multiple selection
4135 |    * page.selectOption('select#colors', ['red', 'green', 'blue']);
4136 |    *
4137 |    * ```
4138 |    *
4139 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4140 |    * used.
4141 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
4142 |    * only the first option matching one of the passed options is selected. String values are matching both values and
4143 |    * labels. Option is considered matching if all specified properties match.
4144 |    * @param options
4145 |    */
4146 |   selectOption(selector: string, values: null|string|ElementHandle|ReadonlyArray<string>|{
4147 |     /**
4148 |      * Matches by `option.value`. Optional.
4149 |      */
4150 |     value?: string;
4151 | 
4152 |     /**
4153 |      * Matches by `option.label`. Optional.
4154 |      */
4155 |     label?: string;
4156 | 
4157 |     /**
4158 |      * Matches by the index. Optional.
4159 |      */
4160 |     index?: number;
4161 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
4162 |     /**
4163 |      * Matches by `option.value`. Optional.
4164 |      */
4165 |     value?: string;
4166 | 
4167 |     /**
4168 |      * Matches by `option.label`. Optional.
4169 |      */
4170 |     label?: string;
4171 | 
4172 |     /**
4173 |      * Matches by the index. Optional.
4174 |      */
4175 |     index?: number;
4176 |   }>, options?: {
4177 |     /**
4178 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4179 |      */
4180 |     force?: boolean;
4181 | 
4182 |     /**
4183 |      * This option has no effect.
4184 |      * @deprecated This option has no effect.
4185 |      */
4186 |     noWaitAfter?: boolean;
4187 | 
4188 |     /**
4189 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4190 |      * element, the call throws an exception.
4191 |      */
4192 |     strict?: boolean;
4193 | 
4194 |     /**
4195 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4196 |      * option in the config, or by using the
4197 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4198 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4199 |      */
4200 |     timeout?: number;
4201 |   }): Promise<Array<string>>;
4202 | 
4203 |   /**
4204 |    * **NOTE** Use locator-based
4205 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
4206 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4207 |    *
4208 |    * This method checks or unchecks an element matching
4209 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector) by performing the
4210 |    * following steps:
4211 |    * 1. Find an element matching
4212 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector). If there is none,
4213 |    *    wait until a matching element is attached to the DOM.
4214 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
4215 |    * 1. If the element already has the right checked state, this method returns immediately.
4216 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4217 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-set-checked-option-force) option is set. If the
4218 |    *    element is detached during the checks, the whole action is retried.
4219 |    * 1. Scroll the element into view if needed.
4220 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
4221 |    *    element.
4222 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
4223 |    *
4224 |    * When all steps combined have not finished during the specified
4225 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-checked-option-timeout), this method throws a
4226 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4227 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4228 |    * used.
4229 |    * @param checked Whether to check or uncheck the checkbox.
4230 |    * @param options
4231 |    */
4232 |   setChecked(selector: string, checked: boolean, options?: {
4233 |     /**
4234 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4235 |      */
4236 |     force?: boolean;
4237 | 
4238 |     /**
4239 |      * This option has no effect.
4240 |      * @deprecated This option has no effect.
4241 |      */
4242 |     noWaitAfter?: boolean;
4243 | 
4244 |     /**
4245 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4246 |      * the element.
4247 |      */
4248 |     position?: {
4249 |       x: number;
4250 | 
4251 |       y: number;
4252 |     };
4253 | 
4254 |     /**
4255 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4256 |      * element, the call throws an exception.
4257 |      */
4258 |     strict?: boolean;
4259 | 
4260 |     /**
4261 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4262 |      * option in the config, or by using the
4263 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4264 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4265 |      */
4266 |     timeout?: number;
4267 | 
4268 |     /**
4269 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4270 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
4271 |      */
4272 |     trial?: boolean;
4273 |   }): Promise<void>;
4274 | 
4275 |   /**
4276 |    * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
4277 |    * inheriting all its specific characteristics and behaviors.
4278 |    * @param html HTML markup to assign to the page.
4279 |    * @param options
4280 |    */
4281 |   setContent(html: string, options?: {
4282 |     /**
4283 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4284 |      * `navigationTimeout` option in the config, or by using the
4285 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
4286 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
4287 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4288 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4289 |      */
4290 |     timeout?: number;
4291 | 
4292 |     /**
4293 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
4294 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
4295 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
4296 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
4297 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
4298 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
4299 |      *   loading.
4300 |      */
4301 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
4302 |   }): Promise<void>;
4303 | 
4304 |   /**
4305 |    * This setting will change the default maximum navigation time for the following methods and related shortcuts:
4306 |    * - [page.goBack([options])](https://playwright.dev/docs/api/class-page#page-go-back)
4307 |    * - [page.goForward([options])](https://playwright.dev/docs/api/class-page#page-go-forward)
4308 |    * - [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto)
4309 |    * - [page.reload([options])](https://playwright.dev/docs/api/class-page#page-reload)
4310 |    * - [page.setContent(html[, options])](https://playwright.dev/docs/api/class-page#page-set-content)
4311 |    * - [page.waitForNavigation([options])](https://playwright.dev/docs/api/class-page#page-wait-for-navigation)
4312 |    * - [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url)
4313 |    *
4314 |    * **NOTE**
4315 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4316 |    * takes priority over
4317 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout),
4318 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4319 |    * and
4320 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout).
4321 |    *
4322 |    * @param timeout Maximum navigation time in milliseconds
4323 |    */
4324 |   setDefaultNavigationTimeout(timeout: number): void;
4325 | 
4326 |   /**
4327 |    * This setting will change the default maximum time for all the methods accepting
4328 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-default-timeout-option-timeout) option.
4329 |    *
4330 |    * **NOTE**
4331 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4332 |    * takes priority over
4333 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout).
4334 |    *
4335 |    * @param timeout Maximum time in milliseconds. Pass `0` to disable timeout.
4336 |    */
4337 |   setDefaultTimeout(timeout: number): void;
4338 | 
4339 |   /**
4340 |    * The extra HTTP headers will be sent with every request the page initiates.
4341 |    *
4342 |    * **NOTE**
4343 |    * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers) does
4344 |    * not guarantee the order of headers in the outgoing requests.
4345 |    *
4346 |    * @param headers An object containing additional HTTP headers to be sent with every request. All header values must be strings.
4347 |    */
4348 |   setExtraHTTPHeaders(headers: { [key: string]: string; }): Promise<void>;
4349 | 
4350 |   /**
4351 |    * **NOTE** Use locator-based
4352 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
4353 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4354 |    *
4355 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
4356 |    * they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
4357 |    * with a `[webkitdirectory]` attribute, only a single directory path is supported.
4358 |    *
4359 |    * This method expects [`selector`](https://playwright.dev/docs/api/class-page#page-set-input-files-option-selector)
4360 |    * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
4361 |    * element is inside the `<label>` element that has an associated
4362 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
4363 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4364 |    * used.
4365 |    * @param files
4366 |    * @param options
4367 |    */
4368 |   setInputFiles(selector: string, files: string|ReadonlyArray<string>|{
4369 |     /**
4370 |      * File name
4371 |      */
4372 |     name: string;
4373 | 
4374 |     /**
4375 |      * File type
4376 |      */
4377 |     mimeType: string;
4378 | 
4379 |     /**
4380 |      * File content
4381 |      */
4382 |     buffer: Buffer;
4383 |   }|ReadonlyArray<{
4384 |     /**
4385 |      * File name
4386 |      */
4387 |     name: string;
4388 | 
4389 |     /**
4390 |      * File type
4391 |      */
4392 |     mimeType: string;
4393 | 
4394 |     /**
4395 |      * File content
4396 |      */
4397 |     buffer: Buffer;
4398 |   }>, options?: {
4399 |     /**
4400 |      * This option has no effect.
4401 |      * @deprecated This option has no effect.
4402 |      */
4403 |     noWaitAfter?: boolean;
4404 | 
4405 |     /**
4406 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4407 |      * element, the call throws an exception.
4408 |      */
4409 |     strict?: boolean;
4410 | 
4411 |     /**
4412 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4413 |      * option in the config, or by using the
4414 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4415 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4416 |      */
4417 |     timeout?: number;
4418 |   }): Promise<void>;
4419 | 
4420 |   /**
4421 |    * In the case of multiple pages in a single browser, each page can have its own viewport size. However,
4422 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) allows to set
4423 |    * viewport size (and more) for all pages in the context at once.
4424 |    *
4425 |    * [page.setViewportSize(viewportSize)](https://playwright.dev/docs/api/class-page#page-set-viewport-size) will resize
4426 |    * the page. A lot of websites don't expect phones to change size, so you should set the viewport size before
4427 |    * navigating to the page.
4428 |    * [page.setViewportSize(viewportSize)](https://playwright.dev/docs/api/class-page#page-set-viewport-size) will also
4429 |    * reset `screen` size, use
4430 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) with `screen`
4431 |    * and `viewport` parameters if you need better control of these properties.
4432 |    *
4433 |    * **Usage**
4434 |    *
4435 |    * ```js
4436 |    * const page = await browser.newPage();
4437 |    * await page.setViewportSize({
4438 |    *   width: 640,
4439 |    *   height: 480,
4440 |    * });
4441 |    * await page.goto('https://example.com');
4442 |    * ```
4443 |    *
4444 |    * @param viewportSize
4445 |    */
4446 |   setViewportSize(viewportSize: {
4447 |     /**
4448 |      * page width in pixels.
4449 |      */
4450 |     width: number;
4451 | 
4452 |     /**
4453 |      * page height in pixels.
4454 |      */
4455 |     height: number;
4456 |   }): Promise<void>;
4457 | 
4458 |   /**
4459 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
4460 |    * more about [locators](https://playwright.dev/docs/locators).
4461 |    *
4462 |    * This method taps an element matching
4463 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector) by performing the following
4464 |    * steps:
4465 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector).
4466 |    *    If there is none, wait until a matching element is attached to the DOM.
4467 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4468 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-tap-option-force) option is set. If the element is
4469 |    *    detached during the checks, the whole action is retried.
4470 |    * 1. Scroll the element into view if needed.
4471 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
4472 |    *    element, or the specified [`position`](https://playwright.dev/docs/api/class-page#page-tap-option-position).
4473 |    *
4474 |    * When all steps combined have not finished during the specified
4475 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-tap-option-timeout), this method throws a
4476 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4477 |    *
4478 |    * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
4479 |    * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
4480 |    * browser context is false.
4481 |    *
4482 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4483 |    * used.
4484 |    * @param options
4485 |    */
4486 |   tap(selector: string, options?: {
4487 |     /**
4488 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4489 |      */
4490 |     force?: boolean;
4491 | 
4492 |     /**
4493 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
4494 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
4495 |      * "Control" on Windows and Linux and to "Meta" on macOS.
4496 |      */
4497 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
4498 | 
4499 |     /**
4500 |      * This option has no effect.
4501 |      * @deprecated This option has no effect.
4502 |      */
4503 |     noWaitAfter?: boolean;
4504 | 
4505 |     /**
4506 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4507 |      * the element.
4508 |      */
4509 |     position?: {
4510 |       x: number;
4511 | 
4512 |       y: number;
4513 |     };
4514 | 
4515 |     /**
4516 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4517 |      * element, the call throws an exception.
4518 |      */
4519 |     strict?: boolean;
4520 | 
4521 |     /**
4522 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4523 |      * option in the config, or by using the
4524 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4525 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4526 |      */
4527 |     timeout?: number;
4528 | 
4529 |     /**
4530 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4531 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
4532 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
4533 |      * are pressed.
4534 |      */
4535 |     trial?: boolean;
4536 |   }): Promise<void>;
4537 | 
4538 |   /**
4539 |    * **NOTE** Use locator-based
4540 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
4541 |    * more about [locators](https://playwright.dev/docs/locators).
4542 |    *
4543 |    * Returns `element.textContent`.
4544 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4545 |    * used.
4546 |    * @param options
4547 |    */
4548 |   textContent(selector: string, options?: {
4549 |     /**
4550 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4551 |      * element, the call throws an exception.
4552 |      */
4553 |     strict?: boolean;
4554 | 
4555 |     /**
4556 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4557 |      * option in the config, or by using the
4558 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4559 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4560 |      */
4561 |     timeout?: number;
4562 |   }): Promise<null|string>;
4563 | 
4564 |   /**
4565 |    * Returns the page's title.
4566 |    */
4567 |   title(): Promise<string>;
4568 | 
4569 |   /**
4570 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `page.type` can be used to
4571 |    * send fine-grained keyboard events. To fill values in form fields, use
4572 |    * [page.fill(selector, value[, options])](https://playwright.dev/docs/api/class-page#page-fill).
4573 |    *
4574 |    * To press a special key, like `Control` or `ArrowDown`, use
4575 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
4576 |    *
4577 |    * **Usage**
4578 |    * @deprecated In most cases, you should use
4579 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
4580 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
4581 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
4582 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4583 |    * used.
4584 |    * @param text A text to type into a focused element.
4585 |    * @param options
4586 |    */
4587 |   type(selector: string, text: string, options?: {
4588 |     /**
4589 |      * Time to wait between key presses in milliseconds. Defaults to 0.
4590 |      */
4591 |     delay?: number;
4592 | 
4593 |     /**
4594 |      * This option has no effect.
4595 |      * @deprecated This option has no effect.
4596 |      */
4597 |     noWaitAfter?: boolean;
4598 | 
4599 |     /**
4600 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4601 |      * element, the call throws an exception.
4602 |      */
4603 |     strict?: boolean;
4604 | 
4605 |     /**
4606 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4607 |      * option in the config, or by using the
4608 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4609 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4610 |      */
4611 |     timeout?: number;
4612 |   }): Promise<void>;
4613 | 
4614 |   /**
4615 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
4616 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
4617 |    *
4618 |    * This method unchecks an element matching
4619 |    * [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector) by performing the following
4620 |    * steps:
4621 |    * 1. Find an element matching
4622 |    *    [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector). If there is none, wait
4623 |    *    until a matching element is attached to the DOM.
4624 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
4625 |    *    already unchecked, this method returns immediately.
4626 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
4627 |    *    [`force`](https://playwright.dev/docs/api/class-page#page-uncheck-option-force) option is set. If the element
4628 |    *    is detached during the checks, the whole action is retried.
4629 |    * 1. Scroll the element into view if needed.
4630 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
4631 |    *    element.
4632 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
4633 |    *
4634 |    * When all steps combined have not finished during the specified
4635 |    * [`timeout`](https://playwright.dev/docs/api/class-page#page-uncheck-option-timeout), this method throws a
4636 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
4637 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
4638 |    * used.
4639 |    * @param options
4640 |    */
4641 |   uncheck(selector: string, options?: {
4642 |     /**
4643 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
4644 |      */
4645 |     force?: boolean;
4646 | 
4647 |     /**
4648 |      * This option has no effect.
4649 |      * @deprecated This option has no effect.
4650 |      */
4651 |     noWaitAfter?: boolean;
4652 | 
4653 |     /**
4654 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
4655 |      * the element.
4656 |      */
4657 |     position?: {
4658 |       x: number;
4659 | 
4660 |       y: number;
4661 |     };
4662 | 
4663 |     /**
4664 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4665 |      * element, the call throws an exception.
4666 |      */
4667 |     strict?: boolean;
4668 | 
4669 |     /**
4670 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
4671 |      * option in the config, or by using the
4672 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4673 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4674 |      */
4675 |     timeout?: number;
4676 | 
4677 |     /**
4678 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
4679 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
4680 |      */
4681 |     trial?: boolean;
4682 |   }): Promise<void>;
4683 | 
4684 |   /**
4685 |    * Removes a route created with
4686 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route). When
4687 |    * [`handler`](https://playwright.dev/docs/api/class-page#page-unroute-option-handler) is not specified, removes all
4688 |    * routes for the [`url`](https://playwright.dev/docs/api/class-page#page-unroute-option-url).
4689 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
4690 |    * @param handler Optional handler function to route the request.
4691 |    */
4692 |   unroute(url: string|RegExp|((url: URL) => boolean), handler?: ((route: Route, request: Request) => Promise<any>|any)): Promise<void>;
4693 | 
4694 |   /**
4695 |    * Removes all routes created with
4696 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) and
4697 |    * [page.routeFromHAR(har[, options])](https://playwright.dev/docs/api/class-page#page-route-from-har).
4698 |    * @param options
4699 |    */
4700 |   unrouteAll(options?: {
4701 |     /**
4702 |      * Specifies whether to wait for already running handlers and what to do if they throw errors:
4703 |      * - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
4704 |      *   result in unhandled error
4705 |      * - `'wait'` - wait for current handler calls (if any) to finish
4706 |      * - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
4707 |      *   after unrouting are silently caught
4708 |      */
4709 |     behavior?: "wait"|"ignoreErrors"|"default";
4710 |   }): Promise<void>;
4711 | 
4712 |   url(): string;
4713 | 
4714 |   /**
4715 |    * Video object associated with this page.
4716 |    */
4717 |   video(): null|Video;
4718 | 
4719 |   viewportSize(): null|{
4720 |     /**
4721 |      * page width in pixels.
4722 |      */
4723 |     width: number;
4724 | 
4725 |     /**
4726 |      * page height in pixels.
4727 |      */
4728 |     height: number;
4729 |   };
4730 | 
4731 |   /**
4732 |    * Emitted when the page closes.
4733 |    */
4734 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4735 | 
4736 |   /**
4737 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
4738 |    *
4739 |    * The arguments passed into `console.log` are available on the
4740 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
4741 |    *
4742 |    * **Usage**
4743 |    *
4744 |    * ```js
4745 |    * page.on('console', async msg => {
4746 |    *   const values = [];
4747 |    *   for (const arg of msg.args())
4748 |    *     values.push(await arg.jsonValue());
4749 |    *   console.log(...values);
4750 |    * });
4751 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
4752 |    * ```
4753 |    *
4754 |    */
4755 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
4756 | 
4757 |   /**
4758 |    * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
4759 |    * crashes, ongoing and subsequent operations will throw.
4760 |    *
4761 |    * The most common way to deal with crashes is to catch an exception:
4762 |    *
4763 |    * ```js
4764 |    * try {
4765 |    *   // Crash might happen during a click.
4766 |    *   await page.click('button');
4767 |    *   // Or while waiting for an event.
4768 |    *   await page.waitForEvent('popup');
4769 |    * } catch (e) {
4770 |    *   // When the page crashes, exception message contains 'crash'.
4771 |    * }
4772 |    * ```
4773 |    *
4774 |    */
4775 |   waitForEvent(event: 'crash', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4776 | 
4777 |   /**
4778 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
4779 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
4780 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
4781 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
4782 |    * dialog, and actions like click will never finish.
4783 |    *
4784 |    * **Usage**
4785 |    *
4786 |    * ```js
4787 |    * page.on('dialog', dialog => dialog.accept());
4788 |    * ```
4789 |    *
4790 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
4791 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
4792 |    * listeners are present, all dialogs are automatically dismissed.
4793 |    *
4794 |    */
4795 |   waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
4796 | 
4797 |   /**
4798 |    * Emitted when the JavaScript
4799 |    * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
4800 |    */
4801 |   waitForEvent(event: 'domcontentloaded', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4802 | 
4803 |   /**
4804 |    * Emitted when attachment download started. User can access basic file operations on downloaded content via the
4805 |    * passed [Download](https://playwright.dev/docs/api/class-download) instance.
4806 |    */
4807 |   waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
4808 | 
4809 |   /**
4810 |    * Emitted when a file chooser is supposed to appear, such as after clicking the  `<input type=file>`. Playwright can
4811 |    * respond to it via setting the input files using
4812 |    * [fileChooser.setFiles(files[, options])](https://playwright.dev/docs/api/class-filechooser#file-chooser-set-files)
4813 |    * that can be uploaded after that.
4814 |    *
4815 |    * ```js
4816 |    * page.on('filechooser', async fileChooser => {
4817 |    *   await fileChooser.setFiles(path.join(__dirname, '/tmp/myfile.pdf'));
4818 |    * });
4819 |    * ```
4820 |    *
4821 |    */
4822 |   waitForEvent(event: 'filechooser', optionsOrPredicate?: { predicate?: (fileChooser: FileChooser) => boolean | Promise<boolean>, timeout?: number } | ((fileChooser: FileChooser) => boolean | Promise<boolean>)): Promise<FileChooser>;
4823 | 
4824 |   /**
4825 |    * Emitted when a frame is attached.
4826 |    */
4827 |   waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4828 | 
4829 |   /**
4830 |    * Emitted when a frame is detached.
4831 |    */
4832 |   waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4833 | 
4834 |   /**
4835 |    * Emitted when a frame is navigated to a new url.
4836 |    */
4837 |   waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4838 | 
4839 |   /**
4840 |    * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
4841 |    */
4842 |   waitForEvent(event: 'load', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4843 | 
4844 |   /**
4845 |    * Emitted when an uncaught exception happens within the page.
4846 |    *
4847 |    * ```js
4848 |    * // Log all uncaught errors to the terminal
4849 |    * page.on('pageerror', exception => {
4850 |    *   console.log(`Uncaught exception: "${exception}"`);
4851 |    * });
4852 |    *
4853 |    * // Navigate to a page with an exception.
4854 |    * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
4855 |    * ```
4856 |    *
4857 |    */
4858 |   waitForEvent(event: 'pageerror', optionsOrPredicate?: { predicate?: (error: Error) => boolean | Promise<boolean>, timeout?: number } | ((error: Error) => boolean | Promise<boolean>)): Promise<Error>;
4859 | 
4860 |   /**
4861 |    * Emitted when the page opens a new tab or window. This event is emitted in addition to the
4862 |    * [browserContext.on('page')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-page), but
4863 |    * only for popups relevant to this page.
4864 |    *
4865 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
4866 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
4867 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
4868 |    * to this network request, use
4869 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
4870 |    * and
4871 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
4872 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
4873 |    *
4874 |    * ```js
4875 |    * // Start waiting for popup before clicking. Note no await.
4876 |    * const popupPromise = page.waitForEvent('popup');
4877 |    * await page.getByText('open the popup').click();
4878 |    * const popup = await popupPromise;
4879 |    * console.log(await popup.evaluate('location.href'));
4880 |    * ```
4881 |    *
4882 |    * **NOTE** Use
4883 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
4884 |    * wait until the page gets to a particular state (you should not need it in most cases).
4885 |    *
4886 |    */
4887 |   waitForEvent(event: 'popup', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4888 | 
4889 |   /**
4890 |    * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
4891 |    * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
4892 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
4893 |    */
4894 |   waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4895 | 
4896 |   /**
4897 |    * Emitted when a request fails, for example by timing out.
4898 |    *
4899 |    * ```js
4900 |    * page.on('requestfailed', request => {
4901 |    *   console.log(request.url() + ' ' + request.failure().errorText);
4902 |    * });
4903 |    * ```
4904 |    *
4905 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
4906 |    * will complete with
4907 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) event and not
4908 |    * with [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed). A request
4909 |    * will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network
4910 |    * error net::ERR_FAILED.
4911 |    *
4912 |    */
4913 |   waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4914 | 
4915 |   /**
4916 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
4917 |    * sequence of events is `request`, `response` and `requestfinished`.
4918 |    */
4919 |   waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4920 | 
4921 |   /**
4922 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
4923 |    * events is `request`, `response` and `requestfinished`.
4924 |    */
4925 |   waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
4926 | 
4927 |   /**
4928 |    * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
4929 |    */
4930 |   waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
4931 | 
4932 |   /**
4933 |    * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
4934 |    * by the page.
4935 |    */
4936 |   waitForEvent(event: 'worker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
4937 | 
4938 | 
4939 |   /**
4940 |    * Returns when the required load state has been reached.
4941 |    *
4942 |    * This resolves when the page reaches a required load state, `load` by default. The navigation must have been
4943 |    * committed when this method is called. If current document has already reached the required state, resolves
4944 |    * immediately.
4945 |    *
4946 |    * **NOTE** Most of the time, this method is not needed because Playwright
4947 |    * [auto-waits before every action](https://playwright.dev/docs/actionability).
4948 |    *
4949 |    * **Usage**
4950 |    *
4951 |    * ```js
4952 |    * await page.getByRole('button').click(); // Click triggers navigation.
4953 |    * await page.waitForLoadState(); // The promise resolves after 'load' event.
4954 |    * ```
4955 |    *
4956 |    * ```js
4957 |    * const popupPromise = page.waitForEvent('popup');
4958 |    * await page.getByRole('button').click(); // Click triggers a popup.
4959 |    * const popup = await popupPromise;
4960 |    * await popup.waitForLoadState('domcontentloaded'); // Wait for the 'DOMContentLoaded' event.
4961 |    * console.log(await popup.title()); // Popup is ready to use.
4962 |    * ```
4963 |    *
4964 |    * @param state Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
4965 |    * document, the method resolves immediately. Can be one of:
4966 |    * - `'load'` - wait for the `load` event to be fired.
4967 |    * - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
4968 |    * - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
4969 |    * this method for testing, rely on web assertions to assess readiness instead.
4970 |    * @param options
4971 |    */
4972 |   waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
4973 |     /**
4974 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4975 |      * `navigationTimeout` option in the config, or by using the
4976 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
4977 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
4978 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
4979 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
4980 |      */
4981 |     timeout?: number;
4982 |   }): Promise<void>;
4983 | 
4984 |   /**
4985 |    * Waits for the main frame navigation and returns the main resource response. In case of multiple redirects, the
4986 |    * navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
4987 |    * navigation due to History API usage, the navigation will resolve with `null`.
4988 |    *
4989 |    * **Usage**
4990 |    *
4991 |    * This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will
4992 |    * indirectly cause the page to navigate. e.g. The click target has an `onclick` handler that triggers navigation from
4993 |    * a `setTimeout`. Consider this example:
4994 |    *
4995 |    * ```js
4996 |    * // Start waiting for navigation before clicking. Note no await.
4997 |    * const navigationPromise = page.waitForNavigation();
4998 |    * await page.getByText('Navigate after timeout').click();
4999 |    * await navigationPromise;
5000 |    * ```
5001 |    *
5002 |    * **NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
5003 |    * is considered a navigation.
5004 |    *
5005 |    * @deprecated This method is inherently racy, please use
5006 |    * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url) instead.
5007 |    * @param options
5008 |    */
5009 |   waitForNavigation(options?: {
5010 |     /**
5011 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5012 |      * `navigationTimeout` option in the config, or by using the
5013 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
5014 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
5015 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
5016 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
5017 |      */
5018 |     timeout?: number;
5019 | 
5020 |     /**
5021 |      * A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
5022 |      * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
5023 |      * equal to the string.
5024 |      */
5025 |     url?: string|RegExp|((url: URL) => boolean);
5026 | 
5027 |     /**
5028 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
5029 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
5030 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
5031 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
5032 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
5033 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
5034 |      *   loading.
5035 |      */
5036 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
5037 |   }): Promise<null|Response>;
5038 | 
5039 |   /**
5040 |    * Waits for the matching request and returns it. See [waiting for event](https://playwright.dev/docs/events#waiting-for-event) for more
5041 |    * details about events.
5042 |    *
5043 |    * **Usage**
5044 |    *
5045 |    * ```js
5046 |    * // Start waiting for request before clicking. Note no await.
5047 |    * const requestPromise = page.waitForRequest('https://example.com/resource');
5048 |    * await page.getByText('trigger request').click();
5049 |    * const request = await requestPromise;
5050 |    *
5051 |    * // Alternative way with a predicate. Note no await.
5052 |    * const requestPromise = page.waitForRequest(request =>
5053 |    *   request.url() === 'https://example.com' && request.method() === 'GET',
5054 |    * );
5055 |    * await page.getByText('trigger request').click();
5056 |    * const request = await requestPromise;
5057 |    * ```
5058 |    *
5059 |    * @param urlOrPredicate Request URL string, regex or predicate receiving [Request](https://playwright.dev/docs/api/class-request) object.
5060 |    * @param options
5061 |    */
5062 |   waitForRequest(urlOrPredicate: string|RegExp|((request: Request) => boolean|Promise<boolean>), options?: {
5063 |     /**
5064 |      * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5065 |      * be changed by using the
5066 |      * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) method.
5067 |      */
5068 |     timeout?: number;
5069 |   }): Promise<Request>;
5070 | 
5071 |   /**
5072 |    * Returns the matched response. See [waiting for event](https://playwright.dev/docs/events#waiting-for-event) for more details about
5073 |    * events.
5074 |    *
5075 |    * **Usage**
5076 |    *
5077 |    * ```js
5078 |    * // Start waiting for response before clicking. Note no await.
5079 |    * const responsePromise = page.waitForResponse('https://example.com/resource');
5080 |    * await page.getByText('trigger response').click();
5081 |    * const response = await responsePromise;
5082 |    *
5083 |    * // Alternative way with a predicate. Note no await.
5084 |    * const responsePromise = page.waitForResponse(response =>
5085 |    *   response.url() === 'https://example.com' && response.status() === 200
5086 |    *       && response.request().method() === 'GET'
5087 |    * );
5088 |    * await page.getByText('trigger response').click();
5089 |    * const response = await responsePromise;
5090 |    * ```
5091 |    *
5092 |    * @param urlOrPredicate Request URL string, regex or predicate receiving [Response](https://playwright.dev/docs/api/class-response) object.
5093 |    * When a [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the
5094 |    * context options was provided and the passed URL is a path, it gets merged via the
5095 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
5096 |    * @param options
5097 |    */
5098 |   waitForResponse(urlOrPredicate: string|RegExp|((response: Response) => boolean|Promise<boolean>), options?: {
5099 |     /**
5100 |      * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5101 |      * be changed by using the
5102 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
5103 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
5104 |      */
5105 |     timeout?: number;
5106 |   }): Promise<Response>;
5107 | 
5108 |   /**
5109 |    * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
5110 |    * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
5111 |    *
5112 |    * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-timeout-option-timeout) in
5113 |    * milliseconds.
5114 |    *
5115 |    * Note that `page.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
5116 |    * to be flaky. Use signals such as network events, selectors becoming visible and others instead.
5117 |    *
5118 |    * **Usage**
5119 |    *
5120 |    * ```js
5121 |    * // wait for 1 second
5122 |    * await page.waitForTimeout(1000);
5123 |    * ```
5124 |    *
5125 |    * @param timeout A timeout to wait for
5126 |    */
5127 |   waitForTimeout(timeout: number): Promise<void>;
5128 | 
5129 |   /**
5130 |    * Waits for the main frame to navigate to the given URL.
5131 |    *
5132 |    * **Usage**
5133 |    *
5134 |    * ```js
5135 |    * await page.click('a.delayed-navigation'); // Clicking the link will indirectly cause a navigation
5136 |    * await page.waitForURL('**\/target.html');
5137 |    * ```
5138 |    *
5139 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
5140 |    * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
5141 |    * equal to the string.
5142 |    * @param options
5143 |    */
5144 |   waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {
5145 |     /**
5146 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5147 |      * `navigationTimeout` option in the config, or by using the
5148 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
5149 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
5150 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
5151 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
5152 |      */
5153 |     timeout?: number;
5154 | 
5155 |     /**
5156 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
5157 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
5158 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
5159 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
5160 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
5161 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
5162 |      *   loading.
5163 |      */
5164 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
5165 |   }): Promise<void>;
5166 | 
5167 |   /**
5168 |    * This method returns all of the dedicated
5169 |    * [WebWorkers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) associated with the page.
5170 |    *
5171 |    * **NOTE** This does not contain ServiceWorkers
5172 |    *
5173 |    */
5174 |   workers(): Array<Worker>;
5175 | 
5176 |   /**
5177 |    * Playwright has ability to mock clock and passage of time.
5178 |    */
5179 |   clock: Clock;
5180 | 
5181 |   /**
5182 |    * **NOTE** Only available for Chromium atm.
5183 |    *
5184 |    * Browser-specific Coverage implementation. See [Coverage](https://playwright.dev/docs/api/class-coverage) for more
5185 |    * details.
5186 |    */
5187 |   coverage: Coverage;
5188 | 
5189 |   keyboard: Keyboard;
5190 | 
5191 |   mouse: Mouse;
5192 | 
5193 |   /**
5194 |    * API testing helper associated with this page. This method returns the same instance as
5195 |    * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) on the
5196 |    * page's context. See
5197 |    * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) for more
5198 |    * details.
5199 |    */
5200 |   request: APIRequestContext;
5201 | 
5202 |   touchscreen: Touchscreen;
5203 | 
5204 |   [Symbol.asyncDispose](): Promise<void>;
5205 | }
5206 | 
5207 | /**
5208 |  * At every point of time, page exposes its current frame tree via the
5209 |  * [page.mainFrame()](https://playwright.dev/docs/api/class-page#page-main-frame) and
5210 |  * [frame.childFrames()](https://playwright.dev/docs/api/class-frame#frame-child-frames) methods.
5211 |  *
5212 |  * [Frame](https://playwright.dev/docs/api/class-frame) object's lifecycle is controlled by three events, dispatched
5213 |  * on the page object:
5214 |  * - [page.on('frameattached')](https://playwright.dev/docs/api/class-page#page-event-frame-attached) - fired when
5215 |  *   the frame gets attached to the page. A Frame can be attached to the page only once.
5216 |  * - [page.on('framenavigated')](https://playwright.dev/docs/api/class-page#page-event-frame-navigated) - fired when
5217 |  *   the frame commits navigation to a different URL.
5218 |  * - [page.on('framedetached')](https://playwright.dev/docs/api/class-page#page-event-frame-detached) - fired when
5219 |  *   the frame gets detached from the page.  A Frame can be detached from the page only once.
5220 |  *
5221 |  * An example of dumping frame tree:
5222 |  *
5223 |  * ```js
5224 |  * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5225 |  *
5226 |  * (async () => {
5227 |  *   const browser = await firefox.launch();
5228 |  *   const page = await browser.newPage();
5229 |  *   await page.goto('https://www.google.com/chrome/browser/canary.html');
5230 |  *   dumpFrameTree(page.mainFrame(), '');
5231 |  *   await browser.close();
5232 |  *
5233 |  *   function dumpFrameTree(frame, indent) {
5234 |  *     console.log(indent + frame.url());
5235 |  *     for (const child of frame.childFrames())
5236 |  *       dumpFrameTree(child, indent + '  ');
5237 |  *   }
5238 |  * })();
5239 |  * ```
5240 |  *
5241 |  */
5242 | export interface Frame {
5243 |   /**
5244 |    * Returns the return value of
5245 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5246 |    *
5247 |    * If the function passed to the
5248 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5249 |    * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5250 |    * would wait for the promise to resolve and return its value.
5251 |    *
5252 |    * If the function passed to the
5253 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5254 |    * non-[Serializable] value, then
5255 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5256 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5257 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
5258 |    *
5259 |    * **Usage**
5260 |    *
5261 |    * ```js
5262 |    * const result = await frame.evaluate(([x, y]) => {
5263 |    *   return Promise.resolve(x * y);
5264 |    * }, [7, 8]);
5265 |    * console.log(result); // prints "56"
5266 |    * ```
5267 |    *
5268 |    * A string can also be passed in instead of a function.
5269 |    *
5270 |    * ```js
5271 |    * console.log(await frame.evaluate('1 + 2')); // prints "3"
5272 |    * ```
5273 |    *
5274 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5275 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5276 |    *
5277 |    * ```js
5278 |    * const bodyHandle = await frame.evaluate('document.body');
5279 |    * const html = await frame.evaluate(([body, suffix]) =>
5280 |    *   body.innerHTML + suffix, [bodyHandle, 'hello'],
5281 |    * );
5282 |    * await bodyHandle.dispose();
5283 |    * ```
5284 |    *
5285 |    * @param pageFunction Function to be evaluated in the page context.
5286 |    * @param arg Optional argument to pass to
5287 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5288 |    */
5289 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
5290 |   /**
5291 |    * Returns the return value of
5292 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5293 |    *
5294 |    * If the function passed to the
5295 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5296 |    * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5297 |    * would wait for the promise to resolve and return its value.
5298 |    *
5299 |    * If the function passed to the
5300 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5301 |    * non-[Serializable] value, then
5302 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5303 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5304 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
5305 |    *
5306 |    * **Usage**
5307 |    *
5308 |    * ```js
5309 |    * const result = await frame.evaluate(([x, y]) => {
5310 |    *   return Promise.resolve(x * y);
5311 |    * }, [7, 8]);
5312 |    * console.log(result); // prints "56"
5313 |    * ```
5314 |    *
5315 |    * A string can also be passed in instead of a function.
5316 |    *
5317 |    * ```js
5318 |    * console.log(await frame.evaluate('1 + 2')); // prints "3"
5319 |    * ```
5320 |    *
5321 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5322 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5323 |    *
5324 |    * ```js
5325 |    * const bodyHandle = await frame.evaluate('document.body');
5326 |    * const html = await frame.evaluate(([body, suffix]) =>
5327 |    *   body.innerHTML + suffix, [bodyHandle, 'hello'],
5328 |    * );
5329 |    * await bodyHandle.dispose();
5330 |    * ```
5331 |    *
5332 |    * @param pageFunction Function to be evaluated in the page context.
5333 |    * @param arg Optional argument to pass to
5334 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5335 |    */
5336 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
5337 | 
5338 |   /**
5339 |    * Returns the return value of
5340 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
5341 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5342 |    *
5343 |    * The only difference between
5344 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5345 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5346 |    * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5347 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5348 |    *
5349 |    * If the function, passed to the
5350 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5351 |    * returns a [Promise], then
5352 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5353 |    * would wait for the promise to resolve and return its value.
5354 |    *
5355 |    * **Usage**
5356 |    *
5357 |    * ```js
5358 |    * // Handle for the window object
5359 |    * const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window));
5360 |    * ```
5361 |    *
5362 |    * A string can also be passed in instead of a function.
5363 |    *
5364 |    * ```js
5365 |    * const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
5366 |    * ```
5367 |    *
5368 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5369 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5370 |    *
5371 |    * ```js
5372 |    * const aHandle = await frame.evaluateHandle(() => document.body);
5373 |    * const resultHandle = await frame.evaluateHandle(([body, suffix]) =>
5374 |    *   body.innerHTML + suffix, [aHandle, 'hello'],
5375 |    * );
5376 |    * console.log(await resultHandle.jsonValue());
5377 |    * await resultHandle.dispose();
5378 |    * ```
5379 |    *
5380 |    * @param pageFunction Function to be evaluated in the page context.
5381 |    * @param arg Optional argument to pass to
5382 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
5383 |    */
5384 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
5385 |   /**
5386 |    * Returns the return value of
5387 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
5388 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5389 |    *
5390 |    * The only difference between
5391 |    * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5392 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5393 |    * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5394 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5395 |    *
5396 |    * If the function, passed to the
5397 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5398 |    * returns a [Promise], then
5399 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5400 |    * would wait for the promise to resolve and return its value.
5401 |    *
5402 |    * **Usage**
5403 |    *
5404 |    * ```js
5405 |    * // Handle for the window object
5406 |    * const aWindowHandle = await frame.evaluateHandle(() => Promise.resolve(window));
5407 |    * ```
5408 |    *
5409 |    * A string can also be passed in instead of a function.
5410 |    *
5411 |    * ```js
5412 |    * const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
5413 |    * ```
5414 |    *
5415 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5416 |    * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5417 |    *
5418 |    * ```js
5419 |    * const aHandle = await frame.evaluateHandle(() => document.body);
5420 |    * const resultHandle = await frame.evaluateHandle(([body, suffix]) =>
5421 |    *   body.innerHTML + suffix, [aHandle, 'hello'],
5422 |    * );
5423 |    * console.log(await resultHandle.jsonValue());
5424 |    * await resultHandle.dispose();
5425 |    * ```
5426 |    *
5427 |    * @param pageFunction Function to be evaluated in the page context.
5428 |    * @param arg Optional argument to pass to
5429 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
5430 |    */
5431 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
5432 | 
5433 |   /**
5434 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5435 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5436 |    *
5437 |    * Returns the ElementHandle pointing to the frame element.
5438 |    *
5439 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5440 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
5441 |    *
5442 |    * The method finds an element matching the specified selector within the frame. If no elements match the selector,
5443 |    * returns `null`.
5444 |    * @param selector A selector to query for.
5445 |    * @param options
5446 |    */
5447 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
5448 |   /**
5449 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5450 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5451 |    *
5452 |    * Returns the ElementHandle pointing to the frame element.
5453 |    *
5454 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5455 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
5456 |    *
5457 |    * The method finds an element matching the specified selector within the frame. If no elements match the selector,
5458 |    * returns `null`.
5459 |    * @param selector A selector to query for.
5460 |    * @param options
5461 |    */
5462 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
5463 | 
5464 |   /**
5465 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5466 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5467 |    *
5468 |    * Returns the ElementHandles pointing to the frame elements.
5469 |    *
5470 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5471 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
5472 |    *
5473 |    * The method finds all elements matching the specified selector within the frame. If no elements match the selector,
5474 |    * returns empty array.
5475 |    * @param selector A selector to query for.
5476 |    */
5477 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
5478 |   /**
5479 |    * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
5480 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
5481 |    *
5482 |    * Returns the ElementHandles pointing to the frame elements.
5483 |    *
5484 |    * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
5485 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
5486 |    *
5487 |    * The method finds all elements matching the specified selector within the frame. If no elements match the selector,
5488 |    * returns empty array.
5489 |    * @param selector A selector to query for.
5490 |    */
5491 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
5492 | 
5493 |   /**
5494 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5495 |    * tests. Use
5496 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5497 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5498 |    *
5499 |    * Returns the return value of
5500 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5501 |    *
5502 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5503 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5504 |    * elements match the selector, the method throws an error.
5505 |    *
5506 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5507 |    * [Promise], then
5508 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5509 |    * would wait for the promise to resolve and return its value.
5510 |    *
5511 |    * **Usage**
5512 |    *
5513 |    * ```js
5514 |    * const searchValue = await frame.$eval('#search', el => el.value);
5515 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5516 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5517 |    * ```
5518 |    *
5519 |    * @param selector A selector to query for.
5520 |    * @param pageFunction Function to be evaluated in the page context.
5521 |    * @param arg Optional argument to pass to
5522 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5523 |    * @param options
5524 |    */
5525 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
5526 |   /**
5527 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5528 |    * tests. Use
5529 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5530 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5531 |    *
5532 |    * Returns the return value of
5533 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5534 |    *
5535 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5536 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5537 |    * elements match the selector, the method throws an error.
5538 |    *
5539 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5540 |    * [Promise], then
5541 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5542 |    * would wait for the promise to resolve and return its value.
5543 |    *
5544 |    * **Usage**
5545 |    *
5546 |    * ```js
5547 |    * const searchValue = await frame.$eval('#search', el => el.value);
5548 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5549 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5550 |    * ```
5551 |    *
5552 |    * @param selector A selector to query for.
5553 |    * @param pageFunction Function to be evaluated in the page context.
5554 |    * @param arg Optional argument to pass to
5555 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5556 |    * @param options
5557 |    */
5558 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
5559 |   /**
5560 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5561 |    * tests. Use
5562 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5563 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5564 |    *
5565 |    * Returns the return value of
5566 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5567 |    *
5568 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5569 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5570 |    * elements match the selector, the method throws an error.
5571 |    *
5572 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5573 |    * [Promise], then
5574 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5575 |    * would wait for the promise to resolve and return its value.
5576 |    *
5577 |    * **Usage**
5578 |    *
5579 |    * ```js
5580 |    * const searchValue = await frame.$eval('#search', el => el.value);
5581 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5582 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5583 |    * ```
5584 |    *
5585 |    * @param selector A selector to query for.
5586 |    * @param pageFunction Function to be evaluated in the page context.
5587 |    * @param arg Optional argument to pass to
5588 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5589 |    * @param options
5590 |    */
5591 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
5592 |   /**
5593 |    * **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
5594 |    * tests. Use
5595 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
5596 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
5597 |    *
5598 |    * Returns the return value of
5599 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5600 |    *
5601 |    * The method finds an element matching the specified selector within the frame and passes it as a first argument to
5602 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
5603 |    * elements match the selector, the method throws an error.
5604 |    *
5605 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
5606 |    * [Promise], then
5607 |    * [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
5608 |    * would wait for the promise to resolve and return its value.
5609 |    *
5610 |    * **Usage**
5611 |    *
5612 |    * ```js
5613 |    * const searchValue = await frame.$eval('#search', el => el.value);
5614 |    * const preloadHref = await frame.$eval('link[rel=preload]', el => el.href);
5615 |    * const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + suffix, 'hello');
5616 |    * ```
5617 |    *
5618 |    * @param selector A selector to query for.
5619 |    * @param pageFunction Function to be evaluated in the page context.
5620 |    * @param arg Optional argument to pass to
5621 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
5622 |    * @param options
5623 |    */
5624 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
5625 | 
5626 |   /**
5627 |    * **NOTE** In most cases,
5628 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5629 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5630 |    * job.
5631 |    *
5632 |    * Returns the return value of
5633 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5634 |    *
5635 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5636 |    * elements as a first argument to
5637 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5638 |    *
5639 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5640 |    * returns a [Promise], then
5641 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5642 |    * would wait for the promise to resolve and return its value.
5643 |    *
5644 |    * **Usage**
5645 |    *
5646 |    * ```js
5647 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5648 |    * ```
5649 |    *
5650 |    * @param selector A selector to query for.
5651 |    * @param pageFunction Function to be evaluated in the page context.
5652 |    * @param arg Optional argument to pass to
5653 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5654 |    */
5655 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
5656 |   /**
5657 |    * **NOTE** In most cases,
5658 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5659 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5660 |    * job.
5661 |    *
5662 |    * Returns the return value of
5663 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5664 |    *
5665 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5666 |    * elements as a first argument to
5667 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5668 |    *
5669 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5670 |    * returns a [Promise], then
5671 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5672 |    * would wait for the promise to resolve and return its value.
5673 |    *
5674 |    * **Usage**
5675 |    *
5676 |    * ```js
5677 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5678 |    * ```
5679 |    *
5680 |    * @param selector A selector to query for.
5681 |    * @param pageFunction Function to be evaluated in the page context.
5682 |    * @param arg Optional argument to pass to
5683 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5684 |    */
5685 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
5686 |   /**
5687 |    * **NOTE** In most cases,
5688 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5689 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5690 |    * job.
5691 |    *
5692 |    * Returns the return value of
5693 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5694 |    *
5695 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5696 |    * elements as a first argument to
5697 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5698 |    *
5699 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5700 |    * returns a [Promise], then
5701 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5702 |    * would wait for the promise to resolve and return its value.
5703 |    *
5704 |    * **Usage**
5705 |    *
5706 |    * ```js
5707 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5708 |    * ```
5709 |    *
5710 |    * @param selector A selector to query for.
5711 |    * @param pageFunction Function to be evaluated in the page context.
5712 |    * @param arg Optional argument to pass to
5713 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5714 |    */
5715 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
5716 |   /**
5717 |    * **NOTE** In most cases,
5718 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
5719 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
5720 |    * job.
5721 |    *
5722 |    * Returns the return value of
5723 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5724 |    *
5725 |    * The method finds all elements matching the specified selector within the frame and passes an array of matched
5726 |    * elements as a first argument to
5727 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5728 |    *
5729 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
5730 |    * returns a [Promise], then
5731 |    * [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
5732 |    * would wait for the promise to resolve and return its value.
5733 |    *
5734 |    * **Usage**
5735 |    *
5736 |    * ```js
5737 |    * const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min, 10);
5738 |    * ```
5739 |    *
5740 |    * @param selector A selector to query for.
5741 |    * @param pageFunction Function to be evaluated in the page context.
5742 |    * @param arg Optional argument to pass to
5743 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
5744 |    */
5745 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
5746 | 
5747 |   /**
5748 |    * Returns when the
5749 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
5750 |    * truthy value, returns that value.
5751 |    *
5752 |    * **Usage**
5753 |    *
5754 |    * The
5755 |    * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-function)
5756 |    * can be used to observe viewport size change:
5757 |    *
5758 |    * ```js
5759 |    * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5760 |    *
5761 |    * (async () => {
5762 |    *   const browser = await firefox.launch();
5763 |    *   const page = await browser.newPage();
5764 |    *   const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100');
5765 |    *   await page.setViewportSize({ width: 50, height: 50 });
5766 |    *   await watchDog;
5767 |    *   await browser.close();
5768 |    * })();
5769 |    * ```
5770 |    *
5771 |    * To pass an argument to the predicate of `frame.waitForFunction` function:
5772 |    *
5773 |    * ```js
5774 |    * const selector = '.foo';
5775 |    * await frame.waitForFunction(selector => !!document.querySelector(selector), selector);
5776 |    * ```
5777 |    *
5778 |    * @param pageFunction Function to be evaluated in the page context.
5779 |    * @param arg Optional argument to pass to
5780 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
5781 |    * @param options
5782 |    */
5783 |   waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
5784 |   /**
5785 |    * Returns when the
5786 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
5787 |    * truthy value, returns that value.
5788 |    *
5789 |    * **Usage**
5790 |    *
5791 |    * The
5792 |    * [frame.waitForFunction(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-function)
5793 |    * can be used to observe viewport size change:
5794 |    *
5795 |    * ```js
5796 |    * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
5797 |    *
5798 |    * (async () => {
5799 |    *   const browser = await firefox.launch();
5800 |    *   const page = await browser.newPage();
5801 |    *   const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100');
5802 |    *   await page.setViewportSize({ width: 50, height: 50 });
5803 |    *   await watchDog;
5804 |    *   await browser.close();
5805 |    * })();
5806 |    * ```
5807 |    *
5808 |    * To pass an argument to the predicate of `frame.waitForFunction` function:
5809 |    *
5810 |    * ```js
5811 |    * const selector = '.foo';
5812 |    * await frame.waitForFunction(selector => !!document.querySelector(selector), selector);
5813 |    * ```
5814 |    *
5815 |    * @param pageFunction Function to be evaluated in the page context.
5816 |    * @param arg Optional argument to pass to
5817 |    * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
5818 |    * @param options
5819 |    */
5820 |   waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
5821 | 
5822 |   /**
5823 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5824 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5825 |    * about [locators](https://playwright.dev/docs/locators).
5826 |    *
5827 |    * Returns when element specified by selector satisfies
5828 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5829 |    * if waiting for `hidden` or `detached`.
5830 |    *
5831 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5832 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5833 |    * wait-for-selector-free.
5834 |    *
5835 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5836 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5837 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5838 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5839 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5840 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5841 |    * function will throw.
5842 |    *
5843 |    * **Usage**
5844 |    *
5845 |    * This method works across navigations:
5846 |    *
5847 |    * ```js
5848 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5849 |    *
5850 |    * (async () => {
5851 |    *   const browser = await chromium.launch();
5852 |    *   const page = await browser.newPage();
5853 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5854 |    *     await page.goto(currentURL);
5855 |    *     const element = await page.mainFrame().waitForSelector('img');
5856 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5857 |    *   }
5858 |    *   await browser.close();
5859 |    * })();
5860 |    * ```
5861 |    *
5862 |    * @param selector A selector to query for.
5863 |    * @param options
5864 |    */
5865 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
5866 |   /**
5867 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5868 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5869 |    * about [locators](https://playwright.dev/docs/locators).
5870 |    *
5871 |    * Returns when element specified by selector satisfies
5872 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5873 |    * if waiting for `hidden` or `detached`.
5874 |    *
5875 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5876 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5877 |    * wait-for-selector-free.
5878 |    *
5879 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5880 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5881 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5882 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5883 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5884 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5885 |    * function will throw.
5886 |    *
5887 |    * **Usage**
5888 |    *
5889 |    * This method works across navigations:
5890 |    *
5891 |    * ```js
5892 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5893 |    *
5894 |    * (async () => {
5895 |    *   const browser = await chromium.launch();
5896 |    *   const page = await browser.newPage();
5897 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5898 |    *     await page.goto(currentURL);
5899 |    *     const element = await page.mainFrame().waitForSelector('img');
5900 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5901 |    *   }
5902 |    *   await browser.close();
5903 |    * })();
5904 |    * ```
5905 |    *
5906 |    * @param selector A selector to query for.
5907 |    * @param options
5908 |    */
5909 |   waitForSelector(selector: string, options?: PageWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
5910 |   /**
5911 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5912 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5913 |    * about [locators](https://playwright.dev/docs/locators).
5914 |    *
5915 |    * Returns when element specified by selector satisfies
5916 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5917 |    * if waiting for `hidden` or `detached`.
5918 |    *
5919 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5920 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5921 |    * wait-for-selector-free.
5922 |    *
5923 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5924 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5925 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5926 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5927 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5928 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5929 |    * function will throw.
5930 |    *
5931 |    * **Usage**
5932 |    *
5933 |    * This method works across navigations:
5934 |    *
5935 |    * ```js
5936 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5937 |    *
5938 |    * (async () => {
5939 |    *   const browser = await chromium.launch();
5940 |    *   const page = await browser.newPage();
5941 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5942 |    *     await page.goto(currentURL);
5943 |    *     const element = await page.mainFrame().waitForSelector('img');
5944 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5945 |    *   }
5946 |    *   await browser.close();
5947 |    * })();
5948 |    * ```
5949 |    *
5950 |    * @param selector A selector to query for.
5951 |    * @param options
5952 |    */
5953 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: PageWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
5954 |   /**
5955 |    * **NOTE** Use web assertions that assert visibility or a locator-based
5956 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
5957 |    * about [locators](https://playwright.dev/docs/locators).
5958 |    *
5959 |    * Returns when element specified by selector satisfies
5960 |    * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
5961 |    * if waiting for `hidden` or `detached`.
5962 |    *
5963 |    * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
5964 |    * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
5965 |    * wait-for-selector-free.
5966 |    *
5967 |    * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
5968 |    * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
5969 |    * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
5970 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
5971 |    * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
5972 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
5973 |    * function will throw.
5974 |    *
5975 |    * **Usage**
5976 |    *
5977 |    * This method works across navigations:
5978 |    *
5979 |    * ```js
5980 |    * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
5981 |    *
5982 |    * (async () => {
5983 |    *   const browser = await chromium.launch();
5984 |    *   const page = await browser.newPage();
5985 |    *   for (const currentURL of ['https://google.com', 'https://bbc.com']) {
5986 |    *     await page.goto(currentURL);
5987 |    *     const element = await page.mainFrame().waitForSelector('img');
5988 |    *     console.log('Loaded image: ' + await element.getAttribute('src'));
5989 |    *   }
5990 |    *   await browser.close();
5991 |    * })();
5992 |    * ```
5993 |    *
5994 |    * @param selector A selector to query for.
5995 |    * @param options
5996 |    */
5997 |   waitForSelector(selector: string, options: PageWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
5998 |   /**
5999 |    * Returns the added tag when the script's onload fires or when the script content was injected into frame.
6000 |    *
6001 |    * Adds a `<script>` tag into the page with the desired url or content.
6002 |    * @param options
6003 |    */
6004 |   addScriptTag(options?: {
6005 |     /**
6006 |      * Raw JavaScript content to be injected into frame.
6007 |      */
6008 |     content?: string;
6009 | 
6010 |     /**
6011 |      * Path to the JavaScript file to be injected into frame. If `path` is a relative path, then it is resolved relative
6012 |      * to the current working directory.
6013 |      */
6014 |     path?: string;
6015 | 
6016 |     /**
6017 |      * Script type. Use 'module' in order to load a JavaScript ES6 module. See
6018 |      * [script](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for more details.
6019 |      */
6020 |     type?: string;
6021 | 
6022 |     /**
6023 |      * URL of a script to be added.
6024 |      */
6025 |     url?: string;
6026 |   }): Promise<ElementHandle>;
6027 | 
6028 |   /**
6029 |    * Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame.
6030 |    *
6031 |    * Adds a `<link rel="stylesheet">` tag into the page with the desired url or a `<style type="text/css">` tag with the
6032 |    * content.
6033 |    * @param options
6034 |    */
6035 |   addStyleTag(options?: {
6036 |     /**
6037 |      * Raw CSS content to be injected into frame.
6038 |      */
6039 |     content?: string;
6040 | 
6041 |     /**
6042 |      * Path to the CSS file to be injected into frame. If `path` is a relative path, then it is resolved relative to the
6043 |      * current working directory.
6044 |      */
6045 |     path?: string;
6046 | 
6047 |     /**
6048 |      * URL of the `<link>` tag.
6049 |      */
6050 |     url?: string;
6051 |   }): Promise<ElementHandle>;
6052 | 
6053 |   /**
6054 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
6055 |    * Read more about [locators](https://playwright.dev/docs/locators).
6056 |    *
6057 |    * This method checks an element matching
6058 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector) by performing the following
6059 |    * steps:
6060 |    * 1. Find an element matching
6061 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector). If there is none, wait
6062 |    *    until a matching element is attached to the DOM.
6063 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
6064 |    *    already checked, this method returns immediately.
6065 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6066 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-check-option-force) option is set. If the element
6067 |    *    is detached during the checks, the whole action is retried.
6068 |    * 1. Scroll the element into view if needed.
6069 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
6070 |    *    element.
6071 |    * 1. Ensure that the element is now checked. If not, this method throws.
6072 |    *
6073 |    * When all steps combined have not finished during the specified
6074 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-check-option-timeout), this method throws a
6075 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6076 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6077 |    * used.
6078 |    * @param options
6079 |    */
6080 |   check(selector: string, options?: {
6081 |     /**
6082 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6083 |      */
6084 |     force?: boolean;
6085 | 
6086 |     /**
6087 |      * This option has no effect.
6088 |      * @deprecated This option has no effect.
6089 |      */
6090 |     noWaitAfter?: boolean;
6091 | 
6092 |     /**
6093 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6094 |      * the element.
6095 |      */
6096 |     position?: {
6097 |       x: number;
6098 | 
6099 |       y: number;
6100 |     };
6101 | 
6102 |     /**
6103 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6104 |      * element, the call throws an exception.
6105 |      */
6106 |     strict?: boolean;
6107 | 
6108 |     /**
6109 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6110 |      * option in the config, or by using the
6111 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6112 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6113 |      */
6114 |     timeout?: number;
6115 | 
6116 |     /**
6117 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6118 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
6119 |      */
6120 |     trial?: boolean;
6121 |   }): Promise<void>;
6122 | 
6123 |   childFrames(): Array<Frame>;
6124 | 
6125 |   /**
6126 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
6127 |    * Read more about [locators](https://playwright.dev/docs/locators).
6128 |    *
6129 |    * This method clicks an element matching
6130 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector) by performing the following
6131 |    * steps:
6132 |    * 1. Find an element matching
6133 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector). If there is none, wait
6134 |    *    until a matching element is attached to the DOM.
6135 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6136 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-click-option-force) option is set. If the element
6137 |    *    is detached during the checks, the whole action is retried.
6138 |    * 1. Scroll the element into view if needed.
6139 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
6140 |    *    element, or the specified
6141 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-click-option-position).
6142 |    * 1. Wait for initiated navigations to either succeed or fail, unless
6143 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-frame#frame-click-option-no-wait-after) option is set.
6144 |    *
6145 |    * When all steps combined have not finished during the specified
6146 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-click-option-timeout), this method throws a
6147 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6148 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6149 |    * used.
6150 |    * @param options
6151 |    */
6152 |   click(selector: string, options?: {
6153 |     /**
6154 |      * Defaults to `left`.
6155 |      */
6156 |     button?: "left"|"right"|"middle";
6157 | 
6158 |     /**
6159 |      * defaults to 1. See [UIEvent.detail].
6160 |      */
6161 |     clickCount?: number;
6162 | 
6163 |     /**
6164 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
6165 |      */
6166 |     delay?: number;
6167 | 
6168 |     /**
6169 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6170 |      */
6171 |     force?: boolean;
6172 | 
6173 |     /**
6174 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6175 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6176 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6177 |      */
6178 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6179 | 
6180 |     /**
6181 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
6182 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
6183 |      * navigating to inaccessible pages. Defaults to `false`.
6184 |      * @deprecated This option will default to `true` in the future.
6185 |      */
6186 |     noWaitAfter?: boolean;
6187 | 
6188 |     /**
6189 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6190 |      * the element.
6191 |      */
6192 |     position?: {
6193 |       x: number;
6194 | 
6195 |       y: number;
6196 |     };
6197 | 
6198 |     /**
6199 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6200 |      * element, the call throws an exception.
6201 |      */
6202 |     strict?: boolean;
6203 | 
6204 |     /**
6205 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6206 |      * option in the config, or by using the
6207 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6208 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6209 |      */
6210 |     timeout?: number;
6211 | 
6212 |     /**
6213 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6214 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
6215 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
6216 |      * are pressed.
6217 |      */
6218 |     trial?: boolean;
6219 |   }): Promise<void>;
6220 | 
6221 |   /**
6222 |    * Gets the full HTML contents of the frame, including the doctype.
6223 |    */
6224 |   content(): Promise<string>;
6225 | 
6226 |   /**
6227 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
6228 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6229 |    *
6230 |    * This method double clicks an element matching
6231 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector) by performing the
6232 |    * following steps:
6233 |    * 1. Find an element matching
6234 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector). If there is none,
6235 |    *    wait until a matching element is attached to the DOM.
6236 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6237 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-force) option is set. If the
6238 |    *    element is detached during the checks, the whole action is retried.
6239 |    * 1. Scroll the element into view if needed.
6240 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
6241 |    *    element, or the specified
6242 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-position). if the first click
6243 |    *    of the `dblclick()` triggers a navigation event, this method will throw.
6244 |    *
6245 |    * When all steps combined have not finished during the specified
6246 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-timeout), this method throws a
6247 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6248 |    *
6249 |    * **NOTE** `frame.dblclick()` dispatches two `click` events and a single `dblclick` event.
6250 |    *
6251 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6252 |    * used.
6253 |    * @param options
6254 |    */
6255 |   dblclick(selector: string, options?: {
6256 |     /**
6257 |      * Defaults to `left`.
6258 |      */
6259 |     button?: "left"|"right"|"middle";
6260 | 
6261 |     /**
6262 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
6263 |      */
6264 |     delay?: number;
6265 | 
6266 |     /**
6267 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6268 |      */
6269 |     force?: boolean;
6270 | 
6271 |     /**
6272 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6273 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6274 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6275 |      */
6276 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6277 | 
6278 |     /**
6279 |      * This option has no effect.
6280 |      * @deprecated This option has no effect.
6281 |      */
6282 |     noWaitAfter?: boolean;
6283 | 
6284 |     /**
6285 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
6286 |      * the element.
6287 |      */
6288 |     position?: {
6289 |       x: number;
6290 | 
6291 |       y: number;
6292 |     };
6293 | 
6294 |     /**
6295 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6296 |      * element, the call throws an exception.
6297 |      */
6298 |     strict?: boolean;
6299 | 
6300 |     /**
6301 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6302 |      * option in the config, or by using the
6303 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6304 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6305 |      */
6306 |     timeout?: number;
6307 | 
6308 |     /**
6309 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6310 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
6311 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
6312 |      * are pressed.
6313 |      */
6314 |     trial?: boolean;
6315 |   }): Promise<void>;
6316 | 
6317 |   /**
6318 |    * **NOTE** Use locator-based
6319 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
6320 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6321 |    *
6322 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
6323 |    * `click` is dispatched. This is equivalent to calling
6324 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
6325 |    *
6326 |    * **Usage**
6327 |    *
6328 |    * ```js
6329 |    * await frame.dispatchEvent('button#submit', 'click');
6330 |    * ```
6331 |    *
6332 |    * Under the hood, it creates an instance of an event based on the given
6333 |    * [`type`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-type), initializes it with
6334 |    * [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) properties and
6335 |    * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
6336 |    *
6337 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) is
6338 |    * event-specific, please refer to the events documentation for the lists of initial properties:
6339 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
6340 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
6341 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
6342 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
6343 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
6344 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
6345 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
6346 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
6347 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
6348 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
6349 |    *
6350 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
6351 |    *
6352 |    * ```js
6353 |    * // Note you can only create DataTransfer in Chromium and Firefox
6354 |    * const dataTransfer = await frame.evaluateHandle(() => new DataTransfer());
6355 |    * await frame.dispatchEvent('#source', 'dragstart', { dataTransfer });
6356 |    * ```
6357 |    *
6358 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6359 |    * used.
6360 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
6361 |    * @param eventInit Optional event-specific initialization properties.
6362 |    * @param options
6363 |    */
6364 |   dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
6365 |     /**
6366 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6367 |      * element, the call throws an exception.
6368 |      */
6369 |     strict?: boolean;
6370 | 
6371 |     /**
6372 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6373 |      * option in the config, or by using the
6374 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6375 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6376 |      */
6377 |     timeout?: number;
6378 |   }): Promise<void>;
6379 | 
6380 |   /**
6381 |    * @param source A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will
6382 |    * be used.
6383 |    * @param target A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first
6384 |    * will be used.
6385 |    * @param options
6386 |    */
6387 |   dragAndDrop(source: string, target: string, options?: {
6388 |     /**
6389 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6390 |      */
6391 |     force?: boolean;
6392 | 
6393 |     /**
6394 |      * This option has no effect.
6395 |      * @deprecated This option has no effect.
6396 |      */
6397 |     noWaitAfter?: boolean;
6398 | 
6399 |     /**
6400 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
6401 |      * specified, some visible point of the element is used.
6402 |      */
6403 |     sourcePosition?: {
6404 |       x: number;
6405 | 
6406 |       y: number;
6407 |     };
6408 | 
6409 |     /**
6410 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between the `mousedown` and `mouseup`
6411 |      * of the drag. When set to 1, emits a single `mousemove` event at the destination location.
6412 |      */
6413 |     steps?: number;
6414 | 
6415 |     /**
6416 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6417 |      * element, the call throws an exception.
6418 |      */
6419 |     strict?: boolean;
6420 | 
6421 |     /**
6422 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
6423 |      * specified, some visible point of the element is used.
6424 |      */
6425 |     targetPosition?: {
6426 |       x: number;
6427 | 
6428 |       y: number;
6429 |     };
6430 | 
6431 |     /**
6432 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6433 |      * option in the config, or by using the
6434 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6435 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6436 |      */
6437 |     timeout?: number;
6438 | 
6439 |     /**
6440 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
6441 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
6442 |      */
6443 |     trial?: boolean;
6444 |   }): Promise<void>;
6445 | 
6446 |   /**
6447 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
6448 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6449 |    *
6450 |    * This method waits for an element matching
6451 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-fill-option-selector), waits for
6452 |    * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
6453 |    * filling. Note that you can pass an empty string to clear the input field.
6454 |    *
6455 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
6456 |    * error. However, if the element is inside the `<label>` element that has an associated
6457 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
6458 |    * instead.
6459 |    *
6460 |    * To send fine-grained keyboard events, use
6461 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
6462 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6463 |    * used.
6464 |    * @param value Value to fill for the `<input>`, `<textarea>` or `[contenteditable]` element.
6465 |    * @param options
6466 |    */
6467 |   fill(selector: string, value: string, options?: {
6468 |     /**
6469 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6470 |      */
6471 |     force?: boolean;
6472 | 
6473 |     /**
6474 |      * This option has no effect.
6475 |      * @deprecated This option has no effect.
6476 |      */
6477 |     noWaitAfter?: boolean;
6478 | 
6479 |     /**
6480 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6481 |      * element, the call throws an exception.
6482 |      */
6483 |     strict?: boolean;
6484 | 
6485 |     /**
6486 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6487 |      * option in the config, or by using the
6488 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6489 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6490 |      */
6491 |     timeout?: number;
6492 |   }): Promise<void>;
6493 | 
6494 |   /**
6495 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
6496 |    * Read more about [locators](https://playwright.dev/docs/locators).
6497 |    *
6498 |    * This method fetches an element with
6499 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector) and focuses it. If there's no
6500 |    * element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector), the method
6501 |    * waits until a matching element appears in the DOM.
6502 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6503 |    * used.
6504 |    * @param options
6505 |    */
6506 |   focus(selector: string, options?: {
6507 |     /**
6508 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6509 |      * element, the call throws an exception.
6510 |      */
6511 |     strict?: boolean;
6512 | 
6513 |     /**
6514 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6515 |      * option in the config, or by using the
6516 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6517 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6518 |      */
6519 |     timeout?: number;
6520 |   }): Promise<void>;
6521 | 
6522 |   /**
6523 |    * Returns the `frame` or `iframe` element handle which corresponds to this frame.
6524 |    *
6525 |    * This is an inverse of
6526 |    * [elementHandle.contentFrame()](https://playwright.dev/docs/api/class-elementhandle#element-handle-content-frame).
6527 |    * Note that returned handle actually belongs to the parent frame.
6528 |    *
6529 |    * This method throws an error if the frame has been detached before `frameElement()` returns.
6530 |    *
6531 |    * **Usage**
6532 |    *
6533 |    * ```js
6534 |    * const frameElement = await frame.frameElement();
6535 |    * const contentFrame = await frameElement.contentFrame();
6536 |    * console.log(frame === contentFrame);  // -> true
6537 |    * ```
6538 |    *
6539 |    */
6540 |   frameElement(): Promise<ElementHandle>;
6541 | 
6542 |   /**
6543 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
6544 |    * in that iframe.
6545 |    *
6546 |    * **Usage**
6547 |    *
6548 |    * Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe
6549 |    * id="my-frame">`:
6550 |    *
6551 |    * ```js
6552 |    * const locator = frame.frameLocator('#my-iframe').getByText('Submit');
6553 |    * await locator.click();
6554 |    * ```
6555 |    *
6556 |    * @param selector A selector to use when resolving DOM element.
6557 |    */
6558 |   frameLocator(selector: string): FrameLocator;
6559 | 
6560 |   /**
6561 |    * **NOTE** Use locator-based
6562 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
6563 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
6564 |    *
6565 |    * Returns element attribute value.
6566 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6567 |    * used.
6568 |    * @param name Attribute name to get the value for.
6569 |    * @param options
6570 |    */
6571 |   getAttribute(selector: string, name: string, options?: {
6572 |     /**
6573 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6574 |      * element, the call throws an exception.
6575 |      */
6576 |     strict?: boolean;
6577 | 
6578 |     /**
6579 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
6580 |      * option in the config, or by using the
6581 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6582 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6583 |      */
6584 |     timeout?: number;
6585 |   }): Promise<null|string>;
6586 | 
6587 |   /**
6588 |    * Allows locating elements by their alt text.
6589 |    *
6590 |    * **Usage**
6591 |    *
6592 |    * For example, this method will find the image by alt text "Playwright logo":
6593 |    *
6594 |    * ```html
6595 |    * <img alt='Playwright logo'>
6596 |    * ```
6597 |    *
6598 |    * ```js
6599 |    * await page.getByAltText('Playwright logo').click();
6600 |    * ```
6601 |    *
6602 |    * @param text Text to locate the element for.
6603 |    * @param options
6604 |    */
6605 |   getByAltText(text: string|RegExp, options?: {
6606 |     /**
6607 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6608 |      * regular expression. Note that exact match still trims whitespace.
6609 |      */
6610 |     exact?: boolean;
6611 |   }): Locator;
6612 | 
6613 |   /**
6614 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
6615 |    * `aria-label` attribute.
6616 |    *
6617 |    * **Usage**
6618 |    *
6619 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
6620 |    *
6621 |    * ```html
6622 |    * <input aria-label="Username">
6623 |    * <label for="password-input">Password:</label>
6624 |    * <input id="password-input">
6625 |    * ```
6626 |    *
6627 |    * ```js
6628 |    * await page.getByLabel('Username').fill('john');
6629 |    * await page.getByLabel('Password').fill('secret');
6630 |    * ```
6631 |    *
6632 |    * @param text Text to locate the element for.
6633 |    * @param options
6634 |    */
6635 |   getByLabel(text: string|RegExp, options?: {
6636 |     /**
6637 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6638 |      * regular expression. Note that exact match still trims whitespace.
6639 |      */
6640 |     exact?: boolean;
6641 |   }): Locator;
6642 | 
6643 |   /**
6644 |    * Allows locating input elements by the placeholder text.
6645 |    *
6646 |    * **Usage**
6647 |    *
6648 |    * For example, consider the following DOM structure.
6649 |    *
6650 |    * ```html
6651 |    * <input type="email" placeholder="name@example.com" />
6652 |    * ```
6653 |    *
6654 |    * You can fill the input after locating it by the placeholder text:
6655 |    *
6656 |    * ```js
6657 |    * await page
6658 |    *     .getByPlaceholder('name@example.com')
6659 |    *     .fill('playwright@microsoft.com');
6660 |    * ```
6661 |    *
6662 |    * @param text Text to locate the element for.
6663 |    * @param options
6664 |    */
6665 |   getByPlaceholder(text: string|RegExp, options?: {
6666 |     /**
6667 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6668 |      * regular expression. Note that exact match still trims whitespace.
6669 |      */
6670 |     exact?: boolean;
6671 |   }): Locator;
6672 | 
6673 |   /**
6674 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
6675 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
6676 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
6677 |    *
6678 |    * **Usage**
6679 |    *
6680 |    * Consider the following DOM structure.
6681 |    *
6682 |    * ```html
6683 |    * <h3>Sign up</h3>
6684 |    * <label>
6685 |    *   <input type="checkbox" /> Subscribe
6686 |    * </label>
6687 |    * <br/>
6688 |    * <button>Submit</button>
6689 |    * ```
6690 |    *
6691 |    * You can locate each element by it's implicit role:
6692 |    *
6693 |    * ```js
6694 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
6695 |    *
6696 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
6697 |    *
6698 |    * await page.getByRole('button', { name: /submit/i }).click();
6699 |    * ```
6700 |    *
6701 |    * **Details**
6702 |    *
6703 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
6704 |    * about the ARIA guidelines.
6705 |    *
6706 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
6707 |    * that is recognized by the role selector. You can find all the
6708 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
6709 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
6710 |    * @param role Required aria role.
6711 |    * @param options
6712 |    */
6713 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
6714 |     /**
6715 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
6716 |      *
6717 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
6718 |      */
6719 |     checked?: boolean;
6720 | 
6721 |     /**
6722 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
6723 |      *
6724 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
6725 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
6726 |      *
6727 |      */
6728 |     disabled?: boolean;
6729 | 
6730 |     /**
6731 |      * Whether [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is matched exactly:
6732 |      * case-sensitive and whole-string. Defaults to false. Ignored when
6733 |      * [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is a regular expression. Note
6734 |      * that exact match still trims whitespace.
6735 |      */
6736 |     exact?: boolean;
6737 | 
6738 |     /**
6739 |      * An attribute that is usually set by `aria-expanded`.
6740 |      *
6741 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
6742 |      */
6743 |     expanded?: boolean;
6744 | 
6745 |     /**
6746 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
6747 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
6748 |      *
6749 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
6750 |      */
6751 |     includeHidden?: boolean;
6752 | 
6753 |     /**
6754 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
6755 |      * for `<h1>-<h6>` elements.
6756 |      *
6757 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
6758 |      */
6759 |     level?: number;
6760 | 
6761 |     /**
6762 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
6763 |      * case-insensitive and searches for a substring, use
6764 |      * [`exact`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-exact) to control this behavior.
6765 |      *
6766 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
6767 |      */
6768 |     name?: string|RegExp;
6769 | 
6770 |     /**
6771 |      * An attribute that is usually set by `aria-pressed`.
6772 |      *
6773 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
6774 |      */
6775 |     pressed?: boolean;
6776 | 
6777 |     /**
6778 |      * An attribute that is usually set by `aria-selected`.
6779 |      *
6780 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
6781 |      */
6782 |     selected?: boolean;
6783 |   }): Locator;
6784 | 
6785 |   /**
6786 |    * Locate element by the test id.
6787 |    *
6788 |    * **Usage**
6789 |    *
6790 |    * Consider the following DOM structure.
6791 |    *
6792 |    * ```html
6793 |    * <button data-testid="directions">Itinéraire</button>
6794 |    * ```
6795 |    *
6796 |    * You can locate the element by it's test id:
6797 |    *
6798 |    * ```js
6799 |    * await page.getByTestId('directions').click();
6800 |    * ```
6801 |    *
6802 |    * **Details**
6803 |    *
6804 |    * By default, the `data-testid` attribute is used as a test id. Use
6805 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
6806 |    * to configure a different test id attribute if necessary.
6807 |    *
6808 |    * ```js
6809 |    * // Set custom test id attribute from @playwright/test config:
6810 |    * import { defineConfig } from '@playwright/test';
6811 |    *
6812 |    * export default defineConfig({
6813 |    *   use: {
6814 |    *     testIdAttribute: 'data-pw'
6815 |    *   },
6816 |    * });
6817 |    * ```
6818 |    *
6819 |    * @param testId Id to locate the element by.
6820 |    */
6821 |   getByTestId(testId: string|RegExp): Locator;
6822 | 
6823 |   /**
6824 |    * Allows locating elements that contain given text.
6825 |    *
6826 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
6827 |    * match by another criteria, like an accessible role, and then filter by the text content.
6828 |    *
6829 |    * **Usage**
6830 |    *
6831 |    * Consider the following DOM structure:
6832 |    *
6833 |    * ```html
6834 |    * <div>Hello <span>world</span></div>
6835 |    * <div>Hello</div>
6836 |    * ```
6837 |    *
6838 |    * You can locate by text substring, exact string, or a regular expression:
6839 |    *
6840 |    * ```js
6841 |    * // Matches <span>
6842 |    * page.getByText('world');
6843 |    *
6844 |    * // Matches first <div>
6845 |    * page.getByText('Hello world');
6846 |    *
6847 |    * // Matches second <div>
6848 |    * page.getByText('Hello', { exact: true });
6849 |    *
6850 |    * // Matches both <div>s
6851 |    * page.getByText(/Hello/);
6852 |    *
6853 |    * // Matches second <div>
6854 |    * page.getByText(/^hello$/i);
6855 |    * ```
6856 |    *
6857 |    * **Details**
6858 |    *
6859 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
6860 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
6861 |    *
6862 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
6863 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
6864 |    * @param text Text to locate the element for.
6865 |    * @param options
6866 |    */
6867 |   getByText(text: string|RegExp, options?: {
6868 |     /**
6869 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6870 |      * regular expression. Note that exact match still trims whitespace.
6871 |      */
6872 |     exact?: boolean;
6873 |   }): Locator;
6874 | 
6875 |   /**
6876 |    * Allows locating elements by their title attribute.
6877 |    *
6878 |    * **Usage**
6879 |    *
6880 |    * Consider the following DOM structure.
6881 |    *
6882 |    * ```html
6883 |    * <span title='Issues count'>25 issues</span>
6884 |    * ```
6885 |    *
6886 |    * You can check the issues count after locating it by the title text:
6887 |    *
6888 |    * ```js
6889 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
6890 |    * ```
6891 |    *
6892 |    * @param text Text to locate the element for.
6893 |    * @param options
6894 |    */
6895 |   getByTitle(text: string|RegExp, options?: {
6896 |     /**
6897 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
6898 |      * regular expression. Note that exact match still trims whitespace.
6899 |      */
6900 |     exact?: boolean;
6901 |   }): Locator;
6902 | 
6903 |   /**
6904 |    * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of
6905 |    * the last redirect.
6906 |    *
6907 |    * The method will throw an error if:
6908 |    * - there's an SSL error (e.g. in case of self-signed certificates).
6909 |    * - target URL is invalid.
6910 |    * - the [`timeout`](https://playwright.dev/docs/api/class-frame#frame-goto-option-timeout) is exceeded during
6911 |    *   navigation.
6912 |    * - the remote server does not respond or is unreachable.
6913 |    * - the main resource failed to load.
6914 |    *
6915 |    * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404
6916 |    * "Not Found" and 500 "Internal Server Error".  The status code for such responses can be retrieved by calling
6917 |    * [response.status()](https://playwright.dev/docs/api/class-response#response-status).
6918 |    *
6919 |    * **NOTE** The method either throws an error or returns a main resource response. The only exceptions are navigation
6920 |    * to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`.
6921 |    *
6922 |    * **NOTE** Headless mode doesn't support navigation to a PDF document. See the
6923 |    * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
6924 |    *
6925 |    * @param url URL to navigate frame to. The url should include scheme, e.g. `https://`.
6926 |    * @param options
6927 |    */
6928 |   goto(url: string, options?: {
6929 |     /**
6930 |      * Referer header value. If provided it will take preference over the referer header value set by
6931 |      * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers).
6932 |      */
6933 |     referer?: string;
6934 | 
6935 |     /**
6936 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
6937 |      * `navigationTimeout` option in the config, or by using the
6938 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
6939 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
6940 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
6941 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
6942 |      */
6943 |     timeout?: number;
6944 | 
6945 |     /**
6946 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
6947 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
6948 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
6949 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
6950 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
6951 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
6952 |      *   loading.
6953 |      */
6954 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
6955 |   }): Promise<null|Response>;
6956 | 
6957 |   /**
6958 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
6959 |    * Read more about [locators](https://playwright.dev/docs/locators).
6960 |    *
6961 |    * This method hovers over an element matching
6962 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector) by performing the following
6963 |    * steps:
6964 |    * 1. Find an element matching
6965 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector). If there is none, wait
6966 |    *    until a matching element is attached to the DOM.
6967 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
6968 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-hover-option-force) option is set. If the element
6969 |    *    is detached during the checks, the whole action is retried.
6970 |    * 1. Scroll the element into view if needed.
6971 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
6972 |    *    element, or the specified
6973 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-hover-option-position).
6974 |    *
6975 |    * When all steps combined have not finished during the specified
6976 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-hover-option-timeout), this method throws a
6977 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
6978 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
6979 |    * used.
6980 |    * @param options
6981 |    */
6982 |   hover(selector: string, options?: {
6983 |     /**
6984 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
6985 |      */
6986 |     force?: boolean;
6987 | 
6988 |     /**
6989 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
6990 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
6991 |      * "Control" on Windows and Linux and to "Meta" on macOS.
6992 |      */
6993 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
6994 | 
6995 |     /**
6996 |      * This option has no effect.
6997 |      * @deprecated This option has no effect.
6998 |      */
6999 |     noWaitAfter?: boolean;
7000 | 
7001 |     /**
7002 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7003 |      * the element.
7004 |      */
7005 |     position?: {
7006 |       x: number;
7007 | 
7008 |       y: number;
7009 |     };
7010 | 
7011 |     /**
7012 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7013 |      * element, the call throws an exception.
7014 |      */
7015 |     strict?: boolean;
7016 | 
7017 |     /**
7018 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7019 |      * option in the config, or by using the
7020 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7021 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7022 |      */
7023 |     timeout?: number;
7024 | 
7025 |     /**
7026 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7027 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
7028 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
7029 |      * are pressed.
7030 |      */
7031 |     trial?: boolean;
7032 |   }): Promise<void>;
7033 | 
7034 |   /**
7035 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
7036 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7037 |    *
7038 |    * Returns `element.innerHTML`.
7039 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7040 |    * used.
7041 |    * @param options
7042 |    */
7043 |   innerHTML(selector: string, options?: {
7044 |     /**
7045 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7046 |      * element, the call throws an exception.
7047 |      */
7048 |     strict?: boolean;
7049 | 
7050 |     /**
7051 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7052 |      * option in the config, or by using the
7053 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7054 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7055 |      */
7056 |     timeout?: number;
7057 |   }): Promise<string>;
7058 | 
7059 |   /**
7060 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
7061 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7062 |    *
7063 |    * Returns `element.innerText`.
7064 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7065 |    * used.
7066 |    * @param options
7067 |    */
7068 |   innerText(selector: string, options?: {
7069 |     /**
7070 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7071 |      * element, the call throws an exception.
7072 |      */
7073 |     strict?: boolean;
7074 | 
7075 |     /**
7076 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7077 |      * option in the config, or by using the
7078 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7079 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7080 |      */
7081 |     timeout?: number;
7082 |   }): Promise<string>;
7083 | 
7084 |   /**
7085 |    * **NOTE** Use locator-based
7086 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
7087 |    * more about [locators](https://playwright.dev/docs/locators).
7088 |    *
7089 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
7090 |    *
7091 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
7092 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
7093 |    * control.
7094 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7095 |    * used.
7096 |    * @param options
7097 |    */
7098 |   inputValue(selector: string, options?: {
7099 |     /**
7100 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7101 |      * element, the call throws an exception.
7102 |      */
7103 |     strict?: boolean;
7104 | 
7105 |     /**
7106 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7107 |      * option in the config, or by using the
7108 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7109 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7110 |      */
7111 |     timeout?: number;
7112 |   }): Promise<string>;
7113 | 
7114 |   /**
7115 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
7116 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7117 |    *
7118 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
7119 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7120 |    * used.
7121 |    * @param options
7122 |    */
7123 |   isChecked(selector: string, options?: {
7124 |     /**
7125 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7126 |      * element, the call throws an exception.
7127 |      */
7128 |     strict?: boolean;
7129 | 
7130 |     /**
7131 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7132 |      * option in the config, or by using the
7133 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7134 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7135 |      */
7136 |     timeout?: number;
7137 |   }): Promise<boolean>;
7138 | 
7139 |   /**
7140 |    * Returns `true` if the frame has been detached, or `false` otherwise.
7141 |    */
7142 |   isDetached(): boolean;
7143 | 
7144 |   /**
7145 |    * **NOTE** Use locator-based
7146 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
7147 |    * more about [locators](https://playwright.dev/docs/locators).
7148 |    *
7149 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
7150 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7151 |    * used.
7152 |    * @param options
7153 |    */
7154 |   isDisabled(selector: string, options?: {
7155 |     /**
7156 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7157 |      * element, the call throws an exception.
7158 |      */
7159 |     strict?: boolean;
7160 | 
7161 |     /**
7162 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7163 |      * option in the config, or by using the
7164 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7165 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7166 |      */
7167 |     timeout?: number;
7168 |   }): Promise<boolean>;
7169 | 
7170 |   /**
7171 |    * **NOTE** Use locator-based
7172 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
7173 |    * more about [locators](https://playwright.dev/docs/locators).
7174 |    *
7175 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
7176 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7177 |    * used.
7178 |    * @param options
7179 |    */
7180 |   isEditable(selector: string, options?: {
7181 |     /**
7182 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7183 |      * element, the call throws an exception.
7184 |      */
7185 |     strict?: boolean;
7186 | 
7187 |     /**
7188 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7189 |      * option in the config, or by using the
7190 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7191 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7192 |      */
7193 |     timeout?: number;
7194 |   }): Promise<boolean>;
7195 | 
7196 |   /**
7197 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
7198 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7199 |    * used.
7200 |    * @param options
7201 |    */
7202 |   isEnabled(selector: string, options?: {
7203 |     /**
7204 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7205 |      * element, the call throws an exception.
7206 |      */
7207 |     strict?: boolean;
7208 | 
7209 |     /**
7210 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7211 |      * option in the config, or by using the
7212 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7213 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7214 |      */
7215 |     timeout?: number;
7216 |   }): Promise<boolean>;
7217 | 
7218 |   /**
7219 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
7220 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7221 |    *
7222 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
7223 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-hidden-option-selector) that does not match any
7224 |    * elements is considered hidden.
7225 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7226 |    * used.
7227 |    * @param options
7228 |    */
7229 |   isHidden(selector: string, options?: {
7230 |     /**
7231 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7232 |      * element, the call throws an exception.
7233 |      */
7234 |     strict?: boolean;
7235 | 
7236 |     /**
7237 |      * @deprecated This option is ignored.
7238 |      * [frame.isHidden(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-is-hidden) does not wait
7239 |      * for the element to become hidden and returns immediately.
7240 |      */
7241 |     timeout?: number;
7242 |   }): Promise<boolean>;
7243 | 
7244 |   /**
7245 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
7246 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7247 |    *
7248 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
7249 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-visible-option-selector) that does not match any
7250 |    * elements is considered not visible.
7251 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7252 |    * used.
7253 |    * @param options
7254 |    */
7255 |   isVisible(selector: string, options?: {
7256 |     /**
7257 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7258 |      * element, the call throws an exception.
7259 |      */
7260 |     strict?: boolean;
7261 | 
7262 |     /**
7263 |      * @deprecated This option is ignored.
7264 |      * [frame.isVisible(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-is-visible) does not wait
7265 |      * for the element to become visible and returns immediately.
7266 |      */
7267 |     timeout?: number;
7268 |   }): Promise<boolean>;
7269 | 
7270 |   /**
7271 |    * The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved
7272 |    * to the element immediately before performing an action, so a series of actions on the same locator can in fact be
7273 |    * performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
7274 |    *
7275 |    * [Learn more about locators](https://playwright.dev/docs/locators).
7276 |    *
7277 |    * [Learn more about locators](https://playwright.dev/docs/locators).
7278 |    * @param selector A selector to use when resolving DOM element.
7279 |    * @param options
7280 |    */
7281 |   locator(selector: string, options?: {
7282 |     /**
7283 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
7284 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
7285 |      *
7286 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
7287 |      * the document root. For example, you can find `content` that has `div` in
7288 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
7289 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
7290 |      *
7291 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
7292 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
7293 |      */
7294 |     has?: Locator;
7295 | 
7296 |     /**
7297 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
7298 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
7299 |      *
7300 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
7301 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
7302 |      */
7303 |     hasNot?: Locator;
7304 | 
7305 |     /**
7306 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
7307 |      * When passed a [string], matching is case-insensitive and searches for a substring.
7308 |      */
7309 |     hasNotText?: string|RegExp;
7310 | 
7311 |     /**
7312 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
7313 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
7314 |      * `<article><div>Playwright</div></article>`.
7315 |      */
7316 |     hasText?: string|RegExp;
7317 |   }): Locator;
7318 | 
7319 |   /**
7320 |    * Returns frame's name attribute as specified in the tag.
7321 |    *
7322 |    * If the name is empty, returns the id attribute instead.
7323 |    *
7324 |    * **NOTE** This value is calculated once when the frame is created, and will not update if the attribute is changed
7325 |    * later.
7326 |    *
7327 |    */
7328 |   name(): string;
7329 | 
7330 |   /**
7331 |    * Returns the page containing this frame.
7332 |    */
7333 |   page(): Page;
7334 | 
7335 |   /**
7336 |    * Parent frame, if any. Detached frames and main frames return `null`.
7337 |    */
7338 |   parentFrame(): null|Frame;
7339 | 
7340 |   /**
7341 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
7342 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7343 |    *
7344 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) can specify the intended
7345 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
7346 |    * to generate the text for. A superset of the
7347 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) values can be found
7348 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
7349 |    *
7350 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
7351 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
7352 |    * etc.
7353 |    *
7354 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
7355 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
7356 |    *
7357 |    * Holding down `Shift` will type the text that corresponds to the
7358 |    * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) in the upper case.
7359 |    *
7360 |    * If [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) is a single character, it is
7361 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
7362 |    *
7363 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
7364 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
7365 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7366 |    * used.
7367 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
7368 |    * @param options
7369 |    */
7370 |   press(selector: string, key: string, options?: {
7371 |     /**
7372 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
7373 |      */
7374 |     delay?: number;
7375 | 
7376 |     /**
7377 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
7378 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
7379 |      * navigating to inaccessible pages. Defaults to `false`.
7380 |      * @deprecated This option will default to `true` in the future.
7381 |      */
7382 |     noWaitAfter?: boolean;
7383 | 
7384 |     /**
7385 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7386 |      * element, the call throws an exception.
7387 |      */
7388 |     strict?: boolean;
7389 | 
7390 |     /**
7391 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7392 |      * option in the config, or by using the
7393 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7394 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7395 |      */
7396 |     timeout?: number;
7397 |   }): Promise<void>;
7398 | 
7399 |   /**
7400 |    * **NOTE** Use locator-based
7401 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
7402 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7403 |    *
7404 |    * This method waits for an element matching
7405 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-select-option-option-selector), waits for
7406 |    * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
7407 |    * element and selects these options.
7408 |    *
7409 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
7410 |    * the `<label>` element that has an associated
7411 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
7412 |    * instead.
7413 |    *
7414 |    * Returns the array of option values that have been successfully selected.
7415 |    *
7416 |    * Triggers a `change` and `input` event once all the provided options have been selected.
7417 |    *
7418 |    * **Usage**
7419 |    *
7420 |    * ```js
7421 |    * // Single selection matching the value or label
7422 |    * frame.selectOption('select#colors', 'blue');
7423 |    *
7424 |    * // single selection matching both the value and the label
7425 |    * frame.selectOption('select#colors', { label: 'Blue' });
7426 |    *
7427 |    * // multiple selection
7428 |    * frame.selectOption('select#colors', 'red', 'green', 'blue');
7429 |    * ```
7430 |    *
7431 |    * @param selector A selector to query for.
7432 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
7433 |    * only the first option matching one of the passed options is selected. String values are matching both values and
7434 |    * labels. Option is considered matching if all specified properties match.
7435 |    * @param options
7436 |    */
7437 |   selectOption(selector: string, values: null|string|ElementHandle|ReadonlyArray<string>|{
7438 |     /**
7439 |      * Matches by `option.value`. Optional.
7440 |      */
7441 |     value?: string;
7442 | 
7443 |     /**
7444 |      * Matches by `option.label`. Optional.
7445 |      */
7446 |     label?: string;
7447 | 
7448 |     /**
7449 |      * Matches by the index. Optional.
7450 |      */
7451 |     index?: number;
7452 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
7453 |     /**
7454 |      * Matches by `option.value`. Optional.
7455 |      */
7456 |     value?: string;
7457 | 
7458 |     /**
7459 |      * Matches by `option.label`. Optional.
7460 |      */
7461 |     label?: string;
7462 | 
7463 |     /**
7464 |      * Matches by the index. Optional.
7465 |      */
7466 |     index?: number;
7467 |   }>, options?: {
7468 |     /**
7469 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7470 |      */
7471 |     force?: boolean;
7472 | 
7473 |     /**
7474 |      * This option has no effect.
7475 |      * @deprecated This option has no effect.
7476 |      */
7477 |     noWaitAfter?: boolean;
7478 | 
7479 |     /**
7480 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7481 |      * element, the call throws an exception.
7482 |      */
7483 |     strict?: boolean;
7484 | 
7485 |     /**
7486 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7487 |      * option in the config, or by using the
7488 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7489 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7490 |      */
7491 |     timeout?: number;
7492 |   }): Promise<Array<string>>;
7493 | 
7494 |   /**
7495 |    * **NOTE** Use locator-based
7496 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
7497 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7498 |    *
7499 |    * This method checks or unchecks an element matching
7500 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector) by performing the
7501 |    * following steps:
7502 |    * 1. Find an element matching
7503 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector). If there is
7504 |    *    none, wait until a matching element is attached to the DOM.
7505 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
7506 |    * 1. If the element already has the right checked state, this method returns immediately.
7507 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7508 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-force) option is set. If the
7509 |    *    element is detached during the checks, the whole action is retried.
7510 |    * 1. Scroll the element into view if needed.
7511 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
7512 |    *    element.
7513 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
7514 |    *
7515 |    * When all steps combined have not finished during the specified
7516 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-timeout), this method throws a
7517 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7518 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7519 |    * used.
7520 |    * @param checked Whether to check or uncheck the checkbox.
7521 |    * @param options
7522 |    */
7523 |   setChecked(selector: string, checked: boolean, options?: {
7524 |     /**
7525 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7526 |      */
7527 |     force?: boolean;
7528 | 
7529 |     /**
7530 |      * This option has no effect.
7531 |      * @deprecated This option has no effect.
7532 |      */
7533 |     noWaitAfter?: boolean;
7534 | 
7535 |     /**
7536 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7537 |      * the element.
7538 |      */
7539 |     position?: {
7540 |       x: number;
7541 | 
7542 |       y: number;
7543 |     };
7544 | 
7545 |     /**
7546 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7547 |      * element, the call throws an exception.
7548 |      */
7549 |     strict?: boolean;
7550 | 
7551 |     /**
7552 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7553 |      * option in the config, or by using the
7554 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7555 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7556 |      */
7557 |     timeout?: number;
7558 | 
7559 |     /**
7560 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7561 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
7562 |      */
7563 |     trial?: boolean;
7564 |   }): Promise<void>;
7565 | 
7566 |   /**
7567 |    * This method internally calls [document.write()](https://developer.mozilla.org/en-US/docs/Web/API/Document/write),
7568 |    * inheriting all its specific characteristics and behaviors.
7569 |    * @param html HTML markup to assign to the page.
7570 |    * @param options
7571 |    */
7572 |   setContent(html: string, options?: {
7573 |     /**
7574 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7575 |      * `navigationTimeout` option in the config, or by using the
7576 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7577 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7578 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7579 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7580 |      */
7581 |     timeout?: number;
7582 | 
7583 |     /**
7584 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
7585 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
7586 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
7587 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
7588 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
7589 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
7590 |      *   loading.
7591 |      */
7592 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
7593 |   }): Promise<void>;
7594 | 
7595 |   /**
7596 |    * **NOTE** Use locator-based
7597 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
7598 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7599 |    *
7600 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
7601 |    * they are resolved relative to the current working directory. For empty array, clears the selected files.
7602 |    *
7603 |    * This method expects [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-input-files-option-selector)
7604 |    * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
7605 |    * element is inside the `<label>` element that has an associated
7606 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
7607 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7608 |    * used.
7609 |    * @param files
7610 |    * @param options
7611 |    */
7612 |   setInputFiles(selector: string, files: string|ReadonlyArray<string>|{
7613 |     /**
7614 |      * File name
7615 |      */
7616 |     name: string;
7617 | 
7618 |     /**
7619 |      * File type
7620 |      */
7621 |     mimeType: string;
7622 | 
7623 |     /**
7624 |      * File content
7625 |      */
7626 |     buffer: Buffer;
7627 |   }|ReadonlyArray<{
7628 |     /**
7629 |      * File name
7630 |      */
7631 |     name: string;
7632 | 
7633 |     /**
7634 |      * File type
7635 |      */
7636 |     mimeType: string;
7637 | 
7638 |     /**
7639 |      * File content
7640 |      */
7641 |     buffer: Buffer;
7642 |   }>, options?: {
7643 |     /**
7644 |      * This option has no effect.
7645 |      * @deprecated This option has no effect.
7646 |      */
7647 |     noWaitAfter?: boolean;
7648 | 
7649 |     /**
7650 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7651 |      * element, the call throws an exception.
7652 |      */
7653 |     strict?: boolean;
7654 | 
7655 |     /**
7656 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7657 |      * option in the config, or by using the
7658 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7659 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7660 |      */
7661 |     timeout?: number;
7662 |   }): Promise<void>;
7663 | 
7664 |   /**
7665 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
7666 |    * more about [locators](https://playwright.dev/docs/locators).
7667 |    *
7668 |    * This method taps an element matching
7669 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector) by performing the following
7670 |    * steps:
7671 |    * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector).
7672 |    *    If there is none, wait until a matching element is attached to the DOM.
7673 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7674 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-tap-option-force) option is set. If the element
7675 |    *    is detached during the checks, the whole action is retried.
7676 |    * 1. Scroll the element into view if needed.
7677 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
7678 |    *    element, or the specified
7679 |    *    [`position`](https://playwright.dev/docs/api/class-frame#frame-tap-option-position).
7680 |    *
7681 |    * When all steps combined have not finished during the specified
7682 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-tap-option-timeout), this method throws a
7683 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7684 |    *
7685 |    * **NOTE** `frame.tap()` requires that the `hasTouch` option of the browser context be set to true.
7686 |    *
7687 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7688 |    * used.
7689 |    * @param options
7690 |    */
7691 |   tap(selector: string, options?: {
7692 |     /**
7693 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7694 |      */
7695 |     force?: boolean;
7696 | 
7697 |     /**
7698 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
7699 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
7700 |      * "Control" on Windows and Linux and to "Meta" on macOS.
7701 |      */
7702 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
7703 | 
7704 |     /**
7705 |      * This option has no effect.
7706 |      * @deprecated This option has no effect.
7707 |      */
7708 |     noWaitAfter?: boolean;
7709 | 
7710 |     /**
7711 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7712 |      * the element.
7713 |      */
7714 |     position?: {
7715 |       x: number;
7716 | 
7717 |       y: number;
7718 |     };
7719 | 
7720 |     /**
7721 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7722 |      * element, the call throws an exception.
7723 |      */
7724 |     strict?: boolean;
7725 | 
7726 |     /**
7727 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7728 |      * option in the config, or by using the
7729 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7730 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7731 |      */
7732 |     timeout?: number;
7733 | 
7734 |     /**
7735 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7736 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
7737 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
7738 |      * are pressed.
7739 |      */
7740 |     trial?: boolean;
7741 |   }): Promise<void>;
7742 | 
7743 |   /**
7744 |    * **NOTE** Use locator-based
7745 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
7746 |    * more about [locators](https://playwright.dev/docs/locators).
7747 |    *
7748 |    * Returns `element.textContent`.
7749 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7750 |    * used.
7751 |    * @param options
7752 |    */
7753 |   textContent(selector: string, options?: {
7754 |     /**
7755 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7756 |      * element, the call throws an exception.
7757 |      */
7758 |     strict?: boolean;
7759 | 
7760 |     /**
7761 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7762 |      * option in the config, or by using the
7763 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7764 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7765 |      */
7766 |     timeout?: number;
7767 |   }): Promise<null|string>;
7768 | 
7769 |   /**
7770 |    * Returns the page title.
7771 |    */
7772 |   title(): Promise<string>;
7773 | 
7774 |   /**
7775 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text. `frame.type` can be used
7776 |    * to send fine-grained keyboard events. To fill values in form fields, use
7777 |    * [frame.fill(selector, value[, options])](https://playwright.dev/docs/api/class-frame#frame-fill).
7778 |    *
7779 |    * To press a special key, like `Control` or `ArrowDown`, use
7780 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
7781 |    *
7782 |    * **Usage**
7783 |    * @deprecated In most cases, you should use
7784 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
7785 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
7786 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
7787 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7788 |    * used.
7789 |    * @param text A text to type into a focused element.
7790 |    * @param options
7791 |    */
7792 |   type(selector: string, text: string, options?: {
7793 |     /**
7794 |      * Time to wait between key presses in milliseconds. Defaults to 0.
7795 |      */
7796 |     delay?: number;
7797 | 
7798 |     /**
7799 |      * This option has no effect.
7800 |      * @deprecated This option has no effect.
7801 |      */
7802 |     noWaitAfter?: boolean;
7803 | 
7804 |     /**
7805 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7806 |      * element, the call throws an exception.
7807 |      */
7808 |     strict?: boolean;
7809 | 
7810 |     /**
7811 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7812 |      * option in the config, or by using the
7813 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7814 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7815 |      */
7816 |     timeout?: number;
7817 |   }): Promise<void>;
7818 | 
7819 |   /**
7820 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
7821 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
7822 |    *
7823 |    * This method checks an element matching
7824 |    * [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector) by performing the following
7825 |    * steps:
7826 |    * 1. Find an element matching
7827 |    *    [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector). If there is none,
7828 |    *    wait until a matching element is attached to the DOM.
7829 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
7830 |    *    already unchecked, this method returns immediately.
7831 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
7832 |    *    [`force`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-force) option is set. If the
7833 |    *    element is detached during the checks, the whole action is retried.
7834 |    * 1. Scroll the element into view if needed.
7835 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
7836 |    *    element.
7837 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
7838 |    *
7839 |    * When all steps combined have not finished during the specified
7840 |    * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-timeout), this method throws a
7841 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
7842 |    * @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
7843 |    * used.
7844 |    * @param options
7845 |    */
7846 |   uncheck(selector: string, options?: {
7847 |     /**
7848 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
7849 |      */
7850 |     force?: boolean;
7851 | 
7852 |     /**
7853 |      * This option has no effect.
7854 |      * @deprecated This option has no effect.
7855 |      */
7856 |     noWaitAfter?: boolean;
7857 | 
7858 |     /**
7859 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
7860 |      * the element.
7861 |      */
7862 |     position?: {
7863 |       x: number;
7864 | 
7865 |       y: number;
7866 |     };
7867 | 
7868 |     /**
7869 |      * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7870 |      * element, the call throws an exception.
7871 |      */
7872 |     strict?: boolean;
7873 | 
7874 |     /**
7875 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
7876 |      * option in the config, or by using the
7877 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7878 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7879 |      */
7880 |     timeout?: number;
7881 | 
7882 |     /**
7883 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
7884 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
7885 |      */
7886 |     trial?: boolean;
7887 |   }): Promise<void>;
7888 | 
7889 |   /**
7890 |    * Returns frame's url.
7891 |    */
7892 |   url(): string;
7893 | 
7894 |   /**
7895 |    * Waits for the required load state to be reached.
7896 |    *
7897 |    * This returns when the frame reaches a required load state, `load` by default. The navigation must have been
7898 |    * committed when this method is called. If current document has already reached the required state, resolves
7899 |    * immediately.
7900 |    *
7901 |    * **NOTE** Most of the time, this method is not needed because Playwright
7902 |    * [auto-waits before every action](https://playwright.dev/docs/actionability).
7903 |    *
7904 |    * **Usage**
7905 |    *
7906 |    * ```js
7907 |    * await frame.click('button'); // Click triggers navigation.
7908 |    * await frame.waitForLoadState(); // Waits for 'load' state by default.
7909 |    * ```
7910 |    *
7911 |    * @param state Optional load state to wait for, defaults to `load`. If the state has been already reached while loading current
7912 |    * document, the method resolves immediately. Can be one of:
7913 |    * - `'load'` - wait for the `load` event to be fired.
7914 |    * - `'domcontentloaded'` - wait for the `DOMContentLoaded` event to be fired.
7915 |    * - `'networkidle'` - **DISCOURAGED** wait until there are no network connections for at least `500` ms. Don't use
7916 |    * this method for testing, rely on web assertions to assess readiness instead.
7917 |    * @param options
7918 |    */
7919 |   waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
7920 |     /**
7921 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7922 |      * `navigationTimeout` option in the config, or by using the
7923 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7924 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7925 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7926 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7927 |      */
7928 |     timeout?: number;
7929 |   }): Promise<void>;
7930 | 
7931 |   /**
7932 |    * Waits for the frame navigation and returns the main resource response. In case of multiple redirects, the
7933 |    * navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or
7934 |    * navigation due to History API usage, the navigation will resolve with `null`.
7935 |    *
7936 |    * **Usage**
7937 |    *
7938 |    * This method waits for the frame to navigate to a new URL. It is useful for when you run code which will indirectly
7939 |    * cause the frame to navigate. Consider this example:
7940 |    *
7941 |    * ```js
7942 |    * // Start waiting for navigation before clicking. Note no await.
7943 |    * const navigationPromise = page.waitForNavigation();
7944 |    * await page.getByText('Navigate after timeout').click();
7945 |    * await navigationPromise;
7946 |    * ```
7947 |    *
7948 |    * **NOTE** Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API) to change the URL
7949 |    * is considered a navigation.
7950 |    *
7951 |    * @deprecated This method is inherently racy, please use
7952 |    * [frame.waitForURL(url[, options])](https://playwright.dev/docs/api/class-frame#frame-wait-for-url) instead.
7953 |    * @param options
7954 |    */
7955 |   waitForNavigation(options?: {
7956 |     /**
7957 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7958 |      * `navigationTimeout` option in the config, or by using the
7959 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
7960 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
7961 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
7962 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
7963 |      */
7964 |     timeout?: number;
7965 | 
7966 |     /**
7967 |      * A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
7968 |      * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
7969 |      * equal to the string.
7970 |      */
7971 |     url?: string|RegExp|((url: URL) => boolean);
7972 | 
7973 |     /**
7974 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
7975 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
7976 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
7977 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
7978 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
7979 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
7980 |      *   loading.
7981 |      */
7982 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
7983 |   }): Promise<null|Response>;
7984 | 
7985 |   /**
7986 |    * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
7987 |    * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
7988 |    *
7989 |    * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-timeout-option-timeout)
7990 |    * in milliseconds.
7991 |    *
7992 |    * Note that `frame.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
7993 |    * to be flaky. Use signals such as network events, selectors becoming visible and others instead.
7994 |    * @param timeout A timeout to wait for
7995 |    */
7996 |   waitForTimeout(timeout: number): Promise<void>;
7997 | 
7998 |   /**
7999 |    * Waits for the frame to navigate to the given URL.
8000 |    *
8001 |    * **Usage**
8002 |    *
8003 |    * ```js
8004 |    * await frame.click('a.delayed-navigation'); // Clicking the link will indirectly cause a navigation
8005 |    * await frame.waitForURL('**\/target.html');
8006 |    * ```
8007 |    *
8008 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if
8009 |    * the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly
8010 |    * equal to the string.
8011 |    * @param options
8012 |    */
8013 |   waitForURL(url: string|RegExp|((url: URL) => boolean), options?: {
8014 |     /**
8015 |      * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
8016 |      * `navigationTimeout` option in the config, or by using the
8017 |      * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout),
8018 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout),
8019 |      * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
8020 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
8021 |      */
8022 |     timeout?: number;
8023 | 
8024 |     /**
8025 |      * When to consider operation succeeded, defaults to `load`. Events can be either:
8026 |      * - `'domcontentloaded'` - consider operation to be finished when the `DOMContentLoaded` event is fired.
8027 |      * - `'load'` - consider operation to be finished when the `load` event is fired.
8028 |      * - `'networkidle'` - **DISCOURAGED** consider operation to be finished when there are no network connections for
8029 |      *   at least `500` ms. Don't use this method for testing, rely on web assertions to assess readiness instead.
8030 |      * - `'commit'` - consider operation to be finished when network response is received and the document started
8031 |      *   loading.
8032 |      */
8033 |     waitUntil?: "load"|"domcontentloaded"|"networkidle"|"commit";
8034 |   }): Promise<void>;
8035 | }
8036 | 
8037 | /**
8038 |  * BrowserContexts provide a way to operate multiple independent browser sessions.
8039 |  *
8040 |  * If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser
8041 |  * context.
8042 |  *
8043 |  * Playwright allows creating isolated non-persistent browser contexts with
8044 |  * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) method.
8045 |  * Non-persistent browser contexts don't write any browsing data to disk.
8046 |  *
8047 |  * ```js
8048 |  * // Create a new incognito browser context
8049 |  * const context = await browser.newContext();
8050 |  * // Create a new page inside context.
8051 |  * const page = await context.newPage();
8052 |  * await page.goto('https://example.com');
8053 |  * // Dispose context once it's no longer needed.
8054 |  * await context.close();
8055 |  * ```
8056 |  *
8057 |  */
8058 | export interface BrowserContext {
8059 |   /**
8060 |    * The method adds a function called
8061 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
8062 |    * `window` object of every frame in every page in the context. When called, the function executes
8063 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8064 |    * and returns a [Promise] which resolves to the return value of
8065 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
8066 |    * If the
8067 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8068 |    * returns a [Promise], it will be awaited.
8069 |    *
8070 |    * The first argument of the
8071 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8072 |    * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
8073 |    *
8074 |    * See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
8075 |    * for page-only version.
8076 |    *
8077 |    * **Usage**
8078 |    *
8079 |    * An example of exposing page URL to all frames in all pages in the context:
8080 |    *
8081 |    * ```js
8082 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8083 |    *
8084 |    * (async () => {
8085 |    *   const browser = await webkit.launch({ headless: false });
8086 |    *   const context = await browser.newContext();
8087 |    *   await context.exposeBinding('pageURL', ({ page }) => page.url());
8088 |    *   const page = await context.newPage();
8089 |    *   await page.setContent(`
8090 |    *     <script>
8091 |    *       async function onClick() {
8092 |    *         document.querySelector('div').textContent = await window.pageURL();
8093 |    *       }
8094 |    *     </script>
8095 |    *     <button onclick="onClick()">Click me</button>
8096 |    *     <div></div>
8097 |    *   `);
8098 |    *   await page.getByRole('button').click();
8099 |    * })();
8100 |    * ```
8101 |    *
8102 |    * @param name Name of the function on the window object.
8103 |    * @param callback Callback function that will be called in the Playwright's context.
8104 |    * @param options
8105 |    */
8106 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
8107 |   /**
8108 |    * The method adds a function called
8109 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
8110 |    * `window` object of every frame in every page in the context. When called, the function executes
8111 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8112 |    * and returns a [Promise] which resolves to the return value of
8113 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
8114 |    * If the
8115 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8116 |    * returns a [Promise], it will be awaited.
8117 |    *
8118 |    * The first argument of the
8119 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
8120 |    * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
8121 |    *
8122 |    * See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
8123 |    * for page-only version.
8124 |    *
8125 |    * **Usage**
8126 |    *
8127 |    * An example of exposing page URL to all frames in all pages in the context:
8128 |    *
8129 |    * ```js
8130 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8131 |    *
8132 |    * (async () => {
8133 |    *   const browser = await webkit.launch({ headless: false });
8134 |    *   const context = await browser.newContext();
8135 |    *   await context.exposeBinding('pageURL', ({ page }) => page.url());
8136 |    *   const page = await context.newPage();
8137 |    *   await page.setContent(`
8138 |    *     <script>
8139 |    *       async function onClick() {
8140 |    *         document.querySelector('div').textContent = await window.pageURL();
8141 |    *       }
8142 |    *     </script>
8143 |    *     <button onclick="onClick()">Click me</button>
8144 |    *     <div></div>
8145 |    *   `);
8146 |    *   await page.getByRole('button').click();
8147 |    * })();
8148 |    * ```
8149 |    *
8150 |    * @param name Name of the function on the window object.
8151 |    * @param callback Callback function that will be called in the Playwright's context.
8152 |    * @param options
8153 |    */
8154 |   exposeBinding(name: string, playwrightBinding: (source: BindingSource, ...args: any[]) => any, options?: { handle?: boolean }): Promise<void>;
8155 | 
8156 |   /**
8157 |    * Adds a script which would be evaluated in one of the following scenarios:
8158 |    * - Whenever a page is created in the browser context or is navigated.
8159 |    * - Whenever a child frame is attached or navigated in any page in the browser context. In this case, the script is
8160 |    *   evaluated in the context of the newly attached frame.
8161 |    *
8162 |    * The script is evaluated after the document was created but before any of its scripts were run. This is useful to
8163 |    * amend the JavaScript environment, e.g. to seed `Math.random`.
8164 |    *
8165 |    * **Usage**
8166 |    *
8167 |    * An example of overriding `Math.random` before the page loads:
8168 |    *
8169 |    * ```js
8170 |    * // preload.js
8171 |    * Math.random = () => 42;
8172 |    * ```
8173 |    *
8174 |    * ```js
8175 |    * // In your playwright script, assuming the preload.js file is in same directory.
8176 |    * await browserContext.addInitScript({
8177 |    *   path: 'preload.js'
8178 |    * });
8179 |    * ```
8180 |    *
8181 |    * **NOTE** The order of evaluation of multiple scripts installed via
8182 |    * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
8183 |    * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
8184 |    * defined.
8185 |    *
8186 |    * @param script Script to be evaluated in all pages in the browser context.
8187 |    * @param arg Optional argument to pass to
8188 |    * [`script`](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script-option-script)
8189 |    * (only supported when passing a function).
8190 |    */
8191 |   addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
8192 | 
8193 |   /**
8194 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
8195 |    * async listeners to complete or to ignore subsequent errors from these listeners.
8196 |    * @param type
8197 |    * @param options
8198 |    */
8199 |   removeAllListeners(type?: string): this;
8200 |   /**
8201 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
8202 |    * async listeners to complete or to ignore subsequent errors from these listeners.
8203 |    * @param type
8204 |    * @param options
8205 |    */
8206 |   removeAllListeners(type: string | undefined, options: {
8207 |     /**
8208 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
8209 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
8210 |      * - `'wait'` - wait for current listener calls (if any) to finish
8211 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
8212 |      */
8213 |     behavior?: 'wait'|'ignoreErrors'|'default'
8214 |   }): Promise<void>;
8215 |   /**
8216 |    * This event is not emitted.
8217 |    */
8218 |   on(event: 'backgroundpage', listener: (page: Page) => any): this;
8219 | 
8220 |   /**
8221 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8222 |    * - Browser context is closed.
8223 |    * - Browser application is closed or crashed.
8224 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8225 |    */
8226 |   on(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8227 | 
8228 |   /**
8229 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8230 |    *
8231 |    * The arguments passed into `console.log` and the page are available on the
8232 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8233 |    *
8234 |    * **Usage**
8235 |    *
8236 |    * ```js
8237 |    * context.on('console', async msg => {
8238 |    *   const values = [];
8239 |    *   for (const arg of msg.args())
8240 |    *     values.push(await arg.jsonValue());
8241 |    *   console.log(...values);
8242 |    * });
8243 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8244 |    * ```
8245 |    *
8246 |    */
8247 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8248 | 
8249 |   /**
8250 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8251 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8252 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8253 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8254 |    * dialog, and actions like click will never finish.
8255 |    *
8256 |    * **Usage**
8257 |    *
8258 |    * ```js
8259 |    * context.on('dialog', dialog => {
8260 |    *   dialog.accept();
8261 |    * });
8262 |    * ```
8263 |    *
8264 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8265 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8266 |    * listeners are present, all dialogs are automatically dismissed.
8267 |    *
8268 |    */
8269 |   on(event: 'dialog', listener: (dialog: Dialog) => any): this;
8270 | 
8271 |   /**
8272 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8273 |    * will also fire for popup pages. See also
8274 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8275 |    * relevant to a specific page.
8276 |    *
8277 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8278 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8279 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8280 |    * to this network request, use
8281 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8282 |    * and
8283 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8284 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8285 |    *
8286 |    * ```js
8287 |    * const newPagePromise = context.waitForEvent('page');
8288 |    * await page.getByText('open new page').click();
8289 |    * const newPage = await newPagePromise;
8290 |    * console.log(await newPage.evaluate('location.href'));
8291 |    * ```
8292 |    *
8293 |    * **NOTE** Use
8294 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8295 |    * wait until the page gets to a particular state (you should not need it in most cases).
8296 |    *
8297 |    */
8298 |   on(event: 'page', listener: (page: Page) => any): this;
8299 | 
8300 |   /**
8301 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8302 |    * only listen for requests from a particular page, use
8303 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8304 |    *
8305 |    * In order to intercept and mutate requests, see
8306 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8307 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8308 |    */
8309 |   on(event: 'request', listener: (request: Request) => any): this;
8310 | 
8311 |   /**
8312 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8313 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8314 |    *
8315 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8316 |    * will complete with
8317 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8318 |    * event and not with
8319 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8320 |    *
8321 |    */
8322 |   on(event: 'requestfailed', listener: (request: Request) => any): this;
8323 | 
8324 |   /**
8325 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8326 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8327 |    * particular page, use
8328 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8329 |    */
8330 |   on(event: 'requestfinished', listener: (request: Request) => any): this;
8331 | 
8332 |   /**
8333 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8334 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8335 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8336 |    */
8337 |   on(event: 'response', listener: (response: Response) => any): this;
8338 | 
8339 |   /**
8340 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8341 |    *
8342 |    * Emitted when new service worker is created in the context.
8343 |    */
8344 |   on(event: 'serviceworker', listener: (worker: Worker) => any): this;
8345 | 
8346 |   /**
8347 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8348 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8349 |    */
8350 |   on(event: 'weberror', listener: (webError: WebError) => any): this;
8351 | 
8352 |   /**
8353 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8354 |    */
8355 |   once(event: 'backgroundpage', listener: (page: Page) => any): this;
8356 | 
8357 |   /**
8358 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8359 |    */
8360 |   once(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8361 | 
8362 |   /**
8363 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8364 |    */
8365 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8366 | 
8367 |   /**
8368 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8369 |    */
8370 |   once(event: 'dialog', listener: (dialog: Dialog) => any): this;
8371 | 
8372 |   /**
8373 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8374 |    */
8375 |   once(event: 'page', listener: (page: Page) => any): this;
8376 | 
8377 |   /**
8378 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8379 |    */
8380 |   once(event: 'request', listener: (request: Request) => any): this;
8381 | 
8382 |   /**
8383 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8384 |    */
8385 |   once(event: 'requestfailed', listener: (request: Request) => any): this;
8386 | 
8387 |   /**
8388 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8389 |    */
8390 |   once(event: 'requestfinished', listener: (request: Request) => any): this;
8391 | 
8392 |   /**
8393 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8394 |    */
8395 |   once(event: 'response', listener: (response: Response) => any): this;
8396 | 
8397 |   /**
8398 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8399 |    */
8400 |   once(event: 'serviceworker', listener: (worker: Worker) => any): this;
8401 | 
8402 |   /**
8403 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
8404 |    */
8405 |   once(event: 'weberror', listener: (webError: WebError) => any): this;
8406 | 
8407 |   /**
8408 |    * This event is not emitted.
8409 |    */
8410 |   addListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8411 | 
8412 |   /**
8413 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8414 |    * - Browser context is closed.
8415 |    * - Browser application is closed or crashed.
8416 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8417 |    */
8418 |   addListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8419 | 
8420 |   /**
8421 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8422 |    *
8423 |    * The arguments passed into `console.log` and the page are available on the
8424 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8425 |    *
8426 |    * **Usage**
8427 |    *
8428 |    * ```js
8429 |    * context.on('console', async msg => {
8430 |    *   const values = [];
8431 |    *   for (const arg of msg.args())
8432 |    *     values.push(await arg.jsonValue());
8433 |    *   console.log(...values);
8434 |    * });
8435 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8436 |    * ```
8437 |    *
8438 |    */
8439 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8440 | 
8441 |   /**
8442 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8443 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8444 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8445 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8446 |    * dialog, and actions like click will never finish.
8447 |    *
8448 |    * **Usage**
8449 |    *
8450 |    * ```js
8451 |    * context.on('dialog', dialog => {
8452 |    *   dialog.accept();
8453 |    * });
8454 |    * ```
8455 |    *
8456 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8457 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8458 |    * listeners are present, all dialogs are automatically dismissed.
8459 |    *
8460 |    */
8461 |   addListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8462 | 
8463 |   /**
8464 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8465 |    * will also fire for popup pages. See also
8466 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8467 |    * relevant to a specific page.
8468 |    *
8469 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8470 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8471 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8472 |    * to this network request, use
8473 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8474 |    * and
8475 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8476 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8477 |    *
8478 |    * ```js
8479 |    * const newPagePromise = context.waitForEvent('page');
8480 |    * await page.getByText('open new page').click();
8481 |    * const newPage = await newPagePromise;
8482 |    * console.log(await newPage.evaluate('location.href'));
8483 |    * ```
8484 |    *
8485 |    * **NOTE** Use
8486 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8487 |    * wait until the page gets to a particular state (you should not need it in most cases).
8488 |    *
8489 |    */
8490 |   addListener(event: 'page', listener: (page: Page) => any): this;
8491 | 
8492 |   /**
8493 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8494 |    * only listen for requests from a particular page, use
8495 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8496 |    *
8497 |    * In order to intercept and mutate requests, see
8498 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8499 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8500 |    */
8501 |   addListener(event: 'request', listener: (request: Request) => any): this;
8502 | 
8503 |   /**
8504 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8505 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8506 |    *
8507 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8508 |    * will complete with
8509 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8510 |    * event and not with
8511 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8512 |    *
8513 |    */
8514 |   addListener(event: 'requestfailed', listener: (request: Request) => any): this;
8515 | 
8516 |   /**
8517 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8518 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8519 |    * particular page, use
8520 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8521 |    */
8522 |   addListener(event: 'requestfinished', listener: (request: Request) => any): this;
8523 | 
8524 |   /**
8525 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8526 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8527 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8528 |    */
8529 |   addListener(event: 'response', listener: (response: Response) => any): this;
8530 | 
8531 |   /**
8532 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8533 |    *
8534 |    * Emitted when new service worker is created in the context.
8535 |    */
8536 |   addListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8537 | 
8538 |   /**
8539 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8540 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8541 |    */
8542 |   addListener(event: 'weberror', listener: (webError: WebError) => any): this;
8543 | 
8544 |   /**
8545 |    * Removes an event listener added by `on` or `addListener`.
8546 |    */
8547 |   removeListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8548 | 
8549 |   /**
8550 |    * Removes an event listener added by `on` or `addListener`.
8551 |    */
8552 |   removeListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8553 | 
8554 |   /**
8555 |    * Removes an event listener added by `on` or `addListener`.
8556 |    */
8557 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8558 | 
8559 |   /**
8560 |    * Removes an event listener added by `on` or `addListener`.
8561 |    */
8562 |   removeListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8563 | 
8564 |   /**
8565 |    * Removes an event listener added by `on` or `addListener`.
8566 |    */
8567 |   removeListener(event: 'page', listener: (page: Page) => any): this;
8568 | 
8569 |   /**
8570 |    * Removes an event listener added by `on` or `addListener`.
8571 |    */
8572 |   removeListener(event: 'request', listener: (request: Request) => any): this;
8573 | 
8574 |   /**
8575 |    * Removes an event listener added by `on` or `addListener`.
8576 |    */
8577 |   removeListener(event: 'requestfailed', listener: (request: Request) => any): this;
8578 | 
8579 |   /**
8580 |    * Removes an event listener added by `on` or `addListener`.
8581 |    */
8582 |   removeListener(event: 'requestfinished', listener: (request: Request) => any): this;
8583 | 
8584 |   /**
8585 |    * Removes an event listener added by `on` or `addListener`.
8586 |    */
8587 |   removeListener(event: 'response', listener: (response: Response) => any): this;
8588 | 
8589 |   /**
8590 |    * Removes an event listener added by `on` or `addListener`.
8591 |    */
8592 |   removeListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8593 | 
8594 |   /**
8595 |    * Removes an event listener added by `on` or `addListener`.
8596 |    */
8597 |   removeListener(event: 'weberror', listener: (webError: WebError) => any): this;
8598 | 
8599 |   /**
8600 |    * Removes an event listener added by `on` or `addListener`.
8601 |    */
8602 |   off(event: 'backgroundpage', listener: (page: Page) => any): this;
8603 | 
8604 |   /**
8605 |    * Removes an event listener added by `on` or `addListener`.
8606 |    */
8607 |   off(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8608 | 
8609 |   /**
8610 |    * Removes an event listener added by `on` or `addListener`.
8611 |    */
8612 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8613 | 
8614 |   /**
8615 |    * Removes an event listener added by `on` or `addListener`.
8616 |    */
8617 |   off(event: 'dialog', listener: (dialog: Dialog) => any): this;
8618 | 
8619 |   /**
8620 |    * Removes an event listener added by `on` or `addListener`.
8621 |    */
8622 |   off(event: 'page', listener: (page: Page) => any): this;
8623 | 
8624 |   /**
8625 |    * Removes an event listener added by `on` or `addListener`.
8626 |    */
8627 |   off(event: 'request', listener: (request: Request) => any): this;
8628 | 
8629 |   /**
8630 |    * Removes an event listener added by `on` or `addListener`.
8631 |    */
8632 |   off(event: 'requestfailed', listener: (request: Request) => any): this;
8633 | 
8634 |   /**
8635 |    * Removes an event listener added by `on` or `addListener`.
8636 |    */
8637 |   off(event: 'requestfinished', listener: (request: Request) => any): this;
8638 | 
8639 |   /**
8640 |    * Removes an event listener added by `on` or `addListener`.
8641 |    */
8642 |   off(event: 'response', listener: (response: Response) => any): this;
8643 | 
8644 |   /**
8645 |    * Removes an event listener added by `on` or `addListener`.
8646 |    */
8647 |   off(event: 'serviceworker', listener: (worker: Worker) => any): this;
8648 | 
8649 |   /**
8650 |    * Removes an event listener added by `on` or `addListener`.
8651 |    */
8652 |   off(event: 'weberror', listener: (webError: WebError) => any): this;
8653 | 
8654 |   /**
8655 |    * This event is not emitted.
8656 |    */
8657 |   prependListener(event: 'backgroundpage', listener: (page: Page) => any): this;
8658 | 
8659 |   /**
8660 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
8661 |    * - Browser context is closed.
8662 |    * - Browser application is closed or crashed.
8663 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
8664 |    */
8665 |   prependListener(event: 'close', listener: (browserContext: BrowserContext) => any): this;
8666 | 
8667 |   /**
8668 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
8669 |    *
8670 |    * The arguments passed into `console.log` and the page are available on the
8671 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
8672 |    *
8673 |    * **Usage**
8674 |    *
8675 |    * ```js
8676 |    * context.on('console', async msg => {
8677 |    *   const values = [];
8678 |    *   for (const arg of msg.args())
8679 |    *     values.push(await arg.jsonValue());
8680 |    *   console.log(...values);
8681 |    * });
8682 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
8683 |    * ```
8684 |    *
8685 |    */
8686 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
8687 | 
8688 |   /**
8689 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
8690 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
8691 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
8692 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
8693 |    * dialog, and actions like click will never finish.
8694 |    *
8695 |    * **Usage**
8696 |    *
8697 |    * ```js
8698 |    * context.on('dialog', dialog => {
8699 |    *   dialog.accept();
8700 |    * });
8701 |    * ```
8702 |    *
8703 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
8704 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
8705 |    * listeners are present, all dialogs are automatically dismissed.
8706 |    *
8707 |    */
8708 |   prependListener(event: 'dialog', listener: (dialog: Dialog) => any): this;
8709 | 
8710 |   /**
8711 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
8712 |    * will also fire for popup pages. See also
8713 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
8714 |    * relevant to a specific page.
8715 |    *
8716 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
8717 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
8718 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
8719 |    * to this network request, use
8720 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8721 |    * and
8722 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
8723 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
8724 |    *
8725 |    * ```js
8726 |    * const newPagePromise = context.waitForEvent('page');
8727 |    * await page.getByText('open new page').click();
8728 |    * const newPage = await newPagePromise;
8729 |    * console.log(await newPage.evaluate('location.href'));
8730 |    * ```
8731 |    *
8732 |    * **NOTE** Use
8733 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
8734 |    * wait until the page gets to a particular state (you should not need it in most cases).
8735 |    *
8736 |    */
8737 |   prependListener(event: 'page', listener: (page: Page) => any): this;
8738 | 
8739 |   /**
8740 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
8741 |    * only listen for requests from a particular page, use
8742 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
8743 |    *
8744 |    * In order to intercept and mutate requests, see
8745 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
8746 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
8747 |    */
8748 |   prependListener(event: 'request', listener: (request: Request) => any): this;
8749 | 
8750 |   /**
8751 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
8752 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
8753 |    *
8754 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
8755 |    * will complete with
8756 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
8757 |    * event and not with
8758 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
8759 |    *
8760 |    */
8761 |   prependListener(event: 'requestfailed', listener: (request: Request) => any): this;
8762 | 
8763 |   /**
8764 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
8765 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
8766 |    * particular page, use
8767 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
8768 |    */
8769 |   prependListener(event: 'requestfinished', listener: (request: Request) => any): this;
8770 | 
8771 |   /**
8772 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
8773 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
8774 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
8775 |    */
8776 |   prependListener(event: 'response', listener: (response: Response) => any): this;
8777 | 
8778 |   /**
8779 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
8780 |    *
8781 |    * Emitted when new service worker is created in the context.
8782 |    */
8783 |   prependListener(event: 'serviceworker', listener: (worker: Worker) => any): this;
8784 | 
8785 |   /**
8786 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
8787 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
8788 |    */
8789 |   prependListener(event: 'weberror', listener: (webError: WebError) => any): this;
8790 | 
8791 |   /**
8792 |    * Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies
8793 |    * can be obtained via
8794 |    * [browserContext.cookies([urls])](https://playwright.dev/docs/api/class-browsercontext#browser-context-cookies).
8795 |    *
8796 |    * **Usage**
8797 |    *
8798 |    * ```js
8799 |    * await browserContext.addCookies([cookieObject1, cookieObject2]);
8800 |    * ```
8801 |    *
8802 |    * @param cookies
8803 |    */
8804 |   addCookies(cookies: ReadonlyArray<{
8805 |     name: string;
8806 | 
8807 |     value: string;
8808 | 
8809 |     /**
8810 |      * Either `url` or both `domain` and `path` are required. Optional.
8811 |      */
8812 |     url?: string;
8813 | 
8814 |     /**
8815 |      * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either
8816 |      * `url` or both `domain` and `path` are required. Optional.
8817 |      */
8818 |     domain?: string;
8819 | 
8820 |     /**
8821 |      * Either `url` or both `domain` and `path` are required. Optional.
8822 |      */
8823 |     path?: string;
8824 | 
8825 |     /**
8826 |      * Unix time in seconds. Optional.
8827 |      */
8828 |     expires?: number;
8829 | 
8830 |     /**
8831 |      * Optional.
8832 |      */
8833 |     httpOnly?: boolean;
8834 | 
8835 |     /**
8836 |      * Optional.
8837 |      */
8838 |     secure?: boolean;
8839 | 
8840 |     /**
8841 |      * Optional.
8842 |      */
8843 |     sameSite?: "Strict"|"Lax"|"None";
8844 | 
8845 |     /**
8846 |      * For partitioned third-party cookies (aka
8847 |      * [CHIPS](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies)), the
8848 |      * partition key. Optional.
8849 |      */
8850 |     partitionKey?: string;
8851 |   }>): Promise<void>;
8852 | 
8853 |   /**
8854 |    * Returns an empty list.
8855 |    * @deprecated Background pages have been removed from Chromium together with Manifest V2 extensions.
8856 |    */
8857 |   backgroundPages(): Array<Page>;
8858 | 
8859 |   /**
8860 |    * Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal
8861 |    * browser, e.g. Android or Electron.
8862 |    */
8863 |   browser(): null|Browser;
8864 | 
8865 |   /**
8866 |    * Removes cookies from context. Accepts optional filter.
8867 |    *
8868 |    * **Usage**
8869 |    *
8870 |    * ```js
8871 |    * await context.clearCookies();
8872 |    * await context.clearCookies({ name: 'session-id' });
8873 |    * await context.clearCookies({ domain: 'my-origin.com' });
8874 |    * await context.clearCookies({ domain: /.*my-origin\.com/ });
8875 |    * await context.clearCookies({ path: '/api/v1' });
8876 |    * await context.clearCookies({ name: 'session-id', domain: 'my-origin.com' });
8877 |    * ```
8878 |    *
8879 |    * @param options
8880 |    */
8881 |   clearCookies(options?: {
8882 |     /**
8883 |      * Only removes cookies with the given domain.
8884 |      */
8885 |     domain?: string|RegExp;
8886 | 
8887 |     /**
8888 |      * Only removes cookies with the given name.
8889 |      */
8890 |     name?: string|RegExp;
8891 | 
8892 |     /**
8893 |      * Only removes cookies with the given path.
8894 |      */
8895 |     path?: string|RegExp;
8896 |   }): Promise<void>;
8897 | 
8898 |   /**
8899 |    * Clears all permission overrides for the browser context.
8900 |    *
8901 |    * **Usage**
8902 |    *
8903 |    * ```js
8904 |    * const context = await browser.newContext();
8905 |    * await context.grantPermissions(['clipboard-read']);
8906 |    * // do stuff ..
8907 |    * context.clearPermissions();
8908 |    * ```
8909 |    *
8910 |    */
8911 |   clearPermissions(): Promise<void>;
8912 | 
8913 |   /**
8914 |    * Closes the browser context. All the pages that belong to the browser context will be closed.
8915 |    *
8916 |    * **NOTE** The default browser context cannot be closed.
8917 |    *
8918 |    * @param options
8919 |    */
8920 |   close(options?: {
8921 |     /**
8922 |      * The reason to be reported to the operations interrupted by the context closure.
8923 |      */
8924 |     reason?: string;
8925 |   }): Promise<void>;
8926 | 
8927 |   /**
8928 |    * If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those
8929 |    * URLs are returned.
8930 |    * @param urls Optional list of URLs.
8931 |    */
8932 |   cookies(urls?: string|ReadonlyArray<string>): Promise<Array<Cookie>>;
8933 | 
8934 |   /**
8935 |    * The method adds a function called
8936 |    * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-name) on the
8937 |    * `window` object of every frame in every page in the context. When called, the function executes
8938 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
8939 |    * and returns a [Promise] which resolves to the return value of
8940 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback).
8941 |    *
8942 |    * If the
8943 |    * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
8944 |    * returns a [Promise], it will be awaited.
8945 |    *
8946 |    * See [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) for
8947 |    * page-only version.
8948 |    *
8949 |    * **Usage**
8950 |    *
8951 |    * An example of adding a `sha256` function to all pages in the context:
8952 |    *
8953 |    * ```js
8954 |    * const { webkit } = require('playwright');  // Or 'chromium' or 'firefox'.
8955 |    * const crypto = require('crypto');
8956 |    *
8957 |    * (async () => {
8958 |    *   const browser = await webkit.launch({ headless: false });
8959 |    *   const context = await browser.newContext();
8960 |    *   await context.exposeFunction('sha256', text =>
8961 |    *     crypto.createHash('sha256').update(text).digest('hex'),
8962 |    *   );
8963 |    *   const page = await context.newPage();
8964 |    *   await page.setContent(`
8965 |    *     <script>
8966 |    *       async function onClick() {
8967 |    *         document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');
8968 |    *       }
8969 |    *     </script>
8970 |    *     <button onclick="onClick()">Click me</button>
8971 |    *     <div></div>
8972 |    *   `);
8973 |    *   await page.getByRole('button').click();
8974 |    * })();
8975 |    * ```
8976 |    *
8977 |    * @param name Name of the function on the window object.
8978 |    * @param callback Callback function that will be called in the Playwright's context.
8979 |    */
8980 |   exposeFunction(name: string, callback: Function): Promise<void>;
8981 | 
8982 |   /**
8983 |    * Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if
8984 |    * specified.
8985 |    * @param permissions A list of permissions to grant.
8986 |    *
8987 |    * **NOTE** Supported permissions differ between browsers, and even between different versions of the same browser.
8988 |    * Any permission may stop working after an update.
8989 |    *
8990 |    * Here are some permissions that may be supported by some browsers:
8991 |    * - `'accelerometer'`
8992 |    * - `'ambient-light-sensor'`
8993 |    * - `'background-sync'`
8994 |    * - `'camera'`
8995 |    * - `'clipboard-read'`
8996 |    * - `'clipboard-write'`
8997 |    * - `'geolocation'`
8998 |    * - `'gyroscope'`
8999 |    * - `'local-fonts'`
9000 |    * - `'local-network-access'`
9001 |    * - `'magnetometer'`
9002 |    * - `'microphone'`
9003 |    * - `'midi-sysex'` (system-exclusive midi)
9004 |    * - `'midi'`
9005 |    * - `'notifications'`
9006 |    * - `'payment-handler'`
9007 |    * - `'storage-access'`
9008 |    * @param options
9009 |    */
9010 |   grantPermissions(permissions: ReadonlyArray<string>, options?: {
9011 |     /**
9012 |      * The [origin] to grant permissions to, e.g. "https://example.com".
9013 |      */
9014 |     origin?: string;
9015 |   }): Promise<void>;
9016 | 
9017 |   /**
9018 |    * **NOTE** CDP sessions are only supported on Chromium-based browsers.
9019 |    *
9020 |    * Returns the newly created session.
9021 |    * @param page Target to create new session for. For backwards-compatibility, this parameter is named `page`, but it can be a
9022 |    * `Page` or `Frame` type.
9023 |    */
9024 |   newCDPSession(page: Page|Frame): Promise<CDPSession>;
9025 | 
9026 |   /**
9027 |    * Creates a new page in the browser context.
9028 |    */
9029 |   newPage(): Promise<Page>;
9030 | 
9031 |   /**
9032 |    * Returns all open pages in the context.
9033 |    */
9034 |   pages(): Array<Page>;
9035 | 
9036 |   /**
9037 |    * Routing provides the capability to modify network requests that are made by any page in the browser context. Once
9038 |    * route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.
9039 |    *
9040 |    * **NOTE**
9041 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9042 |    * will not intercept requests intercepted by Service Worker. See
9043 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
9044 |    * using request interception by setting
9045 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
9046 |    * `'block'`.
9047 |    *
9048 |    * **Usage**
9049 |    *
9050 |    * An example of a naive handler that aborts all image requests:
9051 |    *
9052 |    * ```js
9053 |    * const context = await browser.newContext();
9054 |    * await context.route('**\/*.{png,jpg,jpeg}', route => route.abort());
9055 |    * const page = await context.newPage();
9056 |    * await page.goto('https://example.com');
9057 |    * await browser.close();
9058 |    * ```
9059 |    *
9060 |    * or the same snippet using a regex pattern instead:
9061 |    *
9062 |    * ```js
9063 |    * const context = await browser.newContext();
9064 |    * await context.route(/(\.png$)|(\.jpg$)/, route => route.abort());
9065 |    * const page = await context.newPage();
9066 |    * await page.goto('https://example.com');
9067 |    * await browser.close();
9068 |    * ```
9069 |    *
9070 |    * It is possible to examine the request to decide the route action. For example, mocking all requests that contain
9071 |    * some post data, and leaving all other requests as is:
9072 |    *
9073 |    * ```js
9074 |    * await context.route('/api/**', async route => {
9075 |    *   if (route.request().postData().includes('my-string'))
9076 |    *     await route.fulfill({ body: 'mocked-data' });
9077 |    *   else
9078 |    *     await route.continue();
9079 |    * });
9080 |    * ```
9081 |    *
9082 |    * Page routes (set up with
9083 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route)) take precedence over
9084 |    * browser context routes when request matches both handlers.
9085 |    *
9086 |    * To remove a route with its handler you can use
9087 |    * [browserContext.unroute(url[, handler])](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute).
9088 |    *
9089 |    * **NOTE** Enabling routing disables http cache.
9090 |    *
9091 |    * @param url A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If
9092 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) is set in the
9093 |    * context options and the provided URL is a string that does not start with `*`, it is resolved using the
9094 |    * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
9095 |    * @param handler handler function to route the request.
9096 |    * @param options
9097 |    */
9098 |   route(url: string|RegExp|((url: URL) => boolean), handler: ((route: Route, request: Request) => Promise<any>|any), options?: {
9099 |     /**
9100 |      * How often a route should be used. By default it will be used every time.
9101 |      */
9102 |     times?: number;
9103 |   }): Promise<void>;
9104 | 
9105 |   /**
9106 |    * If specified the network requests that are made in the context will be served from the HAR file. Read more about
9107 |    * [Replaying from HAR](https://playwright.dev/docs/mock#replaying-from-har).
9108 |    *
9109 |    * Playwright will not serve requests intercepted by Service Worker from the HAR file. See
9110 |    * [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
9111 |    * using request interception by setting
9112 |    * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
9113 |    * `'block'`.
9114 |    * @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
9115 |    * relative path, then it is resolved relative to the current working directory.
9116 |    * @param options
9117 |    */
9118 |   routeFromHAR(har: string, options?: {
9119 |     /**
9120 |      * - If set to 'abort' any request not found in the HAR file will be aborted.
9121 |      * - If set to 'fallback' falls through to the next route handler in the handler chain.
9122 |      *
9123 |      * Defaults to abort.
9124 |      */
9125 |     notFound?: "abort"|"fallback";
9126 | 
9127 |     /**
9128 |      * If specified, updates the given HAR with the actual network information instead of serving from file. The file is
9129 |      * written to disk when
9130 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) is
9131 |      * called.
9132 |      */
9133 |     update?: boolean;
9134 | 
9135 |     /**
9136 |      * Optional setting to control resource content management. If `attach` is specified, resources are persisted as
9137 |      * separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file.
9138 |      */
9139 |     updateContent?: "embed"|"attach";
9140 | 
9141 |     /**
9142 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
9143 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to
9144 |      * `minimal`.
9145 |      */
9146 |     updateMode?: "full"|"minimal";
9147 | 
9148 |     /**
9149 |      * A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the
9150 |      * pattern will be served from the HAR file. If not specified, all requests are served from the HAR file.
9151 |      */
9152 |     url?: string|RegExp;
9153 |   }): Promise<void>;
9154 | 
9155 |   /**
9156 |    * This method allows to modify websocket connections that are made by any page in the browser context.
9157 |    *
9158 |    * Note that only `WebSocket`s created after this method was called will be routed. It is recommended to call this
9159 |    * method before creating any pages.
9160 |    *
9161 |    * **Usage**
9162 |    *
9163 |    * Below is an example of a simple handler that blocks some websocket messages. See
9164 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
9165 |    *
9166 |    * ```js
9167 |    * await context.routeWebSocket('/ws', async ws => {
9168 |    *   ws.routeSend(message => {
9169 |    *     if (message === 'to-be-blocked')
9170 |    *       return;
9171 |    *     ws.send(message);
9172 |    *   });
9173 |    *   await ws.connect();
9174 |    * });
9175 |    * ```
9176 |    *
9177 |    * @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
9178 |    * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
9179 |    * @param handler Handler function to route the WebSocket.
9180 |    */
9181 |   routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
9182 | 
9183 |   /**
9184 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
9185 |    *
9186 |    * All existing service workers in the context.
9187 |    */
9188 |   serviceWorkers(): Array<Worker>;
9189 | 
9190 |   /**
9191 |    * This setting will change the default maximum navigation time for the following methods and related shortcuts:
9192 |    * - [page.goBack([options])](https://playwright.dev/docs/api/class-page#page-go-back)
9193 |    * - [page.goForward([options])](https://playwright.dev/docs/api/class-page#page-go-forward)
9194 |    * - [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto)
9195 |    * - [page.reload([options])](https://playwright.dev/docs/api/class-page#page-reload)
9196 |    * - [page.setContent(html[, options])](https://playwright.dev/docs/api/class-page#page-set-content)
9197 |    * - [page.waitForNavigation([options])](https://playwright.dev/docs/api/class-page#page-wait-for-navigation)
9198 |    *
9199 |    * **NOTE**
9200 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
9201 |    * and [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) take
9202 |    * priority over
9203 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout).
9204 |    *
9205 |    * @param timeout Maximum navigation time in milliseconds
9206 |    */
9207 |   setDefaultNavigationTimeout(timeout: number): void;
9208 | 
9209 |   /**
9210 |    * This setting will change the default maximum time for all the methods accepting
9211 |    * [`timeout`](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout-option-timeout)
9212 |    * option.
9213 |    *
9214 |    * **NOTE**
9215 |    * [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout),
9216 |    * [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) and
9217 |    * [browserContext.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout)
9218 |    * take priority over
9219 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout).
9220 |    *
9221 |    * @param timeout Maximum time in milliseconds. Pass `0` to disable timeout.
9222 |    */
9223 |   setDefaultTimeout(timeout: number): void;
9224 | 
9225 |   /**
9226 |    * The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are
9227 |    * merged with page-specific extra HTTP headers set with
9228 |    * [page.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-page#page-set-extra-http-headers). If
9229 |    * page overrides a particular header, page-specific header value will be used instead of the browser context header
9230 |    * value.
9231 |    *
9232 |    * **NOTE**
9233 |    * [browserContext.setExtraHTTPHeaders(headers)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-extra-http-headers)
9234 |    * does not guarantee the order of headers in the outgoing requests.
9235 |    *
9236 |    * @param headers An object containing additional HTTP headers to be sent with every request. All header values must be strings.
9237 |    */
9238 |   setExtraHTTPHeaders(headers: { [key: string]: string; }): Promise<void>;
9239 | 
9240 |   /**
9241 |    * Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable.
9242 |    *
9243 |    * **Usage**
9244 |    *
9245 |    * ```js
9246 |    * await browserContext.setGeolocation({ latitude: 59.95, longitude: 30.31667 });
9247 |    * ```
9248 |    *
9249 |    * **NOTE** Consider using
9250 |    * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
9251 |    * to grant permissions for the browser context pages to read its geolocation.
9252 |    *
9253 |    * @param geolocation
9254 |    */
9255 |   setGeolocation(geolocation: null|{
9256 |     /**
9257 |      * Latitude between -90 and 90.
9258 |      */
9259 |     latitude: number;
9260 | 
9261 |     /**
9262 |      * Longitude between -180 and 180.
9263 |      */
9264 |     longitude: number;
9265 | 
9266 |     /**
9267 |      * Non-negative accuracy value. Defaults to `0`.
9268 |      */
9269 |     accuracy?: number;
9270 |   }): Promise<void>;
9271 | 
9272 |   /**
9273 |    * @deprecated Browsers may cache credentials after successful authentication. Create a new browser context instead.
9274 |    * @param httpCredentials
9275 |    */
9276 |   setHTTPCredentials(httpCredentials: null|{
9277 |     username: string;
9278 | 
9279 |     password: string;
9280 |   }): Promise<void>;
9281 | 
9282 |   /**
9283 |    * @param offline Whether to emulate network being offline for the browser context.
9284 |    */
9285 |   setOffline(offline: boolean): Promise<void>;
9286 | 
9287 |   /**
9288 |    * Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB
9289 |    * snapshot.
9290 |    * @param options
9291 |    */
9292 |   storageState(options?: {
9293 |     /**
9294 |      * Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage
9295 |      * state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication,
9296 |      * enable this.
9297 |      */
9298 |     indexedDB?: boolean;
9299 | 
9300 |     /**
9301 |      * The file path to save the storage state to. If
9302 |      * [`path`](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-path) is a
9303 |      * relative path, then it is resolved relative to current working directory. If no path is provided, storage state is
9304 |      * still returned, but won't be saved to the disk.
9305 |      */
9306 |     path?: string;
9307 |   }): Promise<{
9308 |     cookies: Array<{
9309 |       name: string;
9310 | 
9311 |       value: string;
9312 | 
9313 |       domain: string;
9314 | 
9315 |       path: string;
9316 | 
9317 |       /**
9318 |        * Unix time in seconds.
9319 |        */
9320 |       expires: number;
9321 | 
9322 |       httpOnly: boolean;
9323 | 
9324 |       secure: boolean;
9325 | 
9326 |       sameSite: "Strict"|"Lax"|"None";
9327 |     }>;
9328 | 
9329 |     origins: Array<{
9330 |       origin: string;
9331 | 
9332 |       localStorage: Array<{
9333 |         name: string;
9334 | 
9335 |         value: string;
9336 |       }>;
9337 |     }>;
9338 |   }>;
9339 | 
9340 |   /**
9341 |    * Removes a route created with
9342 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9343 |    * When [`handler`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-handler) is
9344 |    * not specified, removes all routes for the
9345 |    * [`url`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-url).
9346 |    * @param url A glob pattern, regex pattern or predicate receiving [URL] used to register a routing with
9347 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9348 |    * @param handler Optional handler function used to register a routing with
9349 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
9350 |    */
9351 |   unroute(url: string|RegExp|((url: URL) => boolean), handler?: ((route: Route, request: Request) => Promise<any>|any)): Promise<void>;
9352 | 
9353 |   /**
9354 |    * Removes all routes created with
9355 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9356 |    * and
9357 |    * [browserContext.routeFromHAR(har[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-from-har).
9358 |    * @param options
9359 |    */
9360 |   unrouteAll(options?: {
9361 |     /**
9362 |      * Specifies whether to wait for already running handlers and what to do if they throw errors:
9363 |      * - `'default'` - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may
9364 |      *   result in unhandled error
9365 |      * - `'wait'` - wait for current handler calls (if any) to finish
9366 |      * - `'ignoreErrors'` - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers
9367 |      *   after unrouting are silently caught
9368 |      */
9369 |     behavior?: "wait"|"ignoreErrors"|"default";
9370 |   }): Promise<void>;
9371 | 
9372 |   /**
9373 |    * This event is not emitted.
9374 |    */
9375 |   waitForEvent(event: 'backgroundpage', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9376 | 
9377 |   /**
9378 |    * Emitted when Browser context gets closed. This might happen because of one of the following:
9379 |    * - Browser context is closed.
9380 |    * - Browser application is closed or crashed.
9381 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9382 |    */
9383 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (browserContext: BrowserContext) => boolean | Promise<boolean>, timeout?: number } | ((browserContext: BrowserContext) => boolean | Promise<boolean>)): Promise<BrowserContext>;
9384 | 
9385 |   /**
9386 |    * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
9387 |    *
9388 |    * The arguments passed into `console.log` and the page are available on the
9389 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
9390 |    *
9391 |    * **Usage**
9392 |    *
9393 |    * ```js
9394 |    * context.on('console', async msg => {
9395 |    *   const values = [];
9396 |    *   for (const arg of msg.args())
9397 |    *     values.push(await arg.jsonValue());
9398 |    *   console.log(...values);
9399 |    * });
9400 |    * await page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
9401 |    * ```
9402 |    *
9403 |    */
9404 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
9405 | 
9406 |   /**
9407 |    * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
9408 |    * either [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
9409 |    * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
9410 |    * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
9411 |    * dialog, and actions like click will never finish.
9412 |    *
9413 |    * **Usage**
9414 |    *
9415 |    * ```js
9416 |    * context.on('dialog', dialog => {
9417 |    *   dialog.accept();
9418 |    * });
9419 |    * ```
9420 |    *
9421 |    * **NOTE** When no [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) or
9422 |    * [browserContext.on('dialog')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-dialog)
9423 |    * listeners are present, all dialogs are automatically dismissed.
9424 |    *
9425 |    */
9426 |   waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
9427 | 
9428 |   /**
9429 |    * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
9430 |    * will also fire for popup pages. See also
9431 |    * [page.on('popup')](https://playwright.dev/docs/api/class-page#page-event-popup) to receive events about popups
9432 |    * relevant to a specific page.
9433 |    *
9434 |    * The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a
9435 |    * popup with `window.open('http://example.com')`, this event will fire when the network request to
9436 |    * "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen
9437 |    * to this network request, use
9438 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9439 |    * and
9440 |    * [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
9441 |    * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
9442 |    *
9443 |    * ```js
9444 |    * const newPagePromise = context.waitForEvent('page');
9445 |    * await page.getByText('open new page').click();
9446 |    * const newPage = await newPagePromise;
9447 |    * console.log(await newPage.evaluate('location.href'));
9448 |    * ```
9449 |    *
9450 |    * **NOTE** Use
9451 |    * [page.waitForLoadState([state, options])](https://playwright.dev/docs/api/class-page#page-wait-for-load-state) to
9452 |    * wait until the page gets to a particular state (you should not need it in most cases).
9453 |    *
9454 |    */
9455 |   waitForEvent(event: 'page', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9456 | 
9457 |   /**
9458 |    * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
9459 |    * only listen for requests from a particular page, use
9460 |    * [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request).
9461 |    *
9462 |    * In order to intercept and mutate requests, see
9463 |    * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9464 |    * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
9465 |    */
9466 |   waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9467 | 
9468 |   /**
9469 |    * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
9470 |    * use [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed).
9471 |    *
9472 |    * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
9473 |    * will complete with
9474 |    * [browserContext.on('requestfinished')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-finished)
9475 |    * event and not with
9476 |    * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
9477 |    *
9478 |    */
9479 |   waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9480 | 
9481 |   /**
9482 |    * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
9483 |    * sequence of events is `request`, `response` and `requestfinished`. To listen for successful requests from a
9484 |    * particular page, use
9485 |    * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
9486 |    */
9487 |   waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9488 | 
9489 |   /**
9490 |    * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
9491 |    * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
9492 |    * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
9493 |    */
9494 |   waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
9495 | 
9496 |   /**
9497 |    * **NOTE** Service workers are only supported on Chromium-based browsers.
9498 |    *
9499 |    * Emitted when new service worker is created in the context.
9500 |    */
9501 |   waitForEvent(event: 'serviceworker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
9502 | 
9503 |   /**
9504 |    * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
9505 |    * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
9506 |    */
9507 |   waitForEvent(event: 'weberror', optionsOrPredicate?: { predicate?: (webError: WebError) => boolean | Promise<boolean>, timeout?: number } | ((webError: WebError) => boolean | Promise<boolean>)): Promise<WebError>;
9508 | 
9509 | 
9510 |   /**
9511 |    * Playwright has ability to mock clock and passage of time.
9512 |    */
9513 |   clock: Clock;
9514 | 
9515 |   /**
9516 |    * API testing helper associated with this context. Requests made with this API will use context cookies.
9517 |    */
9518 |   request: APIRequestContext;
9519 | 
9520 |   tracing: Tracing;
9521 | 
9522 |   [Symbol.asyncDispose](): Promise<void>;
9523 | }
9524 | 
9525 | /**
9526 |  * A Browser is created via
9527 |  * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). An example
9528 |  * of using a [Browser](https://playwright.dev/docs/api/class-browser) to create a
9529 |  * [Page](https://playwright.dev/docs/api/class-page):
9530 |  *
9531 |  * ```js
9532 |  * const { firefox } = require('playwright');  // Or 'chromium' or 'webkit'.
9533 |  *
9534 |  * (async () => {
9535 |  *   const browser = await firefox.launch();
9536 |  *   const page = await browser.newPage();
9537 |  *   await page.goto('https://example.com');
9538 |  *   await browser.close();
9539 |  * })();
9540 |  * ```
9541 |  *
9542 |  */
9543 | export interface Browser {
9544 |   /**
9545 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
9546 |    * async listeners to complete or to ignore subsequent errors from these listeners.
9547 |    * @param type
9548 |    * @param options
9549 |    */
9550 |   removeAllListeners(type?: string): this;
9551 |   /**
9552 |    * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
9553 |    * async listeners to complete or to ignore subsequent errors from these listeners.
9554 |    * @param type
9555 |    * @param options
9556 |    */
9557 |   removeAllListeners(type: string | undefined, options: {
9558 |     /**
9559 |      * Specifies whether to wait for already running listeners and what to do if they throw errors:
9560 |      * - `'default'` - do not wait for current listener calls (if any) to finish, if the listener throws, it may result in unhandled error
9561 |      * - `'wait'` - wait for current listener calls (if any) to finish
9562 |      * - `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
9563 |      */
9564 |     behavior?: 'wait'|'ignoreErrors'|'default'
9565 |   }): Promise<void>;
9566 |   /**
9567 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9568 |    * following:
9569 |    * - Browser application is closed or crashed.
9570 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9571 |    */
9572 |   on(event: 'disconnected', listener: (browser: Browser) => any): this;
9573 | 
9574 |   /**
9575 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
9576 |    */
9577 |   once(event: 'disconnected', listener: (browser: Browser) => any): this;
9578 | 
9579 |   /**
9580 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9581 |    * following:
9582 |    * - Browser application is closed or crashed.
9583 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9584 |    */
9585 |   addListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9586 | 
9587 |   /**
9588 |    * Removes an event listener added by `on` or `addListener`.
9589 |    */
9590 |   removeListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9591 | 
9592 |   /**
9593 |    * Removes an event listener added by `on` or `addListener`.
9594 |    */
9595 |   off(event: 'disconnected', listener: (browser: Browser) => any): this;
9596 | 
9597 |   /**
9598 |    * Emitted when Browser gets disconnected from the browser application. This might happen because of one of the
9599 |    * following:
9600 |    * - Browser application is closed or crashed.
9601 |    * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9602 |    */
9603 |   prependListener(event: 'disconnected', listener: (browser: Browser) => any): this;
9604 | 
9605 |   /**
9606 |    * Get the browser type (chromium, firefox or webkit) that the browser belongs to.
9607 |    */
9608 |   browserType(): BrowserType;
9609 | 
9610 |   /**
9611 |    * In case this browser is obtained using
9612 |    * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch), closes the
9613 |    * browser and all of its pages (if any were opened).
9614 |    *
9615 |    * In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from
9616 |    * the browser server.
9617 |    *
9618 |    * **NOTE** This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close
9619 |    * events, call
9620 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on
9621 |    * any [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) instances you explicitly created earlier
9622 |    * using [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
9623 |    * calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close).
9624 |    *
9625 |    * The [Browser](https://playwright.dev/docs/api/class-browser) object itself is considered to be disposed and cannot
9626 |    * be used anymore.
9627 |    * @param options
9628 |    */
9629 |   close(options?: {
9630 |     /**
9631 |      * The reason to be reported to the operations interrupted by the browser closure.
9632 |      */
9633 |     reason?: string;
9634 |   }): Promise<void>;
9635 | 
9636 |   /**
9637 |    * Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.
9638 |    *
9639 |    * **Usage**
9640 |    *
9641 |    * ```js
9642 |    * const browser = await pw.webkit.launch();
9643 |    * console.log(browser.contexts().length); // prints `0`
9644 |    *
9645 |    * const context = await browser.newContext();
9646 |    * console.log(browser.contexts().length); // prints `1`
9647 |    * ```
9648 |    *
9649 |    */
9650 |   contexts(): Array<BrowserContext>;
9651 | 
9652 |   /**
9653 |    * Indicates that the browser is connected.
9654 |    */
9655 |   isConnected(): boolean;
9656 | 
9657 |   /**
9658 |    * **NOTE** CDP Sessions are only supported on Chromium-based browsers.
9659 |    *
9660 |    * Returns the newly created browser session.
9661 |    */
9662 |   newBrowserCDPSession(): Promise<CDPSession>;
9663 | 
9664 |   /**
9665 |    * Creates a new browser context. It won't share cookies/cache with other browser contexts.
9666 |    *
9667 |    * **NOTE** If directly using this method to create
9668 |    * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)s, it is best practice to explicitly close
9669 |    * the returned context via
9670 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) when
9671 |    * your code is done with the [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), and before
9672 |    * calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close). This will ensure
9673 |    * the `context` is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved.
9674 |    *
9675 |    * **Usage**
9676 |    *
9677 |    * ```js
9678 |    * (async () => {
9679 |    *   const browser = await playwright.firefox.launch();  // Or 'chromium' or 'webkit'.
9680 |    *   // Create a new incognito browser context.
9681 |    *   const context = await browser.newContext();
9682 |    *   // Create a new page in a pristine context.
9683 |    *   const page = await context.newPage();
9684 |    *   await page.goto('https://example.com');
9685 |    *
9686 |    *   // Gracefully close up everything
9687 |    *   await context.close();
9688 |    *   await browser.close();
9689 |    * })();
9690 |    * ```
9691 |    *
9692 |    * @param options
9693 |    */
9694 |   newContext(options?: BrowserContextOptions): Promise<BrowserContext>;
9695 | 
9696 |   /**
9697 |    * Creates a new page in a new browser context. Closing this page will close the context as well.
9698 |    *
9699 |    * This is a convenience API that should only be used for the single-page scenarios and short snippets. Production
9700 |    * code and testing frameworks should explicitly create
9701 |    * [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) followed by the
9702 |    * [browserContext.newPage()](https://playwright.dev/docs/api/class-browsercontext#browser-context-new-page) to
9703 |    * control their exact life times.
9704 |    * @param options
9705 |    */
9706 |   newPage(options?: {
9707 |     /**
9708 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
9709 |      */
9710 |     acceptDownloads?: boolean;
9711 | 
9712 |     /**
9713 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
9714 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
9715 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
9716 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
9717 |      * or
9718 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
9719 |      * it takes the base URL in consideration by using the
9720 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
9721 |      * Unset by default. Examples:
9722 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
9723 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
9724 |      *   `http://localhost:3000/foo/bar.html`
9725 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
9726 |      *   `http://localhost:3000/bar.html`
9727 |      */
9728 |     baseURL?: string;
9729 | 
9730 |     /**
9731 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
9732 |      */
9733 |     bypassCSP?: boolean;
9734 | 
9735 |     /**
9736 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
9737 |      *
9738 |      * **Details**
9739 |      *
9740 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
9741 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
9742 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
9743 |      * with an exact match to the request origin that the certificate is valid for.
9744 |      *
9745 |      * Client certificate authentication is only active when at least one client certificate is provided. If you want to
9746 |      * reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
9747 |      * does not match any of the domains you plan to visit.
9748 |      *
9749 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
9750 |      * work by replacing `localhost` with `local.playwright`.
9751 |      *
9752 |      */
9753 |     clientCertificates?: Array<{
9754 |       /**
9755 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
9756 |        */
9757 |       origin: string;
9758 | 
9759 |       /**
9760 |        * Path to the file with the certificate in PEM format.
9761 |        */
9762 |       certPath?: string;
9763 | 
9764 |       /**
9765 |        * Direct value of the certificate in PEM format.
9766 |        */
9767 |       cert?: Buffer;
9768 | 
9769 |       /**
9770 |        * Path to the file with the private key in PEM format.
9771 |        */
9772 |       keyPath?: string;
9773 | 
9774 |       /**
9775 |        * Direct value of the private key in PEM format.
9776 |        */
9777 |       key?: Buffer;
9778 | 
9779 |       /**
9780 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
9781 |        */
9782 |       pfxPath?: string;
9783 | 
9784 |       /**
9785 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
9786 |        */
9787 |       pfx?: Buffer;
9788 | 
9789 |       /**
9790 |        * Passphrase for the private key (PEM or PFX).
9791 |        */
9792 |       passphrase?: string;
9793 |     }>;
9794 | 
9795 |     /**
9796 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
9797 |      * media feature, supported values are `'light'` and `'dark'`. See
9798 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9799 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
9800 |      */
9801 |     colorScheme?: null|"light"|"dark"|"no-preference";
9802 | 
9803 |     /**
9804 |      * Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
9805 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9806 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
9807 |      */
9808 |     contrast?: null|"no-preference"|"more";
9809 | 
9810 |     /**
9811 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
9812 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
9813 |      */
9814 |     deviceScaleFactor?: number;
9815 | 
9816 |     /**
9817 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
9818 |      */
9819 |     extraHTTPHeaders?: { [key: string]: string; };
9820 | 
9821 |     /**
9822 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
9823 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
9824 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
9825 |      */
9826 |     forcedColors?: null|"active"|"none";
9827 | 
9828 |     geolocation?: {
9829 |       /**
9830 |        * Latitude between -90 and 90.
9831 |        */
9832 |       latitude: number;
9833 | 
9834 |       /**
9835 |        * Longitude between -180 and 180.
9836 |        */
9837 |       longitude: number;
9838 | 
9839 |       /**
9840 |        * Non-negative accuracy value. Defaults to `0`.
9841 |        */
9842 |       accuracy?: number;
9843 |     };
9844 | 
9845 |     /**
9846 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
9847 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
9848 |      */
9849 |     hasTouch?: boolean;
9850 | 
9851 |     /**
9852 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
9853 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
9854 |      */
9855 |     httpCredentials?: {
9856 |       username: string;
9857 | 
9858 |       password: string;
9859 | 
9860 |       /**
9861 |        * Restrain sending http credentials on specific origin (scheme://host:port).
9862 |        */
9863 |       origin?: string;
9864 | 
9865 |       /**
9866 |        * This option only applies to the requests sent from corresponding
9867 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
9868 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
9869 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
9870 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
9871 |        */
9872 |       send?: "unauthorized"|"always";
9873 |     };
9874 | 
9875 |     /**
9876 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
9877 |      */
9878 |     ignoreHTTPSErrors?: boolean;
9879 | 
9880 |     /**
9881 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
9882 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
9883 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
9884 |      */
9885 |     isMobile?: boolean;
9886 | 
9887 |     /**
9888 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
9889 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
9890 |      */
9891 |     javaScriptEnabled?: boolean;
9892 | 
9893 |     /**
9894 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
9895 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
9896 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
9897 |      */
9898 |     locale?: string;
9899 | 
9900 |     /**
9901 |      * Logger sink for Playwright logging.
9902 |      * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
9903 |      */
9904 |     logger?: Logger;
9905 | 
9906 |     /**
9907 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
9908 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
9909 |      */
9910 |     offline?: boolean;
9911 | 
9912 |     /**
9913 |      * A list of permissions to grant to all pages in this context. See
9914 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
9915 |      * for more details. Defaults to none.
9916 |      */
9917 |     permissions?: Array<string>;
9918 | 
9919 |     /**
9920 |      * Network proxy settings to use with this context. Defaults to none.
9921 |      */
9922 |     proxy?: {
9923 |       /**
9924 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
9925 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
9926 |        */
9927 |       server: string;
9928 | 
9929 |       /**
9930 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
9931 |        */
9932 |       bypass?: string;
9933 | 
9934 |       /**
9935 |        * Optional username to use if HTTP proxy requires authentication.
9936 |        */
9937 |       username?: string;
9938 | 
9939 |       /**
9940 |        * Optional password to use if HTTP proxy requires authentication.
9941 |        */
9942 |       password?: string;
9943 |     };
9944 | 
9945 |     /**
9946 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
9947 |      * If not specified, the HAR is not recorded. Make sure to await
9948 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
9949 |      * the HAR to be saved.
9950 |      */
9951 |     recordHar?: {
9952 |       /**
9953 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
9954 |        * `content` policy instead.
9955 |        */
9956 |       omitContent?: boolean;
9957 | 
9958 |       /**
9959 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
9960 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
9961 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
9962 |        * files and to `embed` for all other file extensions.
9963 |        */
9964 |       content?: "omit"|"embed"|"attach";
9965 | 
9966 |       /**
9967 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
9968 |        * default.
9969 |        */
9970 |       path: string;
9971 | 
9972 |       /**
9973 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
9974 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
9975 |        */
9976 |       mode?: "full"|"minimal";
9977 | 
9978 |       /**
9979 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
9980 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
9981 |        * options was provided and the passed URL is a path, it gets merged via the
9982 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
9983 |        */
9984 |       urlFilter?: string|RegExp;
9985 |     };
9986 | 
9987 |     /**
9988 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
9989 |      * Make sure to await
9990 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
9991 |      * videos to be saved.
9992 |      */
9993 |     recordVideo?: {
9994 |       /**
9995 |        * Path to the directory to put videos into.
9996 |        */
9997 |       dir: string;
9998 | 
9999 |       /**
10000 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
10001 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
10002 |        * each page will be scaled down if necessary to fit the specified size.
10003 |        */
10004 |       size?: {
10005 |         /**
10006 |          * Video frame width.
10007 |          */
10008 |         width: number;
10009 | 
10010 |         /**
10011 |          * Video frame height.
10012 |          */
10013 |         height: number;
10014 |       };
10015 |     };
10016 | 
10017 |     /**
10018 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
10019 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
10020 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
10021 |      */
10022 |     reducedMotion?: null|"reduce"|"no-preference";
10023 | 
10024 |     /**
10025 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
10026 |      * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-viewport) is set.
10027 |      */
10028 |     screen?: {
10029 |       /**
10030 |        * page width in pixels.
10031 |        */
10032 |       width: number;
10033 | 
10034 |       /**
10035 |        * page height in pixels.
10036 |        */
10037 |       height: number;
10038 |     };
10039 | 
10040 |     /**
10041 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
10042 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
10043 |      *   registered.
10044 |      * - `'block'`: Playwright will block all registration of Service Workers.
10045 |      */
10046 |     serviceWorkers?: "allow"|"block";
10047 | 
10048 |     /**
10049 |      * Learn more about [storage state and auth](https://playwright.dev/docs/auth).
10050 |      *
10051 |      * Populates context with given storage state. This option can be used to initialize context with logged-in
10052 |      * information obtained via
10053 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state).
10054 |      */
10055 |     storageState?: string|{
10056 |       /**
10057 |        * Cookies to set for context
10058 |        */
10059 |       cookies: Array<{
10060 |         name: string;
10061 | 
10062 |         value: string;
10063 | 
10064 |         /**
10065 |          * Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like
10066 |          * this: ".example.com"
10067 |          */
10068 |         domain: string;
10069 | 
10070 |         /**
10071 |          * Domain and path are required
10072 |          */
10073 |         path: string;
10074 | 
10075 |         /**
10076 |          * Unix time in seconds.
10077 |          */
10078 |         expires: number;
10079 | 
10080 |         httpOnly: boolean;
10081 | 
10082 |         secure: boolean;
10083 | 
10084 |         /**
10085 |          * sameSite flag
10086 |          */
10087 |         sameSite: "Strict"|"Lax"|"None";
10088 |       }>;
10089 | 
10090 |       origins: Array<{
10091 |         origin: string;
10092 | 
10093 |         /**
10094 |          * localStorage to set for context
10095 |          */
10096 |         localStorage: Array<{
10097 |           name: string;
10098 | 
10099 |           value: string;
10100 |         }>;
10101 |       }>;
10102 |     };
10103 | 
10104 |     /**
10105 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
10106 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
10107 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
10108 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
10109 |      */
10110 |     strictSelectors?: boolean;
10111 | 
10112 |     /**
10113 |      * Changes the timezone of the context. See
10114 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
10115 |      * for a list of supported timezone IDs. Defaults to the system timezone.
10116 |      */
10117 |     timezoneId?: string;
10118 | 
10119 |     /**
10120 |      * Specific user agent to use in this context.
10121 |      */
10122 |     userAgent?: string;
10123 | 
10124 |     /**
10125 |      * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
10126 |      */
10127 |     videoSize?: {
10128 |       /**
10129 |        * Video frame width.
10130 |        */
10131 |       width: number;
10132 | 
10133 |       /**
10134 |        * Video frame height.
10135 |        */
10136 |       height: number;
10137 |     };
10138 | 
10139 |     /**
10140 |      * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
10141 |      */
10142 |     videosPath?: string;
10143 | 
10144 |     /**
10145 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
10146 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
10147 |      *
10148 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
10149 |      * by the operating system. It makes the execution of the tests non-deterministic.
10150 |      *
10151 |      */
10152 |     viewport?: null|{
10153 |       /**
10154 |        * page width in pixels.
10155 |        */
10156 |       width: number;
10157 | 
10158 |       /**
10159 |        * page height in pixels.
10160 |        */
10161 |       height: number;
10162 |     };
10163 |   }): Promise<Page>;
10164 | 
10165 |   /**
10166 |    * **NOTE** This API controls
10167 |    * [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
10168 |    * chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/docs/trace-viewer) could be found
10169 |    * [here](https://playwright.dev/docs/api/class-tracing).
10170 |    *
10171 |    * You can use
10172 |    * [browser.startTracing([page, options])](https://playwright.dev/docs/api/class-browser#browser-start-tracing) and
10173 |    * [browser.stopTracing()](https://playwright.dev/docs/api/class-browser#browser-stop-tracing) to create a trace file
10174 |    * that can be opened in Chrome DevTools performance panel.
10175 |    *
10176 |    * **Usage**
10177 |    *
10178 |    * ```js
10179 |    * await browser.startTracing(page, { path: 'trace.json' });
10180 |    * await page.goto('https://www.google.com');
10181 |    * await browser.stopTracing();
10182 |    * ```
10183 |    *
10184 |    * @param page Optional, if specified, tracing includes screenshots of the given page.
10185 |    * @param options
10186 |    */
10187 |   startTracing(page?: Page, options?: {
10188 |     /**
10189 |      * specify custom categories to use instead of default.
10190 |      */
10191 |     categories?: Array<string>;
10192 | 
10193 |     /**
10194 |      * A path to write the trace file to.
10195 |      */
10196 |     path?: string;
10197 | 
10198 |     /**
10199 |      * captures screenshots in the trace.
10200 |      */
10201 |     screenshots?: boolean;
10202 |   }): Promise<void>;
10203 | 
10204 |   /**
10205 |    * **NOTE** This API controls
10206 |    * [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level
10207 |    * chromium-specific debugging tool. API to control [Playwright Tracing](https://playwright.dev/docs/trace-viewer) could be found
10208 |    * [here](https://playwright.dev/docs/api/class-tracing).
10209 |    *
10210 |    * Returns the buffer with trace data.
10211 |    */
10212 |   stopTracing(): Promise<Buffer>;
10213 | 
10214 |   /**
10215 |    * Returns the browser version.
10216 |    */
10217 |   version(): string;
10218 | 
10219 |   [Symbol.asyncDispose](): Promise<void>;
10220 | }
10221 | 
10222 | /**
10223 |  * The Worker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
10224 |  * `worker` event is emitted on the page object to signal a worker creation. `close` event is emitted on the worker
10225 |  * object when the worker is gone.
10226 |  *
10227 |  * ```js
10228 |  * page.on('worker', worker => {
10229 |  *   console.log('Worker created: ' + worker.url());
10230 |  *   worker.on('close', worker => console.log('Worker destroyed: ' + worker.url()));
10231 |  * });
10232 |  *
10233 |  * console.log('Current workers:');
10234 |  * for (const worker of page.workers())
10235 |  *   console.log('  ' + worker.url());
10236 |  * ```
10237 |  *
10238 |  */
10239 | export interface Worker {
10240 |   /**
10241 |    * Returns the return value of
10242 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10243 |    *
10244 |    * If the function passed to the
10245 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10246 |    * [Promise], then
10247 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) would wait for
10248 |    * the promise to resolve and return its value.
10249 |    *
10250 |    * If the function passed to the
10251 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10252 |    * non-[Serializable] value, then
10253 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns
10254 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
10255 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
10256 |    * @param pageFunction Function to be evaluated in the worker context.
10257 |    * @param arg Optional argument to pass to
10258 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10259 |    */
10260 |   evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
10261 |   /**
10262 |    * Returns the return value of
10263 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10264 |    *
10265 |    * If the function passed to the
10266 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10267 |    * [Promise], then
10268 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) would wait for
10269 |    * the promise to resolve and return its value.
10270 |    *
10271 |    * If the function passed to the
10272 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
10273 |    * non-[Serializable] value, then
10274 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns
10275 |    * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
10276 |    * `-0`, `NaN`, `Infinity`, `-Infinity`.
10277 |    * @param pageFunction Function to be evaluated in the worker context.
10278 |    * @param arg Optional argument to pass to
10279 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
10280 |    */
10281 |   evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
10282 | 
10283 |   /**
10284 |    * Returns the return value of
10285 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
10286 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10287 |    *
10288 |    * The only difference between
10289 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
10290 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10291 |    * is that
10292 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10293 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10294 |    *
10295 |    * If the function passed to the
10296 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10297 |    * returns a [Promise], then
10298 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10299 |    * would wait for the promise to resolve and return its value.
10300 |    * @param pageFunction Function to be evaluated in the worker context.
10301 |    * @param arg Optional argument to pass to
10302 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
10303 |    */
10304 |   evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
10305 |   /**
10306 |    * Returns the return value of
10307 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
10308 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10309 |    *
10310 |    * The only difference between
10311 |    * [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
10312 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10313 |    * is that
10314 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10315 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10316 |    *
10317 |    * If the function passed to the
10318 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10319 |    * returns a [Promise], then
10320 |    * [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
10321 |    * would wait for the promise to resolve and return its value.
10322 |    * @param pageFunction Function to be evaluated in the worker context.
10323 |    * @param arg Optional argument to pass to
10324 |    * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
10325 |    */
10326 |   evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
10327 |   /**
10328 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10329 |    * terminated.
10330 |    */
10331 |   on(event: 'close', listener: (worker: Worker) => any): this;
10332 | 
10333 |   /**
10334 |    * Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`.
10335 |    */
10336 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10337 | 
10338 |   /**
10339 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
10340 |    */
10341 |   once(event: 'close', listener: (worker: Worker) => any): this;
10342 | 
10343 |   /**
10344 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
10345 |    */
10346 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10347 | 
10348 |   /**
10349 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10350 |    * terminated.
10351 |    */
10352 |   addListener(event: 'close', listener: (worker: Worker) => any): this;
10353 | 
10354 |   /**
10355 |    * Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`.
10356 |    */
10357 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10358 | 
10359 |   /**
10360 |    * Removes an event listener added by `on` or `addListener`.
10361 |    */
10362 |   removeListener(event: 'close', listener: (worker: Worker) => any): this;
10363 | 
10364 |   /**
10365 |    * Removes an event listener added by `on` or `addListener`.
10366 |    */
10367 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10368 | 
10369 |   /**
10370 |    * Removes an event listener added by `on` or `addListener`.
10371 |    */
10372 |   off(event: 'close', listener: (worker: Worker) => any): this;
10373 | 
10374 |   /**
10375 |    * Removes an event listener added by `on` or `addListener`.
10376 |    */
10377 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10378 | 
10379 |   /**
10380 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10381 |    * terminated.
10382 |    */
10383 |   prependListener(event: 'close', listener: (worker: Worker) => any): this;
10384 | 
10385 |   /**
10386 |    * Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`.
10387 |    */
10388 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
10389 | 
10390 |   url(): string;
10391 | 
10392 |   /**
10393 |    * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10394 |    * terminated.
10395 |    */
10396 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
10397 | 
10398 |   /**
10399 |    * Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`.
10400 |    */
10401 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
10402 | 
10403 | }
10404 | 
10405 | /**
10406 |  * JSHandle represents an in-page JavaScript object. JSHandles can be created with the
10407 |  * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) method.
10408 |  *
10409 |  * ```js
10410 |  * const windowHandle = await page.evaluateHandle(() => window);
10411 |  * // ...
10412 |  * ```
10413 |  *
10414 |  * JSHandle prevents the referenced JavaScript object being garbage collected unless the handle is exposed with
10415 |  * [jsHandle.dispose()](https://playwright.dev/docs/api/class-jshandle#js-handle-dispose). JSHandles are auto-disposed
10416 |  * when their origin frame gets navigated or the parent context gets destroyed.
10417 |  *
10418 |  * JSHandle instances can be used as an argument in
10419 |  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector),
10420 |  * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
10421 |  * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
10422 |  * methods.
10423 |  */
10424 | export interface JSHandle<T = any> {
10425 |   /**
10426 |    * Returns the return value of
10427 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10428 |    *
10429 |    * This method passes this handle as the first argument to
10430 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10431 |    *
10432 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
10433 |    * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
10434 |    *
10435 |    * **Usage**
10436 |    *
10437 |    * ```js
10438 |    * const tweetHandle = await page.$('.tweet .retweets');
10439 |    * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10 retweets');
10440 |    * ```
10441 |    *
10442 |    * @param pageFunction Function to be evaluated in the page context.
10443 |    * @param arg Optional argument to pass to
10444 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10445 |    */
10446 |   evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<R>;
10447 |   /**
10448 |    * Returns the return value of
10449 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10450 |    *
10451 |    * This method passes this handle as the first argument to
10452 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10453 |    *
10454 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
10455 |    * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
10456 |    *
10457 |    * **Usage**
10458 |    *
10459 |    * ```js
10460 |    * const tweetHandle = await page.$('.tweet .retweets');
10461 |    * expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10 retweets');
10462 |    * ```
10463 |    *
10464 |    * @param pageFunction Function to be evaluated in the page context.
10465 |    * @param arg Optional argument to pass to
10466 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
10467 |    */
10468 |   evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
10469 | 
10470 |   /**
10471 |    * Returns the return value of
10472 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
10473 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10474 |    *
10475 |    * This method passes this handle as the first argument to
10476 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10477 |    *
10478 |    * The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
10479 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10480 |    *
10481 |    * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10482 |    * wait for the promise to resolve and return its value.
10483 |    *
10484 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10485 |    * more details.
10486 |    * @param pageFunction Function to be evaluated in the page context.
10487 |    * @param arg Optional argument to pass to
10488 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10489 |    */
10490 |   evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
10491 |   /**
10492 |    * Returns the return value of
10493 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
10494 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10495 |    *
10496 |    * This method passes this handle as the first argument to
10497 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10498 |    *
10499 |    * The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
10500 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
10501 |    *
10502 |    * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10503 |    * wait for the promise to resolve and return its value.
10504 |    *
10505 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10506 |    * more details.
10507 |    * @param pageFunction Function to be evaluated in the page context.
10508 |    * @param arg Optional argument to pass to
10509 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
10510 |    */
10511 |   evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<SmartHandle<R>>;
10512 | 
10513 |   /**
10514 |    * Returns a JSON representation of the object. If the object has a `toJSON` function, it **will not be called**.
10515 |    *
10516 |    * **NOTE** The method will return an empty JSON object if the referenced object is not stringifiable. It will throw
10517 |    * an error if the object has circular references.
10518 |    *
10519 |    */
10520 |   jsonValue(): Promise<T>;
10521 |   /**
10522 |    * Returns either `null` or the object handle itself, if the object handle is an instance of
10523 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle).
10524 |    */
10525 |   asElement(): T extends Node ? ElementHandle<T> : null;
10526 |   /**
10527 |    * The `jsHandle.dispose` method stops referencing the element handle.
10528 |    */
10529 |   dispose(): Promise<void>;
10530 | 
10531 |   /**
10532 |    * The method returns a map with **own property names** as keys and JSHandle instances for the property values.
10533 |    *
10534 |    * **Usage**
10535 |    *
10536 |    * ```js
10537 |    * const handle = await page.evaluateHandle(() => ({ window, document }));
10538 |    * const properties = await handle.getProperties();
10539 |    * const windowHandle = properties.get('window');
10540 |    * const documentHandle = properties.get('document');
10541 |    * await handle.dispose();
10542 |    * ```
10543 |    *
10544 |    */
10545 |   getProperties(): Promise<Map<string, JSHandle>>;
10546 | 
10547 |   /**
10548 |    * Fetches a single property from the referenced object.
10549 |    * @param propertyName property to get
10550 |    */
10551 |   getProperty(propertyName: string): Promise<JSHandle>;
10552 | 
10553 |   [Symbol.asyncDispose](): Promise<void>;
10554 | }
10555 | 
10556 | /**
10557 |  * - extends: [JSHandle](https://playwright.dev/docs/api/class-jshandle)
10558 |  *
10559 |  * ElementHandle represents an in-page DOM element. ElementHandles can be created with the
10560 |  * [page.$(selector[, options])](https://playwright.dev/docs/api/class-page#page-query-selector) method.
10561 |  *
10562 |  * **NOTE** The use of ElementHandle is discouraged, use [Locator](https://playwright.dev/docs/api/class-locator)
10563 |  * objects and web-first assertions instead.
10564 |  *
10565 |  * ```js
10566 |  * const hrefElement = await page.$('a');
10567 |  * await hrefElement.click();
10568 |  * ```
10569 |  *
10570 |  * ElementHandle prevents DOM element from garbage collection unless the handle is disposed with
10571 |  * [jsHandle.dispose()](https://playwright.dev/docs/api/class-jshandle#js-handle-dispose). ElementHandles are
10572 |  * auto-disposed when their origin frame gets navigated.
10573 |  *
10574 |  * ElementHandle instances can be used as an argument in
10575 |  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
10576 |  * and [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) methods.
10577 |  *
10578 |  * The difference between the [Locator](https://playwright.dev/docs/api/class-locator) and ElementHandle is that the
10579 |  * ElementHandle points to a particular element, while [Locator](https://playwright.dev/docs/api/class-locator)
10580 |  * captures the logic of how to retrieve an element.
10581 |  *
10582 |  * In the example below, handle points to a particular DOM element on page. If that element changes text or is used by
10583 |  * React to render an entirely different component, handle is still pointing to that very DOM element. This can lead
10584 |  * to unexpected behaviors.
10585 |  *
10586 |  * ```js
10587 |  * const handle = await page.$('text=Submit');
10588 |  * // ...
10589 |  * await handle.hover();
10590 |  * await handle.click();
10591 |  * ```
10592 |  *
10593 |  * With the locator, every time the `element` is used, up-to-date DOM element is located in the page using the
10594 |  * selector. So in the snippet below, underlying DOM element is going to be located twice.
10595 |  *
10596 |  * ```js
10597 |  * const locator = page.getByText('Submit');
10598 |  * // ...
10599 |  * await locator.hover();
10600 |  * await locator.click();
10601 |  * ```
10602 |  *
10603 |  */
10604 | export interface ElementHandle<T=Node> extends JSHandle<T> {
10605 |   /**
10606 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10607 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10608 |    *
10609 |    * The method finds an element matching the specified selector in the `ElementHandle`'s subtree. If no elements match
10610 |    * the selector, returns `null`.
10611 |    * @param selector A selector to query for.
10612 |    */
10613 |   $<K extends keyof HTMLElementTagNameMap>(selector: K, options?: { strict: boolean }): Promise<ElementHandleForTag<K> | null>;
10614 |   /**
10615 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10616 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10617 |    *
10618 |    * The method finds an element matching the specified selector in the `ElementHandle`'s subtree. If no elements match
10619 |    * the selector, returns `null`.
10620 |    * @param selector A selector to query for.
10621 |    */
10622 |   $(selector: string, options?: { strict: boolean }): Promise<ElementHandle<SVGElement | HTMLElement> | null>;
10623 | 
10624 |   /**
10625 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10626 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10627 |    *
10628 |    * The method finds all elements matching the specified selector in the `ElementHandle`s subtree. If no elements match
10629 |    * the selector, returns empty array.
10630 |    * @param selector A selector to query for.
10631 |    */
10632 |   $$<K extends keyof HTMLElementTagNameMap>(selector: K): Promise<ElementHandleForTag<K>[]>;
10633 |   /**
10634 |    * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
10635 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
10636 |    *
10637 |    * The method finds all elements matching the specified selector in the `ElementHandle`s subtree. If no elements match
10638 |    * the selector, returns empty array.
10639 |    * @param selector A selector to query for.
10640 |    */
10641 |   $$(selector: string): Promise<ElementHandle<SVGElement | HTMLElement>[]>;
10642 | 
10643 |   /**
10644 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10645 |    * Use
10646 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10647 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10648 |    *
10649 |    * Returns the return value of
10650 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10651 |    *
10652 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10653 |    * first argument to
10654 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10655 |    * If no elements match the selector, the method throws an error.
10656 |    *
10657 |    * If
10658 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10659 |    * returns a [Promise], then
10660 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10661 |    * would wait for the promise to resolve and return its value.
10662 |    *
10663 |    * **Usage**
10664 |    *
10665 |    * ```js
10666 |    * const tweetHandle = await page.$('.tweet');
10667 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10668 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10669 |    * ```
10670 |    *
10671 |    * @param selector A selector to query for.
10672 |    * @param pageFunction Function to be evaluated in the page context.
10673 |    * @param arg Optional argument to pass to
10674 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10675 |    */
10676 |   $eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
10677 |   /**
10678 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10679 |    * Use
10680 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10681 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10682 |    *
10683 |    * Returns the return value of
10684 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10685 |    *
10686 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10687 |    * first argument to
10688 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10689 |    * If no elements match the selector, the method throws an error.
10690 |    *
10691 |    * If
10692 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10693 |    * returns a [Promise], then
10694 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10695 |    * would wait for the promise to resolve and return its value.
10696 |    *
10697 |    * **Usage**
10698 |    *
10699 |    * ```js
10700 |    * const tweetHandle = await page.$('.tweet');
10701 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10702 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10703 |    * ```
10704 |    *
10705 |    * @param selector A selector to query for.
10706 |    * @param pageFunction Function to be evaluated in the page context.
10707 |    * @param arg Optional argument to pass to
10708 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10709 |    */
10710 |   $eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
10711 |   /**
10712 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10713 |    * Use
10714 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10715 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10716 |    *
10717 |    * Returns the return value of
10718 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10719 |    *
10720 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10721 |    * first argument to
10722 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10723 |    * If no elements match the selector, the method throws an error.
10724 |    *
10725 |    * If
10726 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10727 |    * returns a [Promise], then
10728 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10729 |    * would wait for the promise to resolve and return its value.
10730 |    *
10731 |    * **Usage**
10732 |    *
10733 |    * ```js
10734 |    * const tweetHandle = await page.$('.tweet');
10735 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10736 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10737 |    * ```
10738 |    *
10739 |    * @param selector A selector to query for.
10740 |    * @param pageFunction Function to be evaluated in the page context.
10741 |    * @param arg Optional argument to pass to
10742 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10743 |    */
10744 |   $eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
10745 |   /**
10746 |    * **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
10747 |    * Use
10748 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
10749 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
10750 |    *
10751 |    * Returns the return value of
10752 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10753 |    *
10754 |    * The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
10755 |    * first argument to
10756 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10757 |    * If no elements match the selector, the method throws an error.
10758 |    *
10759 |    * If
10760 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
10761 |    * returns a [Promise], then
10762 |    * [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
10763 |    * would wait for the promise to resolve and return its value.
10764 |    *
10765 |    * **Usage**
10766 |    *
10767 |    * ```js
10768 |    * const tweetHandle = await page.$('.tweet');
10769 |    * expect(await tweetHandle.$eval('.like', node => node.innerText)).toBe('100');
10770 |    * expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
10771 |    * ```
10772 |    *
10773 |    * @param selector A selector to query for.
10774 |    * @param pageFunction Function to be evaluated in the page context.
10775 |    * @param arg Optional argument to pass to
10776 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
10777 |    */
10778 |   $eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
10779 | 
10780 |   /**
10781 |    * **NOTE** In most cases,
10782 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10783 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10784 |    * job.
10785 |    *
10786 |    * Returns the return value of
10787 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10788 |    *
10789 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10790 |    * of matched elements as a first argument to
10791 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10792 |    *
10793 |    * If
10794 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10795 |    * returns a [Promise], then
10796 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10797 |    * would wait for the promise to resolve and return its value.
10798 |    *
10799 |    * **Usage**
10800 |    *
10801 |    * ```html
10802 |    * <div class="feed">
10803 |    *   <div class="tweet">Hello!</div>
10804 |    *   <div class="tweet">Hi!</div>
10805 |    * </div>
10806 |    * ```
10807 |    *
10808 |    * ```js
10809 |    * const feedHandle = await page.$('.feed');
10810 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10811 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10812 |    * );
10813 |    * ```
10814 |    *
10815 |    * @param selector A selector to query for.
10816 |    * @param pageFunction Function to be evaluated in the page context.
10817 |    * @param arg Optional argument to pass to
10818 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10819 |    */
10820 |   $$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
10821 |   /**
10822 |    * **NOTE** In most cases,
10823 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10824 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10825 |    * job.
10826 |    *
10827 |    * Returns the return value of
10828 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10829 |    *
10830 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10831 |    * of matched elements as a first argument to
10832 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10833 |    *
10834 |    * If
10835 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10836 |    * returns a [Promise], then
10837 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10838 |    * would wait for the promise to resolve and return its value.
10839 |    *
10840 |    * **Usage**
10841 |    *
10842 |    * ```html
10843 |    * <div class="feed">
10844 |    *   <div class="tweet">Hello!</div>
10845 |    *   <div class="tweet">Hi!</div>
10846 |    * </div>
10847 |    * ```
10848 |    *
10849 |    * ```js
10850 |    * const feedHandle = await page.$('.feed');
10851 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10852 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10853 |    * );
10854 |    * ```
10855 |    *
10856 |    * @param selector A selector to query for.
10857 |    * @param pageFunction Function to be evaluated in the page context.
10858 |    * @param arg Optional argument to pass to
10859 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10860 |    */
10861 |   $$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
10862 |   /**
10863 |    * **NOTE** In most cases,
10864 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10865 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10866 |    * job.
10867 |    *
10868 |    * Returns the return value of
10869 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10870 |    *
10871 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10872 |    * of matched elements as a first argument to
10873 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10874 |    *
10875 |    * If
10876 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10877 |    * returns a [Promise], then
10878 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10879 |    * would wait for the promise to resolve and return its value.
10880 |    *
10881 |    * **Usage**
10882 |    *
10883 |    * ```html
10884 |    * <div class="feed">
10885 |    *   <div class="tweet">Hello!</div>
10886 |    *   <div class="tweet">Hi!</div>
10887 |    * </div>
10888 |    * ```
10889 |    *
10890 |    * ```js
10891 |    * const feedHandle = await page.$('.feed');
10892 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10893 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10894 |    * );
10895 |    * ```
10896 |    *
10897 |    * @param selector A selector to query for.
10898 |    * @param pageFunction Function to be evaluated in the page context.
10899 |    * @param arg Optional argument to pass to
10900 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10901 |    */
10902 |   $$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
10903 |   /**
10904 |    * **NOTE** In most cases,
10905 |    * [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
10906 |    * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
10907 |    * job.
10908 |    *
10909 |    * Returns the return value of
10910 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10911 |    *
10912 |    * The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
10913 |    * of matched elements as a first argument to
10914 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10915 |    *
10916 |    * If
10917 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
10918 |    * returns a [Promise], then
10919 |    * [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
10920 |    * would wait for the promise to resolve and return its value.
10921 |    *
10922 |    * **Usage**
10923 |    *
10924 |    * ```html
10925 |    * <div class="feed">
10926 |    *   <div class="tweet">Hello!</div>
10927 |    *   <div class="tweet">Hi!</div>
10928 |    * </div>
10929 |    * ```
10930 |    *
10931 |    * ```js
10932 |    * const feedHandle = await page.$('.feed');
10933 |    * expect(await feedHandle.$$eval('.tweet', nodes =>
10934 |    *   nodes.map(n => n.innerText))).toEqual(['Hello!', 'Hi!'],
10935 |    * );
10936 |    * ```
10937 |    *
10938 |    * @param selector A selector to query for.
10939 |    * @param pageFunction Function to be evaluated in the page context.
10940 |    * @param arg Optional argument to pass to
10941 |    * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
10942 |    */
10943 |   $$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
10944 | 
10945 |   /**
10946 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10947 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10948 |    *
10949 |    * Returns element specified by selector when it satisfies
10950 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10951 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10952 |    *
10953 |    * Wait for the
10954 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10955 |    * relative to the element handle to satisfy
10956 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10957 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10958 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10959 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10960 |    * for the
10961 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10962 |    * milliseconds, the function will throw.
10963 |    *
10964 |    * **Usage**
10965 |    *
10966 |    * ```js
10967 |    * await page.setContent(`<div><span></span></div>`);
10968 |    * const div = await page.$('div');
10969 |    * // Waiting for the 'span' selector relative to the div.
10970 |    * const span = await div.waitForSelector('span', { state: 'attached' });
10971 |    * ```
10972 |    *
10973 |    * **NOTE** This method does not work across navigations, use
10974 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
10975 |    * instead.
10976 |    *
10977 |    * @param selector A selector to query for.
10978 |    * @param options
10979 |    */
10980 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options?: ElementHandleWaitForSelectorOptionsNotHidden): Promise<ElementHandleForTag<K>>;
10981 |   /**
10982 |    * **NOTE** Use web assertions that assert visibility or a locator-based
10983 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
10984 |    *
10985 |    * Returns element specified by selector when it satisfies
10986 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
10987 |    * option. Returns `null` if waiting for `hidden` or `detached`.
10988 |    *
10989 |    * Wait for the
10990 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10991 |    * relative to the element handle to satisfy
10992 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
10993 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
10994 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
10995 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
10996 |    * for the
10997 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
10998 |    * milliseconds, the function will throw.
10999 |    *
11000 |    * **Usage**
11001 |    *
11002 |    * ```js
11003 |    * await page.setContent(`<div><span></span></div>`);
11004 |    * const div = await page.$('div');
11005 |    * // Waiting for the 'span' selector relative to the div.
11006 |    * const span = await div.waitForSelector('span', { state: 'attached' });
11007 |    * ```
11008 |    *
11009 |    * **NOTE** This method does not work across navigations, use
11010 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
11011 |    * instead.
11012 |    *
11013 |    * @param selector A selector to query for.
11014 |    * @param options
11015 |    */
11016 |   waitForSelector(selector: string, options?: ElementHandleWaitForSelectorOptionsNotHidden): Promise<ElementHandle<SVGElement | HTMLElement>>;
11017 |   /**
11018 |    * **NOTE** Use web assertions that assert visibility or a locator-based
11019 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
11020 |    *
11021 |    * Returns element specified by selector when it satisfies
11022 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
11023 |    * option. Returns `null` if waiting for `hidden` or `detached`.
11024 |    *
11025 |    * Wait for the
11026 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
11027 |    * relative to the element handle to satisfy
11028 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
11029 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
11030 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
11031 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
11032 |    * for the
11033 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
11034 |    * milliseconds, the function will throw.
11035 |    *
11036 |    * **Usage**
11037 |    *
11038 |    * ```js
11039 |    * await page.setContent(`<div><span></span></div>`);
11040 |    * const div = await page.$('div');
11041 |    * // Waiting for the 'span' selector relative to the div.
11042 |    * const span = await div.waitForSelector('span', { state: 'attached' });
11043 |    * ```
11044 |    *
11045 |    * **NOTE** This method does not work across navigations, use
11046 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
11047 |    * instead.
11048 |    *
11049 |    * @param selector A selector to query for.
11050 |    * @param options
11051 |    */
11052 |   waitForSelector<K extends keyof HTMLElementTagNameMap>(selector: K, options: ElementHandleWaitForSelectorOptions): Promise<ElementHandleForTag<K> | null>;
11053 |   /**
11054 |    * **NOTE** Use web assertions that assert visibility or a locator-based
11055 |    * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
11056 |    *
11057 |    * Returns element specified by selector when it satisfies
11058 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
11059 |    * option. Returns `null` if waiting for `hidden` or `detached`.
11060 |    *
11061 |    * Wait for the
11062 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
11063 |    * relative to the element handle to satisfy
11064 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
11065 |    * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
11066 |    * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
11067 |    * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
11068 |    * for the
11069 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
11070 |    * milliseconds, the function will throw.
11071 |    *
11072 |    * **Usage**
11073 |    *
11074 |    * ```js
11075 |    * await page.setContent(`<div><span></span></div>`);
11076 |    * const div = await page.$('div');
11077 |    * // Waiting for the 'span' selector relative to the div.
11078 |    * const span = await div.waitForSelector('span', { state: 'attached' });
11079 |    * ```
11080 |    *
11081 |    * **NOTE** This method does not work across navigations, use
11082 |    * [page.waitForSelector(selector[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-selector)
11083 |    * instead.
11084 |    *
11085 |    * @param selector A selector to query for.
11086 |    * @param options
11087 |    */
11088 |   waitForSelector(selector: string, options: ElementHandleWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
11089 |   /**
11090 |    * This method returns the bounding box of the element, or `null` if the element is not visible. The bounding box is
11091 |    * calculated relative to the main frame viewport - which is usually the same as the browser window.
11092 |    *
11093 |    * Scrolling affects the returned bounding box, similarly to
11094 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
11095 |    * That means `x` and/or `y` may be negative.
11096 |    *
11097 |    * Elements from child frames return the bounding box relative to the main frame, unlike the
11098 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
11099 |    *
11100 |    * Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
11101 |    * following snippet should click the center of the element.
11102 |    *
11103 |    * **Usage**
11104 |    *
11105 |    * ```js
11106 |    * const box = await elementHandle.boundingBox();
11107 |    * await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
11108 |    * ```
11109 |    *
11110 |    */
11111 |   boundingBox(): Promise<null|{
11112 |     /**
11113 |      * the x coordinate of the element in pixels.
11114 |      */
11115 |     x: number;
11116 | 
11117 |     /**
11118 |      * the y coordinate of the element in pixels.
11119 |      */
11120 |     y: number;
11121 | 
11122 |     /**
11123 |      * the width of the element in pixels.
11124 |      */
11125 |     width: number;
11126 | 
11127 |     /**
11128 |      * the height of the element in pixels.
11129 |      */
11130 |     height: number;
11131 |   }>;
11132 | 
11133 |   /**
11134 |    * **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
11135 |    * Read more about [locators](https://playwright.dev/docs/locators).
11136 |    *
11137 |    * This method checks the element by performing the following steps:
11138 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
11139 |    *    checked, this method returns immediately.
11140 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11141 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-force) option is
11142 |    *    set.
11143 |    * 1. Scroll the element into view if needed.
11144 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11145 |    *    element.
11146 |    * 1. Ensure that the element is now checked. If not, this method throws.
11147 |    *
11148 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11149 |    *
11150 |    * When all steps combined have not finished during the specified
11151 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-timeout), this method
11152 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11153 |    * @param options
11154 |    */
11155 |   check(options?: {
11156 |     /**
11157 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11158 |      */
11159 |     force?: boolean;
11160 | 
11161 |     /**
11162 |      * This option has no effect.
11163 |      * @deprecated This option has no effect.
11164 |      */
11165 |     noWaitAfter?: boolean;
11166 | 
11167 |     /**
11168 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11169 |      * the element.
11170 |      */
11171 |     position?: {
11172 |       x: number;
11173 | 
11174 |       y: number;
11175 |     };
11176 | 
11177 |     /**
11178 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11179 |      * option in the config, or by using the
11180 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11181 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11182 |      */
11183 |     timeout?: number;
11184 | 
11185 |     /**
11186 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11187 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11188 |      */
11189 |     trial?: boolean;
11190 |   }): Promise<void>;
11191 | 
11192 |   /**
11193 |    * **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
11194 |    * Read more about [locators](https://playwright.dev/docs/locators).
11195 |    *
11196 |    * This method clicks the element by performing the following steps:
11197 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11198 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-force) option is
11199 |    *    set.
11200 |    * 1. Scroll the element into view if needed.
11201 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11202 |    *    element, or the specified
11203 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-position).
11204 |    * 1. Wait for initiated navigations to either succeed or fail, unless
11205 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-no-wait-after)
11206 |    *    option is set.
11207 |    *
11208 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11209 |    *
11210 |    * When all steps combined have not finished during the specified
11211 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-timeout), this method
11212 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11213 |    * @param options
11214 |    */
11215 |   click(options?: {
11216 |     /**
11217 |      * Defaults to `left`.
11218 |      */
11219 |     button?: "left"|"right"|"middle";
11220 | 
11221 |     /**
11222 |      * defaults to 1. See [UIEvent.detail].
11223 |      */
11224 |     clickCount?: number;
11225 | 
11226 |     /**
11227 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
11228 |      */
11229 |     delay?: number;
11230 | 
11231 |     /**
11232 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11233 |      */
11234 |     force?: boolean;
11235 | 
11236 |     /**
11237 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11238 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11239 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11240 |      */
11241 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11242 | 
11243 |     /**
11244 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
11245 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
11246 |      * navigating to inaccessible pages. Defaults to `false`.
11247 |      * @deprecated This option will default to `true` in the future.
11248 |      */
11249 |     noWaitAfter?: boolean;
11250 | 
11251 |     /**
11252 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11253 |      * the element.
11254 |      */
11255 |     position?: {
11256 |       x: number;
11257 | 
11258 |       y: number;
11259 |     };
11260 | 
11261 |     /**
11262 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11263 |      * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
11264 |      */
11265 |     steps?: number;
11266 | 
11267 |     /**
11268 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11269 |      * option in the config, or by using the
11270 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11271 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11272 |      */
11273 |     timeout?: number;
11274 | 
11275 |     /**
11276 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11277 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11278 |      */
11279 |     trial?: boolean;
11280 |   }): Promise<void>;
11281 | 
11282 |   /**
11283 |    * Returns the content frame for element handles referencing iframe nodes, or `null` otherwise
11284 |    */
11285 |   contentFrame(): Promise<null|Frame>;
11286 | 
11287 |   /**
11288 |    * **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
11289 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11290 |    *
11291 |    * This method double clicks the element by performing the following steps:
11292 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11293 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-force) option is
11294 |    *    set.
11295 |    * 1. Scroll the element into view if needed.
11296 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
11297 |    *    element, or the specified
11298 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-position).
11299 |    *
11300 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11301 |    *
11302 |    * When all steps combined have not finished during the specified
11303 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-timeout), this
11304 |    * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
11305 |    * this.
11306 |    *
11307 |    * **NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.
11308 |    *
11309 |    * @param options
11310 |    */
11311 |   dblclick(options?: {
11312 |     /**
11313 |      * Defaults to `left`.
11314 |      */
11315 |     button?: "left"|"right"|"middle";
11316 | 
11317 |     /**
11318 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
11319 |      */
11320 |     delay?: number;
11321 | 
11322 |     /**
11323 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11324 |      */
11325 |     force?: boolean;
11326 | 
11327 |     /**
11328 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11329 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11330 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11331 |      */
11332 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11333 | 
11334 |     /**
11335 |      * This option has no effect.
11336 |      * @deprecated This option has no effect.
11337 |      */
11338 |     noWaitAfter?: boolean;
11339 | 
11340 |     /**
11341 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11342 |      * the element.
11343 |      */
11344 |     position?: {
11345 |       x: number;
11346 | 
11347 |       y: number;
11348 |     };
11349 | 
11350 |     /**
11351 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11352 |      * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
11353 |      */
11354 |     steps?: number;
11355 | 
11356 |     /**
11357 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11358 |      * option in the config, or by using the
11359 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11360 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11361 |      */
11362 |     timeout?: number;
11363 | 
11364 |     /**
11365 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11366 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11367 |      */
11368 |     trial?: boolean;
11369 |   }): Promise<void>;
11370 | 
11371 |   /**
11372 |    * **NOTE** Use locator-based
11373 |    * [locator.dispatchEvent(type[, eventInit, options])](https://playwright.dev/docs/api/class-locator#locator-dispatch-event)
11374 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11375 |    *
11376 |    * The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
11377 |    * `click` is dispatched. This is equivalent to calling
11378 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
11379 |    *
11380 |    * **Usage**
11381 |    *
11382 |    * ```js
11383 |    * await elementHandle.dispatchEvent('click');
11384 |    * ```
11385 |    *
11386 |    * Under the hood, it creates an instance of an event based on the given
11387 |    * [`type`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-type),
11388 |    * initializes it with
11389 |    * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
11390 |    * properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
11391 |    *
11392 |    * Since
11393 |    * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
11394 |    * is event-specific, please refer to the events documentation for the lists of initial properties:
11395 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
11396 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
11397 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
11398 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
11399 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
11400 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
11401 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
11402 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
11403 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
11404 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
11405 |    *
11406 |    * You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:
11407 |    *
11408 |    * ```js
11409 |    * // Note you can only create DataTransfer in Chromium and Firefox
11410 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
11411 |    * await elementHandle.dispatchEvent('dragstart', { dataTransfer });
11412 |    * ```
11413 |    *
11414 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
11415 |    * @param eventInit Optional event-specific initialization properties.
11416 |    */
11417 |   dispatchEvent(type: string, eventInit?: EvaluationArgument): Promise<void>;
11418 | 
11419 |   /**
11420 |    * **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
11421 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11422 |    *
11423 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an
11424 |    * `input` event after filling. Note that you can pass an empty string to clear the input field.
11425 |    *
11426 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
11427 |    * error. However, if the element is inside the `<label>` element that has an associated
11428 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
11429 |    * instead.
11430 |    *
11431 |    * To send fine-grained keyboard events, use
11432 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
11433 |    * @param value Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
11434 |    * @param options
11435 |    */
11436 |   fill(value: string, options?: {
11437 |     /**
11438 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11439 |      */
11440 |     force?: boolean;
11441 | 
11442 |     /**
11443 |      * This option has no effect.
11444 |      * @deprecated This option has no effect.
11445 |      */
11446 |     noWaitAfter?: boolean;
11447 | 
11448 |     /**
11449 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11450 |      * option in the config, or by using the
11451 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11452 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11453 |      */
11454 |     timeout?: number;
11455 |   }): Promise<void>;
11456 | 
11457 |   /**
11458 |    * **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
11459 |    * Read more about [locators](https://playwright.dev/docs/locators).
11460 |    *
11461 |    * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the element.
11462 |    */
11463 |   focus(): Promise<void>;
11464 | 
11465 |   /**
11466 |    * **NOTE** Use locator-based
11467 |    * [locator.getAttribute(name[, options])](https://playwright.dev/docs/api/class-locator#locator-get-attribute)
11468 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11469 |    *
11470 |    * Returns element attribute value.
11471 |    * @param name Attribute name to get the value for.
11472 |    */
11473 |   getAttribute(name: string): Promise<null|string>;
11474 | 
11475 |   /**
11476 |    * **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
11477 |    * Read more about [locators](https://playwright.dev/docs/locators).
11478 |    *
11479 |    * This method hovers over the element by performing the following steps:
11480 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
11481 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-force) option is
11482 |    *    set.
11483 |    * 1. Scroll the element into view if needed.
11484 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
11485 |    *    element, or the specified
11486 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-position).
11487 |    *
11488 |    * If the element is detached from the DOM at any moment during the action, this method throws.
11489 |    *
11490 |    * When all steps combined have not finished during the specified
11491 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-timeout), this method
11492 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
11493 |    * @param options
11494 |    */
11495 |   hover(options?: {
11496 |     /**
11497 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11498 |      */
11499 |     force?: boolean;
11500 | 
11501 |     /**
11502 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
11503 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
11504 |      * "Control" on Windows and Linux and to "Meta" on macOS.
11505 |      */
11506 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
11507 | 
11508 |     /**
11509 |      * This option has no effect.
11510 |      * @deprecated This option has no effect.
11511 |      */
11512 |     noWaitAfter?: boolean;
11513 | 
11514 |     /**
11515 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11516 |      * the element.
11517 |      */
11518 |     position?: {
11519 |       x: number;
11520 | 
11521 |       y: number;
11522 |     };
11523 | 
11524 |     /**
11525 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11526 |      * option in the config, or by using the
11527 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11528 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11529 |      */
11530 |     timeout?: number;
11531 | 
11532 |     /**
11533 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11534 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11535 |      */
11536 |     trial?: boolean;
11537 |   }): Promise<void>;
11538 | 
11539 |   /**
11540 |    * **NOTE** Use locator-based [locator.innerHTML([options])](https://playwright.dev/docs/api/class-locator#locator-inner-html)
11541 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11542 |    *
11543 |    * Returns the `element.innerHTML`.
11544 |    */
11545 |   innerHTML(): Promise<string>;
11546 | 
11547 |   /**
11548 |    * **NOTE** Use locator-based [locator.innerText([options])](https://playwright.dev/docs/api/class-locator#locator-inner-text)
11549 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11550 |    *
11551 |    * Returns the `element.innerText`.
11552 |    */
11553 |   innerText(): Promise<string>;
11554 | 
11555 |   /**
11556 |    * **NOTE** Use locator-based
11557 |    * [locator.inputValue([options])](https://playwright.dev/docs/api/class-locator#locator-input-value) instead. Read
11558 |    * more about [locators](https://playwright.dev/docs/locators).
11559 |    *
11560 |    * Returns `input.value` for the selected `<input>` or `<textarea>` or `<select>` element.
11561 |    *
11562 |    * Throws for non-input elements. However, if the element is inside the `<label>` element that has an associated
11563 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
11564 |    * control.
11565 |    * @param options
11566 |    */
11567 |   inputValue(options?: {
11568 |     /**
11569 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11570 |      * option in the config, or by using the
11571 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11572 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11573 |      */
11574 |     timeout?: number;
11575 |   }): Promise<string>;
11576 | 
11577 |   /**
11578 |    * **NOTE** Use locator-based [locator.isChecked([options])](https://playwright.dev/docs/api/class-locator#locator-is-checked)
11579 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11580 |    *
11581 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
11582 |    */
11583 |   isChecked(): Promise<boolean>;
11584 | 
11585 |   /**
11586 |    * **NOTE** Use locator-based
11587 |    * [locator.isDisabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-disabled) instead. Read
11588 |    * more about [locators](https://playwright.dev/docs/locators).
11589 |    *
11590 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
11591 |    */
11592 |   isDisabled(): Promise<boolean>;
11593 | 
11594 |   /**
11595 |    * **NOTE** Use locator-based
11596 |    * [locator.isEditable([options])](https://playwright.dev/docs/api/class-locator#locator-is-editable) instead. Read
11597 |    * more about [locators](https://playwright.dev/docs/locators).
11598 |    *
11599 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable).
11600 |    */
11601 |   isEditable(): Promise<boolean>;
11602 | 
11603 |   /**
11604 |    * **NOTE** Use locator-based [locator.isEnabled([options])](https://playwright.dev/docs/api/class-locator#locator-is-enabled)
11605 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11606 |    *
11607 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
11608 |    */
11609 |   isEnabled(): Promise<boolean>;
11610 | 
11611 |   /**
11612 |    * **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
11613 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11614 |    *
11615 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
11616 |    */
11617 |   isHidden(): Promise<boolean>;
11618 | 
11619 |   /**
11620 |    * **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
11621 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11622 |    *
11623 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
11624 |    */
11625 |   isVisible(): Promise<boolean>;
11626 | 
11627 |   /**
11628 |    * Returns the frame containing the given element.
11629 |    */
11630 |   ownerFrame(): Promise<null|Frame>;
11631 | 
11632 |   /**
11633 |    * **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
11634 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11635 |    *
11636 |    * Focuses the element, and then uses
11637 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
11638 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
11639 |    *
11640 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) can specify the
11641 |    * intended [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single
11642 |    * character to generate the text for. A superset of the
11643 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) values can be found
11644 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
11645 |    *
11646 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
11647 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
11648 |    * etc.
11649 |    *
11650 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
11651 |    * `ControlOrMeta`.
11652 |    *
11653 |    * Holding down `Shift` will type the text that corresponds to the
11654 |    * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) in the upper case.
11655 |    *
11656 |    * If [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) is a single
11657 |    * character, it is case-sensitive, so the values `a` and `A` will generate different respective texts.
11658 |    *
11659 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
11660 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
11661 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
11662 |    * @param options
11663 |    */
11664 |   press(key: string, options?: {
11665 |     /**
11666 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
11667 |      */
11668 |     delay?: number;
11669 | 
11670 |     /**
11671 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
11672 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
11673 |      * navigating to inaccessible pages. Defaults to `false`.
11674 |      * @deprecated This option will default to `true` in the future.
11675 |      */
11676 |     noWaitAfter?: boolean;
11677 | 
11678 |     /**
11679 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11680 |      * option in the config, or by using the
11681 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11682 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11683 |      */
11684 |     timeout?: number;
11685 |   }): Promise<void>;
11686 | 
11687 |   /**
11688 |    * **NOTE** Use locator-based [locator.screenshot([options])](https://playwright.dev/docs/api/class-locator#locator-screenshot)
11689 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11690 |    *
11691 |    * This method captures a screenshot of the page, clipped to the size and position of this particular element. If the
11692 |    * element is covered by other elements, it will not be actually visible on the screenshot. If the element is a
11693 |    * scrollable container, only the currently scrolled content will be visible on the screenshot.
11694 |    *
11695 |    * This method waits for the [actionability](https://playwright.dev/docs/actionability) checks, then scrolls element into view before taking
11696 |    * a screenshot. If the element is detached from DOM, the method throws an error.
11697 |    *
11698 |    * Returns the buffer with the captured screenshot.
11699 |    * @param options
11700 |    */
11701 |   screenshot(options?: {
11702 |     /**
11703 |      * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
11704 |      * treatment depending on their duration:
11705 |      * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
11706 |      * - infinite animations are canceled to initial state, and then played over after the screenshot.
11707 |      *
11708 |      * Defaults to `"allow"` that leaves animations untouched.
11709 |      */
11710 |     animations?: "disabled"|"allow";
11711 | 
11712 |     /**
11713 |      * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
11714 |      * changed.  Defaults to `"hide"`.
11715 |      */
11716 |     caret?: "hide"|"initial";
11717 | 
11718 |     /**
11719 |      * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
11720 |      * box `#FF00FF` (customized by
11721 |      * [`maskColor`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-mask-color))
11722 |      * that completely covers its bounding box. The mask is also applied to invisible elements, see
11723 |      * [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
11724 |      */
11725 |     mask?: Array<Locator>;
11726 | 
11727 |     /**
11728 |      * Specify the color of the overlay box for masked elements, in
11729 |      * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
11730 |      */
11731 |     maskColor?: string;
11732 | 
11733 |     /**
11734 |      * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
11735 |      * Defaults to `false`.
11736 |      */
11737 |     omitBackground?: boolean;
11738 | 
11739 |     /**
11740 |      * The file path to save the image to. The screenshot type will be inferred from file extension. If
11741 |      * [`path`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-path) is a relative
11742 |      * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
11743 |      * saved to the disk.
11744 |      */
11745 |     path?: string;
11746 | 
11747 |     /**
11748 |      * The quality of the image, between 0-100. Not applicable to `png` images.
11749 |      */
11750 |     quality?: number;
11751 | 
11752 |     /**
11753 |      * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
11754 |      * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
11755 |      * screenshots of high-dpi devices will be twice as large or even larger.
11756 |      *
11757 |      * Defaults to `"device"`.
11758 |      */
11759 |     scale?: "css"|"device";
11760 | 
11761 |     /**
11762 |      * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
11763 |      * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
11764 |      * the Shadow DOM and applies to the inner frames.
11765 |      */
11766 |     style?: string;
11767 | 
11768 |     /**
11769 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11770 |      * option in the config, or by using the
11771 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11772 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11773 |      */
11774 |     timeout?: number;
11775 | 
11776 |     /**
11777 |      * Specify screenshot type, defaults to `png`.
11778 |      */
11779 |     type?: "png"|"jpeg";
11780 |   }): Promise<Buffer>;
11781 | 
11782 |   /**
11783 |    * **NOTE** Use locator-based
11784 |    * [locator.scrollIntoViewIfNeeded([options])](https://playwright.dev/docs/api/class-locator#locator-scroll-into-view-if-needed)
11785 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11786 |    *
11787 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then tries to scroll element into view, unless
11788 |    * it is completely visible as defined by
11789 |    * [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.
11790 |    *
11791 |    * Throws when `elementHandle` does not point to an element
11792 |    * [connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.
11793 |    *
11794 |    * See [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
11795 |    * @param options
11796 |    */
11797 |   scrollIntoViewIfNeeded(options?: {
11798 |     /**
11799 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11800 |      * option in the config, or by using the
11801 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11802 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11803 |      */
11804 |     timeout?: number;
11805 |   }): Promise<void>;
11806 | 
11807 |   /**
11808 |    * **NOTE** Use locator-based
11809 |    * [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
11810 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11811 |    *
11812 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in
11813 |    * the `<select>` element and selects these options.
11814 |    *
11815 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
11816 |    * the `<label>` element that has an associated
11817 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
11818 |    * instead.
11819 |    *
11820 |    * Returns the array of option values that have been successfully selected.
11821 |    *
11822 |    * Triggers a `change` and `input` event once all the provided options have been selected.
11823 |    *
11824 |    * **Usage**
11825 |    *
11826 |    * ```js
11827 |    * // Single selection matching the value or label
11828 |    * handle.selectOption('blue');
11829 |    *
11830 |    * // single selection matching the label
11831 |    * handle.selectOption({ label: 'Blue' });
11832 |    *
11833 |    * // multiple selection
11834 |    * handle.selectOption(['red', 'green', 'blue']);
11835 |    * ```
11836 |    *
11837 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
11838 |    * only the first option matching one of the passed options is selected. String values are matching both values and
11839 |    * labels. Option is considered matching if all specified properties match.
11840 |    * @param options
11841 |    */
11842 |   selectOption(values: null|string|ElementHandle|ReadonlyArray<string>|{
11843 |     /**
11844 |      * Matches by `option.value`. Optional.
11845 |      */
11846 |     value?: string;
11847 | 
11848 |     /**
11849 |      * Matches by `option.label`. Optional.
11850 |      */
11851 |     label?: string;
11852 | 
11853 |     /**
11854 |      * Matches by the index. Optional.
11855 |      */
11856 |     index?: number;
11857 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
11858 |     /**
11859 |      * Matches by `option.value`. Optional.
11860 |      */
11861 |     value?: string;
11862 | 
11863 |     /**
11864 |      * Matches by `option.label`. Optional.
11865 |      */
11866 |     label?: string;
11867 | 
11868 |     /**
11869 |      * Matches by the index. Optional.
11870 |      */
11871 |     index?: number;
11872 |   }>, options?: {
11873 |     /**
11874 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11875 |      */
11876 |     force?: boolean;
11877 | 
11878 |     /**
11879 |      * This option has no effect.
11880 |      * @deprecated This option has no effect.
11881 |      */
11882 |     noWaitAfter?: boolean;
11883 | 
11884 |     /**
11885 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11886 |      * option in the config, or by using the
11887 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11888 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11889 |      */
11890 |     timeout?: number;
11891 |   }): Promise<Array<string>>;
11892 | 
11893 |   /**
11894 |    * **NOTE** Use locator-based
11895 |    * [locator.selectText([options])](https://playwright.dev/docs/api/class-locator#locator-select-text) instead. Read
11896 |    * more about [locators](https://playwright.dev/docs/locators).
11897 |    *
11898 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then focuses the element and selects all its
11899 |    * text content.
11900 |    *
11901 |    * If the element is inside the `<label>` element that has an associated
11902 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
11903 |    * the control instead.
11904 |    * @param options
11905 |    */
11906 |   selectText(options?: {
11907 |     /**
11908 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11909 |      */
11910 |     force?: boolean;
11911 | 
11912 |     /**
11913 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11914 |      * option in the config, or by using the
11915 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11916 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11917 |      */
11918 |     timeout?: number;
11919 |   }): Promise<void>;
11920 | 
11921 |   /**
11922 |    * **NOTE** Use locator-based
11923 |    * [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
11924 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11925 |    *
11926 |    * This method checks or unchecks an element by performing the following steps:
11927 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws.
11928 |    * 1. If the element already has the right checked state, this method returns immediately.
11929 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
11930 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-force) option
11931 |    *    is set. If the element is detached during the checks, the whole action is retried.
11932 |    * 1. Scroll the element into view if needed.
11933 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
11934 |    *    element.
11935 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
11936 |    *
11937 |    * When all steps combined have not finished during the specified
11938 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-timeout), this
11939 |    * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
11940 |    * this.
11941 |    * @param checked Whether to check or uncheck the checkbox.
11942 |    * @param options
11943 |    */
11944 |   setChecked(checked: boolean, options?: {
11945 |     /**
11946 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
11947 |      */
11948 |     force?: boolean;
11949 | 
11950 |     /**
11951 |      * This option has no effect.
11952 |      * @deprecated This option has no effect.
11953 |      */
11954 |     noWaitAfter?: boolean;
11955 | 
11956 |     /**
11957 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
11958 |      * the element.
11959 |      */
11960 |     position?: {
11961 |       x: number;
11962 | 
11963 |       y: number;
11964 |     };
11965 | 
11966 |     /**
11967 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11968 |      * option in the config, or by using the
11969 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
11970 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
11971 |      */
11972 |     timeout?: number;
11973 | 
11974 |     /**
11975 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
11976 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
11977 |      */
11978 |     trial?: boolean;
11979 |   }): Promise<void>;
11980 | 
11981 |   /**
11982 |    * **NOTE** Use locator-based
11983 |    * [locator.setInputFiles(files[, options])](https://playwright.dev/docs/api/class-locator#locator-set-input-files)
11984 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
11985 |    *
11986 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
11987 |    * they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
11988 |    * with a `[webkitdirectory]` attribute, only a single directory path is supported.
11989 |    *
11990 |    * This method expects [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) to point to an
11991 |    * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
11992 |    * the `<label>` element that has an associated
11993 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
11994 |    * @param files
11995 |    * @param options
11996 |    */
11997 |   setInputFiles(files: string|ReadonlyArray<string>|{
11998 |     /**
11999 |      * File name
12000 |      */
12001 |     name: string;
12002 | 
12003 |     /**
12004 |      * File type
12005 |      */
12006 |     mimeType: string;
12007 | 
12008 |     /**
12009 |      * File content
12010 |      */
12011 |     buffer: Buffer;
12012 |   }|ReadonlyArray<{
12013 |     /**
12014 |      * File name
12015 |      */
12016 |     name: string;
12017 | 
12018 |     /**
12019 |      * File type
12020 |      */
12021 |     mimeType: string;
12022 | 
12023 |     /**
12024 |      * File content
12025 |      */
12026 |     buffer: Buffer;
12027 |   }>, options?: {
12028 |     /**
12029 |      * This option has no effect.
12030 |      * @deprecated This option has no effect.
12031 |      */
12032 |     noWaitAfter?: boolean;
12033 | 
12034 |     /**
12035 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12036 |      * option in the config, or by using the
12037 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12038 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12039 |      */
12040 |     timeout?: number;
12041 |   }): Promise<void>;
12042 | 
12043 |   /**
12044 |    * **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
12045 |    * more about [locators](https://playwright.dev/docs/locators).
12046 |    *
12047 |    * This method taps the element by performing the following steps:
12048 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12049 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-force) option is set.
12050 |    * 1. Scroll the element into view if needed.
12051 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
12052 |    *    element, or the specified
12053 |    *    [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-position).
12054 |    *
12055 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12056 |    *
12057 |    * When all steps combined have not finished during the specified
12058 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-timeout), this method
12059 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12060 |    *
12061 |    * **NOTE** `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true.
12062 |    *
12063 |    * @param options
12064 |    */
12065 |   tap(options?: {
12066 |     /**
12067 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12068 |      */
12069 |     force?: boolean;
12070 | 
12071 |     /**
12072 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
12073 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
12074 |      * "Control" on Windows and Linux and to "Meta" on macOS.
12075 |      */
12076 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
12077 | 
12078 |     /**
12079 |      * This option has no effect.
12080 |      * @deprecated This option has no effect.
12081 |      */
12082 |     noWaitAfter?: boolean;
12083 | 
12084 |     /**
12085 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12086 |      * the element.
12087 |      */
12088 |     position?: {
12089 |       x: number;
12090 | 
12091 |       y: number;
12092 |     };
12093 | 
12094 |     /**
12095 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12096 |      * option in the config, or by using the
12097 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12098 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12099 |      */
12100 |     timeout?: number;
12101 | 
12102 |     /**
12103 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12104 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12105 |      */
12106 |     trial?: boolean;
12107 |   }): Promise<void>;
12108 | 
12109 |   /**
12110 |    * **NOTE** Use locator-based
12111 |    * [locator.textContent([options])](https://playwright.dev/docs/api/class-locator#locator-text-content) instead. Read
12112 |    * more about [locators](https://playwright.dev/docs/locators).
12113 |    *
12114 |    * Returns the `node.textContent`.
12115 |    */
12116 |   textContent(): Promise<null|string>;
12117 | 
12118 |   /**
12119 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
12120 |    * text.
12121 |    *
12122 |    * To press a special key, like `Control` or `ArrowDown`, use
12123 |    * [elementHandle.press(key[, options])](https://playwright.dev/docs/api/class-elementhandle#element-handle-press).
12124 |    *
12125 |    * **Usage**
12126 |    * @deprecated In most cases, you should use
12127 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
12128 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
12129 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
12130 |    * @param text A text to type into a focused element.
12131 |    * @param options
12132 |    */
12133 |   type(text: string, options?: {
12134 |     /**
12135 |      * Time to wait between key presses in milliseconds. Defaults to 0.
12136 |      */
12137 |     delay?: number;
12138 | 
12139 |     /**
12140 |      * This option has no effect.
12141 |      * @deprecated This option has no effect.
12142 |      */
12143 |     noWaitAfter?: boolean;
12144 | 
12145 |     /**
12146 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12147 |      * option in the config, or by using the
12148 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12149 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12150 |      */
12151 |     timeout?: number;
12152 |   }): Promise<void>;
12153 | 
12154 |   /**
12155 |    * **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
12156 |    * instead. Read more about [locators](https://playwright.dev/docs/locators).
12157 |    *
12158 |    * This method checks the element by performing the following steps:
12159 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
12160 |    *    unchecked, this method returns immediately.
12161 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12162 |    *    [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-force) option is
12163 |    *    set.
12164 |    * 1. Scroll the element into view if needed.
12165 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12166 |    *    element.
12167 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
12168 |    *
12169 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12170 |    *
12171 |    * When all steps combined have not finished during the specified
12172 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-timeout), this method
12173 |    * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12174 |    * @param options
12175 |    */
12176 |   uncheck(options?: {
12177 |     /**
12178 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12179 |      */
12180 |     force?: boolean;
12181 | 
12182 |     /**
12183 |      * This option has no effect.
12184 |      * @deprecated This option has no effect.
12185 |      */
12186 |     noWaitAfter?: boolean;
12187 | 
12188 |     /**
12189 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12190 |      * the element.
12191 |      */
12192 |     position?: {
12193 |       x: number;
12194 | 
12195 |       y: number;
12196 |     };
12197 | 
12198 |     /**
12199 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12200 |      * option in the config, or by using the
12201 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12202 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12203 |      */
12204 |     timeout?: number;
12205 | 
12206 |     /**
12207 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12208 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12209 |      */
12210 |     trial?: boolean;
12211 |   }): Promise<void>;
12212 | 
12213 |   /**
12214 |    * Returns when the element satisfies the
12215 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state).
12216 |    *
12217 |    * Depending on the
12218 |    * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state)
12219 |    * parameter, this method waits for one of the [actionability](https://playwright.dev/docs/actionability) checks to pass. This method throws
12220 |    * when the element is detached while waiting, unless waiting for the `"hidden"` state.
12221 |    * - `"visible"` Wait until the element is [visible](https://playwright.dev/docs/actionability#visible).
12222 |    * - `"hidden"` Wait until the element is [not visible](https://playwright.dev/docs/actionability#visible) or not attached. Note that
12223 |    *   waiting for hidden does not throw when the element detaches.
12224 |    * - `"stable"` Wait until the element is both [visible](https://playwright.dev/docs/actionability#visible) and
12225 |    *   [stable](https://playwright.dev/docs/actionability#stable).
12226 |    * - `"enabled"` Wait until the element is [enabled](https://playwright.dev/docs/actionability#enabled).
12227 |    * - `"disabled"` Wait until the element is [not enabled](https://playwright.dev/docs/actionability#enabled).
12228 |    * - `"editable"` Wait until the element is [editable](https://playwright.dev/docs/actionability#editable).
12229 |    *
12230 |    * If the element does not satisfy the condition for the
12231 |    * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-timeout)
12232 |    * milliseconds, this method will throw.
12233 |    * @param state A state to wait for, see below for more details.
12234 |    * @param options
12235 |    */
12236 |   waitForElementState(state: "visible"|"hidden"|"stable"|"enabled"|"disabled"|"editable", options?: {
12237 |     /**
12238 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12239 |      * option in the config, or by using the
12240 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12241 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12242 |      */
12243 |     timeout?: number;
12244 |   }): Promise<void>;
12245 | }
12246 | 
12247 | /**
12248 |  * Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a
12249 |  * way to find element(s) on the page at any moment. A locator can be created with the
12250 |  * [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator) method.
12251 |  *
12252 |  * [Learn more about locators](https://playwright.dev/docs/locators).
12253 |  */
12254 | export interface Locator {
12255 |   /**
12256 |    * Execute JavaScript code in the page, taking the matching element as an argument.
12257 |    *
12258 |    * **Details**
12259 |    *
12260 |    * Returns the return value of
12261 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
12262 |    * matching element as a first argument, and
12263 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
12264 |    *
12265 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
12266 |    * [Promise], this method will wait for the promise to resolve and return its value.
12267 |    *
12268 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
12269 |    * rejects, this method throws.
12270 |    *
12271 |    * **Usage**
12272 |    *
12273 |    * Passing argument to
12274 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression):
12275 |    *
12276 |    * ```js
12277 |    * const result = await page.getByTestId('myId').evaluate((element, [x, y]) => {
12278 |    *   return element.textContent + ' ' + x * y;
12279 |    * }, [7, 8]);
12280 |    * console.log(result); // prints "myId text 56"
12281 |    * ```
12282 |    *
12283 |    * @param pageFunction Function to be evaluated in the page context.
12284 |    * @param arg Optional argument to pass to
12285 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12286 |    * @param options
12287 |    */
12288 |   evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, options?: {
12289 |     timeout?: number;
12290 |   }): Promise<R>;
12291 |   /**
12292 |    * Execute JavaScript code in the page, taking the matching element as an argument.
12293 |    *
12294 |    * **Details**
12295 |    *
12296 |    * Returns the return value of
12297 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
12298 |    * matching element as a first argument, and
12299 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
12300 |    *
12301 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
12302 |    * [Promise], this method will wait for the promise to resolve and return its value.
12303 |    *
12304 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
12305 |    * rejects, this method throws.
12306 |    *
12307 |    * **Usage**
12308 |    *
12309 |    * Passing argument to
12310 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression):
12311 |    *
12312 |    * ```js
12313 |    * const result = await page.getByTestId('myId').evaluate((element, [x, y]) => {
12314 |    *   return element.textContent + ' ' + x * y;
12315 |    * }, [7, 8]);
12316 |    * console.log(result); // prints "myId text 56"
12317 |    * ```
12318 |    *
12319 |    * @param pageFunction Function to be evaluated in the page context.
12320 |    * @param arg Optional argument to pass to
12321 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12322 |    * @param options
12323 |    */
12324 |   evaluate<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, options?: {
12325 |     timeout?: number;
12326 |   }): Promise<R>;
12327 |   /**
12328 |    * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12329 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
12330 |    *
12331 |    * **Details**
12332 |    *
12333 |    * Returns the return value of
12334 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
12335 |    * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
12336 |    * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
12337 |    *
12338 |    * The only difference between
12339 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
12340 |    * and
12341 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12342 |    * is that
12343 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12344 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
12345 |    *
12346 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
12347 |    * returns a [Promise], this method will wait for the promise to resolve and return its value.
12348 |    *
12349 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12350 |    * or rejects, this method throws.
12351 |    *
12352 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12353 |    * more details.
12354 |    * @param pageFunction Function to be evaluated in the page context.
12355 |    * @param arg Optional argument to pass to
12356 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12357 |    * @param options
12358 |    */
12359 |   evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
12360 |   /**
12361 |    * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12362 |    * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
12363 |    *
12364 |    * **Details**
12365 |    *
12366 |    * Returns the return value of
12367 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
12368 |    * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
12369 |    * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
12370 |    *
12371 |    * The only difference between
12372 |    * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
12373 |    * and
12374 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12375 |    * is that
12376 |    * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12377 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
12378 |    *
12379 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
12380 |    * returns a [Promise], this method will wait for the promise to resolve and return its value.
12381 |    *
12382 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12383 |    * or rejects, this method throws.
12384 |    *
12385 |    * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12386 |    * more details.
12387 |    * @param pageFunction Function to be evaluated in the page context.
12388 |    * @param arg Optional argument to pass to
12389 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12390 |    * @param options
12391 |    */
12392 |   evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>): Promise<SmartHandle<R>>;
12393 |   /**
12394 |    * Execute JavaScript code in the page, taking all matching elements as an argument.
12395 |    *
12396 |    * **Details**
12397 |    *
12398 |    * Returns the return value of
12399 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
12400 |    * an array of all matching elements as a first argument, and
12401 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
12402 |    *
12403 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
12404 |    * [Promise], this method will wait for the promise to resolve and return its value.
12405 |    *
12406 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
12407 |    * rejects, this method throws.
12408 |    *
12409 |    * **Usage**
12410 |    *
12411 |    * ```js
12412 |    * const locator = page.locator('div');
12413 |    * const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min, 10);
12414 |    * ```
12415 |    *
12416 |    * @param pageFunction Function to be evaluated in the page context.
12417 |    * @param arg Optional argument to pass to
12418 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
12419 |    */
12420 |   evaluateAll<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
12421 |   /**
12422 |    * Execute JavaScript code in the page, taking all matching elements as an argument.
12423 |    *
12424 |    * **Details**
12425 |    *
12426 |    * Returns the return value of
12427 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
12428 |    * an array of all matching elements as a first argument, and
12429 |    * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
12430 |    *
12431 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
12432 |    * [Promise], this method will wait for the promise to resolve and return its value.
12433 |    *
12434 |    * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
12435 |    * rejects, this method throws.
12436 |    *
12437 |    * **Usage**
12438 |    *
12439 |    * ```js
12440 |    * const locator = page.locator('div');
12441 |    * const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min, 10);
12442 |    * ```
12443 |    *
12444 |    * @param pageFunction Function to be evaluated in the page context.
12445 |    * @param arg Optional argument to pass to
12446 |    * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
12447 |    */
12448 |   evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
12449 |   /**
12450 |    * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
12451 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
12452 |    *
12453 |    * Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If
12454 |    * multiple elements match the locator, throws.
12455 |    * @param options
12456 |    */
12457 |   elementHandle(options?: {
12458 |     timeout?: number;
12459 |   }): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
12460 |   /**
12461 |    * Returns a human-readable representation of the locator, using the
12462 |    * [locator.description()](https://playwright.dev/docs/api/class-locator#locator-description) if one exists;
12463 |    * otherwise, it generates a string based on the locator's selector.
12464 |    */
12465 |   toString(): string;
12466 |   /**
12467 |    * When the locator points to a list of elements, this returns an array of locators, pointing to their respective
12468 |    * elements.
12469 |    *
12470 |    * **NOTE** [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all) does not wait for elements to
12471 |    * match the locator, and instead immediately returns whatever is present in the page.
12472 |    *
12473 |    * When the list of elements changes dynamically,
12474 |    * [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all) will produce unpredictable and flaky
12475 |    * results.
12476 |    *
12477 |    * When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before
12478 |    * calling [locator.all()](https://playwright.dev/docs/api/class-locator#locator-all).
12479 |    *
12480 |    * **Usage**
12481 |    *
12482 |    * ```js
12483 |    * for (const li of await page.getByRole('listitem').all())
12484 |    *   await li.click();
12485 |    * ```
12486 |    *
12487 |    */
12488 |   all(): Promise<Array<Locator>>;
12489 | 
12490 |   /**
12491 |    * Returns an array of `node.innerText` values for all matching nodes.
12492 |    *
12493 |    * **NOTE** If you need to assert text on the page, prefer
12494 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
12495 |    * with
12496 |    * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
12497 |    * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12498 |    *
12499 |    * **Usage**
12500 |    *
12501 |    * ```js
12502 |    * const texts = await page.getByRole('link').allInnerTexts();
12503 |    * ```
12504 |    *
12505 |    */
12506 |   allInnerTexts(): Promise<Array<string>>;
12507 | 
12508 |   /**
12509 |    * Returns an array of `node.textContent` values for all matching nodes.
12510 |    *
12511 |    * **NOTE** If you need to assert text on the page, prefer
12512 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
12513 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12514 |    *
12515 |    * **Usage**
12516 |    *
12517 |    * ```js
12518 |    * const texts = await page.getByRole('link').allTextContents();
12519 |    * ```
12520 |    *
12521 |    */
12522 |   allTextContents(): Promise<Array<string>>;
12523 | 
12524 |   /**
12525 |    * Creates a locator that matches both this locator and the argument locator.
12526 |    *
12527 |    * **Usage**
12528 |    *
12529 |    * The following example finds a button with a specific title.
12530 |    *
12531 |    * ```js
12532 |    * const button = page.getByRole('button').and(page.getByTitle('Subscribe'));
12533 |    * ```
12534 |    *
12535 |    * @param locator Additional locator to match.
12536 |    */
12537 |   and(locator: Locator): Locator;
12538 | 
12539 |   /**
12540 |    * Captures the aria snapshot of the given element. Read more about [aria snapshots](https://playwright.dev/docs/aria-snapshots) and
12541 |    * [expect(locator).toMatchAriaSnapshot(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot)
12542 |    * for the corresponding assertion.
12543 |    *
12544 |    * **Usage**
12545 |    *
12546 |    * ```js
12547 |    * await page.getByRole('link').ariaSnapshot();
12548 |    * ```
12549 |    *
12550 |    * **Details**
12551 |    *
12552 |    * This method captures the aria snapshot of the given element. The snapshot is a string that represents the state of
12553 |    * the element and its children. The snapshot can be used to assert the state of the element in the test, or to
12554 |    * compare it to state in the future.
12555 |    *
12556 |    * The ARIA snapshot is represented using [YAML](https://yaml.org/spec/1.2.2/) markup language:
12557 |    * - The keys of the objects are the roles and optional accessible names of the elements.
12558 |    * - The values are either text content or an array of child elements.
12559 |    * - Generic static text can be represented with the `text` key.
12560 |    *
12561 |    * Below is the HTML markup and the respective ARIA snapshot:
12562 |    *
12563 |    * ```html
12564 |    * <ul aria-label="Links">
12565 |    *   <li><a href="/">Home</a></li>
12566 |    *   <li><a href="/about">About</a></li>
12567 |    * <ul>
12568 |    * ```
12569 |    *
12570 |    * ```yml
12571 |    * - list "Links":
12572 |    *   - listitem:
12573 |    *     - link "Home"
12574 |    *   - listitem:
12575 |    *     - link "About"
12576 |    * ```
12577 |    *
12578 |    * @param options
12579 |    */
12580 |   ariaSnapshot(options?: {
12581 |     /**
12582 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12583 |      * option in the config, or by using the
12584 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12585 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12586 |      */
12587 |     timeout?: number;
12588 |   }): Promise<string>;
12589 | 
12590 |   /**
12591 |    * Calls [blur](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur) on the element.
12592 |    * @param options
12593 |    */
12594 |   blur(options?: {
12595 |     /**
12596 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12597 |      * option in the config, or by using the
12598 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12599 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12600 |      */
12601 |     timeout?: number;
12602 |   }): Promise<void>;
12603 | 
12604 |   /**
12605 |    * This method returns the bounding box of the element matching the locator, or `null` if the element is not visible.
12606 |    * The bounding box is calculated relative to the main frame viewport - which is usually the same as the browser
12607 |    * window.
12608 |    *
12609 |    * **Details**
12610 |    *
12611 |    * Scrolling affects the returned bounding box, similarly to
12612 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
12613 |    * That means `x` and/or `y` may be negative.
12614 |    *
12615 |    * Elements from child frames return the bounding box relative to the main frame, unlike the
12616 |    * [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
12617 |    *
12618 |    * Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the
12619 |    * following snippet should click the center of the element.
12620 |    *
12621 |    * **Usage**
12622 |    *
12623 |    * ```js
12624 |    * const box = await page.getByRole('button').boundingBox();
12625 |    * await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
12626 |    * ```
12627 |    *
12628 |    * @param options
12629 |    */
12630 |   boundingBox(options?: {
12631 |     /**
12632 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12633 |      * option in the config, or by using the
12634 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12635 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12636 |      */
12637 |     timeout?: number;
12638 |   }): Promise<null|{
12639 |     /**
12640 |      * the x coordinate of the element in pixels.
12641 |      */
12642 |     x: number;
12643 | 
12644 |     /**
12645 |      * the y coordinate of the element in pixels.
12646 |      */
12647 |     y: number;
12648 | 
12649 |     /**
12650 |      * the width of the element in pixels.
12651 |      */
12652 |     width: number;
12653 | 
12654 |     /**
12655 |      * the height of the element in pixels.
12656 |      */
12657 |     height: number;
12658 |   }>;
12659 | 
12660 |   /**
12661 |    * Ensure that checkbox or radio element is checked.
12662 |    *
12663 |    * **Details**
12664 |    *
12665 |    * Performs the following steps:
12666 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
12667 |    *    checked, this method returns immediately.
12668 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12669 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-check-option-force) option is set.
12670 |    * 1. Scroll the element into view if needed.
12671 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12672 |    *    element.
12673 |    * 1. Ensure that the element is now checked. If not, this method throws.
12674 |    *
12675 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12676 |    *
12677 |    * When all steps combined have not finished during the specified
12678 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-check-option-timeout), this method throws a
12679 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12680 |    *
12681 |    * **Usage**
12682 |    *
12683 |    * ```js
12684 |    * await page.getByRole('checkbox').check();
12685 |    * ```
12686 |    *
12687 |    * @param options
12688 |    */
12689 |   check(options?: {
12690 |     /**
12691 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12692 |      */
12693 |     force?: boolean;
12694 | 
12695 |     /**
12696 |      * This option has no effect.
12697 |      * @deprecated This option has no effect.
12698 |      */
12699 |     noWaitAfter?: boolean;
12700 | 
12701 |     /**
12702 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12703 |      * the element.
12704 |      */
12705 |     position?: {
12706 |       x: number;
12707 | 
12708 |       y: number;
12709 |     };
12710 | 
12711 |     /**
12712 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12713 |      * option in the config, or by using the
12714 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12715 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12716 |      */
12717 |     timeout?: number;
12718 | 
12719 |     /**
12720 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12721 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
12722 |      */
12723 |     trial?: boolean;
12724 |   }): Promise<void>;
12725 | 
12726 |   /**
12727 |    * Clear the input field.
12728 |    *
12729 |    * **Details**
12730 |    *
12731 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, clears it and triggers an
12732 |    * `input` event after clearing.
12733 |    *
12734 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
12735 |    * error. However, if the element is inside the `<label>` element that has an associated
12736 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be cleared
12737 |    * instead.
12738 |    *
12739 |    * **Usage**
12740 |    *
12741 |    * ```js
12742 |    * await page.getByRole('textbox').clear();
12743 |    * ```
12744 |    *
12745 |    * @param options
12746 |    */
12747 |   clear(options?: {
12748 |     /**
12749 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12750 |      */
12751 |     force?: boolean;
12752 | 
12753 |     /**
12754 |      * This option has no effect.
12755 |      * @deprecated This option has no effect.
12756 |      */
12757 |     noWaitAfter?: boolean;
12758 | 
12759 |     /**
12760 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12761 |      * option in the config, or by using the
12762 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12763 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12764 |      */
12765 |     timeout?: number;
12766 |   }): Promise<void>;
12767 | 
12768 |   /**
12769 |    * Click an element.
12770 |    *
12771 |    * **Details**
12772 |    *
12773 |    * This method clicks the element by performing the following steps:
12774 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12775 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-click-option-force) option is set.
12776 |    * 1. Scroll the element into view if needed.
12777 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
12778 |    *    element, or the specified
12779 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-click-option-position).
12780 |    * 1. Wait for initiated navigations to either succeed or fail, unless
12781 |    *    [`noWaitAfter`](https://playwright.dev/docs/api/class-locator#locator-click-option-no-wait-after) option is
12782 |    *    set.
12783 |    *
12784 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12785 |    *
12786 |    * When all steps combined have not finished during the specified
12787 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-click-option-timeout), this method throws a
12788 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12789 |    *
12790 |    * **Usage**
12791 |    *
12792 |    * Click a button:
12793 |    *
12794 |    * ```js
12795 |    * await page.getByRole('button').click();
12796 |    * ```
12797 |    *
12798 |    * Shift-right-click at a specific position on a canvas:
12799 |    *
12800 |    * ```js
12801 |    * await page.locator('canvas').click({
12802 |    *   button: 'right',
12803 |    *   modifiers: ['Shift'],
12804 |    *   position: { x: 23, y: 32 },
12805 |    * });
12806 |    * ```
12807 |    *
12808 |    * @param options
12809 |    */
12810 |   click(options?: {
12811 |     /**
12812 |      * Defaults to `left`.
12813 |      */
12814 |     button?: "left"|"right"|"middle";
12815 | 
12816 |     /**
12817 |      * defaults to 1. See [UIEvent.detail].
12818 |      */
12819 |     clickCount?: number;
12820 | 
12821 |     /**
12822 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
12823 |      */
12824 |     delay?: number;
12825 | 
12826 |     /**
12827 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12828 |      */
12829 |     force?: boolean;
12830 | 
12831 |     /**
12832 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
12833 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
12834 |      * "Control" on Windows and Linux and to "Meta" on macOS.
12835 |      */
12836 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
12837 | 
12838 |     /**
12839 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
12840 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
12841 |      * navigating to inaccessible pages. Defaults to `false`.
12842 |      * @deprecated This option will default to `true` in the future.
12843 |      */
12844 |     noWaitAfter?: boolean;
12845 | 
12846 |     /**
12847 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12848 |      * the element.
12849 |      */
12850 |     position?: {
12851 |       x: number;
12852 | 
12853 |       y: number;
12854 |     };
12855 | 
12856 |     /**
12857 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
12858 |      * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
12859 |      */
12860 |     steps?: number;
12861 | 
12862 |     /**
12863 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12864 |      * option in the config, or by using the
12865 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12866 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12867 |      */
12868 |     timeout?: number;
12869 | 
12870 |     /**
12871 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12872 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
12873 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
12874 |      * are pressed.
12875 |      */
12876 |     trial?: boolean;
12877 |   }): Promise<void>;
12878 | 
12879 |   /**
12880 |    * Returns a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object pointing to the same `iframe`
12881 |    * as this locator.
12882 |    *
12883 |    * Useful when you have a [Locator](https://playwright.dev/docs/api/class-locator) object obtained somewhere, and
12884 |    * later on would like to interact with the content inside the frame.
12885 |    *
12886 |    * For a reverse operation, use
12887 |    * [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
12888 |    *
12889 |    * **Usage**
12890 |    *
12891 |    * ```js
12892 |    * const locator = page.locator('iframe[name="embedded"]');
12893 |    * // ...
12894 |    * const frameLocator = locator.contentFrame();
12895 |    * await frameLocator.getByRole('button').click();
12896 |    * ```
12897 |    *
12898 |    */
12899 |   contentFrame(): FrameLocator;
12900 | 
12901 |   /**
12902 |    * Returns the number of elements matching the locator.
12903 |    *
12904 |    * **NOTE** If you need to assert the number of elements on the page, prefer
12905 |    * [expect(locator).toHaveCount(count[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-count)
12906 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
12907 |    *
12908 |    * **Usage**
12909 |    *
12910 |    * ```js
12911 |    * const count = await page.getByRole('listitem').count();
12912 |    * ```
12913 |    *
12914 |    */
12915 |   count(): Promise<number>;
12916 | 
12917 |   /**
12918 |    * Double-click an element.
12919 |    *
12920 |    * **Details**
12921 |    *
12922 |    * This method double clicks the element by performing the following steps:
12923 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
12924 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-force) option is set.
12925 |    * 1. Scroll the element into view if needed.
12926 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
12927 |    *    element, or the specified
12928 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-position).
12929 |    *
12930 |    * If the element is detached from the DOM at any moment during the action, this method throws.
12931 |    *
12932 |    * When all steps combined have not finished during the specified
12933 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-timeout), this method throws a
12934 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
12935 |    *
12936 |    * **NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.
12937 |    *
12938 |    * @param options
12939 |    */
12940 |   dblclick(options?: {
12941 |     /**
12942 |      * Defaults to `left`.
12943 |      */
12944 |     button?: "left"|"right"|"middle";
12945 | 
12946 |     /**
12947 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
12948 |      */
12949 |     delay?: number;
12950 | 
12951 |     /**
12952 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
12953 |      */
12954 |     force?: boolean;
12955 | 
12956 |     /**
12957 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
12958 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
12959 |      * "Control" on Windows and Linux and to "Meta" on macOS.
12960 |      */
12961 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
12962 | 
12963 |     /**
12964 |      * This option has no effect.
12965 |      * @deprecated This option has no effect.
12966 |      */
12967 |     noWaitAfter?: boolean;
12968 | 
12969 |     /**
12970 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
12971 |      * the element.
12972 |      */
12973 |     position?: {
12974 |       x: number;
12975 | 
12976 |       y: number;
12977 |     };
12978 | 
12979 |     /**
12980 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
12981 |      * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
12982 |      */
12983 |     steps?: number;
12984 | 
12985 |     /**
12986 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12987 |      * option in the config, or by using the
12988 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12989 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
12990 |      */
12991 |     timeout?: number;
12992 | 
12993 |     /**
12994 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
12995 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
12996 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
12997 |      * are pressed.
12998 |      */
12999 |     trial?: boolean;
13000 |   }): Promise<void>;
13001 | 
13002 |   /**
13003 |    * Describes the locator, description is used in the trace viewer and reports. Returns the locator pointing to the
13004 |    * same element.
13005 |    *
13006 |    * **Usage**
13007 |    *
13008 |    * ```js
13009 |    * const button = page.getByTestId('btn-sub').describe('Subscribe button');
13010 |    * await button.click();
13011 |    * ```
13012 |    *
13013 |    * @param description Locator description.
13014 |    */
13015 |   describe(description: string): Locator;
13016 | 
13017 |   /**
13018 |    * Returns locator description previously set with
13019 |    * [locator.describe(description)](https://playwright.dev/docs/api/class-locator#locator-describe). Returns `null` if
13020 |    * no custom description has been set. Prefer
13021 |    * [locator.toString()](https://playwright.dev/docs/api/class-locator#locator-to-string) for a human-readable
13022 |    * representation, as it uses the description when available.
13023 |    *
13024 |    * **Usage**
13025 |    *
13026 |    * ```js
13027 |    * const button = page.getByRole('button').describe('Subscribe button');
13028 |    * console.log(button.description()); // "Subscribe button"
13029 |    *
13030 |    * const input = page.getByRole('textbox');
13031 |    * console.log(input.description()); // null
13032 |    * ```
13033 |    *
13034 |    */
13035 |   description(): null|string;
13036 | 
13037 |   /**
13038 |    * Programmatically dispatch an event on the matching element.
13039 |    *
13040 |    * **Usage**
13041 |    *
13042 |    * ```js
13043 |    * await locator.dispatchEvent('click');
13044 |    * ```
13045 |    *
13046 |    * **Details**
13047 |    *
13048 |    * The snippet above dispatches the `click` event on the element. Regardless of the visibility state of the element,
13049 |    * `click` is dispatched. This is equivalent to calling
13050 |    * [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
13051 |    *
13052 |    * Under the hood, it creates an instance of an event based on the given
13053 |    * [`type`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-type), initializes it with
13054 |    * [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) properties
13055 |    * and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
13056 |    *
13057 |    * Since [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) is
13058 |    * event-specific, please refer to the events documentation for the lists of initial properties:
13059 |    * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
13060 |    * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
13061 |    * - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
13062 |    * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
13063 |    * - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)
13064 |    * - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)
13065 |    * - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)
13066 |    * - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
13067 |    * - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
13068 |    * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
13069 |    *
13070 |    * You can also specify [JSHandle](https://playwright.dev/docs/api/class-jshandle) as the property value if you want
13071 |    * live objects to be passed into the event:
13072 |    *
13073 |    * ```js
13074 |    * const dataTransfer = await page.evaluateHandle(() => new DataTransfer());
13075 |    * await locator.dispatchEvent('dragstart', { dataTransfer });
13076 |    * ```
13077 |    *
13078 |    * @param type DOM event type: `"click"`, `"dragstart"`, etc.
13079 |    * @param eventInit Optional event-specific initialization properties.
13080 |    * @param options
13081 |    */
13082 |   dispatchEvent(type: string, eventInit?: EvaluationArgument, options?: {
13083 |     /**
13084 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13085 |      * option in the config, or by using the
13086 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13087 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13088 |      */
13089 |     timeout?: number;
13090 |   }): Promise<void>;
13091 | 
13092 |   /**
13093 |    * Drag the source element towards the target element and drop it.
13094 |    *
13095 |    * **Details**
13096 |    *
13097 |    * This method drags the locator to another target locator or target position. It will first move to the source
13098 |    * element, perform a `mousedown`, then move to the target element or position and perform a `mouseup`.
13099 |    *
13100 |    * **Usage**
13101 |    *
13102 |    * ```js
13103 |    * const source = page.locator('#source');
13104 |    * const target = page.locator('#target');
13105 |    *
13106 |    * await source.dragTo(target);
13107 |    * // or specify exact positions relative to the top-left corners of the elements:
13108 |    * await source.dragTo(target, {
13109 |    *   sourcePosition: { x: 34, y: 7 },
13110 |    *   targetPosition: { x: 10, y: 20 },
13111 |    * });
13112 |    * ```
13113 |    *
13114 |    * @param target Locator of the element to drag to.
13115 |    * @param options
13116 |    */
13117 |   dragTo(target: Locator, options?: {
13118 |     /**
13119 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
13120 |      */
13121 |     force?: boolean;
13122 | 
13123 |     /**
13124 |      * This option has no effect.
13125 |      * @deprecated This option has no effect.
13126 |      */
13127 |     noWaitAfter?: boolean;
13128 | 
13129 |     /**
13130 |      * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
13131 |      * specified, some visible point of the element is used.
13132 |      */
13133 |     sourcePosition?: {
13134 |       x: number;
13135 | 
13136 |       y: number;
13137 |     };
13138 | 
13139 |     /**
13140 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between the `mousedown` and `mouseup`
13141 |      * of the drag. When set to 1, emits a single `mousemove` event at the destination location.
13142 |      */
13143 |     steps?: number;
13144 | 
13145 |     /**
13146 |      * Drops on the target element at this point relative to the top-left corner of the element's padding box. If not
13147 |      * specified, some visible point of the element is used.
13148 |      */
13149 |     targetPosition?: {
13150 |       x: number;
13151 | 
13152 |       y: number;
13153 |     };
13154 | 
13155 |     /**
13156 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13157 |      * option in the config, or by using the
13158 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13159 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13160 |      */
13161 |     timeout?: number;
13162 | 
13163 |     /**
13164 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
13165 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
13166 |      */
13167 |     trial?: boolean;
13168 |   }): Promise<void>;
13169 | 
13170 |   /**
13171 |    * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
13172 |    * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
13173 |    *
13174 |    * Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.
13175 |    */
13176 |   elementHandles(): Promise<Array<ElementHandle>>;
13177 | 
13178 |   /**
13179 |    * Set a value to the input field.
13180 |    *
13181 |    * **Usage**
13182 |    *
13183 |    * ```js
13184 |    * await page.getByRole('textbox').fill('example value');
13185 |    * ```
13186 |    *
13187 |    * **Details**
13188 |    *
13189 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an
13190 |    * `input` event after filling. Note that you can pass an empty string to clear the input field.
13191 |    *
13192 |    * If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
13193 |    * error. However, if the element is inside the `<label>` element that has an associated
13194 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be filled
13195 |    * instead.
13196 |    *
13197 |    * To send fine-grained keyboard events, use
13198 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
13199 |    * @param value Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
13200 |    * @param options
13201 |    */
13202 |   fill(value: string, options?: {
13203 |     /**
13204 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
13205 |      */
13206 |     force?: boolean;
13207 | 
13208 |     /**
13209 |      * This option has no effect.
13210 |      * @deprecated This option has no effect.
13211 |      */
13212 |     noWaitAfter?: boolean;
13213 | 
13214 |     /**
13215 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13216 |      * option in the config, or by using the
13217 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13218 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13219 |      */
13220 |     timeout?: number;
13221 |   }): Promise<void>;
13222 | 
13223 |   /**
13224 |    * This method narrows existing locator according to the options, for example filters by text. It can be chained to
13225 |    * filter multiple times.
13226 |    *
13227 |    * **Usage**
13228 |    *
13229 |    * ```js
13230 |    * const rowLocator = page.locator('tr');
13231 |    * // ...
13232 |    * await rowLocator
13233 |    *     .filter({ hasText: 'text in column 1' })
13234 |    *     .filter({ has: page.getByRole('button', { name: 'column 2 button' }) })
13235 |    *     .screenshot();
13236 |    * ```
13237 |    *
13238 |    * @param options
13239 |    */
13240 |   filter(options?: {
13241 |     /**
13242 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
13243 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
13244 |      *
13245 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
13246 |      * the document root. For example, you can find `content` that has `div` in
13247 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
13248 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
13249 |      *
13250 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13251 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13252 |      */
13253 |     has?: Locator;
13254 | 
13255 |     /**
13256 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
13257 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
13258 |      *
13259 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13260 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13261 |      */
13262 |     hasNot?: Locator;
13263 | 
13264 |     /**
13265 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
13266 |      * When passed a [string], matching is case-insensitive and searches for a substring.
13267 |      */
13268 |     hasNotText?: string|RegExp;
13269 | 
13270 |     /**
13271 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
13272 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
13273 |      * `<article><div>Playwright</div></article>`.
13274 |      */
13275 |     hasText?: string|RegExp;
13276 | 
13277 |     /**
13278 |      * Only matches visible or invisible elements.
13279 |      */
13280 |     visible?: boolean;
13281 |   }): Locator;
13282 | 
13283 |   /**
13284 |    * Returns locator to the first matching element.
13285 |    */
13286 |   first(): Locator;
13287 | 
13288 |   /**
13289 |    * Calls [focus](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus) on the matching element.
13290 |    * @param options
13291 |    */
13292 |   focus(options?: {
13293 |     /**
13294 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13295 |      * option in the config, or by using the
13296 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13297 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13298 |      */
13299 |     timeout?: number;
13300 |   }): Promise<void>;
13301 | 
13302 |   /**
13303 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow locating elements in
13304 |    * that iframe:
13305 |    *
13306 |    * **Usage**
13307 |    *
13308 |    * ```js
13309 |    * const locator = page.frameLocator('iframe').getByText('Submit');
13310 |    * await locator.click();
13311 |    * ```
13312 |    *
13313 |    * @param selector A selector to use when resolving DOM element.
13314 |    */
13315 |   frameLocator(selector: string): FrameLocator;
13316 | 
13317 |   /**
13318 |    * Returns the matching element's attribute value.
13319 |    *
13320 |    * **NOTE** If you need to assert an element's attribute, prefer
13321 |    * [expect(locator).toHaveAttribute(name, value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute)
13322 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13323 |    *
13324 |    * @param name Attribute name to get the value for.
13325 |    * @param options
13326 |    */
13327 |   getAttribute(name: string, options?: {
13328 |     /**
13329 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13330 |      * option in the config, or by using the
13331 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13332 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13333 |      */
13334 |     timeout?: number;
13335 |   }): Promise<null|string>;
13336 | 
13337 |   /**
13338 |    * Allows locating elements by their alt text.
13339 |    *
13340 |    * **Usage**
13341 |    *
13342 |    * For example, this method will find the image by alt text "Playwright logo":
13343 |    *
13344 |    * ```html
13345 |    * <img alt='Playwright logo'>
13346 |    * ```
13347 |    *
13348 |    * ```js
13349 |    * await page.getByAltText('Playwright logo').click();
13350 |    * ```
13351 |    *
13352 |    * @param text Text to locate the element for.
13353 |    * @param options
13354 |    */
13355 |   getByAltText(text: string|RegExp, options?: {
13356 |     /**
13357 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13358 |      * regular expression. Note that exact match still trims whitespace.
13359 |      */
13360 |     exact?: boolean;
13361 |   }): Locator;
13362 | 
13363 |   /**
13364 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
13365 |    * `aria-label` attribute.
13366 |    *
13367 |    * **Usage**
13368 |    *
13369 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
13370 |    *
13371 |    * ```html
13372 |    * <input aria-label="Username">
13373 |    * <label for="password-input">Password:</label>
13374 |    * <input id="password-input">
13375 |    * ```
13376 |    *
13377 |    * ```js
13378 |    * await page.getByLabel('Username').fill('john');
13379 |    * await page.getByLabel('Password').fill('secret');
13380 |    * ```
13381 |    *
13382 |    * @param text Text to locate the element for.
13383 |    * @param options
13384 |    */
13385 |   getByLabel(text: string|RegExp, options?: {
13386 |     /**
13387 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13388 |      * regular expression. Note that exact match still trims whitespace.
13389 |      */
13390 |     exact?: boolean;
13391 |   }): Locator;
13392 | 
13393 |   /**
13394 |    * Allows locating input elements by the placeholder text.
13395 |    *
13396 |    * **Usage**
13397 |    *
13398 |    * For example, consider the following DOM structure.
13399 |    *
13400 |    * ```html
13401 |    * <input type="email" placeholder="name@example.com" />
13402 |    * ```
13403 |    *
13404 |    * You can fill the input after locating it by the placeholder text:
13405 |    *
13406 |    * ```js
13407 |    * await page
13408 |    *     .getByPlaceholder('name@example.com')
13409 |    *     .fill('playwright@microsoft.com');
13410 |    * ```
13411 |    *
13412 |    * @param text Text to locate the element for.
13413 |    * @param options
13414 |    */
13415 |   getByPlaceholder(text: string|RegExp, options?: {
13416 |     /**
13417 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13418 |      * regular expression. Note that exact match still trims whitespace.
13419 |      */
13420 |     exact?: boolean;
13421 |   }): Locator;
13422 | 
13423 |   /**
13424 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
13425 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
13426 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
13427 |    *
13428 |    * **Usage**
13429 |    *
13430 |    * Consider the following DOM structure.
13431 |    *
13432 |    * ```html
13433 |    * <h3>Sign up</h3>
13434 |    * <label>
13435 |    *   <input type="checkbox" /> Subscribe
13436 |    * </label>
13437 |    * <br/>
13438 |    * <button>Submit</button>
13439 |    * ```
13440 |    *
13441 |    * You can locate each element by it's implicit role:
13442 |    *
13443 |    * ```js
13444 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
13445 |    *
13446 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
13447 |    *
13448 |    * await page.getByRole('button', { name: /submit/i }).click();
13449 |    * ```
13450 |    *
13451 |    * **Details**
13452 |    *
13453 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
13454 |    * about the ARIA guidelines.
13455 |    *
13456 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
13457 |    * that is recognized by the role selector. You can find all the
13458 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
13459 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
13460 |    * @param role Required aria role.
13461 |    * @param options
13462 |    */
13463 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
13464 |     /**
13465 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
13466 |      *
13467 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
13468 |      */
13469 |     checked?: boolean;
13470 | 
13471 |     /**
13472 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
13473 |      *
13474 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
13475 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
13476 |      *
13477 |      */
13478 |     disabled?: boolean;
13479 | 
13480 |     /**
13481 |      * Whether [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is matched exactly:
13482 |      * case-sensitive and whole-string. Defaults to false. Ignored when
13483 |      * [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is a regular expression.
13484 |      * Note that exact match still trims whitespace.
13485 |      */
13486 |     exact?: boolean;
13487 | 
13488 |     /**
13489 |      * An attribute that is usually set by `aria-expanded`.
13490 |      *
13491 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
13492 |      */
13493 |     expanded?: boolean;
13494 | 
13495 |     /**
13496 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
13497 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
13498 |      *
13499 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
13500 |      */
13501 |     includeHidden?: boolean;
13502 | 
13503 |     /**
13504 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
13505 |      * for `<h1>-<h6>` elements.
13506 |      *
13507 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
13508 |      */
13509 |     level?: number;
13510 | 
13511 |     /**
13512 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
13513 |      * case-insensitive and searches for a substring, use
13514 |      * [`exact`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-exact) to control this behavior.
13515 |      *
13516 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
13517 |      */
13518 |     name?: string|RegExp;
13519 | 
13520 |     /**
13521 |      * An attribute that is usually set by `aria-pressed`.
13522 |      *
13523 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
13524 |      */
13525 |     pressed?: boolean;
13526 | 
13527 |     /**
13528 |      * An attribute that is usually set by `aria-selected`.
13529 |      *
13530 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
13531 |      */
13532 |     selected?: boolean;
13533 |   }): Locator;
13534 | 
13535 |   /**
13536 |    * Locate element by the test id.
13537 |    *
13538 |    * **Usage**
13539 |    *
13540 |    * Consider the following DOM structure.
13541 |    *
13542 |    * ```html
13543 |    * <button data-testid="directions">Itinéraire</button>
13544 |    * ```
13545 |    *
13546 |    * You can locate the element by it's test id:
13547 |    *
13548 |    * ```js
13549 |    * await page.getByTestId('directions').click();
13550 |    * ```
13551 |    *
13552 |    * **Details**
13553 |    *
13554 |    * By default, the `data-testid` attribute is used as a test id. Use
13555 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
13556 |    * to configure a different test id attribute if necessary.
13557 |    *
13558 |    * ```js
13559 |    * // Set custom test id attribute from @playwright/test config:
13560 |    * import { defineConfig } from '@playwright/test';
13561 |    *
13562 |    * export default defineConfig({
13563 |    *   use: {
13564 |    *     testIdAttribute: 'data-pw'
13565 |    *   },
13566 |    * });
13567 |    * ```
13568 |    *
13569 |    * @param testId Id to locate the element by.
13570 |    */
13571 |   getByTestId(testId: string|RegExp): Locator;
13572 | 
13573 |   /**
13574 |    * Allows locating elements that contain given text.
13575 |    *
13576 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
13577 |    * match by another criteria, like an accessible role, and then filter by the text content.
13578 |    *
13579 |    * **Usage**
13580 |    *
13581 |    * Consider the following DOM structure:
13582 |    *
13583 |    * ```html
13584 |    * <div>Hello <span>world</span></div>
13585 |    * <div>Hello</div>
13586 |    * ```
13587 |    *
13588 |    * You can locate by text substring, exact string, or a regular expression:
13589 |    *
13590 |    * ```js
13591 |    * // Matches <span>
13592 |    * page.getByText('world');
13593 |    *
13594 |    * // Matches first <div>
13595 |    * page.getByText('Hello world');
13596 |    *
13597 |    * // Matches second <div>
13598 |    * page.getByText('Hello', { exact: true });
13599 |    *
13600 |    * // Matches both <div>s
13601 |    * page.getByText(/Hello/);
13602 |    *
13603 |    * // Matches second <div>
13604 |    * page.getByText(/^hello$/i);
13605 |    * ```
13606 |    *
13607 |    * **Details**
13608 |    *
13609 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
13610 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
13611 |    *
13612 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
13613 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
13614 |    * @param text Text to locate the element for.
13615 |    * @param options
13616 |    */
13617 |   getByText(text: string|RegExp, options?: {
13618 |     /**
13619 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13620 |      * regular expression. Note that exact match still trims whitespace.
13621 |      */
13622 |     exact?: boolean;
13623 |   }): Locator;
13624 | 
13625 |   /**
13626 |    * Allows locating elements by their title attribute.
13627 |    *
13628 |    * **Usage**
13629 |    *
13630 |    * Consider the following DOM structure.
13631 |    *
13632 |    * ```html
13633 |    * <span title='Issues count'>25 issues</span>
13634 |    * ```
13635 |    *
13636 |    * You can check the issues count after locating it by the title text:
13637 |    *
13638 |    * ```js
13639 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
13640 |    * ```
13641 |    *
13642 |    * @param text Text to locate the element for.
13643 |    * @param options
13644 |    */
13645 |   getByTitle(text: string|RegExp, options?: {
13646 |     /**
13647 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
13648 |      * regular expression. Note that exact match still trims whitespace.
13649 |      */
13650 |     exact?: boolean;
13651 |   }): Locator;
13652 | 
13653 |   /**
13654 |    * Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses
13655 |    * [locator.highlight()](https://playwright.dev/docs/api/class-locator#locator-highlight).
13656 |    */
13657 |   highlight(): Promise<void>;
13658 | 
13659 |   /**
13660 |    * Hover over the matching element.
13661 |    *
13662 |    * **Usage**
13663 |    *
13664 |    * ```js
13665 |    * await page.getByRole('link').hover();
13666 |    * ```
13667 |    *
13668 |    * **Details**
13669 |    *
13670 |    * This method hovers over the element by performing the following steps:
13671 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
13672 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-hover-option-force) option is set.
13673 |    * 1. Scroll the element into view if needed.
13674 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
13675 |    *    element, or the specified
13676 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-hover-option-position).
13677 |    *
13678 |    * If the element is detached from the DOM at any moment during the action, this method throws.
13679 |    *
13680 |    * When all steps combined have not finished during the specified
13681 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-hover-option-timeout), this method throws a
13682 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
13683 |    * @param options
13684 |    */
13685 |   hover(options?: {
13686 |     /**
13687 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
13688 |      */
13689 |     force?: boolean;
13690 | 
13691 |     /**
13692 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
13693 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
13694 |      * "Control" on Windows and Linux and to "Meta" on macOS.
13695 |      */
13696 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
13697 | 
13698 |     /**
13699 |      * This option has no effect.
13700 |      * @deprecated This option has no effect.
13701 |      */
13702 |     noWaitAfter?: boolean;
13703 | 
13704 |     /**
13705 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
13706 |      * the element.
13707 |      */
13708 |     position?: {
13709 |       x: number;
13710 | 
13711 |       y: number;
13712 |     };
13713 | 
13714 |     /**
13715 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13716 |      * option in the config, or by using the
13717 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13718 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13719 |      */
13720 |     timeout?: number;
13721 | 
13722 |     /**
13723 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
13724 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
13725 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
13726 |      * are pressed.
13727 |      */
13728 |     trial?: boolean;
13729 |   }): Promise<void>;
13730 | 
13731 |   /**
13732 |    * Returns the [`element.innerHTML`](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).
13733 |    * @param options
13734 |    */
13735 |   innerHTML(options?: {
13736 |     /**
13737 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13738 |      * option in the config, or by using the
13739 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13740 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13741 |      */
13742 |     timeout?: number;
13743 |   }): Promise<string>;
13744 | 
13745 |   /**
13746 |    * Returns the [`element.innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText).
13747 |    *
13748 |    * **NOTE** If you need to assert text on the page, prefer
13749 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
13750 |    * with
13751 |    * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
13752 |    * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13753 |    *
13754 |    * @param options
13755 |    */
13756 |   innerText(options?: {
13757 |     /**
13758 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13759 |      * option in the config, or by using the
13760 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13761 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13762 |      */
13763 |     timeout?: number;
13764 |   }): Promise<string>;
13765 | 
13766 |   /**
13767 |    * Returns the value for the matching `<input>` or `<textarea>` or `<select>` element.
13768 |    *
13769 |    * **NOTE** If you need to assert input value, prefer
13770 |    * [expect(locator).toHaveValue(value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-value)
13771 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13772 |    *
13773 |    * **Usage**
13774 |    *
13775 |    * ```js
13776 |    * const value = await page.getByRole('textbox').inputValue();
13777 |    * ```
13778 |    *
13779 |    * **Details**
13780 |    *
13781 |    * Throws elements that are not an input, textarea or a select. However, if the element is inside the `<label>`
13782 |    * element that has an associated
13783 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), returns the value of the
13784 |    * control.
13785 |    * @param options
13786 |    */
13787 |   inputValue(options?: {
13788 |     /**
13789 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13790 |      * option in the config, or by using the
13791 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13792 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13793 |      */
13794 |     timeout?: number;
13795 |   }): Promise<string>;
13796 | 
13797 |   /**
13798 |    * Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
13799 |    *
13800 |    * **NOTE** If you need to assert that checkbox is checked, prefer
13801 |    * [expect(locator).toBeChecked([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-checked)
13802 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13803 |    *
13804 |    * **Usage**
13805 |    *
13806 |    * ```js
13807 |    * const checked = await page.getByRole('checkbox').isChecked();
13808 |    * ```
13809 |    *
13810 |    * @param options
13811 |    */
13812 |   isChecked(options?: {
13813 |     /**
13814 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13815 |      * option in the config, or by using the
13816 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13817 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13818 |      */
13819 |     timeout?: number;
13820 |   }): Promise<boolean>;
13821 | 
13822 |   /**
13823 |    * Returns whether the element is disabled, the opposite of [enabled](https://playwright.dev/docs/actionability#enabled).
13824 |    *
13825 |    * **NOTE** If you need to assert that an element is disabled, prefer
13826 |    * [expect(locator).toBeDisabled([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-disabled)
13827 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13828 |    *
13829 |    * **Usage**
13830 |    *
13831 |    * ```js
13832 |    * const disabled = await page.getByRole('button').isDisabled();
13833 |    * ```
13834 |    *
13835 |    * @param options
13836 |    */
13837 |   isDisabled(options?: {
13838 |     /**
13839 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13840 |      * option in the config, or by using the
13841 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13842 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13843 |      */
13844 |     timeout?: number;
13845 |   }): Promise<boolean>;
13846 | 
13847 |   /**
13848 |    * Returns whether the element is [editable](https://playwright.dev/docs/actionability#editable). If the target element is not an `<input>`,
13849 |    * `<textarea>`, `<select>`, `[contenteditable]` and does not have a role allowing `[aria-readonly]`, this method
13850 |    * throws an error.
13851 |    *
13852 |    * **NOTE** If you need to assert that an element is editable, prefer
13853 |    * [expect(locator).toBeEditable([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-editable)
13854 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13855 |    *
13856 |    * **Usage**
13857 |    *
13858 |    * ```js
13859 |    * const editable = await page.getByRole('textbox').isEditable();
13860 |    * ```
13861 |    *
13862 |    * @param options
13863 |    */
13864 |   isEditable(options?: {
13865 |     /**
13866 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13867 |      * option in the config, or by using the
13868 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13869 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13870 |      */
13871 |     timeout?: number;
13872 |   }): Promise<boolean>;
13873 | 
13874 |   /**
13875 |    * Returns whether the element is [enabled](https://playwright.dev/docs/actionability#enabled).
13876 |    *
13877 |    * **NOTE** If you need to assert that an element is enabled, prefer
13878 |    * [expect(locator).toBeEnabled([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-enabled)
13879 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13880 |    *
13881 |    * **Usage**
13882 |    *
13883 |    * ```js
13884 |    * const enabled = await page.getByRole('button').isEnabled();
13885 |    * ```
13886 |    *
13887 |    * @param options
13888 |    */
13889 |   isEnabled(options?: {
13890 |     /**
13891 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13892 |      * option in the config, or by using the
13893 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13894 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13895 |      */
13896 |     timeout?: number;
13897 |   }): Promise<boolean>;
13898 | 
13899 |   /**
13900 |    * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
13901 |    *
13902 |    * **NOTE** If you need to assert that element is hidden, prefer
13903 |    * [expect(locator).toBeHidden([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-hidden)
13904 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13905 |    *
13906 |    * **Usage**
13907 |    *
13908 |    * ```js
13909 |    * const hidden = await page.getByRole('button').isHidden();
13910 |    * ```
13911 |    *
13912 |    * @param options
13913 |    */
13914 |   isHidden(options?: {
13915 |     /**
13916 |      * @deprecated This option is ignored.
13917 |      * [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden) does not wait for
13918 |      * the element to become hidden and returns immediately.
13919 |      */
13920 |     timeout?: number;
13921 |   }): Promise<boolean>;
13922 | 
13923 |   /**
13924 |    * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
13925 |    *
13926 |    * **NOTE** If you need to assert that element is visible, prefer
13927 |    * [expect(locator).toBeVisible([options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-visible)
13928 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
13929 |    *
13930 |    * **Usage**
13931 |    *
13932 |    * ```js
13933 |    * const visible = await page.getByRole('button').isVisible();
13934 |    * ```
13935 |    *
13936 |    * @param options
13937 |    */
13938 |   isVisible(options?: {
13939 |     /**
13940 |      * @deprecated This option is ignored.
13941 |      * [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible) does not wait for
13942 |      * the element to become visible and returns immediately.
13943 |      */
13944 |     timeout?: number;
13945 |   }): Promise<boolean>;
13946 | 
13947 |   /**
13948 |    * Returns locator to the last matching element.
13949 |    *
13950 |    * **Usage**
13951 |    *
13952 |    * ```js
13953 |    * const banana = await page.getByRole('listitem').last();
13954 |    * ```
13955 |    *
13956 |    */
13957 |   last(): Locator;
13958 | 
13959 |   /**
13960 |    * The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
13961 |    * options, similar to [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter)
13962 |    * method.
13963 |    *
13964 |    * [Learn more about locators](https://playwright.dev/docs/locators).
13965 |    * @param selectorOrLocator A selector or locator to use when resolving DOM element.
13966 |    * @param options
13967 |    */
13968 |   locator(selectorOrLocator: string|Locator, options?: {
13969 |     /**
13970 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
13971 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
13972 |      *
13973 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
13974 |      * the document root. For example, you can find `content` that has `div` in
13975 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
13976 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
13977 |      *
13978 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13979 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13980 |      */
13981 |     has?: Locator;
13982 | 
13983 |     /**
13984 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
13985 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
13986 |      *
13987 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
13988 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
13989 |      */
13990 |     hasNot?: Locator;
13991 | 
13992 |     /**
13993 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
13994 |      * When passed a [string], matching is case-insensitive and searches for a substring.
13995 |      */
13996 |     hasNotText?: string|RegExp;
13997 | 
13998 |     /**
13999 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
14000 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
14001 |      * `<article><div>Playwright</div></article>`.
14002 |      */
14003 |     hasText?: string|RegExp;
14004 |   }): Locator;
14005 | 
14006 |   /**
14007 |    * Returns locator to the n-th matching element. It's zero based, `nth(0)` selects the first element.
14008 |    *
14009 |    * **Usage**
14010 |    *
14011 |    * ```js
14012 |    * const banana = await page.getByRole('listitem').nth(2);
14013 |    * ```
14014 |    *
14015 |    * @param index
14016 |    */
14017 |   nth(index: number): Locator;
14018 | 
14019 |   /**
14020 |    * Creates a locator matching all elements that match one or both of the two locators.
14021 |    *
14022 |    * Note that when both locators match something, the resulting locator will have multiple matches, potentially causing
14023 |    * a [locator strictness](https://playwright.dev/docs/locators#strictness) violation.
14024 |    *
14025 |    * **Usage**
14026 |    *
14027 |    * Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog
14028 |    * shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.
14029 |    *
14030 |    * **NOTE** If both "New email" button and security dialog appear on screen, the "or" locator will match both of them,
14031 |    * possibly throwing the ["strict mode violation" error](https://playwright.dev/docs/locators#strictness). In this case, you can use
14032 |    * [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first) to only match one of them.
14033 |    *
14034 |    * ```js
14035 |    * const newEmail = page.getByRole('button', { name: 'New' });
14036 |    * const dialog = page.getByText('Confirm security settings');
14037 |    * await expect(newEmail.or(dialog).first()).toBeVisible();
14038 |    * if (await dialog.isVisible())
14039 |    *   await page.getByRole('button', { name: 'Dismiss' }).click();
14040 |    * await newEmail.click();
14041 |    * ```
14042 |    *
14043 |    * @param locator Alternative locator to match.
14044 |    */
14045 |   or(locator: Locator): Locator;
14046 | 
14047 |   /**
14048 |    * A page this locator belongs to.
14049 |    */
14050 |   page(): Page;
14051 | 
14052 |   /**
14053 |    * Focuses the matching element and presses a combination of the keys.
14054 |    *
14055 |    * **Usage**
14056 |    *
14057 |    * ```js
14058 |    * await page.getByRole('textbox').press('Backspace');
14059 |    * ```
14060 |    *
14061 |    * **Details**
14062 |    *
14063 |    * Focuses the element, and then uses
14064 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
14065 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
14066 |    *
14067 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) can specify the intended
14068 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
14069 |    * to generate the text for. A superset of the
14070 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) values can be found
14071 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
14072 |    *
14073 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
14074 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
14075 |    * etc.
14076 |    *
14077 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
14078 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
14079 |    *
14080 |    * Holding down `Shift` will type the text that corresponds to the
14081 |    * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) in the upper case.
14082 |    *
14083 |    * If [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) is a single character, it is
14084 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
14085 |    *
14086 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
14087 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
14088 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
14089 |    * @param options
14090 |    */
14091 |   press(key: string, options?: {
14092 |     /**
14093 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
14094 |      */
14095 |     delay?: number;
14096 | 
14097 |     /**
14098 |      * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You
14099 |      * can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as
14100 |      * navigating to inaccessible pages. Defaults to `false`.
14101 |      * @deprecated This option will default to `true` in the future.
14102 |      */
14103 |     noWaitAfter?: boolean;
14104 | 
14105 |     /**
14106 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14107 |      * option in the config, or by using the
14108 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14109 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14110 |      */
14111 |     timeout?: number;
14112 |   }): Promise<void>;
14113 | 
14114 |   /**
14115 |    * **NOTE** In most cases, you should use
14116 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
14117 |    * to press keys one by one if there is special keyboard handling on the page.
14118 |    *
14119 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
14120 |    * text.
14121 |    *
14122 |    * To press a special key, like `Control` or `ArrowDown`, use
14123 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press).
14124 |    *
14125 |    * **Usage**
14126 |    *
14127 |    * ```js
14128 |    * await locator.pressSequentially('Hello'); // Types instantly
14129 |    * await locator.pressSequentially('World', { delay: 100 }); // Types slower, like a user
14130 |    * ```
14131 |    *
14132 |    * An example of typing into a text field and then submitting the form:
14133 |    *
14134 |    * ```js
14135 |    * const locator = page.getByLabel('Password');
14136 |    * await locator.pressSequentially('my password');
14137 |    * await locator.press('Enter');
14138 |    * ```
14139 |    *
14140 |    * @param text String of characters to sequentially press into a focused element.
14141 |    * @param options
14142 |    */
14143 |   pressSequentially(text: string, options?: {
14144 |     /**
14145 |      * Time to wait between key presses in milliseconds. Defaults to 0.
14146 |      */
14147 |     delay?: number;
14148 | 
14149 |     /**
14150 |      * This option has no effect.
14151 |      * @deprecated This option has no effect.
14152 |      */
14153 |     noWaitAfter?: boolean;
14154 | 
14155 |     /**
14156 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14157 |      * option in the config, or by using the
14158 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14159 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14160 |      */
14161 |     timeout?: number;
14162 |   }): Promise<void>;
14163 | 
14164 |   /**
14165 |    * Take a screenshot of the element matching the locator.
14166 |    *
14167 |    * **Usage**
14168 |    *
14169 |    * ```js
14170 |    * await page.getByRole('link').screenshot();
14171 |    * ```
14172 |    *
14173 |    * Disable animations and save screenshot to a file:
14174 |    *
14175 |    * ```js
14176 |    * await page.getByRole('link').screenshot({ animations: 'disabled', path: 'link.png' });
14177 |    * ```
14178 |    *
14179 |    * **Details**
14180 |    *
14181 |    * This method captures a screenshot of the page, clipped to the size and position of a particular element matching
14182 |    * the locator. If the element is covered by other elements, it will not be actually visible on the screenshot. If the
14183 |    * element is a scrollable container, only the currently scrolled content will be visible on the screenshot.
14184 |    *
14185 |    * This method waits for the [actionability](https://playwright.dev/docs/actionability) checks, then scrolls element into view before taking
14186 |    * a screenshot. If the element is detached from DOM, the method throws an error.
14187 |    *
14188 |    * Returns the buffer with the captured screenshot.
14189 |    * @param options
14190 |    */
14191 |   screenshot(options?: LocatorScreenshotOptions): Promise<Buffer>;
14192 | 
14193 |   /**
14194 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then tries to scroll element into view, unless
14195 |    * it is completely visible as defined by
14196 |    * [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)'s `ratio`.
14197 |    *
14198 |    * See [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
14199 |    * @param options
14200 |    */
14201 |   scrollIntoViewIfNeeded(options?: {
14202 |     /**
14203 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14204 |      * option in the config, or by using the
14205 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14206 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14207 |      */
14208 |     timeout?: number;
14209 |   }): Promise<void>;
14210 | 
14211 |   /**
14212 |    * Selects option or options in `<select>`.
14213 |    *
14214 |    * **Details**
14215 |    *
14216 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in
14217 |    * the `<select>` element and selects these options.
14218 |    *
14219 |    * If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
14220 |    * the `<label>` element that has an associated
14221 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), the control will be used
14222 |    * instead.
14223 |    *
14224 |    * Returns the array of option values that have been successfully selected.
14225 |    *
14226 |    * Triggers a `change` and `input` event once all the provided options have been selected.
14227 |    *
14228 |    * **Usage**
14229 |    *
14230 |    * ```html
14231 |    * <select multiple>
14232 |    *   <option value="red">Red</option>
14233 |    *   <option value="green">Green</option>
14234 |    *   <option value="blue">Blue</option>
14235 |    * </select>
14236 |    * ```
14237 |    *
14238 |    * ```js
14239 |    * // single selection matching the value or label
14240 |    * element.selectOption('blue');
14241 |    *
14242 |    * // single selection matching the label
14243 |    * element.selectOption({ label: 'Blue' });
14244 |    *
14245 |    * // multiple selection for red, green and blue options
14246 |    * element.selectOption(['red', 'green', 'blue']);
14247 |    * ```
14248 |    *
14249 |    * @param values Options to select. If the `<select>` has the `multiple` attribute, all matching options are selected, otherwise
14250 |    * only the first option matching one of the passed options is selected. String values are matching both values and
14251 |    * labels. Option is considered matching if all specified properties match.
14252 |    * @param options
14253 |    */
14254 |   selectOption(values: null|string|ElementHandle|ReadonlyArray<string>|{
14255 |     /**
14256 |      * Matches by `option.value`. Optional.
14257 |      */
14258 |     value?: string;
14259 | 
14260 |     /**
14261 |      * Matches by `option.label`. Optional.
14262 |      */
14263 |     label?: string;
14264 | 
14265 |     /**
14266 |      * Matches by the index. Optional.
14267 |      */
14268 |     index?: number;
14269 |   }|ReadonlyArray<ElementHandle>|ReadonlyArray<{
14270 |     /**
14271 |      * Matches by `option.value`. Optional.
14272 |      */
14273 |     value?: string;
14274 | 
14275 |     /**
14276 |      * Matches by `option.label`. Optional.
14277 |      */
14278 |     label?: string;
14279 | 
14280 |     /**
14281 |      * Matches by the index. Optional.
14282 |      */
14283 |     index?: number;
14284 |   }>, options?: {
14285 |     /**
14286 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14287 |      */
14288 |     force?: boolean;
14289 | 
14290 |     /**
14291 |      * This option has no effect.
14292 |      * @deprecated This option has no effect.
14293 |      */
14294 |     noWaitAfter?: boolean;
14295 | 
14296 |     /**
14297 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14298 |      * option in the config, or by using the
14299 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14300 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14301 |      */
14302 |     timeout?: number;
14303 |   }): Promise<Array<string>>;
14304 | 
14305 |   /**
14306 |    * This method waits for [actionability](https://playwright.dev/docs/actionability) checks, then focuses the element and selects all its
14307 |    * text content.
14308 |    *
14309 |    * If the element is inside the `<label>` element that has an associated
14310 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), focuses and selects text in
14311 |    * the control instead.
14312 |    * @param options
14313 |    */
14314 |   selectText(options?: {
14315 |     /**
14316 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14317 |      */
14318 |     force?: boolean;
14319 | 
14320 |     /**
14321 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14322 |      * option in the config, or by using the
14323 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14324 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14325 |      */
14326 |     timeout?: number;
14327 |   }): Promise<void>;
14328 | 
14329 |   /**
14330 |    * Set the state of a checkbox or a radio element.
14331 |    *
14332 |    * **Usage**
14333 |    *
14334 |    * ```js
14335 |    * await page.getByRole('checkbox').setChecked(true);
14336 |    * ```
14337 |    *
14338 |    * **Details**
14339 |    *
14340 |    * This method checks or unchecks an element by performing the following steps:
14341 |    * 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
14342 |    * 1. If the element already has the right checked state, this method returns immediately.
14343 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
14344 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-force) option is set. If
14345 |    *    the element is detached during the checks, the whole action is retried.
14346 |    * 1. Scroll the element into view if needed.
14347 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
14348 |    *    element.
14349 |    * 1. Ensure that the element is now checked or unchecked. If not, this method throws.
14350 |    *
14351 |    * When all steps combined have not finished during the specified
14352 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-timeout), this method throws a
14353 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14354 |    * @param checked Whether to check or uncheck the checkbox.
14355 |    * @param options
14356 |    */
14357 |   setChecked(checked: boolean, options?: {
14358 |     /**
14359 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14360 |      */
14361 |     force?: boolean;
14362 | 
14363 |     /**
14364 |      * This option has no effect.
14365 |      * @deprecated This option has no effect.
14366 |      */
14367 |     noWaitAfter?: boolean;
14368 | 
14369 |     /**
14370 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14371 |      * the element.
14372 |      */
14373 |     position?: {
14374 |       x: number;
14375 | 
14376 |       y: number;
14377 |     };
14378 | 
14379 |     /**
14380 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14381 |      * option in the config, or by using the
14382 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14383 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14384 |      */
14385 |     timeout?: number;
14386 | 
14387 |     /**
14388 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14389 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
14390 |      */
14391 |     trial?: boolean;
14392 |   }): Promise<void>;
14393 | 
14394 |   /**
14395 |    * Upload file or multiple files into `<input type=file>`. For inputs with a `[webkitdirectory]` attribute, only a
14396 |    * single directory path is supported.
14397 |    *
14398 |    * **Usage**
14399 |    *
14400 |    * ```js
14401 |    * // Select one file
14402 |    * await page.getByLabel('Upload file').setInputFiles(path.join(__dirname, 'myfile.pdf'));
14403 |    *
14404 |    * // Select multiple files
14405 |    * await page.getByLabel('Upload files').setInputFiles([
14406 |    *   path.join(__dirname, 'file1.txt'),
14407 |    *   path.join(__dirname, 'file2.txt'),
14408 |    * ]);
14409 |    *
14410 |    * // Select a directory
14411 |    * await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));
14412 |    *
14413 |    * // Remove all the selected files
14414 |    * await page.getByLabel('Upload file').setInputFiles([]);
14415 |    *
14416 |    * // Upload buffer from memory
14417 |    * await page.getByLabel('Upload file').setInputFiles({
14418 |    *   name: 'file.txt',
14419 |    *   mimeType: 'text/plain',
14420 |    *   buffer: Buffer.from('this is test')
14421 |    * });
14422 |    * ```
14423 |    *
14424 |    * **Details**
14425 |    *
14426 |    * Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
14427 |    * they are resolved relative to the current working directory. For empty array, clears the selected files.
14428 |    *
14429 |    * This method expects [Locator](https://playwright.dev/docs/api/class-locator) to point to an
14430 |    * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
14431 |    * the `<label>` element that has an associated
14432 |    * [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
14433 |    * @param files
14434 |    * @param options
14435 |    */
14436 |   setInputFiles(files: string|ReadonlyArray<string>|{
14437 |     /**
14438 |      * File name
14439 |      */
14440 |     name: string;
14441 | 
14442 |     /**
14443 |      * File type
14444 |      */
14445 |     mimeType: string;
14446 | 
14447 |     /**
14448 |      * File content
14449 |      */
14450 |     buffer: Buffer;
14451 |   }|ReadonlyArray<{
14452 |     /**
14453 |      * File name
14454 |      */
14455 |     name: string;
14456 | 
14457 |     /**
14458 |      * File type
14459 |      */
14460 |     mimeType: string;
14461 | 
14462 |     /**
14463 |      * File content
14464 |      */
14465 |     buffer: Buffer;
14466 |   }>, options?: {
14467 |     /**
14468 |      * This option has no effect.
14469 |      * @deprecated This option has no effect.
14470 |      */
14471 |     noWaitAfter?: boolean;
14472 | 
14473 |     /**
14474 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14475 |      * option in the config, or by using the
14476 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14477 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14478 |      */
14479 |     timeout?: number;
14480 |   }): Promise<void>;
14481 | 
14482 |   /**
14483 |    * Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually
14484 |    * dispatching touch events, see the [emulating legacy touch events](https://playwright.dev/docs/touch-events) page.
14485 |    *
14486 |    * **Details**
14487 |    *
14488 |    * This method taps the element by performing the following steps:
14489 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
14490 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-tap-option-force) option is set.
14491 |    * 1. Scroll the element into view if needed.
14492 |    * 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
14493 |    *    element, or the specified
14494 |    *    [`position`](https://playwright.dev/docs/api/class-locator#locator-tap-option-position).
14495 |    *
14496 |    * If the element is detached from the DOM at any moment during the action, this method throws.
14497 |    *
14498 |    * When all steps combined have not finished during the specified
14499 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-tap-option-timeout), this method throws a
14500 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14501 |    *
14502 |    * **NOTE** `element.tap()` requires that the `hasTouch` option of the browser context be set to true.
14503 |    *
14504 |    * @param options
14505 |    */
14506 |   tap(options?: {
14507 |     /**
14508 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14509 |      */
14510 |     force?: boolean;
14511 | 
14512 |     /**
14513 |      * Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores
14514 |      * current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to
14515 |      * "Control" on Windows and Linux and to "Meta" on macOS.
14516 |      */
14517 |     modifiers?: Array<"Alt"|"Control"|"ControlOrMeta"|"Meta"|"Shift">;
14518 | 
14519 |     /**
14520 |      * This option has no effect.
14521 |      * @deprecated This option has no effect.
14522 |      */
14523 |     noWaitAfter?: boolean;
14524 | 
14525 |     /**
14526 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14527 |      * the element.
14528 |      */
14529 |     position?: {
14530 |       x: number;
14531 | 
14532 |       y: number;
14533 |     };
14534 | 
14535 |     /**
14536 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14537 |      * option in the config, or by using the
14538 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14539 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14540 |      */
14541 |     timeout?: number;
14542 | 
14543 |     /**
14544 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14545 |      * to `false`. Useful to wait until the element is ready for the action without performing it. Note that keyboard
14546 |      * `modifiers` will be pressed regardless of `trial` to allow testing elements which are only visible when those keys
14547 |      * are pressed.
14548 |      */
14549 |     trial?: boolean;
14550 |   }): Promise<void>;
14551 | 
14552 |   /**
14553 |    * Returns the [`node.textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent).
14554 |    *
14555 |    * **NOTE** If you need to assert text on the page, prefer
14556 |    * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
14557 |    * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
14558 |    *
14559 |    * @param options
14560 |    */
14561 |   textContent(options?: {
14562 |     /**
14563 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14564 |      * option in the config, or by using the
14565 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14566 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14567 |      */
14568 |     timeout?: number;
14569 |   }): Promise<null|string>;
14570 | 
14571 |   /**
14572 |    * Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
14573 |    * text.
14574 |    *
14575 |    * To press a special key, like `Control` or `ArrowDown`, use
14576 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press).
14577 |    *
14578 |    * **Usage**
14579 |    * @deprecated In most cases, you should use
14580 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
14581 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
14582 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
14583 |    * @param text A text to type into a focused element.
14584 |    * @param options
14585 |    */
14586 |   type(text: string, options?: {
14587 |     /**
14588 |      * Time to wait between key presses in milliseconds. Defaults to 0.
14589 |      */
14590 |     delay?: number;
14591 | 
14592 |     /**
14593 |      * This option has no effect.
14594 |      * @deprecated This option has no effect.
14595 |      */
14596 |     noWaitAfter?: boolean;
14597 | 
14598 |     /**
14599 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14600 |      * option in the config, or by using the
14601 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14602 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14603 |      */
14604 |     timeout?: number;
14605 |   }): Promise<void>;
14606 | 
14607 |   /**
14608 |    * Ensure that checkbox or radio element is unchecked.
14609 |    *
14610 |    * **Usage**
14611 |    *
14612 |    * ```js
14613 |    * await page.getByRole('checkbox').uncheck();
14614 |    * ```
14615 |    *
14616 |    * **Details**
14617 |    *
14618 |    * This method unchecks the element by performing the following steps:
14619 |    * 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
14620 |    *    unchecked, this method returns immediately.
14621 |    * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
14622 |    *    [`force`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-force) option is set.
14623 |    * 1. Scroll the element into view if needed.
14624 |    * 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
14625 |    *    element.
14626 |    * 1. Ensure that the element is now unchecked. If not, this method throws.
14627 |    *
14628 |    * If the element is detached from the DOM at any moment during the action, this method throws.
14629 |    *
14630 |    * When all steps combined have not finished during the specified
14631 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-timeout), this method throws a
14632 |    * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
14633 |    * @param options
14634 |    */
14635 |   uncheck(options?: {
14636 |     /**
14637 |      * Whether to bypass the [actionability](https://playwright.dev/docs/actionability) checks. Defaults to `false`.
14638 |      */
14639 |     force?: boolean;
14640 | 
14641 |     /**
14642 |      * This option has no effect.
14643 |      * @deprecated This option has no effect.
14644 |      */
14645 |     noWaitAfter?: boolean;
14646 | 
14647 |     /**
14648 |      * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of
14649 |      * the element.
14650 |      */
14651 |     position?: {
14652 |       x: number;
14653 | 
14654 |       y: number;
14655 |     };
14656 | 
14657 |     /**
14658 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14659 |      * option in the config, or by using the
14660 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14661 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14662 |      */
14663 |     timeout?: number;
14664 | 
14665 |     /**
14666 |      * When set, this method only performs the [actionability](https://playwright.dev/docs/actionability) checks and skips the action. Defaults
14667 |      * to `false`. Useful to wait until the element is ready for the action without performing it.
14668 |      */
14669 |     trial?: boolean;
14670 |   }): Promise<void>;
14671 | 
14672 |   /**
14673 |    * Returns when element specified by locator satisfies the
14674 |    * [`state`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-state) option.
14675 |    *
14676 |    * If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to
14677 |    * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-timeout) milliseconds until the
14678 |    * condition is met.
14679 |    *
14680 |    * **Usage**
14681 |    *
14682 |    * ```js
14683 |    * const orderSent = page.locator('#order-sent');
14684 |    * await orderSent.waitFor();
14685 |    * ```
14686 |    *
14687 |    * @param options
14688 |    */
14689 |   waitFor(options?: {
14690 |     /**
14691 |      * Defaults to `'visible'`. Can be either:
14692 |      * - `'attached'` - wait for element to be present in DOM.
14693 |      * - `'detached'` - wait for element to not be present in DOM.
14694 |      * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
14695 |      *   without any content or with `display:none` has an empty bounding box and is not considered visible.
14696 |      * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
14697 |      *   `visibility:hidden`. This is opposite to the `'visible'` option.
14698 |      */
14699 |     state?: "attached"|"detached"|"visible"|"hidden";
14700 | 
14701 |     /**
14702 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14703 |      * option in the config, or by using the
14704 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14705 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
14706 |      */
14707 |     timeout?: number;
14708 |   }): Promise<void>;
14709 | }
14710 | 
14711 | /**
14712 |  * BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is
14713 |  * a typical example of using Playwright to drive automation:
14714 |  *
14715 |  * ```js
14716 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
14717 |  *
14718 |  * (async () => {
14719 |  *   const browser = await chromium.launch();
14720 |  *   const page = await browser.newPage();
14721 |  *   await page.goto('https://example.com');
14722 |  *   // other actions...
14723 |  *   await browser.close();
14724 |  * })();
14725 |  * ```
14726 |  *
14727 |  */
14728 | export interface BrowserType<Unused = {}> {
14729 |   /**
14730 |    * This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.
14731 |    *
14732 |    * The default browser context is accessible via
14733 |    * [browser.contexts()](https://playwright.dev/docs/api/class-browser#browser-contexts).
14734 |    *
14735 |    * **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
14736 |    *
14737 |    * **NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via
14738 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
14739 |    * If you are experiencing issues or attempting to use advanced functionality, you probably want to use
14740 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
14741 |    *
14742 |    * **Usage**
14743 |    *
14744 |    * ```js
14745 |    * const browser = await playwright.chromium.connectOverCDP('http://localhost:9222');
14746 |    * const defaultContext = browser.contexts()[0];
14747 |    * const page = defaultContext.pages()[0];
14748 |    * ```
14749 |    *
14750 |    * @param endpointURL A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or
14751 |    * `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.
14752 |    * @param options
14753 |    */
14754 |   connectOverCDP(endpointURL: string, options?: ConnectOverCDPOptions): Promise<Browser>;
14755 |   /**
14756 |    * Option `wsEndpoint` is deprecated. Instead use `endpointURL`.
14757 |    * @deprecated
14758 |    */
14759 |   /**
14760 |    * This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol.
14761 |    *
14762 |    * The default browser context is accessible via
14763 |    * [browser.contexts()](https://playwright.dev/docs/api/class-browser#browser-contexts).
14764 |    *
14765 |    * **NOTE** Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
14766 |    *
14767 |    * **NOTE** This connection is significantly lower fidelity than the Playwright protocol connection via
14768 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
14769 |    * If you are experiencing issues or attempting to use advanced functionality, you probably want to use
14770 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
14771 |    *
14772 |    * **Usage**
14773 |    *
14774 |    * ```js
14775 |    * const browser = await playwright.chromium.connectOverCDP('http://localhost:9222');
14776 |    * const defaultContext = browser.contexts()[0];
14777 |    * const page = defaultContext.pages()[0];
14778 |    * ```
14779 |    *
14780 |    * @param endpointURL A CDP websocket endpoint or http url to connect to. For example `http://localhost:9222/` or
14781 |    * `ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4`.
14782 |    * @param options
14783 |    */
14784 |   connectOverCDP(options: ConnectOverCDPOptions & { wsEndpoint?: string }): Promise<Browser>;
14785 |   /**
14786 |    * This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
14787 |    *
14788 |    * **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
14789 |    * Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
14790 |    *
14791 |    * @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
14792 |    * @param options
14793 |    */
14794 |   connect(wsEndpoint: string, options?: ConnectOptions): Promise<Browser>;
14795 |   /**
14796 |    * wsEndpoint in options is deprecated. Instead use `wsEndpoint`.
14797 |    * @param wsEndpoint A browser websocket endpoint to connect to.
14798 |    * @param options
14799 |    * @deprecated
14800 |    */
14801 |   /**
14802 |    * This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
14803 |    *
14804 |    * **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
14805 |    * Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
14806 |    *
14807 |    * @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
14808 |    * @param options
14809 |    */
14810 |   connect(options: ConnectOptions & { wsEndpoint?: string }): Promise<Browser>;
14811 |   /**
14812 |    * A path where Playwright expects to find a bundled browser executable.
14813 |    */
14814 |   executablePath(): string;
14815 | 
14816 |   /**
14817 |    * Returns the browser instance.
14818 |    *
14819 |    * **Usage**
14820 |    *
14821 |    * You can use
14822 |    * [`ignoreDefaultArgs`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-ignore-default-args)
14823 |    * to filter out `--mute-audio` from default arguments:
14824 |    *
14825 |    * ```js
14826 |    * const browser = await chromium.launch({  // Or 'firefox' or 'webkit'.
14827 |    *   ignoreDefaultArgs: ['--mute-audio']
14828 |    * });
14829 |    * ```
14830 |    *
14831 |    * > **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it
14832 |    * works best with the version of Chromium it is bundled with. There is no guarantee it will work with any other
14833 |    * version. Use
14834 |    * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path)
14835 |    * option with extreme caution.
14836 |    * >
14837 |    * > If Google Chrome (rather than Chromium) is preferred, a
14838 |    * [Chrome Canary](https://www.google.com/chrome/browser/canary.html) or
14839 |    * [Dev Channel](https://www.chromium.org/getting-involved/dev-channel) build is suggested.
14840 |    * >
14841 |    * > Stock browsers like Google Chrome and Microsoft Edge are suitable for tests that require proprietary media codecs
14842 |    * for video playback. See
14843 |    * [this article](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for
14844 |    * other differences between Chromium and Chrome.
14845 |    * [This article](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md)
14846 |    * describes some differences for Linux users.
14847 |    * @param options
14848 |    */
14849 |   launch(options?: LaunchOptions): Promise<Browser>;
14850 | 
14851 |   /**
14852 |    * Returns the persistent browser context instance.
14853 |    *
14854 |    * Launches browser that uses persistent storage located at
14855 |    * [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)
14856 |    * and returns the only context. Closing this context will automatically close the browser.
14857 |    * @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty
14858 |    * string to create a temporary directory.
14859 |    *
14860 |    * More details for
14861 |    * [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
14862 |    * [Firefox](https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile). Chromium's user data directory is the
14863 |    * **parent** directory of the "Profile Path" seen at `chrome://version`.
14864 |    *
14865 |    * Note that browsers do not allow launching multiple instances with the same User Data Directory.
14866 |    *
14867 |    * **NOTE** Chromium/Chrome: Due to recent Chrome policy changes, automating the default Chrome user profile is not
14868 |    * supported. Pointing `userDataDir` to Chrome's main "User Data" directory (the profile used for your regular
14869 |    * browsing) may result in pages not loading or the browser exiting. Create and use a separate directory (for example,
14870 |    * an empty folder) as your automation profile instead. See https://developer.chrome.com/blog/remote-debugging-port
14871 |    * for details.
14872 |    *
14873 |    * @param options
14874 |    */
14875 |   launchPersistentContext(userDataDir: string, options?: {
14876 |     /**
14877 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
14878 |      */
14879 |     acceptDownloads?: boolean;
14880 | 
14881 |     /**
14882 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
14883 |      *
14884 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
14885 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
14886 |      */
14887 |     args?: Array<string>;
14888 | 
14889 |     /**
14890 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
14891 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
14892 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
14893 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
14894 |      * or
14895 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
14896 |      * it takes the base URL in consideration by using the
14897 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
14898 |      * Unset by default. Examples:
14899 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
14900 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
14901 |      *   `http://localhost:3000/foo/bar.html`
14902 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
14903 |      *   `http://localhost:3000/bar.html`
14904 |      */
14905 |     baseURL?: string;
14906 | 
14907 |     /**
14908 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
14909 |      */
14910 |     bypassCSP?: boolean;
14911 | 
14912 |     /**
14913 |      * Browser distribution channel.
14914 |      *
14915 |      * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
14916 |      *
14917 |      * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
14918 |      * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
14919 |      */
14920 |     channel?: string;
14921 | 
14922 |     /**
14923 |      * Enable Chromium sandboxing. Defaults to `false`.
14924 |      */
14925 |     chromiumSandbox?: boolean;
14926 | 
14927 |     /**
14928 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
14929 |      *
14930 |      * **Details**
14931 |      *
14932 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
14933 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
14934 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
14935 |      * with an exact match to the request origin that the certificate is valid for.
14936 |      *
14937 |      * Client certificate authentication is only active when at least one client certificate is provided. If you want to
14938 |      * reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
14939 |      * does not match any of the domains you plan to visit.
14940 |      *
14941 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
14942 |      * work by replacing `localhost` with `local.playwright`.
14943 |      *
14944 |      */
14945 |     clientCertificates?: Array<{
14946 |       /**
14947 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
14948 |        */
14949 |       origin: string;
14950 | 
14951 |       /**
14952 |        * Path to the file with the certificate in PEM format.
14953 |        */
14954 |       certPath?: string;
14955 | 
14956 |       /**
14957 |        * Direct value of the certificate in PEM format.
14958 |        */
14959 |       cert?: Buffer;
14960 | 
14961 |       /**
14962 |        * Path to the file with the private key in PEM format.
14963 |        */
14964 |       keyPath?: string;
14965 | 
14966 |       /**
14967 |        * Direct value of the private key in PEM format.
14968 |        */
14969 |       key?: Buffer;
14970 | 
14971 |       /**
14972 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
14973 |        */
14974 |       pfxPath?: string;
14975 | 
14976 |       /**
14977 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
14978 |        */
14979 |       pfx?: Buffer;
14980 | 
14981 |       /**
14982 |        * Passphrase for the private key (PEM or PFX).
14983 |        */
14984 |       passphrase?: string;
14985 |     }>;
14986 | 
14987 |     /**
14988 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
14989 |      * media feature, supported values are `'light'` and `'dark'`. See
14990 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
14991 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
14992 |      */
14993 |     colorScheme?: null|"light"|"dark"|"no-preference";
14994 | 
14995 |     /**
14996 |      * Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
14997 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
14998 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
14999 |      */
15000 |     contrast?: null|"no-preference"|"more";
15001 | 
15002 |     /**
15003 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
15004 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
15005 |      */
15006 |     deviceScaleFactor?: number;
15007 | 
15008 |     /**
15009 |      * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
15010 |      * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
15011 |      * created in is closed.
15012 |      */
15013 |     downloadsPath?: string;
15014 | 
15015 |     env?: { [key: string]: string|undefined; };
15016 | 
15017 |     /**
15018 |      * Path to a browser executable to run instead of the bundled one. If
15019 |      * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-executable-path)
15020 |      * is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
15021 |      * with the bundled Chromium, Firefox or WebKit, use at your own risk.
15022 |      */
15023 |     executablePath?: string;
15024 | 
15025 |     /**
15026 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
15027 |      */
15028 |     extraHTTPHeaders?: { [key: string]: string; };
15029 | 
15030 |     /**
15031 |      * Firefox user preferences. Learn more about the Firefox user preferences at
15032 |      * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
15033 |      *
15034 |      * You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
15035 |      * `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
15036 |      */
15037 |     firefoxUserPrefs?: { [key: string]: string|number|boolean; };
15038 | 
15039 |     /**
15040 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
15041 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
15042 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
15043 |      */
15044 |     forcedColors?: null|"active"|"none";
15045 | 
15046 |     geolocation?: {
15047 |       /**
15048 |        * Latitude between -90 and 90.
15049 |        */
15050 |       latitude: number;
15051 | 
15052 |       /**
15053 |        * Longitude between -180 and 180.
15054 |        */
15055 |       longitude: number;
15056 | 
15057 |       /**
15058 |        * Non-negative accuracy value. Defaults to `0`.
15059 |        */
15060 |       accuracy?: number;
15061 |     };
15062 | 
15063 |     /**
15064 |      * Close the browser process on SIGHUP. Defaults to `true`.
15065 |      */
15066 |     handleSIGHUP?: boolean;
15067 | 
15068 |     /**
15069 |      * Close the browser process on Ctrl-C. Defaults to `true`.
15070 |      */
15071 |     handleSIGINT?: boolean;
15072 | 
15073 |     /**
15074 |      * Close the browser process on SIGTERM. Defaults to `true`.
15075 |      */
15076 |     handleSIGTERM?: boolean;
15077 | 
15078 |     /**
15079 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
15080 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
15081 |      */
15082 |     hasTouch?: boolean;
15083 | 
15084 |     /**
15085 |      * Whether to run browser in headless mode. More details for
15086 |      * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
15087 |      * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
15088 |      */
15089 |     headless?: boolean;
15090 | 
15091 |     /**
15092 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
15093 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
15094 |      */
15095 |     httpCredentials?: {
15096 |       username: string;
15097 | 
15098 |       password: string;
15099 | 
15100 |       /**
15101 |        * Restrain sending http credentials on specific origin (scheme://host:port).
15102 |        */
15103 |       origin?: string;
15104 | 
15105 |       /**
15106 |        * This option only applies to the requests sent from corresponding
15107 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
15108 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
15109 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
15110 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
15111 |        */
15112 |       send?: "unauthorized"|"always";
15113 |     };
15114 | 
15115 |     /**
15116 |      * If `true`, Playwright does not pass its own configurations args and only uses the ones from
15117 |      * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-args). If
15118 |      * an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to
15119 |      * `false`.
15120 |      */
15121 |     ignoreDefaultArgs?: boolean|Array<string>;
15122 | 
15123 |     /**
15124 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
15125 |      */
15126 |     ignoreHTTPSErrors?: boolean;
15127 | 
15128 |     /**
15129 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
15130 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
15131 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
15132 |      */
15133 |     isMobile?: boolean;
15134 | 
15135 |     /**
15136 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
15137 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
15138 |      */
15139 |     javaScriptEnabled?: boolean;
15140 | 
15141 |     /**
15142 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
15143 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
15144 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
15145 |      */
15146 |     locale?: string;
15147 | 
15148 |     /**
15149 |      * Logger sink for Playwright logging.
15150 |      * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
15151 |      */
15152 |     logger?: Logger;
15153 | 
15154 |     /**
15155 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
15156 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
15157 |      */
15158 |     offline?: boolean;
15159 | 
15160 |     /**
15161 |      * A list of permissions to grant to all pages in this context. See
15162 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
15163 |      * for more details. Defaults to none.
15164 |      */
15165 |     permissions?: Array<string>;
15166 | 
15167 |     /**
15168 |      * Network proxy settings.
15169 |      */
15170 |     proxy?: {
15171 |       /**
15172 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
15173 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
15174 |        */
15175 |       server: string;
15176 | 
15177 |       /**
15178 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
15179 |        */
15180 |       bypass?: string;
15181 | 
15182 |       /**
15183 |        * Optional username to use if HTTP proxy requires authentication.
15184 |        */
15185 |       username?: string;
15186 | 
15187 |       /**
15188 |        * Optional password to use if HTTP proxy requires authentication.
15189 |        */
15190 |       password?: string;
15191 |     };
15192 | 
15193 |     /**
15194 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
15195 |      * If not specified, the HAR is not recorded. Make sure to await
15196 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
15197 |      * the HAR to be saved.
15198 |      */
15199 |     recordHar?: {
15200 |       /**
15201 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
15202 |        * `content` policy instead.
15203 |        */
15204 |       omitContent?: boolean;
15205 | 
15206 |       /**
15207 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
15208 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
15209 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
15210 |        * files and to `embed` for all other file extensions.
15211 |        */
15212 |       content?: "omit"|"embed"|"attach";
15213 | 
15214 |       /**
15215 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
15216 |        * default.
15217 |        */
15218 |       path: string;
15219 | 
15220 |       /**
15221 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
15222 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
15223 |        */
15224 |       mode?: "full"|"minimal";
15225 | 
15226 |       /**
15227 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
15228 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
15229 |        * options was provided and the passed URL is a path, it gets merged via the
15230 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
15231 |        */
15232 |       urlFilter?: string|RegExp;
15233 |     };
15234 | 
15235 |     /**
15236 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
15237 |      * Make sure to await
15238 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
15239 |      * videos to be saved.
15240 |      */
15241 |     recordVideo?: {
15242 |       /**
15243 |        * Path to the directory to put videos into.
15244 |        */
15245 |       dir: string;
15246 | 
15247 |       /**
15248 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
15249 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
15250 |        * each page will be scaled down if necessary to fit the specified size.
15251 |        */
15252 |       size?: {
15253 |         /**
15254 |          * Video frame width.
15255 |          */
15256 |         width: number;
15257 | 
15258 |         /**
15259 |          * Video frame height.
15260 |          */
15261 |         height: number;
15262 |       };
15263 |     };
15264 | 
15265 |     /**
15266 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
15267 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
15268 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
15269 |      */
15270 |     reducedMotion?: null|"reduce"|"no-preference";
15271 | 
15272 |     /**
15273 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
15274 |      * [`viewport`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-viewport)
15275 |      * is set.
15276 |      */
15277 |     screen?: {
15278 |       /**
15279 |        * page width in pixels.
15280 |        */
15281 |       width: number;
15282 | 
15283 |       /**
15284 |        * page height in pixels.
15285 |        */
15286 |       height: number;
15287 |     };
15288 | 
15289 |     /**
15290 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
15291 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
15292 |      *   registered.
15293 |      * - `'block'`: Playwright will block all registration of Service Workers.
15294 |      */
15295 |     serviceWorkers?: "allow"|"block";
15296 | 
15297 |     /**
15298 |      * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
15299 |      * on.
15300 |      */
15301 |     slowMo?: number;
15302 | 
15303 |     /**
15304 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
15305 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
15306 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
15307 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
15308 |      */
15309 |     strictSelectors?: boolean;
15310 | 
15311 |     /**
15312 |      * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
15313 |      * to disable timeout.
15314 |      */
15315 |     timeout?: number;
15316 | 
15317 |     /**
15318 |      * Changes the timezone of the context. See
15319 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
15320 |      * for a list of supported timezone IDs. Defaults to the system timezone.
15321 |      */
15322 |     timezoneId?: string;
15323 | 
15324 |     /**
15325 |      * If specified, traces are saved into this directory.
15326 |      */
15327 |     tracesDir?: string;
15328 | 
15329 |     /**
15330 |      * Specific user agent to use in this context.
15331 |      */
15332 |     userAgent?: string;
15333 | 
15334 |     /**
15335 |      * @deprecated Use
15336 |      * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
15337 |      * instead.
15338 |      */
15339 |     videoSize?: {
15340 |       /**
15341 |        * Video frame width.
15342 |        */
15343 |       width: number;
15344 | 
15345 |       /**
15346 |        * Video frame height.
15347 |        */
15348 |       height: number;
15349 |     };
15350 | 
15351 |     /**
15352 |      * @deprecated Use
15353 |      * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
15354 |      * instead.
15355 |      */
15356 |     videosPath?: string;
15357 | 
15358 |     /**
15359 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
15360 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
15361 |      *
15362 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
15363 |      * by the operating system. It makes the execution of the tests non-deterministic.
15364 |      *
15365 |      */
15366 |     viewport?: null|{
15367 |       /**
15368 |        * page width in pixels.
15369 |        */
15370 |       width: number;
15371 | 
15372 |       /**
15373 |        * page height in pixels.
15374 |        */
15375 |       height: number;
15376 |     };
15377 |   }): Promise<BrowserContext>;
15378 | 
15379 |   /**
15380 |    * Returns the browser app instance. You can connect to it via
15381 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect),
15382 |    * which requires the major/minor client/server version to match (1.2.3 → is compatible with 1.2.x).
15383 |    *
15384 |    * **Usage**
15385 |    *
15386 |    * Launches browser server that client can connect to. An example of launching a browser executable and connecting to
15387 |    * it later:
15388 |    *
15389 |    * ```js
15390 |    * const { chromium } = require('playwright');  // Or 'webkit' or 'firefox'.
15391 |    *
15392 |    * (async () => {
15393 |    *   const browserServer = await chromium.launchServer();
15394 |    *   const wsEndpoint = browserServer.wsEndpoint();
15395 |    *   // Use web socket endpoint later to establish a connection.
15396 |    *   const browser = await chromium.connect(wsEndpoint);
15397 |    *   // Close browser instance.
15398 |    *   await browserServer.close();
15399 |    * })();
15400 |    * ```
15401 |    *
15402 |    * @param options
15403 |    */
15404 |   launchServer(options?: {
15405 |     /**
15406 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
15407 |      *
15408 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
15409 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
15410 |      */
15411 |     args?: Array<string>;
15412 | 
15413 |     /**
15414 |      * Browser distribution channel.
15415 |      *
15416 |      * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
15417 |      *
15418 |      * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
15419 |      * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
15420 |      */
15421 |     channel?: string;
15422 | 
15423 |     /**
15424 |      * Enable Chromium sandboxing. Defaults to `false`.
15425 |      */
15426 |     chromiumSandbox?: boolean;
15427 | 
15428 |     /**
15429 |      * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
15430 |      * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
15431 |      * created in is closed.
15432 |      */
15433 |     downloadsPath?: string;
15434 | 
15435 |     env?: { [key: string]: string|undefined; };
15436 | 
15437 |     /**
15438 |      * Path to a browser executable to run instead of the bundled one. If
15439 |      * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-executable-path)
15440 |      * is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
15441 |      * with the bundled Chromium, Firefox or WebKit, use at your own risk.
15442 |      */
15443 |     executablePath?: string;
15444 | 
15445 |     /**
15446 |      * Firefox user preferences. Learn more about the Firefox user preferences at
15447 |      * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
15448 |      *
15449 |      * You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
15450 |      * `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
15451 |      */
15452 |     firefoxUserPrefs?: { [key: string]: string|number|boolean; };
15453 | 
15454 |     /**
15455 |      * Close the browser process on SIGHUP. Defaults to `true`.
15456 |      */
15457 |     handleSIGHUP?: boolean;
15458 | 
15459 |     /**
15460 |      * Close the browser process on Ctrl-C. Defaults to `true`.
15461 |      */
15462 |     handleSIGINT?: boolean;
15463 | 
15464 |     /**
15465 |      * Close the browser process on SIGTERM. Defaults to `true`.
15466 |      */
15467 |     handleSIGTERM?: boolean;
15468 | 
15469 |     /**
15470 |      * Whether to run browser in headless mode. More details for
15471 |      * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
15472 |      * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
15473 |      */
15474 |     headless?: boolean;
15475 | 
15476 |     /**
15477 |      * Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the
15478 |      * unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider
15479 |      * hardening it with picking a specific interface.
15480 |      */
15481 |     host?: string;
15482 | 
15483 |     /**
15484 |      * If `true`, Playwright does not pass its own configurations args and only uses the ones from
15485 |      * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-args). If an array is
15486 |      * given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
15487 |      */
15488 |     ignoreDefaultArgs?: boolean|Array<string>;
15489 | 
15490 |     /**
15491 |      * Logger sink for Playwright logging.
15492 |      * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
15493 |      */
15494 |     logger?: Logger;
15495 | 
15496 |     /**
15497 |      * Port to use for the web socket. Defaults to 0 that picks any available port.
15498 |      */
15499 |     port?: number;
15500 | 
15501 |     /**
15502 |      * Network proxy settings.
15503 |      */
15504 |     proxy?: {
15505 |       /**
15506 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
15507 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
15508 |        */
15509 |       server: string;
15510 | 
15511 |       /**
15512 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
15513 |        */
15514 |       bypass?: string;
15515 | 
15516 |       /**
15517 |        * Optional username to use if HTTP proxy requires authentication.
15518 |        */
15519 |       username?: string;
15520 | 
15521 |       /**
15522 |        * Optional password to use if HTTP proxy requires authentication.
15523 |        */
15524 |       password?: string;
15525 |     };
15526 | 
15527 |     /**
15528 |      * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
15529 |      * to disable timeout.
15530 |      */
15531 |     timeout?: number;
15532 | 
15533 |     /**
15534 |      * If specified, traces are saved into this directory.
15535 |      */
15536 |     tracesDir?: string;
15537 | 
15538 |     /**
15539 |      * Path at which to serve the Browser Server. For security, this defaults to an unguessable string.
15540 |      *
15541 |      * **NOTE** Any process or web page (including those running in Playwright) with knowledge of the `wsPath` can take
15542 |      * control of the OS user. For this reason, you should use an unguessable token when using this option.
15543 |      *
15544 |      */
15545 |     wsPath?: string;
15546 |   }): Promise<BrowserServer>;
15547 | 
15548 |   /**
15549 |    * Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`.
15550 |    */
15551 |   name(): string;
15552 | }
15553 | 
15554 | /**
15555 |  * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol:
15556 |  * - protocol methods can be called with `session.send` method.
15557 |  * - protocol events can be subscribed to with `session.on` method.
15558 |  *
15559 |  * Useful links:
15560 |  * - Documentation on DevTools Protocol can be found here:
15561 |  *   [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).
15562 |  * - Getting Started with DevTools Protocol:
15563 |  *   https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md
15564 |  *
15565 |  * ```js
15566 |  * const client = await page.context().newCDPSession(page);
15567 |  * await client.send('Animation.enable');
15568 |  * client.on('Animation.animationCreated', () => console.log('Animation created!'));
15569 |  * const response = await client.send('Animation.getPlaybackRate');
15570 |  * console.log('playback rate is ' + response.playbackRate);
15571 |  * await client.send('Animation.setPlaybackRate', {
15572 |  *   playbackRate: response.playbackRate / 2
15573 |  * });
15574 |  * ```
15575 |  *
15576 |  */
15577 | export interface CDPSession {
15578 |   on: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15579 |   addListener: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15580 |   off: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15581 |   removeListener: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15582 |   once: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;
15583 |   /**
15584 |    * @param method Protocol method name.
15585 |    * @param params Optional method parameters.
15586 |    */
15587 |   send<T extends keyof Protocol.CommandParameters>(
15588 |     method: T,
15589 |     params?: Protocol.CommandParameters[T]
15590 |   ): Promise<Protocol.CommandReturnValues[T]>;
15591 |   /**
15592 |    * Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be
15593 |    * used to send messages.
15594 |    */
15595 |   detach(): Promise<void>;
15596 | }
15597 | 
15598 | /**
15599 |  * Whenever a [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) route is set up with
15600 |  * [page.routeWebSocket(url, handler)](https://playwright.dev/docs/api/class-page#page-route-web-socket) or
15601 |  * [browserContext.routeWebSocket(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browser-context-route-web-socket),
15602 |  * the `WebSocketRoute` object allows to handle the WebSocket, like an actual server would do.
15603 |  *
15604 |  * **Mocking**
15605 |  *
15606 |  * By default, the routed WebSocket will not connect to the server. This way, you can mock entire communication over
15607 |  * the WebSocket. Here is an example that responds to a `"request"` with a `"response"`.
15608 |  *
15609 |  * ```js
15610 |  * await page.routeWebSocket('wss://example.com/ws', ws => {
15611 |  *   ws.onMessage(message => {
15612 |  *     if (message === 'request')
15613 |  *       ws.send('response');
15614 |  *   });
15615 |  * });
15616 |  * ```
15617 |  *
15618 |  * Since we do not call
15619 |  * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15620 |  * inside the WebSocket route handler, Playwright assumes that WebSocket will be mocked, and opens the WebSocket
15621 |  * inside the page automatically.
15622 |  *
15623 |  * Here is another example that handles JSON messages:
15624 |  *
15625 |  * ```js
15626 |  * await page.routeWebSocket('wss://example.com/ws', ws => {
15627 |  *   ws.onMessage(message => {
15628 |  *     const json = JSON.parse(message);
15629 |  *     if (json.request === 'question')
15630 |  *       ws.send(JSON.stringify({ response: 'answer' }));
15631 |  *   });
15632 |  * });
15633 |  * ```
15634 |  *
15635 |  * **Intercepting**
15636 |  *
15637 |  * Alternatively, you may want to connect to the actual server, but intercept messages in-between and modify or block
15638 |  * them. Calling
15639 |  * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15640 |  * returns a server-side `WebSocketRoute` instance that you can send messages to, or handle incoming messages.
15641 |  *
15642 |  * Below is an example that modifies some messages sent by the page to the server. Messages sent from the server to
15643 |  * the page are left intact, relying on the default forwarding.
15644 |  *
15645 |  * ```js
15646 |  * await page.routeWebSocket('/ws', ws => {
15647 |  *   const server = ws.connectToServer();
15648 |  *   ws.onMessage(message => {
15649 |  *     if (message === 'request')
15650 |  *       server.send('request2');
15651 |  *     else
15652 |  *       server.send(message);
15653 |  *   });
15654 |  * });
15655 |  * ```
15656 |  *
15657 |  * After connecting to the server, all **messages are forwarded** between the page and the server by default.
15658 |  *
15659 |  * However, if you call
15660 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15661 |  * on the original route, messages from the page to the server **will not be forwarded** anymore, but should instead
15662 |  * be handled by the
15663 |  * [`handler`](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message-option-handler).
15664 |  *
15665 |  * Similarly, calling
15666 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15667 |  * on the server-side WebSocket will **stop forwarding messages** from the server to the page, and
15668 |  * [`handler`](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message-option-handler) should
15669 |  * take care of them.
15670 |  *
15671 |  * The following example blocks some messages in both directions. Since it calls
15672 |  * [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15673 |  * in both directions, there is no automatic forwarding at all.
15674 |  *
15675 |  * ```js
15676 |  * await page.routeWebSocket('/ws', ws => {
15677 |  *   const server = ws.connectToServer();
15678 |  *   ws.onMessage(message => {
15679 |  *     if (message !== 'blocked-from-the-page')
15680 |  *       server.send(message);
15681 |  *   });
15682 |  *   server.onMessage(message => {
15683 |  *     if (message !== 'blocked-from-the-server')
15684 |  *       ws.send(message);
15685 |  *   });
15686 |  * });
15687 |  * ```
15688 |  *
15689 |  */
15690 | export interface WebSocketRoute {
15691 |   /**
15692 |    * This method allows to handle messages that are sent by the WebSocket, either from the page or from the server.
15693 |    *
15694 |    * When called on the original WebSocket route, this method handles messages sent from the page. You can handle this
15695 |    * messages by responding to them with
15696 |    * [webSocketRoute.send(message)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-send),
15697 |    * forwarding them to the server-side connection returned by
15698 |    * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server)
15699 |    * or do something else.
15700 |    *
15701 |    * Once this method is called, messages are not automatically forwarded to the server or to the page - you should do
15702 |    * that manually by calling
15703 |    * [webSocketRoute.send(message)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-send). See
15704 |    * examples at the top for more details.
15705 |    *
15706 |    * Calling this method again will override the handler with a new one.
15707 |    * @param handler Function that will handle messages.
15708 |    */
15709 |   onMessage(handler: (message: string | Buffer) => any): void;
15710 |   /**
15711 |    * Allows to handle [`WebSocket.close`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close).
15712 |    *
15713 |    * By default, closing one side of the connection, either in the page or on the server, will close the other side.
15714 |    * However, when
15715 |    * [webSocketRoute.onClose(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-close)
15716 |    * handler is set up, the default forwarding of closure is disabled, and handler should take care of it.
15717 |    * @param handler Function that will handle WebSocket closure. Received an optional
15718 |    * [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional
15719 |    * [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
15720 |    */
15721 |   onClose(handler: (code: number | undefined, reason: string | undefined) => any): void;
15722 |   /**
15723 |    * Closes one side of the WebSocket connection.
15724 |    * @param options
15725 |    */
15726 |   close(options?: {
15727 |     /**
15728 |      * Optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code).
15729 |      */
15730 |     code?: number;
15731 | 
15732 |     /**
15733 |      * Optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
15734 |      */
15735 |     reason?: string;
15736 |   }): Promise<void>;
15737 | 
15738 |   /**
15739 |    * By default, routed WebSocket does not connect to the server, so you can mock entire WebSocket communication. This
15740 |    * method connects to the actual WebSocket server, and returns the server-side
15741 |    * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) instance, giving the ability to send and
15742 |    * receive messages from the server.
15743 |    *
15744 |    * Once connected to the server:
15745 |    * - Messages received from the server will be **automatically forwarded** to the WebSocket in the page, unless
15746 |    *   [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15747 |    *   is called on the server-side `WebSocketRoute`.
15748 |    * - Messages sent by the [`WebSocket.send()`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send) call
15749 |    *   in the page will be **automatically forwarded** to the server, unless
15750 |    *   [webSocketRoute.onMessage(handler)](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-on-message)
15751 |    *   is called on the original `WebSocketRoute`.
15752 |    *
15753 |    * See examples at the top for more details.
15754 |    */
15755 |   connectToServer(): WebSocketRoute;
15756 | 
15757 |   /**
15758 |    * Sends a message to the WebSocket. When called on the original WebSocket, sends the message to the page. When called
15759 |    * on the result of
15760 |    * [webSocketRoute.connectToServer()](https://playwright.dev/docs/api/class-websocketroute#web-socket-route-connect-to-server),
15761 |    * sends the message to the server. See examples at the top for more details.
15762 |    * @param message Message to send.
15763 |    */
15764 |   send(message: string|Buffer): void;
15765 | 
15766 |   /**
15767 |    * URL of the WebSocket created in the page.
15768 |    */
15769 |   url(): string;
15770 | 
15771 |   [Symbol.asyncDispose](): Promise<void>;
15772 | }
15773 | 
15774 | type DeviceDescriptor = {
15775 |   viewport: ViewportSize;
15776 |   userAgent: string;
15777 |   deviceScaleFactor: number;
15778 |   isMobile: boolean;
15779 |   hasTouch: boolean;
15780 |   defaultBrowserType: 'chromium' | 'firefox' | 'webkit';
15781 | };
15782 | 
15783 | export namespace errors {
15784 | 
15785 | /**
15786 |  * - extends: [Error]
15787 |  *
15788 |  * TimeoutError is emitted whenever certain operations are terminated due to timeout, e.g.
15789 |  * [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) or
15790 |  * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch).
15791 |  *
15792 |  * ```js
15793 |  * const playwright = require('playwright');
15794 |  *
15795 |  * (async () => {
15796 |  *   const browser = await playwright.chromium.launch();
15797 |  *   const context = await browser.newContext();
15798 |  *   const page = await context.newPage();
15799 |  *   try {
15800 |  *     await page.locator('text=Foo').click({
15801 |  *       timeout: 100,
15802 |  *     });
15803 |  *   } catch (error) {
15804 |  *     if (error instanceof playwright.errors.TimeoutError)
15805 |  *       console.log('Timeout!');
15806 |  *   }
15807 |  *   await browser.close();
15808 |  * })();
15809 |  * ```
15810 |  *
15811 |  */
15812 | class TimeoutError extends Error {
15813 | }
15814 | 
15815 | }
15816 | 
15817 | export const devices: Devices;
15818 | 
15819 | //@ts-ignore this will be any if electron is not installed
15820 | type ElectronType = typeof import('electron');
15821 | 
15822 | /**
15823 |  * Electron application representation. You can use
15824 |  * [electron.launch([options])](https://playwright.dev/docs/api/class-electron#electron-launch) to obtain the
15825 |  * application instance. This instance you can control main electron process as well as work with Electron windows:
15826 |  *
15827 |  * ```js
15828 |  * const { _electron: electron } = require('playwright');
15829 |  *
15830 |  * (async () => {
15831 |  *   // Launch Electron app.
15832 |  *   const electronApp = await electron.launch({ args: ['main.js'] });
15833 |  *
15834 |  *   // Evaluation expression in the Electron context.
15835 |  *   const appPath = await electronApp.evaluate(async ({ app }) => {
15836 |  *     // This runs in the main Electron process, parameter here is always
15837 |  *     // the result of the require('electron') in the main app script.
15838 |  *     return app.getAppPath();
15839 |  *   });
15840 |  *   console.log(appPath);
15841 |  *
15842 |  *   // Get the first window that the app opens, wait if necessary.
15843 |  *   const window = await electronApp.firstWindow();
15844 |  *   // Print the title.
15845 |  *   console.log(await window.title());
15846 |  *   // Capture a screenshot.
15847 |  *   await window.screenshot({ path: 'intro.png' });
15848 |  *   // Direct Electron console to Node terminal.
15849 |  *   window.on('console', console.log);
15850 |  *   // Click button.
15851 |  *   await window.click('text=Click me');
15852 |  *   // Exit app.
15853 |  *   await electronApp.close();
15854 |  * })();
15855 |  * ```
15856 |  *
15857 |  */
15858 | export interface ElectronApplication {
15859 |   /**
15860 |    * Returns the return value of
15861 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15862 |    *
15863 |    * If the function passed to the
15864 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15865 |    * returns a [Promise], then
15866 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15867 |    * would wait for the promise to resolve and return its value.
15868 |    *
15869 |    * If the function passed to the
15870 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15871 |    * returns a non-[Serializable] value, then
15872 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15873 |    * returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
15874 |    * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
15875 |    * @param pageFunction Function to be evaluated in the main Electron process.
15876 |    * @param arg Optional argument to pass to
15877 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15878 |    */
15879 |   evaluate<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<R>;
15880 |   /**
15881 |    * Returns the return value of
15882 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15883 |    *
15884 |    * If the function passed to the
15885 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15886 |    * returns a [Promise], then
15887 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15888 |    * would wait for the promise to resolve and return its value.
15889 |    *
15890 |    * If the function passed to the
15891 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15892 |    * returns a non-[Serializable] value, then
15893 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15894 |    * returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
15895 |    * `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
15896 |    * @param pageFunction Function to be evaluated in the main Electron process.
15897 |    * @param arg Optional argument to pass to
15898 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
15899 |    */
15900 |   evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
15901 | 
15902 |   /**
15903 |    * Returns the return value of
15904 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
15905 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15906 |    *
15907 |    * The only difference between
15908 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15909 |    * and
15910 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15911 |    * is that
15912 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15913 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15914 |    *
15915 |    * If the function passed to the
15916 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15917 |    * returns a [Promise], then
15918 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15919 |    * would wait for the promise to resolve and return its value.
15920 |    * @param pageFunction Function to be evaluated in the main Electron process.
15921 |    * @param arg Optional argument to pass to
15922 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
15923 |    */
15924 |   evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
15925 |   /**
15926 |    * Returns the return value of
15927 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
15928 |    * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15929 |    *
15930 |    * The only difference between
15931 |    * [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
15932 |    * and
15933 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15934 |    * is that
15935 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15936 |    * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
15937 |    *
15938 |    * If the function passed to the
15939 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15940 |    * returns a [Promise], then
15941 |    * [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
15942 |    * would wait for the promise to resolve and return its value.
15943 |    * @param pageFunction Function to be evaluated in the main Electron process.
15944 |    * @param arg Optional argument to pass to
15945 |    * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
15946 |    */
15947 |   evaluateHandle<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<SmartHandle<R>>;
15948 |   /**
15949 |    * This event is issued when the application process has been terminated.
15950 |    */
15951 |   on(event: 'close', listener: () => any): this;
15952 | 
15953 |   /**
15954 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
15955 |    * `console.dir`.
15956 |    *
15957 |    * The arguments passed into `console.log` are available on the
15958 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
15959 |    *
15960 |    * **Usage**
15961 |    *
15962 |    * ```js
15963 |    * electronApp.on('console', async msg => {
15964 |    *   const values = [];
15965 |    *   for (const arg of msg.args())
15966 |    *     values.push(await arg.jsonValue());
15967 |    *   console.log(...values);
15968 |    * });
15969 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
15970 |    * ```
15971 |    *
15972 |    */
15973 |   on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15974 | 
15975 |   /**
15976 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
15977 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
15978 |    */
15979 |   on(event: 'window', listener: (page: Page) => any): this;
15980 | 
15981 |   /**
15982 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15983 |    */
15984 |   once(event: 'close', listener: () => any): this;
15985 | 
15986 |   /**
15987 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15988 |    */
15989 |   once(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
15990 | 
15991 |   /**
15992 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
15993 |    */
15994 |   once(event: 'window', listener: (page: Page) => any): this;
15995 | 
15996 |   /**
15997 |    * This event is issued when the application process has been terminated.
15998 |    */
15999 |   addListener(event: 'close', listener: () => any): this;
16000 | 
16001 |   /**
16002 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
16003 |    * `console.dir`.
16004 |    *
16005 |    * The arguments passed into `console.log` are available on the
16006 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
16007 |    *
16008 |    * **Usage**
16009 |    *
16010 |    * ```js
16011 |    * electronApp.on('console', async msg => {
16012 |    *   const values = [];
16013 |    *   for (const arg of msg.args())
16014 |    *     values.push(await arg.jsonValue());
16015 |    *   console.log(...values);
16016 |    * });
16017 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
16018 |    * ```
16019 |    *
16020 |    */
16021 |   addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
16022 | 
16023 |   /**
16024 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
16025 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
16026 |    */
16027 |   addListener(event: 'window', listener: (page: Page) => any): this;
16028 | 
16029 |   /**
16030 |    * Removes an event listener added by `on` or `addListener`.
16031 |    */
16032 |   removeListener(event: 'close', listener: () => any): this;
16033 | 
16034 |   /**
16035 |    * Removes an event listener added by `on` or `addListener`.
16036 |    */
16037 |   removeListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
16038 | 
16039 |   /**
16040 |    * Removes an event listener added by `on` or `addListener`.
16041 |    */
16042 |   removeListener(event: 'window', listener: (page: Page) => any): this;
16043 | 
16044 |   /**
16045 |    * Removes an event listener added by `on` or `addListener`.
16046 |    */
16047 |   off(event: 'close', listener: () => any): this;
16048 | 
16049 |   /**
16050 |    * Removes an event listener added by `on` or `addListener`.
16051 |    */
16052 |   off(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
16053 | 
16054 |   /**
16055 |    * Removes an event listener added by `on` or `addListener`.
16056 |    */
16057 |   off(event: 'window', listener: (page: Page) => any): this;
16058 | 
16059 |   /**
16060 |    * This event is issued when the application process has been terminated.
16061 |    */
16062 |   prependListener(event: 'close', listener: () => any): this;
16063 | 
16064 |   /**
16065 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
16066 |    * `console.dir`.
16067 |    *
16068 |    * The arguments passed into `console.log` are available on the
16069 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
16070 |    *
16071 |    * **Usage**
16072 |    *
16073 |    * ```js
16074 |    * electronApp.on('console', async msg => {
16075 |    *   const values = [];
16076 |    *   for (const arg of msg.args())
16077 |    *     values.push(await arg.jsonValue());
16078 |    *   console.log(...values);
16079 |    * });
16080 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
16081 |    * ```
16082 |    *
16083 |    */
16084 |   prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
16085 | 
16086 |   /**
16087 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
16088 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
16089 |    */
16090 |   prependListener(event: 'window', listener: (page: Page) => any): this;
16091 | 
16092 |   /**
16093 |    * Returns the BrowserWindow object that corresponds to the given Playwright page.
16094 |    * @param page Page to retrieve the window for.
16095 |    */
16096 |   browserWindow(page: Page): Promise<JSHandle>;
16097 | 
16098 |   /**
16099 |    * Closes Electron application.
16100 |    */
16101 |   close(): Promise<void>;
16102 | 
16103 |   /**
16104 |    * This method returns browser context that can be used for setting up context-wide routing, etc.
16105 |    */
16106 |   context(): BrowserContext;
16107 | 
16108 |   /**
16109 |    * Convenience method that waits for the first application window to be opened.
16110 |    *
16111 |    * **Usage**
16112 |    *
16113 |    * ```js
16114 |    * const electronApp = await electron.launch({
16115 |    *   args: ['main.js']
16116 |    * });
16117 |    * const window = await electronApp.firstWindow();
16118 |    * // ...
16119 |    * ```
16120 |    *
16121 |    * @param options
16122 |    */
16123 |   firstWindow(options?: {
16124 |     /**
16125 |      * Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The
16126 |      * default value can be changed by using the
16127 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout).
16128 |      */
16129 |     timeout?: number;
16130 |   }): Promise<Page>;
16131 | 
16132 |   /**
16133 |    * Returns the main process for this Electron Application.
16134 |    */
16135 |   process(): ChildProcess;
16136 | 
16137 |   /**
16138 |    * This event is issued when the application process has been terminated.
16139 |    */
16140 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: () => boolean | Promise<boolean>, timeout?: number } | (() => boolean | Promise<boolean>)): Promise<void>;
16141 | 
16142 |   /**
16143 |    * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
16144 |    * `console.dir`.
16145 |    *
16146 |    * The arguments passed into `console.log` are available on the
16147 |    * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
16148 |    *
16149 |    * **Usage**
16150 |    *
16151 |    * ```js
16152 |    * electronApp.on('console', async msg => {
16153 |    *   const values = [];
16154 |    *   for (const arg of msg.args())
16155 |    *     values.push(await arg.jsonValue());
16156 |    *   console.log(...values);
16157 |    * });
16158 |    * await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
16159 |    * ```
16160 |    *
16161 |    */
16162 |   waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
16163 | 
16164 |   /**
16165 |    * This event is issued for every window that is created **and loaded** in Electron. It contains a
16166 |    * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
16167 |    */
16168 |   waitForEvent(event: 'window', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
16169 | 
16170 | 
16171 |   /**
16172 |    * Convenience method that returns all the opened windows.
16173 |    */
16174 |   windows(): Array<Page>;
16175 | 
16176 |   [Symbol.asyncDispose](): Promise<void>;
16177 | }
16178 | 
16179 | export type AndroidElementInfo = {
16180 |   clazz: string;
16181 |   desc: string;
16182 |   res: string;
16183 |   pkg: string;
16184 |   text: string;
16185 |   bounds: { x: number, y: number, width: number, height: number };
16186 |   checkable: boolean;
16187 |   checked: boolean;
16188 |   clickable: boolean;
16189 |   enabled: boolean;
16190 |   focusable: boolean;
16191 |   focused: boolean;
16192 |   longClickable: boolean;
16193 |   scrollable: boolean;
16194 |   selected: boolean;
16195 | };
16196 | 
16197 | export type AndroidSelector = {
16198 |   checkable?: boolean,
16199 |   checked?: boolean,
16200 |   clazz?: string | RegExp,
16201 |   clickable?: boolean,
16202 |   depth?: number,
16203 |   desc?: string | RegExp,
16204 |   enabled?: boolean,
16205 |   focusable?: boolean,
16206 |   focused?: boolean,
16207 |   hasChild?: { selector: AndroidSelector },
16208 |   hasDescendant?: { selector: AndroidSelector, maxDepth?: number },
16209 |   longClickable?: boolean,
16210 |   pkg?: string | RegExp,
16211 |   res?: string | RegExp,
16212 |   scrollable?: boolean,
16213 |   selected?: boolean,
16214 |   text?: string | RegExp,
16215 | };
16216 | 
16217 | export type AndroidKey =
16218 |   'Unknown' |
16219 |   'SoftLeft' | 'SoftRight' |
16220 |   'Home' |
16221 |   'Back' |
16222 |   'Call' | 'EndCall' |
16223 |   '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' |
16224 |   'Star' | '*' | 'Pound' | '#' |
16225 |   'DialUp' | 'DialDown' | 'DialLeft' | 'DialRight' | 'DialCenter' |
16226 |   'VolumeUp' | 'VolumeDown' |
16227 |   'Power' |
16228 |   'Camera' |
16229 |   'Clear' |
16230 |   'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' |
16231 |   'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' |
16232 |   'Comma' | ',' | 'Period' | '.' |
16233 |   'AltLeft' | 'AltRight' |
16234 |   'ShiftLeft' | 'ShiftRight' |
16235 |   'Tab' | '\t' |
16236 |   'Space' | ' ' |
16237 |   'Sym' |
16238 |   'Explorer' |
16239 |   'Envelop' |
16240 |   'Enter' | '\n' |
16241 |   'Del' |
16242 |   'Grave' |
16243 |   'Minus' | '-' |
16244 |   'Equals' | '=' |
16245 |   'LeftBracket' | '(' |
16246 |   'RightBracket' | ')' |
16247 |   'Backslash' | '\\' |
16248 |   'Semicolon' | ';' |
16249 |   'Apostrophe' | '`' |
16250 |   'Slash' | '/' |
16251 |   'At' | '@' |
16252 |   'Num' |
16253 |   'HeadsetHook' |
16254 |   'Focus' |
16255 |   'Plus' | '+' |
16256 |   'Menu' |
16257 |   'Notification' |
16258 |   'Search' |
16259 |   'RecentApps' |
16260 |   'MediaPlayPause' |
16261 |   'MediaStop' |
16262 |   'MediaNext' |
16263 |   'MediaPrevious' |
16264 |   'MediaRewind' |
16265 |   'MediaFastForward' |
16266 |   'MediaPlay' |
16267 |   'MediaPause' |
16268 |   'MediaClose' |
16269 |   'MediaEject' |
16270 |   'MediaRecord' |
16271 |   'ChannelUp' | 'ChannelDown' |
16272 |   'AppSwitch' |
16273 |   'Assist' |
16274 |   'MediaAudioTrack' |
16275 |   'MediaTopMenu' |
16276 |   'MediaSkipForward' |
16277 |   'MediaSkipBackward' |
16278 |   'MediaStepForward' |
16279 |   'MediaStepBackward' |
16280 |   'Cut' |
16281 |   'Copy' |
16282 |   'Paste';
16283 | 
16284 | export const _electron: Electron;
16285 | export const _android: Android;
16286 | 
16287 | // This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
16288 | export {};
16289 | 
16290 | 
16291 | /**
16292 |  * Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android
16293 |  * WebView.
16294 |  *
16295 |  * *Requirements*
16296 |  * - Android device or AVD Emulator.
16297 |  * - [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device.
16298 |  *   Typically running `adb devices` is all you need to do.
16299 |  * - [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the
16300 |  *   device
16301 |  * - "Enable command line on non-rooted devices" enabled in `chrome://flags`.
16302 |  *
16303 |  * *Known limitations*
16304 |  * - Raw USB operation is not yet supported, so you need ADB.
16305 |  * - Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help.
16306 |  * - We didn't run all the tests against the device, so not everything works.
16307 |  *
16308 |  * *How to run*
16309 |  *
16310 |  * An example of the Android automation script would be:
16311 |  *
16312 |  * ```js
16313 |  * const { _android: android } = require('playwright');
16314 |  *
16315 |  * (async () => {
16316 |  *   // Connect to the device.
16317 |  *   const [device] = await android.devices();
16318 |  *   console.log(`Model: ${device.model()}`);
16319 |  *   console.log(`Serial: ${device.serial()}`);
16320 |  *   // Take screenshot of the whole device.
16321 |  *   await device.screenshot({ path: 'device.png' });
16322 |  *
16323 |  *   {
16324 |  *     // --------------------- WebView -----------------------
16325 |  *
16326 |  *     // Launch an application with WebView.
16327 |  *     await device.shell('am force-stop org.chromium.webview_shell');
16328 |  *     await device.shell('am start org.chromium.webview_shell/.WebViewBrowserActivity');
16329 |  *     // Get the WebView.
16330 |  *     const webview = await device.webView({ pkg: 'org.chromium.webview_shell' });
16331 |  *
16332 |  *     // Fill the input box.
16333 |  *     await device.fill({
16334 |  *       res: 'org.chromium.webview_shell:id/url_field',
16335 |  *     }, 'github.com/microsoft/playwright');
16336 |  *     await device.press({
16337 |  *       res: 'org.chromium.webview_shell:id/url_field',
16338 |  *     }, 'Enter');
16339 |  *
16340 |  *     // Work with WebView's page as usual.
16341 |  *     const page = await webview.page();
16342 |  *     await page.waitForNavigation({ url: /.*microsoft\/playwright.*\/ });
16343 |  *     console.log(await page.title());
16344 |  *   }
16345 |  *
16346 |  *   {
16347 |  *     // --------------------- Browser -----------------------
16348 |  *
16349 |  *     // Launch Chrome browser.
16350 |  *     await device.shell('am force-stop com.android.chrome');
16351 |  *     const context = await device.launchBrowser();
16352 |  *
16353 |  *     // Use BrowserContext as usual.
16354 |  *     const page = await context.newPage();
16355 |  *     await page.goto('https://webkit.org/');
16356 |  *     console.log(await page.evaluate(() => window.location.href));
16357 |  *     await page.screenshot({ path: 'page.png' });
16358 |  *
16359 |  *     await context.close();
16360 |  *   }
16361 |  *
16362 |  *   // Close the device.
16363 |  *   await device.close();
16364 |  * })();
16365 |  * ```
16366 |  *
16367 |  */
16368 | export interface Android {
16369 |   /**
16370 |    * This methods attaches Playwright to an existing Android device. Use
16371 |    * [android.launchServer([options])](https://playwright.dev/docs/api/class-android#android-launch-server) to launch a
16372 |    * new Android server instance.
16373 |    * @param wsEndpoint A browser websocket endpoint to connect to.
16374 |    * @param options
16375 |    */
16376 |   connect(wsEndpoint: string, options?: {
16377 |     /**
16378 |      * Additional HTTP headers to be sent with web socket connect request. Optional.
16379 |      */
16380 |     headers?: { [key: string]: string; };
16381 | 
16382 |     /**
16383 |      * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
16384 |      * on. Defaults to `0`.
16385 |      */
16386 |     slowMo?: number;
16387 | 
16388 |     /**
16389 |      * Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass
16390 |      * `0` to disable timeout.
16391 |      */
16392 |     timeout?: number;
16393 |   }): Promise<AndroidDevice>;
16394 | 
16395 |   /**
16396 |    * Returns the list of detected Android devices.
16397 |    * @param options
16398 |    */
16399 |   devices(options?: {
16400 |     /**
16401 |      * Optional host to establish ADB server connection. Default to `127.0.0.1`.
16402 |      */
16403 |     host?: string;
16404 | 
16405 |     /**
16406 |      * Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
16407 |      */
16408 |     omitDriverInstall?: boolean;
16409 | 
16410 |     /**
16411 |      * Optional port to establish ADB server connection. Default to `5037`.
16412 |      */
16413 |     port?: number;
16414 |   }): Promise<Array<AndroidDevice>>;
16415 | 
16416 |   /**
16417 |    * Launches Playwright Android server that clients can connect to. See the following example:
16418 |    *
16419 |    * **Usage**
16420 |    *
16421 |    * Server Side:
16422 |    *
16423 |    * ```js
16424 |    * const { _android } = require('playwright');
16425 |    *
16426 |    * (async () => {
16427 |    *   const browserServer = await _android.launchServer({
16428 |    *     // If you have multiple devices connected and want to use a specific one.
16429 |    *     // deviceSerialNumber: '<deviceSerialNumber>',
16430 |    *   });
16431 |    *   const wsEndpoint = browserServer.wsEndpoint();
16432 |    *   console.log(wsEndpoint);
16433 |    * })();
16434 |    * ```
16435 |    *
16436 |    * Client Side:
16437 |    *
16438 |    * ```js
16439 |    * const { _android } = require('playwright');
16440 |    *
16441 |    * (async () => {
16442 |    *   const device = await _android.connect('<wsEndpoint>');
16443 |    *
16444 |    *   console.log(device.model());
16445 |    *   console.log(device.serial());
16446 |    *   await device.shell('am force-stop com.android.chrome');
16447 |    *   const context = await device.launchBrowser();
16448 |    *
16449 |    *   const page = await context.newPage();
16450 |    *   await page.goto('https://webkit.org/');
16451 |    *   console.log(await page.evaluate(() => window.location.href));
16452 |    *   await page.screenshot({ path: 'page-chrome-1.png' });
16453 |    *
16454 |    *   await context.close();
16455 |    * })();
16456 |    * ```
16457 |    *
16458 |    * @param options
16459 |    */
16460 |   launchServer(options?: {
16461 |     /**
16462 |      * Optional host to establish ADB server connection. Default to `127.0.0.1`.
16463 |      */
16464 |     adbHost?: string;
16465 | 
16466 |     /**
16467 |      * Optional port to establish ADB server connection. Default to `5037`.
16468 |      */
16469 |     adbPort?: number;
16470 | 
16471 |     /**
16472 |      * Optional device serial number to launch the browser on. If not specified, it will throw if multiple devices are
16473 |      * connected.
16474 |      */
16475 |     deviceSerialNumber?: string;
16476 | 
16477 |     /**
16478 |      * Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the
16479 |      * unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider
16480 |      * hardening it with picking a specific interface.
16481 |      */
16482 |     host?: string;
16483 | 
16484 |     /**
16485 |      * Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
16486 |      */
16487 |     omitDriverInstall?: boolean;
16488 | 
16489 |     /**
16490 |      * Port to use for the web socket. Defaults to 0 that picks any available port.
16491 |      */
16492 |     port?: number;
16493 | 
16494 |     /**
16495 |      * Path at which to serve the Android Server. For security, this defaults to an unguessable string.
16496 |      *
16497 |      * **NOTE** Any process or web page (including those running in Playwright) with knowledge of the `wsPath` can take
16498 |      * control of the OS user. For this reason, you should use an unguessable token when using this option.
16499 |      *
16500 |      */
16501 |     wsPath?: string;
16502 |   }): Promise<BrowserServer>;
16503 | 
16504 |   /**
16505 |    * This setting will change the default maximum time for all the methods accepting
16506 |    * [`timeout`](https://playwright.dev/docs/api/class-android#android-set-default-timeout-option-timeout) option.
16507 |    * @param timeout Maximum time in milliseconds
16508 |    */
16509 |   setDefaultTimeout(timeout: number): void;
16510 | }
16511 | 
16512 | /**
16513 |  * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice) represents a connected device, either real
16514 |  * hardware or emulated. Devices can be obtained using
16515 |  * [android.devices([options])](https://playwright.dev/docs/api/class-android#android-devices).
16516 |  */
16517 | export interface AndroidDevice {
16518 |   /**
16519 |    * Emitted when the device connection gets closed.
16520 |    */
16521 |   on(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16522 | 
16523 |   /**
16524 |    * Emitted when a new WebView instance is detected.
16525 |    */
16526 |   on(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16527 | 
16528 |   /**
16529 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
16530 |    */
16531 |   once(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16532 | 
16533 |   /**
16534 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
16535 |    */
16536 |   once(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16537 | 
16538 |   /**
16539 |    * Emitted when the device connection gets closed.
16540 |    */
16541 |   addListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16542 | 
16543 |   /**
16544 |    * Emitted when a new WebView instance is detected.
16545 |    */
16546 |   addListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16547 | 
16548 |   /**
16549 |    * Removes an event listener added by `on` or `addListener`.
16550 |    */
16551 |   removeListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16552 | 
16553 |   /**
16554 |    * Removes an event listener added by `on` or `addListener`.
16555 |    */
16556 |   removeListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16557 | 
16558 |   /**
16559 |    * Removes an event listener added by `on` or `addListener`.
16560 |    */
16561 |   off(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16562 | 
16563 |   /**
16564 |    * Removes an event listener added by `on` or `addListener`.
16565 |    */
16566 |   off(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16567 | 
16568 |   /**
16569 |    * Emitted when the device connection gets closed.
16570 |    */
16571 |   prependListener(event: 'close', listener: (androidDevice: AndroidDevice) => any): this;
16572 | 
16573 |   /**
16574 |    * Emitted when a new WebView instance is detected.
16575 |    */
16576 |   prependListener(event: 'webview', listener: (androidWebView: AndroidWebView) => any): this;
16577 | 
16578 |   /**
16579 |    * Disconnects from the device.
16580 |    */
16581 |   close(): Promise<void>;
16582 | 
16583 |   /**
16584 |    * Drags the widget defined by
16585 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-selector) towards
16586 |    * [`dest`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-dest) point.
16587 |    * @param selector Selector to drag.
16588 |    * @param dest Point to drag to.
16589 |    * @param options
16590 |    */
16591 |   drag(selector: AndroidSelector, dest: {
16592 |     x: number;
16593 | 
16594 |     y: number;
16595 |   }, options?: {
16596 |     /**
16597 |      * Optional speed of the drag in pixels per second.
16598 |      */
16599 |     speed?: number;
16600 | 
16601 |     /**
16602 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16603 |      * by using the
16604 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16605 |      * method.
16606 |      */
16607 |     timeout?: number;
16608 |   }): Promise<void>;
16609 | 
16610 |   /**
16611 |    * Fills the specific
16612 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-selector) input box
16613 |    * with [`text`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-text).
16614 |    * @param selector Selector to fill.
16615 |    * @param text Text to be filled in the input box.
16616 |    * @param options
16617 |    */
16618 |   fill(selector: AndroidSelector, text: string, options?: {
16619 |     /**
16620 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16621 |      * by using the
16622 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16623 |      * method.
16624 |      */
16625 |     timeout?: number;
16626 |   }): Promise<void>;
16627 | 
16628 |   /**
16629 |    * Flings the widget defined by
16630 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-selector) in  the
16631 |    * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-direction).
16632 |    * @param selector Selector to fling.
16633 |    * @param direction Fling direction.
16634 |    * @param options
16635 |    */
16636 |   fling(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", options?: {
16637 |     /**
16638 |      * Optional speed of the fling in pixels per second.
16639 |      */
16640 |     speed?: number;
16641 | 
16642 |     /**
16643 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
16644 |      * by using the
16645 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
16646 |      * method.
16647 |      */
16648 |     timeout?: number;
16649 |   }): Promise<void>;
16650 | 
16651 |   /**
16652 |    * Returns information about a widget defined by
16653 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-info-option-selector).
16654 |    * @param selector Selector to return information about.
16655 |    */
16656 |   info(selector: AndroidSelector): Promise<AndroidElementInfo>;
16657 | 
16658 |   /**
16659 |    * Installs an apk on the device.
16660 |    * @param file Either a path to the apk file, or apk file content.
16661 |    * @param options
16662 |    */
16663 |   installApk(file: string|Buffer, options?: {
16664 |     /**
16665 |      * Optional arguments to pass to the `shell:cmd package install` call. Defaults to `-r -t -S`.
16666 |      */
16667 |     args?: Array<string>;
16668 |   }): Promise<void>;
16669 | 
16670 |   /**
16671 |    * Launches Chrome browser on the device, and returns its persistent context.
16672 |    * @param options
16673 |    */
16674 |   launchBrowser(options?: {
16675 |     /**
16676 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
16677 |      */
16678 |     acceptDownloads?: boolean;
16679 | 
16680 |     /**
16681 |      * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
16682 |      *
16683 |      * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
16684 |      * [here](https://peter.sh/experiments/chromium-command-line-switches/).
16685 |      */
16686 |     args?: Array<string>;
16687 | 
16688 |     /**
16689 |      * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
16690 |      * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
16691 |      * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
16692 |      * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
16693 |      * or
16694 |      * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
16695 |      * it takes the base URL in consideration by using the
16696 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
16697 |      * Unset by default. Examples:
16698 |      * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
16699 |      * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
16700 |      *   `http://localhost:3000/foo/bar.html`
16701 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
16702 |      *   `http://localhost:3000/bar.html`
16703 |      */
16704 |     baseURL?: string;
16705 | 
16706 |     /**
16707 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
16708 |      */
16709 |     bypassCSP?: boolean;
16710 | 
16711 |     /**
16712 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
16713 |      * media feature, supported values are `'light'` and `'dark'`. See
16714 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16715 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
16716 |      */
16717 |     colorScheme?: null|"light"|"dark"|"no-preference";
16718 | 
16719 |     /**
16720 |      * Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
16721 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16722 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
16723 |      */
16724 |     contrast?: null|"no-preference"|"more";
16725 | 
16726 |     /**
16727 |      * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
16728 |      * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
16729 |      */
16730 |     deviceScaleFactor?: number;
16731 | 
16732 |     /**
16733 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
16734 |      */
16735 |     extraHTTPHeaders?: { [key: string]: string; };
16736 | 
16737 |     /**
16738 |      * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
16739 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16740 |      * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
16741 |      */
16742 |     forcedColors?: null|"active"|"none";
16743 | 
16744 |     geolocation?: {
16745 |       /**
16746 |        * Latitude between -90 and 90.
16747 |        */
16748 |       latitude: number;
16749 | 
16750 |       /**
16751 |        * Longitude between -180 and 180.
16752 |        */
16753 |       longitude: number;
16754 | 
16755 |       /**
16756 |        * Non-negative accuracy value. Defaults to `0`.
16757 |        */
16758 |       accuracy?: number;
16759 |     };
16760 | 
16761 |     /**
16762 |      * Specifies if viewport supports touch events. Defaults to false. Learn more about
16763 |      * [mobile emulation](https://playwright.dev/docs/emulation#devices).
16764 |      */
16765 |     hasTouch?: boolean;
16766 | 
16767 |     /**
16768 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
16769 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
16770 |      */
16771 |     httpCredentials?: {
16772 |       username: string;
16773 | 
16774 |       password: string;
16775 | 
16776 |       /**
16777 |        * Restrain sending http credentials on specific origin (scheme://host:port).
16778 |        */
16779 |       origin?: string;
16780 | 
16781 |       /**
16782 |        * This option only applies to the requests sent from corresponding
16783 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
16784 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
16785 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
16786 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
16787 |        */
16788 |       send?: "unauthorized"|"always";
16789 |     };
16790 | 
16791 |     /**
16792 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
16793 |      */
16794 |     ignoreHTTPSErrors?: boolean;
16795 | 
16796 |     /**
16797 |      * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
16798 |      * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
16799 |      * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
16800 |      */
16801 |     isMobile?: boolean;
16802 | 
16803 |     /**
16804 |      * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
16805 |      * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
16806 |      */
16807 |     javaScriptEnabled?: boolean;
16808 | 
16809 |     /**
16810 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
16811 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
16812 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
16813 |      */
16814 |     locale?: string;
16815 | 
16816 |     /**
16817 |      * Logger sink for Playwright logging.
16818 |      * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
16819 |      */
16820 |     logger?: Logger;
16821 | 
16822 |     /**
16823 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
16824 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
16825 |      */
16826 |     offline?: boolean;
16827 | 
16828 |     /**
16829 |      * A list of permissions to grant to all pages in this context. See
16830 |      * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
16831 |      * for more details. Defaults to none.
16832 |      */
16833 |     permissions?: Array<string>;
16834 | 
16835 |     /**
16836 |      * Optional package name to launch instead of default Chrome for Android.
16837 |      */
16838 |     pkg?: string;
16839 | 
16840 |     /**
16841 |      * Network proxy settings.
16842 |      */
16843 |     proxy?: {
16844 |       /**
16845 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
16846 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
16847 |        */
16848 |       server: string;
16849 | 
16850 |       /**
16851 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
16852 |        */
16853 |       bypass?: string;
16854 | 
16855 |       /**
16856 |        * Optional username to use if HTTP proxy requires authentication.
16857 |        */
16858 |       username?: string;
16859 | 
16860 |       /**
16861 |        * Optional password to use if HTTP proxy requires authentication.
16862 |        */
16863 |       password?: string;
16864 |     };
16865 | 
16866 |     /**
16867 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
16868 |      * If not specified, the HAR is not recorded. Make sure to await
16869 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
16870 |      * the HAR to be saved.
16871 |      */
16872 |     recordHar?: {
16873 |       /**
16874 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
16875 |        * `content` policy instead.
16876 |        */
16877 |       omitContent?: boolean;
16878 | 
16879 |       /**
16880 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
16881 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
16882 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
16883 |        * files and to `embed` for all other file extensions.
16884 |        */
16885 |       content?: "omit"|"embed"|"attach";
16886 | 
16887 |       /**
16888 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
16889 |        * default.
16890 |        */
16891 |       path: string;
16892 | 
16893 |       /**
16894 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
16895 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
16896 |        */
16897 |       mode?: "full"|"minimal";
16898 | 
16899 |       /**
16900 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
16901 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
16902 |        * options was provided and the passed URL is a path, it gets merged via the
16903 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
16904 |        */
16905 |       urlFilter?: string|RegExp;
16906 |     };
16907 | 
16908 |     /**
16909 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
16910 |      * Make sure to await
16911 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
16912 |      * videos to be saved.
16913 |      */
16914 |     recordVideo?: {
16915 |       /**
16916 |        * Path to the directory to put videos into.
16917 |        */
16918 |       dir: string;
16919 | 
16920 |       /**
16921 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
16922 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
16923 |        * each page will be scaled down if necessary to fit the specified size.
16924 |        */
16925 |       size?: {
16926 |         /**
16927 |          * Video frame width.
16928 |          */
16929 |         width: number;
16930 | 
16931 |         /**
16932 |          * Video frame height.
16933 |          */
16934 |         height: number;
16935 |       };
16936 |     };
16937 | 
16938 |     /**
16939 |      * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
16940 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
16941 |      * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
16942 |      */
16943 |     reducedMotion?: null|"reduce"|"no-preference";
16944 | 
16945 |     /**
16946 |      * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
16947 |      * [`viewport`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-viewport) is
16948 |      * set.
16949 |      */
16950 |     screen?: {
16951 |       /**
16952 |        * page width in pixels.
16953 |        */
16954 |       width: number;
16955 | 
16956 |       /**
16957 |        * page height in pixels.
16958 |        */
16959 |       height: number;
16960 |     };
16961 | 
16962 |     /**
16963 |      * Whether to allow sites to register Service workers. Defaults to `'allow'`.
16964 |      * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
16965 |      *   registered.
16966 |      * - `'block'`: Playwright will block all registration of Service Workers.
16967 |      */
16968 |     serviceWorkers?: "allow"|"block";
16969 | 
16970 |     /**
16971 |      * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
16972 |      * selectors that imply single target DOM element will throw when more than one element matches the selector. This
16973 |      * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
16974 |      * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
16975 |      */
16976 |     strictSelectors?: boolean;
16977 | 
16978 |     /**
16979 |      * Changes the timezone of the context. See
16980 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
16981 |      * for a list of supported timezone IDs. Defaults to the system timezone.
16982 |      */
16983 |     timezoneId?: string;
16984 | 
16985 |     /**
16986 |      * Specific user agent to use in this context.
16987 |      */
16988 |     userAgent?: string;
16989 | 
16990 |     /**
16991 |      * @deprecated Use
16992 |      * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
16993 |      * instead.
16994 |      */
16995 |     videoSize?: {
16996 |       /**
16997 |        * Video frame width.
16998 |        */
16999 |       width: number;
17000 | 
17001 |       /**
17002 |        * Video frame height.
17003 |        */
17004 |       height: number;
17005 |     };
17006 | 
17007 |     /**
17008 |      * @deprecated Use
17009 |      * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
17010 |      * instead.
17011 |      */
17012 |     videosPath?: string;
17013 | 
17014 |     /**
17015 |      * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
17016 |      * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
17017 |      *
17018 |      * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
17019 |      * by the operating system. It makes the execution of the tests non-deterministic.
17020 |      *
17021 |      */
17022 |     viewport?: null|{
17023 |       /**
17024 |        * page width in pixels.
17025 |        */
17026 |       width: number;
17027 | 
17028 |       /**
17029 |        * page height in pixels.
17030 |        */
17031 |       height: number;
17032 |     };
17033 |   }): Promise<BrowserContext>;
17034 | 
17035 |   /**
17036 |    * Performs a long tap on the widget defined by
17037 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-long-tap-option-selector).
17038 |    * @param selector Selector to tap on.
17039 |    * @param options
17040 |    */
17041 |   longTap(selector: AndroidSelector, options?: {
17042 |     /**
17043 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17044 |      * by using the
17045 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17046 |      * method.
17047 |      */
17048 |     timeout?: number;
17049 |   }): Promise<void>;
17050 | 
17051 |   /**
17052 |    * Device model.
17053 |    */
17054 |   model(): string;
17055 | 
17056 |   /**
17057 |    * Launches a process in the shell on the device and returns a socket to communicate with the launched process.
17058 |    * @param command Shell command to execute.
17059 |    */
17060 |   open(command: string): Promise<AndroidSocket>;
17061 | 
17062 |   /**
17063 |    * Pinches the widget defined by
17064 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-close-option-selector) in the
17065 |    * closing direction.
17066 |    * @param selector Selector to pinch close.
17067 |    * @param percent The size of the pinch as a percentage of the widget's size.
17068 |    * @param options
17069 |    */
17070 |   pinchClose(selector: AndroidSelector, percent: number, options?: {
17071 |     /**
17072 |      * Optional speed of the pinch in pixels per second.
17073 |      */
17074 |     speed?: number;
17075 | 
17076 |     /**
17077 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17078 |      * by using the
17079 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17080 |      * method.
17081 |      */
17082 |     timeout?: number;
17083 |   }): Promise<void>;
17084 | 
17085 |   /**
17086 |    * Pinches the widget defined by
17087 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-open-option-selector) in the
17088 |    * open direction.
17089 |    * @param selector Selector to pinch open.
17090 |    * @param percent The size of the pinch as a percentage of the widget's size.
17091 |    * @param options
17092 |    */
17093 |   pinchOpen(selector: AndroidSelector, percent: number, options?: {
17094 |     /**
17095 |      * Optional speed of the pinch in pixels per second.
17096 |      */
17097 |     speed?: number;
17098 | 
17099 |     /**
17100 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17101 |      * by using the
17102 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17103 |      * method.
17104 |      */
17105 |     timeout?: number;
17106 |   }): Promise<void>;
17107 | 
17108 |   /**
17109 |    * Presses the specific [`key`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-key)
17110 |    * in the widget defined by
17111 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-selector).
17112 |    * @param selector Selector to press the key in.
17113 |    * @param key The key to press.
17114 |    * @param options
17115 |    */
17116 |   press(selector: AndroidSelector, key: AndroidKey, options?: {
17117 |     /**
17118 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17119 |      * by using the
17120 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17121 |      * method.
17122 |      */
17123 |     timeout?: number;
17124 |   }): Promise<void>;
17125 | 
17126 |   /**
17127 |    * Copies a file to the device.
17128 |    * @param file Either a path to the file, or file content.
17129 |    * @param path Path to the file on the device.
17130 |    * @param options
17131 |    */
17132 |   push(file: string|Buffer, path: string, options?: {
17133 |     /**
17134 |      * Optional file mode, defaults to `644` (`rw-r--r--`).
17135 |      */
17136 |     mode?: number;
17137 |   }): Promise<void>;
17138 | 
17139 |   /**
17140 |    * Returns the buffer with the captured screenshot of the device.
17141 |    * @param options
17142 |    */
17143 |   screenshot(options?: {
17144 |     /**
17145 |      * The file path to save the image to. If
17146 |      * [`path`](https://playwright.dev/docs/api/class-androiddevice#android-device-screenshot-option-path) is a relative
17147 |      * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
17148 |      * saved to the disk.
17149 |      */
17150 |     path?: string;
17151 |   }): Promise<Buffer>;
17152 | 
17153 |   /**
17154 |    * Scrolls the widget defined by
17155 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-selector) in  the
17156 |    * specified
17157 |    * [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-direction).
17158 |    * @param selector Selector to scroll.
17159 |    * @param direction Scroll direction.
17160 |    * @param percent Distance to scroll as a percentage of the widget's size.
17161 |    * @param options
17162 |    */
17163 |   scroll(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", percent: number, options?: {
17164 |     /**
17165 |      * Optional speed of the scroll in pixels per second.
17166 |      */
17167 |     speed?: number;
17168 | 
17169 |     /**
17170 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17171 |      * by using the
17172 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17173 |      * method.
17174 |      */
17175 |     timeout?: number;
17176 |   }): Promise<void>;
17177 | 
17178 |   /**
17179 |    * Device serial number.
17180 |    */
17181 |   serial(): string;
17182 | 
17183 |   /**
17184 |    * This setting will change the default maximum time for all the methods accepting
17185 |    * [`timeout`](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout-option-timeout)
17186 |    * option.
17187 |    * @param timeout Maximum time in milliseconds
17188 |    */
17189 |   setDefaultTimeout(timeout: number): void;
17190 | 
17191 |   /**
17192 |    * Executes a shell command on the device and returns its output.
17193 |    * @param command Shell command to execute.
17194 |    */
17195 |   shell(command: string): Promise<Buffer>;
17196 | 
17197 |   /**
17198 |    * Swipes the widget defined by
17199 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-selector) in  the
17200 |    * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-direction).
17201 |    * @param selector Selector to swipe.
17202 |    * @param direction Swipe direction.
17203 |    * @param percent Distance to swipe as a percentage of the widget's size.
17204 |    * @param options
17205 |    */
17206 |   swipe(selector: AndroidSelector, direction: "down"|"up"|"left"|"right", percent: number, options?: {
17207 |     /**
17208 |      * Optional speed of the swipe in pixels per second.
17209 |      */
17210 |     speed?: number;
17211 | 
17212 |     /**
17213 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17214 |      * by using the
17215 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17216 |      * method.
17217 |      */
17218 |     timeout?: number;
17219 |   }): Promise<void>;
17220 | 
17221 |   /**
17222 |    * Taps on the widget defined by
17223 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-tap-option-selector).
17224 |    * @param selector Selector to tap on.
17225 |    * @param options
17226 |    */
17227 |   tap(selector: AndroidSelector, options?: {
17228 |     /**
17229 |      * Optional duration of the tap in milliseconds.
17230 |      */
17231 |     duration?: number;
17232 | 
17233 |     /**
17234 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17235 |      * by using the
17236 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17237 |      * method.
17238 |      */
17239 |     timeout?: number;
17240 |   }): Promise<void>;
17241 | 
17242 |   /**
17243 |    * Waits for the specific
17244 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-selector) to either
17245 |    * appear or disappear, depending on the
17246 |    * [`state`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-state).
17247 |    * @param selector Selector to wait for.
17248 |    * @param options
17249 |    */
17250 |   wait(selector: AndroidSelector, options?: {
17251 |     /**
17252 |      * Optional state. Can be either:
17253 |      * - default - wait for element to be present.
17254 |      * - `'gone'` - wait for element to not be present.
17255 |      */
17256 |     state?: "gone";
17257 | 
17258 |     /**
17259 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17260 |      * by using the
17261 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17262 |      * method.
17263 |      */
17264 |     timeout?: number;
17265 |   }): Promise<void>;
17266 | 
17267 |   /**
17268 |    * Emitted when the device connection gets closed.
17269 |    */
17270 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (androidDevice: AndroidDevice) => boolean | Promise<boolean>, timeout?: number } | ((androidDevice: AndroidDevice) => boolean | Promise<boolean>)): Promise<AndroidDevice>;
17271 | 
17272 |   /**
17273 |    * Emitted when a new WebView instance is detected.
17274 |    */
17275 |   waitForEvent(event: 'webview', optionsOrPredicate?: { predicate?: (androidWebView: AndroidWebView) => boolean | Promise<boolean>, timeout?: number } | ((androidWebView: AndroidWebView) => boolean | Promise<boolean>)): Promise<AndroidWebView>;
17276 | 
17277 | 
17278 |   /**
17279 |    * This method waits until [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) matching the
17280 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector) is opened
17281 |    * and returns it. If there is already an open [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview)
17282 |    * matching the
17283 |    * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector), returns
17284 |    * immediately.
17285 |    * @param selector
17286 |    * @param options
17287 |    */
17288 |   webView(selector: {
17289 |     /**
17290 |      * Optional Package identifier.
17291 |      */
17292 |     pkg?: string;
17293 | 
17294 |     /**
17295 |      * Optional webview socket name.
17296 |      */
17297 |     socketName?: string;
17298 |   }, options?: {
17299 |     /**
17300 |      * Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed
17301 |      * by using the
17302 |      * [androidDevice.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout)
17303 |      * method.
17304 |      */
17305 |     timeout?: number;
17306 |   }): Promise<AndroidWebView>;
17307 | 
17308 |   /**
17309 |    * Currently open WebViews.
17310 |    */
17311 |   webViews(): Array<AndroidWebView>;
17312 | 
17313 |   input: AndroidInput;
17314 | 
17315 |   [Symbol.asyncDispose](): Promise<void>;
17316 | }
17317 | 
17318 | export interface AndroidInput {
17319 |   /**
17320 |    * Performs a drag between [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-from)
17321 |    * and [`to`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-to) points.
17322 |    * @param from The start point of the drag.
17323 |    * @param to The end point of the drag.
17324 |    * @param steps The number of steps in the drag. Each step takes 5 milliseconds to complete.
17325 |    */
17326 |   drag(from: {
17327 |     x: number;
17328 | 
17329 |     y: number;
17330 |   }, to: {
17331 |     x: number;
17332 | 
17333 |     y: number;
17334 |   }, steps: number): Promise<void>;
17335 | 
17336 |   /**
17337 |    * Presses the [`key`](https://playwright.dev/docs/api/class-androidinput#android-input-press-option-key).
17338 |    * @param key Key to press.
17339 |    */
17340 |   press(key: AndroidKey): Promise<void>;
17341 | 
17342 |   /**
17343 |    * Swipes following the path defined by
17344 |    * [`segments`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-segments).
17345 |    * @param from The point to start swiping from.
17346 |    * @param segments Points following the [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-from)
17347 |    * point in the swipe gesture.
17348 |    * @param steps The number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second
17349 |    * per each segment.
17350 |    */
17351 |   swipe(from: {
17352 |     x: number;
17353 | 
17354 |     y: number;
17355 |   }, segments: ReadonlyArray<{
17356 |     x: number;
17357 | 
17358 |     y: number;
17359 |   }>, steps: number): Promise<void>;
17360 | 
17361 |   /**
17362 |    * Taps at the specified [`point`](https://playwright.dev/docs/api/class-androidinput#android-input-tap-option-point).
17363 |    * @param point The point to tap at.
17364 |    */
17365 |   tap(point: {
17366 |     x: number;
17367 | 
17368 |     y: number;
17369 |   }): Promise<void>;
17370 | 
17371 |   /**
17372 |    * Types [`text`](https://playwright.dev/docs/api/class-androidinput#android-input-type-option-text) into currently
17373 |    * focused widget.
17374 |    * @param text Text to type.
17375 |    */
17376 |   type(text: string): Promise<void>;
17377 | }
17378 | 
17379 | /**
17380 |  * [AndroidSocket](https://playwright.dev/docs/api/class-androidsocket) is a way to communicate with a process
17381 |  * launched on the [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). Use
17382 |  * [androidDevice.open(command)](https://playwright.dev/docs/api/class-androiddevice#android-device-open) to open a
17383 |  * socket.
17384 |  */
17385 | export interface AndroidSocket {
17386 |   /**
17387 |    * Emitted when the socket is closed.
17388 |    */
17389 |   on(event: 'close', listener: () => any): this;
17390 | 
17391 |   /**
17392 |    * Emitted when data is available to read from the socket.
17393 |    */
17394 |   on(event: 'data', listener: (buffer: Buffer) => any): this;
17395 | 
17396 |   /**
17397 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17398 |    */
17399 |   once(event: 'close', listener: () => any): this;
17400 | 
17401 |   /**
17402 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17403 |    */
17404 |   once(event: 'data', listener: (buffer: Buffer) => any): this;
17405 | 
17406 |   /**
17407 |    * Emitted when the socket is closed.
17408 |    */
17409 |   addListener(event: 'close', listener: () => any): this;
17410 | 
17411 |   /**
17412 |    * Emitted when data is available to read from the socket.
17413 |    */
17414 |   addListener(event: 'data', listener: (buffer: Buffer) => any): this;
17415 | 
17416 |   /**
17417 |    * Removes an event listener added by `on` or `addListener`.
17418 |    */
17419 |   removeListener(event: 'close', listener: () => any): this;
17420 | 
17421 |   /**
17422 |    * Removes an event listener added by `on` or `addListener`.
17423 |    */
17424 |   removeListener(event: 'data', listener: (buffer: Buffer) => any): this;
17425 | 
17426 |   /**
17427 |    * Removes an event listener added by `on` or `addListener`.
17428 |    */
17429 |   off(event: 'close', listener: () => any): this;
17430 | 
17431 |   /**
17432 |    * Removes an event listener added by `on` or `addListener`.
17433 |    */
17434 |   off(event: 'data', listener: (buffer: Buffer) => any): this;
17435 | 
17436 |   /**
17437 |    * Emitted when the socket is closed.
17438 |    */
17439 |   prependListener(event: 'close', listener: () => any): this;
17440 | 
17441 |   /**
17442 |    * Emitted when data is available to read from the socket.
17443 |    */
17444 |   prependListener(event: 'data', listener: (buffer: Buffer) => any): this;
17445 | 
17446 |   /**
17447 |    * Closes the socket.
17448 |    */
17449 |   close(): Promise<void>;
17450 | 
17451 |   /**
17452 |    * Writes some [`data`](https://playwright.dev/docs/api/class-androidsocket#android-socket-write-option-data) to the
17453 |    * socket.
17454 |    * @param data Data to write.
17455 |    */
17456 |   write(data: Buffer): Promise<void>;
17457 | 
17458 |   [Symbol.asyncDispose](): Promise<void>;
17459 | }
17460 | 
17461 | /**
17462 |  * [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) represents a WebView open on the
17463 |  * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). WebView is usually obtained using
17464 |  * [androidDevice.webView(selector[, options])](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view).
17465 |  */
17466 | export interface AndroidWebView {
17467 |   /**
17468 |    * Emitted when the WebView is closed.
17469 |    */
17470 |   on(event: 'close', listener: () => any): this;
17471 | 
17472 |   /**
17473 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
17474 |    */
17475 |   once(event: 'close', listener: () => any): this;
17476 | 
17477 |   /**
17478 |    * Emitted when the WebView is closed.
17479 |    */
17480 |   addListener(event: 'close', listener: () => any): this;
17481 | 
17482 |   /**
17483 |    * Removes an event listener added by `on` or `addListener`.
17484 |    */
17485 |   removeListener(event: 'close', listener: () => any): this;
17486 | 
17487 |   /**
17488 |    * Removes an event listener added by `on` or `addListener`.
17489 |    */
17490 |   off(event: 'close', listener: () => any): this;
17491 | 
17492 |   /**
17493 |    * Emitted when the WebView is closed.
17494 |    */
17495 |   prependListener(event: 'close', listener: () => any): this;
17496 | 
17497 |   /**
17498 |    * Connects to the WebView and returns a regular Playwright [Page](https://playwright.dev/docs/api/class-page) to
17499 |    * interact with.
17500 |    */
17501 |   page(): Promise<Page>;
17502 | 
17503 |   /**
17504 |    * WebView process PID.
17505 |    */
17506 |   pid(): number;
17507 | 
17508 |   /**
17509 |    * WebView package identifier.
17510 |    */
17511 |   pkg(): string;
17512 | }
17513 | 
17514 | /**
17515 |  * Exposes API that can be used for the Web API testing. This class is used for creating
17516 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which in turn can be used for
17517 |  * sending web requests. An instance of this class can be obtained via
17518 |  * [playwright.request](https://playwright.dev/docs/api/class-playwright#playwright-request). For more information see
17519 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
17520 |  */
17521 | export interface APIRequest {
17522 |   /**
17523 |    * Creates new instances of [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
17524 |    * @param options
17525 |    */
17526 |   newContext(options?: {
17527 |     /**
17528 |      * Methods like
17529 |      * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
17530 |      * take the base URL into consideration by using the
17531 |      * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
17532 |      * Examples:
17533 |      * - baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
17534 |      * - baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in
17535 |      *   `http://localhost:3000/foo/bar.html`
17536 |      * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
17537 |      *   `http://localhost:3000/bar.html`
17538 |      */
17539 |     baseURL?: string;
17540 | 
17541 |     /**
17542 |      * TLS Client Authentication allows the server to request a client certificate and verify it.
17543 |      *
17544 |      * **Details**
17545 |      *
17546 |      * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
17547 |      * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
17548 |      * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
17549 |      * with an exact match to the request origin that the certificate is valid for.
17550 |      *
17551 |      * Client certificate authentication is only active when at least one client certificate is provided. If you want to
17552 |      * reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
17553 |      * does not match any of the domains you plan to visit.
17554 |      *
17555 |      * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
17556 |      * work by replacing `localhost` with `local.playwright`.
17557 |      *
17558 |      */
17559 |     clientCertificates?: Array<{
17560 |       /**
17561 |        * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
17562 |        */
17563 |       origin: string;
17564 | 
17565 |       /**
17566 |        * Path to the file with the certificate in PEM format.
17567 |        */
17568 |       certPath?: string;
17569 | 
17570 |       /**
17571 |        * Direct value of the certificate in PEM format.
17572 |        */
17573 |       cert?: Buffer;
17574 | 
17575 |       /**
17576 |        * Path to the file with the private key in PEM format.
17577 |        */
17578 |       keyPath?: string;
17579 | 
17580 |       /**
17581 |        * Direct value of the private key in PEM format.
17582 |        */
17583 |       key?: Buffer;
17584 | 
17585 |       /**
17586 |        * Path to the PFX or PKCS12 encoded private key and certificate chain.
17587 |        */
17588 |       pfxPath?: string;
17589 | 
17590 |       /**
17591 |        * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
17592 |        */
17593 |       pfx?: Buffer;
17594 | 
17595 |       /**
17596 |        * Passphrase for the private key (PEM or PFX).
17597 |        */
17598 |       passphrase?: string;
17599 |     }>;
17600 | 
17601 |     /**
17602 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
17603 |      */
17604 |     extraHTTPHeaders?: { [key: string]: string; };
17605 | 
17606 |     /**
17607 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17608 |      * codes.
17609 |      */
17610 |     failOnStatusCode?: boolean;
17611 | 
17612 |     /**
17613 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
17614 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
17615 |      */
17616 |     httpCredentials?: {
17617 |       username: string;
17618 | 
17619 |       password: string;
17620 | 
17621 |       /**
17622 |        * Restrain sending http credentials on specific origin (scheme://host:port).
17623 |        */
17624 |       origin?: string;
17625 | 
17626 |       /**
17627 |        * This option only applies to the requests sent from corresponding
17628 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
17629 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
17630 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
17631 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
17632 |        */
17633 |       send?: "unauthorized"|"always";
17634 |     };
17635 | 
17636 |     /**
17637 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17638 |      */
17639 |     ignoreHTTPSErrors?: boolean;
17640 | 
17641 |     /**
17642 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17643 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects. This can be overwritten for each request
17644 |      * individually.
17645 |      */
17646 |     maxRedirects?: number;
17647 | 
17648 |     /**
17649 |      * Network proxy settings.
17650 |      */
17651 |     proxy?: {
17652 |       /**
17653 |        * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
17654 |        * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
17655 |        */
17656 |       server: string;
17657 | 
17658 |       /**
17659 |        * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
17660 |        */
17661 |       bypass?: string;
17662 | 
17663 |       /**
17664 |        * Optional username to use if HTTP proxy requires authentication.
17665 |        */
17666 |       username?: string;
17667 | 
17668 |       /**
17669 |        * Optional password to use if HTTP proxy requires authentication.
17670 |        */
17671 |       password?: string;
17672 |     };
17673 | 
17674 |     /**
17675 |      * Populates context with given storage state. This option can be used to initialize context with logged-in
17676 |      * information obtained via
17677 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)
17678 |      * or
17679 |      * [apiRequestContext.storageState([options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state).
17680 |      * Either a path to the file with saved storage, or the value returned by one of
17681 |      * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state)
17682 |      * or
17683 |      * [apiRequestContext.storageState([options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state)
17684 |      * methods.
17685 |      */
17686 |     storageState?: string|{
17687 |       cookies: Array<{
17688 |         name: string;
17689 | 
17690 |         value: string;
17691 | 
17692 |         domain: string;
17693 | 
17694 |         path: string;
17695 | 
17696 |         /**
17697 |          * Unix time in seconds.
17698 |          */
17699 |         expires: number;
17700 | 
17701 |         httpOnly: boolean;
17702 | 
17703 |         secure: boolean;
17704 | 
17705 |         sameSite: "Strict"|"Lax"|"None";
17706 |       }>;
17707 | 
17708 |       origins: Array<{
17709 |         origin: string;
17710 | 
17711 |         localStorage: Array<{
17712 |           name: string;
17713 | 
17714 |           value: string;
17715 |         }>;
17716 |       }>;
17717 |     };
17718 | 
17719 |     /**
17720 |      * Maximum time in milliseconds to wait for the response. Defaults to `30000` (30 seconds). Pass `0` to disable
17721 |      * timeout.
17722 |      */
17723 |     timeout?: number;
17724 | 
17725 |     /**
17726 |      * Specific user agent to use in this context.
17727 |      */
17728 |     userAgent?: string;
17729 |   }): Promise<APIRequestContext>;
17730 | }
17731 | 
17732 | /**
17733 |  * This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services,
17734 |  * prepare environment or the service to your e2e test.
17735 |  *
17736 |  * Each Playwright browser context has associated with it
17737 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which shares cookie storage
17738 |  * with the browser context and can be accessed via
17739 |  * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) or
17740 |  * [page.request](https://playwright.dev/docs/api/class-page#page-request). It is also possible to create a new
17741 |  * APIRequestContext instance manually by calling
17742 |  * [apiRequest.newContext([options])](https://playwright.dev/docs/api/class-apirequest#api-request-new-context).
17743 |  *
17744 |  * **Cookie management**
17745 |  *
17746 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) returned by
17747 |  * [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) and
17748 |  * [page.request](https://playwright.dev/docs/api/class-page#page-request) shares cookie storage with the
17749 |  * corresponding [BrowserContext](https://playwright.dev/docs/api/class-browsercontext). Each API request will have
17750 |  * `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie`
17751 |  * header it will automatically update [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) cookies
17752 |  * and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will
17753 |  * be logged in and vice versa.
17754 |  *
17755 |  * If you want API requests to not interfere with the browser cookies you should create a new
17756 |  * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) by calling
17757 |  * [apiRequest.newContext([options])](https://playwright.dev/docs/api/class-apirequest#api-request-new-context). Such
17758 |  * `APIRequestContext` object will have its own isolated cookie storage.
17759 |  */
17760 | export interface APIRequestContext {
17761 |   /**
17762 |    * Sends HTTP(S) [DELETE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request and returns its
17763 |    * response. The method will populate request cookies from the context and update context cookies from the response.
17764 |    * The method will automatically follow redirects.
17765 |    * @param url Target URL.
17766 |    * @param options
17767 |    */
17768 |   delete(url: string, options?: {
17769 |     /**
17770 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17771 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17772 |      * header will be set to `application/octet-stream` if not explicitly set.
17773 |      */
17774 |     data?: string|Buffer|Serializable;
17775 | 
17776 |     /**
17777 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17778 |      * codes.
17779 |      */
17780 |     failOnStatusCode?: boolean;
17781 | 
17782 |     /**
17783 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17784 |      * as this request body. If this parameter is specified `content-type` header will be set to
17785 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17786 |      */
17787 |     form?: { [key: string]: string|number|boolean; }|FormData;
17788 | 
17789 |     /**
17790 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17791 |      * it.
17792 |      */
17793 |     headers?: { [key: string]: string; };
17794 | 
17795 |     /**
17796 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17797 |      */
17798 |     ignoreHTTPSErrors?: boolean;
17799 | 
17800 |     /**
17801 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17802 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17803 |      */
17804 |     maxRedirects?: number;
17805 | 
17806 |     /**
17807 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
17808 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
17809 |      */
17810 |     maxRetries?: number;
17811 | 
17812 |     /**
17813 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
17814 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
17815 |      * explicitly provided. File values can be passed either as
17816 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
17817 |      * name, mime-type and its content.
17818 |      */
17819 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
17820 |       /**
17821 |        * File name
17822 |        */
17823 |       name: string;
17824 | 
17825 |       /**
17826 |        * File type
17827 |        */
17828 |       mimeType: string;
17829 | 
17830 |       /**
17831 |        * File content
17832 |        */
17833 |       buffer: Buffer;
17834 |     }; };
17835 | 
17836 |     /**
17837 |      * Query parameters to be sent with the URL.
17838 |      */
17839 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17840 | 
17841 |     /**
17842 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17843 |      */
17844 |     timeout?: number;
17845 |   }): Promise<APIResponse>;
17846 | 
17847 |   /**
17848 |    * All responses returned by
17849 |    * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
17850 |    * and similar methods are stored in the memory, so that you can later call
17851 |    * [apiResponse.body()](https://playwright.dev/docs/api/class-apiresponse#api-response-body).This method discards all
17852 |    * its resources, calling any method on disposed
17853 |    * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) will throw an exception.
17854 |    * @param options
17855 |    */
17856 |   dispose(options?: {
17857 |     /**
17858 |      * The reason to be reported to the operations interrupted by the context disposal.
17859 |      */
17860 |     reason?: string;
17861 |   }): Promise<void>;
17862 | 
17863 |   /**
17864 |    * Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and
17865 |    * update context cookies from the response. The method will automatically follow redirects.
17866 |    *
17867 |    * **Usage**
17868 |    *
17869 |    * JSON objects can be passed directly to the request:
17870 |    *
17871 |    * ```js
17872 |    * await request.fetch('https://example.com/api/createBook', {
17873 |    *   method: 'post',
17874 |    *   data: {
17875 |    *     title: 'Book Title',
17876 |    *     author: 'John Doe',
17877 |    *   }
17878 |    * });
17879 |    * ```
17880 |    *
17881 |    * The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
17882 |    * encoding, by specifiying the `multipart` parameter:
17883 |    *
17884 |    * ```js
17885 |    * const form = new FormData();
17886 |    * form.set('name', 'John');
17887 |    * form.append('name', 'Doe');
17888 |    * // Send two file fields with the same name.
17889 |    * form.append('file', new File(['console.log(2024);'], 'f1.js', { type: 'text/javascript' }));
17890 |    * form.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));
17891 |    * await request.fetch('https://example.com/api/uploadForm', {
17892 |    *   multipart: form
17893 |    * });
17894 |    * ```
17895 |    *
17896 |    * @param urlOrRequest Target URL or Request to get all parameters from.
17897 |    * @param options
17898 |    */
17899 |   fetch(urlOrRequest: string|Request, options?: {
17900 |     /**
17901 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
17902 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
17903 |      * header will be set to `application/octet-stream` if not explicitly set.
17904 |      */
17905 |     data?: string|Buffer|Serializable;
17906 | 
17907 |     /**
17908 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
17909 |      * codes.
17910 |      */
17911 |     failOnStatusCode?: boolean;
17912 | 
17913 |     /**
17914 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
17915 |      * as this request body. If this parameter is specified `content-type` header will be set to
17916 |      * `application/x-www-form-urlencoded` unless explicitly provided.
17917 |      */
17918 |     form?: { [key: string]: string|number|boolean; }|FormData;
17919 | 
17920 |     /**
17921 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
17922 |      * it.
17923 |      */
17924 |     headers?: { [key: string]: string; };
17925 | 
17926 |     /**
17927 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
17928 |      */
17929 |     ignoreHTTPSErrors?: boolean;
17930 | 
17931 |     /**
17932 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
17933 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
17934 |      */
17935 |     maxRedirects?: number;
17936 | 
17937 |     /**
17938 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
17939 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
17940 |      */
17941 |     maxRetries?: number;
17942 | 
17943 |     /**
17944 |      * If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or
17945 |      * [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)). If not specified, GET method is used.
17946 |      */
17947 |     method?: string;
17948 | 
17949 |     /**
17950 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
17951 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
17952 |      * explicitly provided. File values can be passed either as
17953 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
17954 |      * name, mime-type and its content.
17955 |      */
17956 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
17957 |       /**
17958 |        * File name
17959 |        */
17960 |       name: string;
17961 | 
17962 |       /**
17963 |        * File type
17964 |        */
17965 |       mimeType: string;
17966 | 
17967 |       /**
17968 |        * File content
17969 |        */
17970 |       buffer: Buffer;
17971 |     }; };
17972 | 
17973 |     /**
17974 |      * Query parameters to be sent with the URL.
17975 |      */
17976 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17977 | 
17978 |     /**
17979 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17980 |      */
17981 |     timeout?: number;
17982 |   }): Promise<APIResponse>;
17983 | 
17984 |   /**
17985 |    * Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request and returns its
17986 |    * response. The method will populate request cookies from the context and update context cookies from the response.
17987 |    * The method will automatically follow redirects.
17988 |    *
17989 |    * **Usage**
17990 |    *
17991 |    * Request parameters can be configured with `params` option, they will be serialized into the URL search parameters:
17992 |    *
17993 |    * ```js
17994 |    * // Passing params as object
17995 |    * await request.get('https://example.com/api/getText', {
17996 |    *   params: {
17997 |    *     'isbn': '1234',
17998 |    *     'page': 23,
17999 |    *   }
18000 |    * });
18001 |    *
18002 |    * // Passing params as URLSearchParams
18003 |    * const searchParams = new URLSearchParams();
18004 |    * searchParams.set('isbn', '1234');
18005 |    * searchParams.append('page', 23);
18006 |    * searchParams.append('page', 24);
18007 |    * await request.get('https://example.com/api/getText', { params: searchParams });
18008 |    *
18009 |    * // Passing params as string
18010 |    * const queryString = 'isbn=1234&page=23&page=24';
18011 |    * await request.get('https://example.com/api/getText', { params: queryString });
18012 |    * ```
18013 |    *
18014 |    * @param url Target URL.
18015 |    * @param options
18016 |    */
18017 |   get(url: string, options?: {
18018 |     /**
18019 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18020 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18021 |      * header will be set to `application/octet-stream` if not explicitly set.
18022 |      */
18023 |     data?: string|Buffer|Serializable;
18024 | 
18025 |     /**
18026 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18027 |      * codes.
18028 |      */
18029 |     failOnStatusCode?: boolean;
18030 | 
18031 |     /**
18032 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18033 |      * as this request body. If this parameter is specified `content-type` header will be set to
18034 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18035 |      */
18036 |     form?: { [key: string]: string|number|boolean; }|FormData;
18037 | 
18038 |     /**
18039 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18040 |      * it.
18041 |      */
18042 |     headers?: { [key: string]: string; };
18043 | 
18044 |     /**
18045 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18046 |      */
18047 |     ignoreHTTPSErrors?: boolean;
18048 | 
18049 |     /**
18050 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18051 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18052 |      */
18053 |     maxRedirects?: number;
18054 | 
18055 |     /**
18056 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18057 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18058 |      */
18059 |     maxRetries?: number;
18060 | 
18061 |     /**
18062 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18063 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18064 |      * explicitly provided. File values can be passed either as
18065 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18066 |      * name, mime-type and its content.
18067 |      */
18068 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18069 |       /**
18070 |        * File name
18071 |        */
18072 |       name: string;
18073 | 
18074 |       /**
18075 |        * File type
18076 |        */
18077 |       mimeType: string;
18078 | 
18079 |       /**
18080 |        * File content
18081 |        */
18082 |       buffer: Buffer;
18083 |     }; };
18084 | 
18085 |     /**
18086 |      * Query parameters to be sent with the URL.
18087 |      */
18088 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18089 | 
18090 |     /**
18091 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18092 |      */
18093 |     timeout?: number;
18094 |   }): Promise<APIResponse>;
18095 | 
18096 |   /**
18097 |    * Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) request and returns its
18098 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18099 |    * The method will automatically follow redirects.
18100 |    * @param url Target URL.
18101 |    * @param options
18102 |    */
18103 |   head(url: string, options?: {
18104 |     /**
18105 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18106 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18107 |      * header will be set to `application/octet-stream` if not explicitly set.
18108 |      */
18109 |     data?: string|Buffer|Serializable;
18110 | 
18111 |     /**
18112 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18113 |      * codes.
18114 |      */
18115 |     failOnStatusCode?: boolean;
18116 | 
18117 |     /**
18118 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18119 |      * as this request body. If this parameter is specified `content-type` header will be set to
18120 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18121 |      */
18122 |     form?: { [key: string]: string|number|boolean; }|FormData;
18123 | 
18124 |     /**
18125 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18126 |      * it.
18127 |      */
18128 |     headers?: { [key: string]: string; };
18129 | 
18130 |     /**
18131 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18132 |      */
18133 |     ignoreHTTPSErrors?: boolean;
18134 | 
18135 |     /**
18136 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18137 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18138 |      */
18139 |     maxRedirects?: number;
18140 | 
18141 |     /**
18142 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18143 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18144 |      */
18145 |     maxRetries?: number;
18146 | 
18147 |     /**
18148 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18149 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18150 |      * explicitly provided. File values can be passed either as
18151 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18152 |      * name, mime-type and its content.
18153 |      */
18154 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18155 |       /**
18156 |        * File name
18157 |        */
18158 |       name: string;
18159 | 
18160 |       /**
18161 |        * File type
18162 |        */
18163 |       mimeType: string;
18164 | 
18165 |       /**
18166 |        * File content
18167 |        */
18168 |       buffer: Buffer;
18169 |     }; };
18170 | 
18171 |     /**
18172 |      * Query parameters to be sent with the URL.
18173 |      */
18174 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18175 | 
18176 |     /**
18177 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18178 |      */
18179 |     timeout?: number;
18180 |   }): Promise<APIResponse>;
18181 | 
18182 |   /**
18183 |    * Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) request and returns its
18184 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18185 |    * The method will automatically follow redirects.
18186 |    * @param url Target URL.
18187 |    * @param options
18188 |    */
18189 |   patch(url: string, options?: {
18190 |     /**
18191 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18192 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18193 |      * header will be set to `application/octet-stream` if not explicitly set.
18194 |      */
18195 |     data?: string|Buffer|Serializable;
18196 | 
18197 |     /**
18198 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18199 |      * codes.
18200 |      */
18201 |     failOnStatusCode?: boolean;
18202 | 
18203 |     /**
18204 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18205 |      * as this request body. If this parameter is specified `content-type` header will be set to
18206 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18207 |      */
18208 |     form?: { [key: string]: string|number|boolean; }|FormData;
18209 | 
18210 |     /**
18211 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18212 |      * it.
18213 |      */
18214 |     headers?: { [key: string]: string; };
18215 | 
18216 |     /**
18217 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18218 |      */
18219 |     ignoreHTTPSErrors?: boolean;
18220 | 
18221 |     /**
18222 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18223 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18224 |      */
18225 |     maxRedirects?: number;
18226 | 
18227 |     /**
18228 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18229 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18230 |      */
18231 |     maxRetries?: number;
18232 | 
18233 |     /**
18234 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18235 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18236 |      * explicitly provided. File values can be passed either as
18237 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18238 |      * name, mime-type and its content.
18239 |      */
18240 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18241 |       /**
18242 |        * File name
18243 |        */
18244 |       name: string;
18245 | 
18246 |       /**
18247 |        * File type
18248 |        */
18249 |       mimeType: string;
18250 | 
18251 |       /**
18252 |        * File content
18253 |        */
18254 |       buffer: Buffer;
18255 |     }; };
18256 | 
18257 |     /**
18258 |      * Query parameters to be sent with the URL.
18259 |      */
18260 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18261 | 
18262 |     /**
18263 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18264 |      */
18265 |     timeout?: number;
18266 |   }): Promise<APIResponse>;
18267 | 
18268 |   /**
18269 |    * Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request and returns its
18270 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18271 |    * The method will automatically follow redirects.
18272 |    *
18273 |    * **Usage**
18274 |    *
18275 |    * JSON objects can be passed directly to the request:
18276 |    *
18277 |    * ```js
18278 |    * await request.post('https://example.com/api/createBook', {
18279 |    *   data: {
18280 |    *     title: 'Book Title',
18281 |    *     author: 'John Doe',
18282 |    *   }
18283 |    * });
18284 |    * ```
18285 |    *
18286 |    * To send form data to the server use `form` option. Its value will be encoded into the request body with
18287 |    * `application/x-www-form-urlencoded` encoding (see below how to use `multipart/form-data` form encoding to send
18288 |    * files):
18289 |    *
18290 |    * ```js
18291 |    * await request.post('https://example.com/api/findBook', {
18292 |    *   form: {
18293 |    *     title: 'Book Title',
18294 |    *     author: 'John Doe',
18295 |    *   }
18296 |    * });
18297 |    * ```
18298 |    *
18299 |    * The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data`
18300 |    * encoding. Use [FormData] to construct request body and pass it to the request as `multipart` parameter:
18301 |    *
18302 |    * ```js
18303 |    * const form = new FormData();
18304 |    * form.set('name', 'John');
18305 |    * form.append('name', 'Doe');
18306 |    * // Send two file fields with the same name.
18307 |    * form.append('file', new File(['console.log(2024);'], 'f1.js', { type: 'text/javascript' }));
18308 |    * form.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));
18309 |    * await request.post('https://example.com/api/uploadForm', {
18310 |    *   multipart: form
18311 |    * });
18312 |    * ```
18313 |    *
18314 |    * @param url Target URL.
18315 |    * @param options
18316 |    */
18317 |   post(url: string, options?: {
18318 |     /**
18319 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18320 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18321 |      * header will be set to `application/octet-stream` if not explicitly set.
18322 |      */
18323 |     data?: string|Buffer|Serializable;
18324 | 
18325 |     /**
18326 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18327 |      * codes.
18328 |      */
18329 |     failOnStatusCode?: boolean;
18330 | 
18331 |     /**
18332 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18333 |      * as this request body. If this parameter is specified `content-type` header will be set to
18334 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18335 |      */
18336 |     form?: { [key: string]: string|number|boolean; }|FormData;
18337 | 
18338 |     /**
18339 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18340 |      * it.
18341 |      */
18342 |     headers?: { [key: string]: string; };
18343 | 
18344 |     /**
18345 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18346 |      */
18347 |     ignoreHTTPSErrors?: boolean;
18348 | 
18349 |     /**
18350 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18351 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18352 |      */
18353 |     maxRedirects?: number;
18354 | 
18355 |     /**
18356 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18357 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18358 |      */
18359 |     maxRetries?: number;
18360 | 
18361 |     /**
18362 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18363 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18364 |      * explicitly provided. File values can be passed either as
18365 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18366 |      * name, mime-type and its content.
18367 |      */
18368 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18369 |       /**
18370 |        * File name
18371 |        */
18372 |       name: string;
18373 | 
18374 |       /**
18375 |        * File type
18376 |        */
18377 |       mimeType: string;
18378 | 
18379 |       /**
18380 |        * File content
18381 |        */
18382 |       buffer: Buffer;
18383 |     }; };
18384 | 
18385 |     /**
18386 |      * Query parameters to be sent with the URL.
18387 |      */
18388 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18389 | 
18390 |     /**
18391 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18392 |      */
18393 |     timeout?: number;
18394 |   }): Promise<APIResponse>;
18395 | 
18396 |   /**
18397 |    * Sends HTTP(S) [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) request and returns its
18398 |    * response. The method will populate request cookies from the context and update context cookies from the response.
18399 |    * The method will automatically follow redirects.
18400 |    * @param url Target URL.
18401 |    * @param options
18402 |    */
18403 |   put(url: string, options?: {
18404 |     /**
18405 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
18406 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
18407 |      * header will be set to `application/octet-stream` if not explicitly set.
18408 |      */
18409 |     data?: string|Buffer|Serializable;
18410 | 
18411 |     /**
18412 |      * Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
18413 |      * codes.
18414 |      */
18415 |     failOnStatusCode?: boolean;
18416 | 
18417 |     /**
18418 |      * Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent
18419 |      * as this request body. If this parameter is specified `content-type` header will be set to
18420 |      * `application/x-www-form-urlencoded` unless explicitly provided.
18421 |      */
18422 |     form?: { [key: string]: string|number|boolean; }|FormData;
18423 | 
18424 |     /**
18425 |      * Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by
18426 |      * it.
18427 |      */
18428 |     headers?: { [key: string]: string; };
18429 | 
18430 |     /**
18431 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
18432 |      */
18433 |     ignoreHTTPSErrors?: boolean;
18434 | 
18435 |     /**
18436 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
18437 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
18438 |      */
18439 |     maxRedirects?: number;
18440 | 
18441 |     /**
18442 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
18443 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
18444 |      */
18445 |     maxRetries?: number;
18446 | 
18447 |     /**
18448 |      * Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
18449 |      * request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
18450 |      * explicitly provided. File values can be passed either as
18451 |      * [`fs.ReadStream`](https://nodejs.org/api/fs.html#fs_class_fs_readstream) or as file-like object containing file
18452 |      * name, mime-type and its content.
18453 |      */
18454 |     multipart?: FormData|{ [key: string]: string|number|boolean|ReadStream|{
18455 |       /**
18456 |        * File name
18457 |        */
18458 |       name: string;
18459 | 
18460 |       /**
18461 |        * File type
18462 |        */
18463 |       mimeType: string;
18464 | 
18465 |       /**
18466 |        * File content
18467 |        */
18468 |       buffer: Buffer;
18469 |     }; };
18470 | 
18471 |     /**
18472 |      * Query parameters to be sent with the URL.
18473 |      */
18474 |     params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18475 | 
18476 |     /**
18477 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18478 |      */
18479 |     timeout?: number;
18480 |   }): Promise<APIResponse>;
18481 | 
18482 |   /**
18483 |    * Returns storage state for this request context, contains current cookies and local storage snapshot if it was
18484 |    * passed to the constructor.
18485 |    * @param options
18486 |    */
18487 |   storageState(options?: {
18488 |     /**
18489 |      * Set to `true` to include IndexedDB in the storage state snapshot.
18490 |      */
18491 |     indexedDB?: boolean;
18492 | 
18493 |     /**
18494 |      * The file path to save the storage state to. If
18495 |      * [`path`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state-option-path) is
18496 |      * a relative path, then it is resolved relative to current working directory. If no path is provided, storage state
18497 |      * is still returned, but won't be saved to the disk.
18498 |      */
18499 |     path?: string;
18500 |   }): Promise<{
18501 |     cookies: Array<{
18502 |       name: string;
18503 | 
18504 |       value: string;
18505 | 
18506 |       domain: string;
18507 | 
18508 |       path: string;
18509 | 
18510 |       /**
18511 |        * Unix time in seconds.
18512 |        */
18513 |       expires: number;
18514 | 
18515 |       httpOnly: boolean;
18516 | 
18517 |       secure: boolean;
18518 | 
18519 |       sameSite: "Strict"|"Lax"|"None";
18520 |     }>;
18521 | 
18522 |     origins: Array<{
18523 |       origin: string;
18524 | 
18525 |       localStorage: Array<{
18526 |         name: string;
18527 | 
18528 |         value: string;
18529 |       }>;
18530 |     }>;
18531 |   }>;
18532 | 
18533 |   [Symbol.asyncDispose](): Promise<void>;
18534 | }
18535 | 
18536 | /**
18537 |  * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) class represents responses returned by
18538 |  * [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
18539 |  * and similar methods.
18540 |  */
18541 | export interface APIResponse {
18542 |   /**
18543 |    * Returns the buffer with response body.
18544 |    */
18545 |   body(): Promise<Buffer>;
18546 | 
18547 |   /**
18548 |    * Disposes the body of this response. If not called then the body will stay in memory until the context closes.
18549 |    */
18550 |   dispose(): Promise<void>;
18551 | 
18552 |   /**
18553 |    * An object with all the response HTTP headers associated with this response.
18554 |    */
18555 |   headers(): { [key: string]: string; };
18556 | 
18557 |   /**
18558 |    * An array with all the response HTTP headers associated with this response. Header names are not lower-cased.
18559 |    * Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
18560 |    */
18561 |   headersArray(): Array<{
18562 |     /**
18563 |      * Name of the header.
18564 |      */
18565 |     name: string;
18566 | 
18567 |     /**
18568 |      * Value of the header.
18569 |      */
18570 |     value: string;
18571 |   }>;
18572 | 
18573 |   /**
18574 |    * Returns the JSON representation of response body.
18575 |    *
18576 |    * This method will throw if the response body is not parsable via `JSON.parse`.
18577 |    */
18578 |   json(): Promise<Serializable>;
18579 | 
18580 |   /**
18581 |    * Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
18582 |    */
18583 |   ok(): boolean;
18584 | 
18585 |   /**
18586 |    * Contains the status code of the response (e.g., 200 for a success).
18587 |    */
18588 |   status(): number;
18589 | 
18590 |   /**
18591 |    * Contains the status text of the response (e.g. usually an "OK" for a success).
18592 |    */
18593 |   statusText(): string;
18594 | 
18595 |   /**
18596 |    * Returns the text representation of response body.
18597 |    */
18598 |   text(): Promise<string>;
18599 | 
18600 |   /**
18601 |    * Contains the URL of the response.
18602 |    */
18603 |   url(): string;
18604 | 
18605 |   [Symbol.asyncDispose](): Promise<void>;
18606 | }
18607 | 
18608 | export interface BrowserServer {
18609 |   /**
18610 |    * Emitted when the browser server closes.
18611 |    */
18612 |   on(event: 'close', listener: () => any): this;
18613 | 
18614 |   /**
18615 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
18616 |    */
18617 |   once(event: 'close', listener: () => any): this;
18618 | 
18619 |   /**
18620 |    * Emitted when the browser server closes.
18621 |    */
18622 |   addListener(event: 'close', listener: () => any): this;
18623 | 
18624 |   /**
18625 |    * Removes an event listener added by `on` or `addListener`.
18626 |    */
18627 |   removeListener(event: 'close', listener: () => any): this;
18628 | 
18629 |   /**
18630 |    * Removes an event listener added by `on` or `addListener`.
18631 |    */
18632 |   off(event: 'close', listener: () => any): this;
18633 | 
18634 |   /**
18635 |    * Emitted when the browser server closes.
18636 |    */
18637 |   prependListener(event: 'close', listener: () => any): this;
18638 | 
18639 |   /**
18640 |    * Closes the browser gracefully and makes sure the process is terminated.
18641 |    */
18642 |   close(): Promise<void>;
18643 | 
18644 |   /**
18645 |    * Kills the browser process and waits for the process to exit.
18646 |    */
18647 |   kill(): Promise<void>;
18648 | 
18649 |   /**
18650 |    * Spawned browser application process.
18651 |    */
18652 |   process(): ChildProcess;
18653 | 
18654 |   /**
18655 |    * Browser websocket url.
18656 |    *
18657 |    * Browser websocket endpoint which can be used as an argument to
18658 |    * [browserType.connect(wsEndpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect)
18659 |    * to establish connection to the browser.
18660 |    *
18661 |    * Note that if the listen `host` option in `launchServer` options is not specified, localhost will be output anyway,
18662 |    * even if the actual listening address is an unspecified address.
18663 |    */
18664 |   wsEndpoint(): string;
18665 | 
18666 |   [Symbol.asyncDispose](): Promise<void>;
18667 | }
18668 | 
18669 | /**
18670 |  * Accurately simulating time-dependent behavior is essential for verifying the correctness of applications. Learn
18671 |  * more about [clock emulation](https://playwright.dev/docs/clock).
18672 |  *
18673 |  * Note that clock is installed for the entire [BrowserContext](https://playwright.dev/docs/api/class-browsercontext),
18674 |  * so the time in all the pages and iframes is controlled by the same clock.
18675 |  */
18676 | export interface Clock {
18677 |   /**
18678 |    * Advance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user
18679 |    * closing the laptop lid for a while and reopening it later, after given time.
18680 |    *
18681 |    * **Usage**
18682 |    *
18683 |    * ```js
18684 |    * await page.clock.fastForward(1000);
18685 |    * await page.clock.fastForward('30:00');
18686 |    * ```
18687 |    *
18688 |    * @param ticks Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
18689 |    * "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
18690 |    */
18691 |   fastForward(ticks: number|string): Promise<void>;
18692 | 
18693 |   /**
18694 |    * Install fake implementations for the following time-related functions:
18695 |    * - `Date`
18696 |    * - `setTimeout`
18697 |    * - `clearTimeout`
18698 |    * - `setInterval`
18699 |    * - `clearInterval`
18700 |    * - `requestAnimationFrame`
18701 |    * - `cancelAnimationFrame`
18702 |    * - `requestIdleCallback`
18703 |    * - `cancelIdleCallback`
18704 |    * - `performance`
18705 |    *
18706 |    * Fake timers are used to manually control the flow of time in tests. They allow you to advance time, fire timers,
18707 |    * and control the behavior of time-dependent functions. See
18708 |    * [clock.runFor(ticks)](https://playwright.dev/docs/api/class-clock#clock-run-for) and
18709 |    * [clock.fastForward(ticks)](https://playwright.dev/docs/api/class-clock#clock-fast-forward) for more information.
18710 |    * @param options
18711 |    */
18712 |   install(options?: {
18713 |     /**
18714 |      * Time to initialize with, current system time by default.
18715 |      */
18716 |     time?: number|string|Date;
18717 |   }): Promise<void>;
18718 | 
18719 |   /**
18720 |    * Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired
18721 |    * unless [clock.runFor(ticks)](https://playwright.dev/docs/api/class-clock#clock-run-for),
18722 |    * [clock.fastForward(ticks)](https://playwright.dev/docs/api/class-clock#clock-fast-forward),
18723 |    * [clock.pauseAt(time)](https://playwright.dev/docs/api/class-clock#clock-pause-at) or
18724 |    * [clock.resume()](https://playwright.dev/docs/api/class-clock#clock-resume) is called.
18725 |    *
18726 |    * Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it
18727 |    * at the specified time and pausing.
18728 |    *
18729 |    * **Usage**
18730 |    *
18731 |    * ```js
18732 |    * await page.clock.pauseAt(new Date('2020-02-02'));
18733 |    * await page.clock.pauseAt('2020-02-02');
18734 |    * ```
18735 |    *
18736 |    * For best results, install the clock before navigating the page and set it to a time slightly before the intended
18737 |    * test time. This ensures that all timers run normally during page loading, preventing the page from getting stuck.
18738 |    * Once the page has fully loaded, you can safely use
18739 |    * [clock.pauseAt(time)](https://playwright.dev/docs/api/class-clock#clock-pause-at) to pause the clock.
18740 |    *
18741 |    * ```js
18742 |    * // Initialize clock with some time before the test time and let the page load
18743 |    * // naturally. `Date.now` will progress as the timers fire.
18744 |    * await page.clock.install({ time: new Date('2024-12-10T08:00:00') });
18745 |    * await page.goto('http://localhost:3333');
18746 |    * await page.clock.pauseAt(new Date('2024-12-10T10:00:00'));
18747 |    * ```
18748 |    *
18749 |    * @param time Time to pause at.
18750 |    */
18751 |   pauseAt(time: number|string|Date): Promise<void>;
18752 | 
18753 |   /**
18754 |    * Resumes timers. Once this method is called, time resumes flowing, timers are fired as usual.
18755 |    */
18756 |   resume(): Promise<void>;
18757 | 
18758 |   /**
18759 |    * Advance the clock, firing all the time-related callbacks.
18760 |    *
18761 |    * **Usage**
18762 |    *
18763 |    * ```js
18764 |    * await page.clock.runFor(1000);
18765 |    * await page.clock.runFor('30:00');
18766 |    * ```
18767 |    *
18768 |    * @param ticks Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are
18769 |    * "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds.
18770 |    */
18771 |   runFor(ticks: number|string): Promise<void>;
18772 | 
18773 |   /**
18774 |    * Makes `Date.now` and `new Date()` return fixed fake time at all times, keeps all the timers running.
18775 |    *
18776 |    * Use this method for simple scenarios where you only need to test with a predefined time. For more advanced
18777 |    * scenarios, use [clock.install([options])](https://playwright.dev/docs/api/class-clock#clock-install) instead. Read
18778 |    * docs on [clock emulation](https://playwright.dev/docs/clock) to learn more.
18779 |    *
18780 |    * **Usage**
18781 |    *
18782 |    * ```js
18783 |    * await page.clock.setFixedTime(Date.now());
18784 |    * await page.clock.setFixedTime(new Date('2020-02-02'));
18785 |    * await page.clock.setFixedTime('2020-02-02');
18786 |    * ```
18787 |    *
18788 |    * @param time Time to be set in milliseconds.
18789 |    */
18790 |   setFixedTime(time: number|string|Date): Promise<void>;
18791 | 
18792 |   /**
18793 |    * Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for
18794 |    * example switching from summer to winter time, or changing time zones.
18795 |    *
18796 |    * **Usage**
18797 |    *
18798 |    * ```js
18799 |    * await page.clock.setSystemTime(Date.now());
18800 |    * await page.clock.setSystemTime(new Date('2020-02-02'));
18801 |    * await page.clock.setSystemTime('2020-02-02');
18802 |    * ```
18803 |    *
18804 |    * @param time Time to be set in milliseconds.
18805 |    */
18806 |   setSystemTime(time: number|string|Date): Promise<void>;
18807 | }
18808 | 
18809 | /**
18810 |  * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) objects are dispatched by page via the
18811 |  * [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console) event. For each console message
18812 |  * logged in the page there will be corresponding event in the Playwright context.
18813 |  *
18814 |  * ```js
18815 |  * // Listen for all console logs
18816 |  * page.on('console', msg => console.log(msg.text()));
18817 |  *
18818 |  * // Listen for all console events and handle errors
18819 |  * page.on('console', msg => {
18820 |  *   if (msg.type() === 'error')
18821 |  *     console.log(`Error text: "${msg.text()}"`);
18822 |  * });
18823 |  *
18824 |  * // Get the next console log
18825 |  * const msgPromise = page.waitForEvent('console');
18826 |  * await page.evaluate(() => {
18827 |  *   console.log('hello', 42, { foo: 'bar' });  // Issue console.log inside the page
18828 |  * });
18829 |  * const msg = await msgPromise;
18830 |  *
18831 |  * // Deconstruct console log arguments
18832 |  * await msg.args()[0].jsonValue(); // hello
18833 |  * await msg.args()[1].jsonValue(); // 42
18834 |  * ```
18835 |  *
18836 |  */
18837 | export interface ConsoleMessage {
18838 |   /**
18839 |    * List of arguments passed to a `console` function call. See also
18840 |    * [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console).
18841 |    */
18842 |   args(): Array<JSHandle>;
18843 | 
18844 |   location(): {
18845 |     /**
18846 |      * URL of the resource.
18847 |      */
18848 |     url: string;
18849 | 
18850 |     /**
18851 |      * 0-based line number in the resource.
18852 |      */
18853 |     lineNumber: number;
18854 | 
18855 |     /**
18856 |      * 0-based column number in the resource.
18857 |      */
18858 |     columnNumber: number;
18859 |   };
18860 | 
18861 |   /**
18862 |    * The page that produced this console message, if any.
18863 |    */
18864 |   page(): null|Page;
18865 | 
18866 |   /**
18867 |    * The text of the console message.
18868 |    */
18869 |   text(): string;
18870 | 
18871 |   type(): "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"time"|"timeEnd";
18872 | 
18873 |   /**
18874 |    * The web worker or service worker that produced this console message, if any. Note that console messages from web
18875 |    * workers also have non-null
18876 |    * [consoleMessage.page()](https://playwright.dev/docs/api/class-consolemessage#console-message-page).
18877 |    */
18878 |   worker(): null|Worker;
18879 | }
18880 | 
18881 | /**
18882 |  * Coverage gathers information about parts of JavaScript and CSS that were used by the page.
18883 |  *
18884 |  * An example of using JavaScript coverage to produce Istanbul report for page load:
18885 |  *
18886 |  * **NOTE** Coverage APIs are only supported on Chromium-based browsers.
18887 |  *
18888 |  * ```js
18889 |  * const { chromium } = require('playwright');
18890 |  * const v8toIstanbul = require('v8-to-istanbul');
18891 |  *
18892 |  * (async () => {
18893 |  *   const browser = await chromium.launch();
18894 |  *   const page = await browser.newPage();
18895 |  *   await page.coverage.startJSCoverage();
18896 |  *   await page.goto('https://chromium.org');
18897 |  *   const coverage = await page.coverage.stopJSCoverage();
18898 |  *   for (const entry of coverage) {
18899 |  *     const converter = v8toIstanbul('', 0, { source: entry.source });
18900 |  *     await converter.load();
18901 |  *     converter.applyCoverage(entry.functions);
18902 |  *     console.log(JSON.stringify(converter.toIstanbul()));
18903 |  *   }
18904 |  *   await browser.close();
18905 |  * })();
18906 |  * ```
18907 |  *
18908 |  */
18909 | export interface Coverage {
18910 |   /**
18911 |    * Returns coverage is started
18912 |    * @param options
18913 |    */
18914 |   startCSSCoverage(options?: {
18915 |     /**
18916 |      * Whether to reset coverage on every navigation. Defaults to `true`.
18917 |      */
18918 |     resetOnNavigation?: boolean;
18919 |   }): Promise<void>;
18920 | 
18921 |   /**
18922 |    * Returns coverage is started
18923 |    *
18924 |    * **NOTE** Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically
18925 |    * created on the page using `eval` or `new Function`. If
18926 |    * [`reportAnonymousScripts`](https://playwright.dev/docs/api/class-coverage#coverage-start-js-coverage-option-report-anonymous-scripts)
18927 |    * is set to `true`, anonymous scripts will have `__playwright_evaluation_script__` as their URL.
18928 |    *
18929 |    * @param options
18930 |    */
18931 |   startJSCoverage(options?: {
18932 |     /**
18933 |      * Whether anonymous scripts generated by the page should be reported. Defaults to `false`.
18934 |      */
18935 |     reportAnonymousScripts?: boolean;
18936 | 
18937 |     /**
18938 |      * Whether to reset coverage on every navigation. Defaults to `true`.
18939 |      */
18940 |     resetOnNavigation?: boolean;
18941 |   }): Promise<void>;
18942 | 
18943 |   /**
18944 |    * Returns the array of coverage reports for all stylesheets
18945 |    *
18946 |    * **NOTE** CSS Coverage doesn't include dynamically injected style tags without sourceURLs.
18947 |    *
18948 |    */
18949 |   stopCSSCoverage(): Promise<Array<{
18950 |     /**
18951 |      * StyleSheet URL
18952 |      */
18953 |     url: string;
18954 | 
18955 |     /**
18956 |      * StyleSheet content, if available.
18957 |      */
18958 |     text?: string;
18959 | 
18960 |     /**
18961 |      * StyleSheet ranges that were used. Ranges are sorted and non-overlapping.
18962 |      */
18963 |     ranges: Array<{
18964 |       /**
18965 |        * A start offset in text, inclusive
18966 |        */
18967 |       start: number;
18968 | 
18969 |       /**
18970 |        * An end offset in text, exclusive
18971 |        */
18972 |       end: number;
18973 |     }>;
18974 |   }>>;
18975 | 
18976 |   /**
18977 |    * Returns the array of coverage reports for all scripts
18978 |    *
18979 |    * **NOTE** JavaScript Coverage doesn't include anonymous scripts by default. However, scripts with sourceURLs are
18980 |    * reported.
18981 |    *
18982 |    */
18983 |   stopJSCoverage(): Promise<Array<{
18984 |     /**
18985 |      * Script URL
18986 |      */
18987 |     url: string;
18988 | 
18989 |     /**
18990 |      * Script ID
18991 |      */
18992 |     scriptId: string;
18993 | 
18994 |     /**
18995 |      * Script content, if applicable.
18996 |      */
18997 |     source?: string;
18998 | 
18999 |     /**
19000 |      * V8-specific coverage format.
19001 |      */
19002 |     functions: Array<{
19003 |       functionName: string;
19004 | 
19005 |       isBlockCoverage: boolean;
19006 | 
19007 |       ranges: Array<{
19008 |         count: number;
19009 | 
19010 |         startOffset: number;
19011 | 
19012 |         endOffset: number;
19013 |       }>;
19014 |     }>;
19015 |   }>>;
19016 | }
19017 | 
19018 | /**
19019 |  * [Dialog](https://playwright.dev/docs/api/class-dialog) objects are dispatched by page via the
19020 |  * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
19021 |  *
19022 |  * An example of using `Dialog` class:
19023 |  *
19024 |  * ```js
19025 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
19026 |  *
19027 |  * (async () => {
19028 |  *   const browser = await chromium.launch();
19029 |  *   const page = await browser.newPage();
19030 |  *   page.on('dialog', async dialog => {
19031 |  *     console.log(dialog.message());
19032 |  *     await dialog.dismiss();
19033 |  *   });
19034 |  *   await page.evaluate(() => alert('1'));
19035 |  *   await browser.close();
19036 |  * })();
19037 |  * ```
19038 |  *
19039 |  * **NOTE** Dialogs are dismissed automatically, unless there is a
19040 |  * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) listener. When listener is
19041 |  * present, it **must** either
19042 |  * [dialog.accept([promptText])](https://playwright.dev/docs/api/class-dialog#dialog-accept) or
19043 |  * [dialog.dismiss()](https://playwright.dev/docs/api/class-dialog#dialog-dismiss) the dialog - otherwise the page
19044 |  * will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the
19045 |  * dialog, and actions like click will never finish.
19046 |  *
19047 |  */
19048 | export interface Dialog {
19049 |   /**
19050 |    * Returns when the dialog has been accepted.
19051 |    * @param promptText A text to enter in prompt. Does not cause any effects if the dialog's `type` is not prompt. Optional.
19052 |    */
19053 |   accept(promptText?: string): Promise<void>;
19054 | 
19055 |   /**
19056 |    * If dialog is prompt, returns default prompt value. Otherwise, returns empty string.
19057 |    */
19058 |   defaultValue(): string;
19059 | 
19060 |   /**
19061 |    * Returns when the dialog has been dismissed.
19062 |    */
19063 |   dismiss(): Promise<void>;
19064 | 
19065 |   /**
19066 |    * A message displayed in the dialog.
19067 |    */
19068 |   message(): string;
19069 | 
19070 |   /**
19071 |    * The page that initiated this dialog, if available.
19072 |    */
19073 |   page(): null|Page;
19074 | 
19075 |   /**
19076 |    * Returns dialog's type, can be one of `alert`, `beforeunload`, `confirm` or `prompt`.
19077 |    */
19078 |   type(): string;
19079 | }
19080 | 
19081 | /**
19082 |  * [Download](https://playwright.dev/docs/api/class-download) objects are dispatched by page via the
19083 |  * [page.on('download')](https://playwright.dev/docs/api/class-page#page-event-download) event.
19084 |  *
19085 |  * All the downloaded files belonging to the browser context are deleted when the browser context is closed.
19086 |  *
19087 |  * Download event is emitted once the download starts. Download path becomes available once download completes.
19088 |  *
19089 |  * ```js
19090 |  * // Start waiting for download before clicking. Note no await.
19091 |  * const downloadPromise = page.waitForEvent('download');
19092 |  * await page.getByText('Download file').click();
19093 |  * const download = await downloadPromise;
19094 |  *
19095 |  * // Wait for the download process to complete and save the downloaded file somewhere.
19096 |  * await download.saveAs('/path/to/save/at/' + download.suggestedFilename());
19097 |  * ```
19098 |  *
19099 |  */
19100 | export interface Download {
19101 |   /**
19102 |    * Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
19103 |    * `download.failure()` would resolve to `'canceled'`.
19104 |    */
19105 |   cancel(): Promise<void>;
19106 | 
19107 |   /**
19108 |    * Returns a readable stream for a successful download, or throws for a failed/canceled download.
19109 |    *
19110 |    * **NOTE** If you don't need a readable stream, it's usually simpler to read the file from disk after the download
19111 |    * completed. See [download.path()](https://playwright.dev/docs/api/class-download#download-path).
19112 |    *
19113 |    */
19114 |   createReadStream(): Promise<Readable>;
19115 | 
19116 |   /**
19117 |    * Deletes the downloaded file. Will wait for the download to finish if necessary.
19118 |    */
19119 |   delete(): Promise<void>;
19120 | 
19121 |   /**
19122 |    * Returns download error if any. Will wait for the download to finish if necessary.
19123 |    */
19124 |   failure(): Promise<null|string>;
19125 | 
19126 |   /**
19127 |    * Get the page that the download belongs to.
19128 |    */
19129 |   page(): Page;
19130 | 
19131 |   /**
19132 |    * Returns path to the downloaded file for a successful download, or throws for a failed/canceled download. The method
19133 |    * will wait for the download to finish if necessary. The method throws when connected remotely.
19134 |    *
19135 |    * Note that the download's file name is a random GUID, use
19136 |    * [download.suggestedFilename()](https://playwright.dev/docs/api/class-download#download-suggested-filename) to get
19137 |    * suggested file name.
19138 |    */
19139 |   path(): Promise<string>;
19140 | 
19141 |   /**
19142 |    * Copy the download to a user-specified path. It is safe to call this method while the download is still in progress.
19143 |    * Will wait for the download to finish if necessary.
19144 |    *
19145 |    * **Usage**
19146 |    *
19147 |    * ```js
19148 |    * await download.saveAs('/path/to/save/at/' + download.suggestedFilename());
19149 |    * ```
19150 |    *
19151 |    * @param path Path where the download should be copied.
19152 |    */
19153 |   saveAs(path: string): Promise<void>;
19154 | 
19155 |   /**
19156 |    * Returns suggested filename for this download. It is typically computed by the browser from the
19157 |    * [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) response
19158 |    * header or the `download` attribute. See the spec on [whatwg](https://html.spec.whatwg.org/#downloading-resources).
19159 |    * Different browsers can use different logic for computing it.
19160 |    */
19161 |   suggestedFilename(): string;
19162 | 
19163 |   /**
19164 |    * Returns downloaded url.
19165 |    */
19166 |   url(): string;
19167 | }
19168 | 
19169 | /**
19170 |  * Playwright has **experimental** support for Electron automation. You can access electron namespace via:
19171 |  *
19172 |  * ```js
19173 |  * const { _electron } = require('playwright');
19174 |  * ```
19175 |  *
19176 |  * An example of the Electron automation script would be:
19177 |  *
19178 |  * ```js
19179 |  * const { _electron: electron } = require('playwright');
19180 |  *
19181 |  * (async () => {
19182 |  *   // Launch Electron app.
19183 |  *   const electronApp = await electron.launch({ args: ['main.js'] });
19184 |  *
19185 |  *   // Evaluation expression in the Electron context.
19186 |  *   const appPath = await electronApp.evaluate(async ({ app }) => {
19187 |  *     // This runs in the main Electron process, parameter here is always
19188 |  *     // the result of the require('electron') in the main app script.
19189 |  *     return app.getAppPath();
19190 |  *   });
19191 |  *   console.log(appPath);
19192 |  *
19193 |  *   // Get the first window that the app opens, wait if necessary.
19194 |  *   const window = await electronApp.firstWindow();
19195 |  *   // Print the title.
19196 |  *   console.log(await window.title());
19197 |  *   // Capture a screenshot.
19198 |  *   await window.screenshot({ path: 'intro.png' });
19199 |  *   // Direct Electron console to Node terminal.
19200 |  *   window.on('console', console.log);
19201 |  *   // Click button.
19202 |  *   await window.click('text=Click me');
19203 |  *   // Exit app.
19204 |  *   await electronApp.close();
19205 |  * })();
19206 |  * ```
19207 |  *
19208 |  * **Supported Electron versions are:**
19209 |  * - v12.2.0+
19210 |  * - v13.4.0+
19211 |  * - v14+
19212 |  *
19213 |  * **Known issues:**
19214 |  *
19215 |  * If you are not able to launch Electron and it will end up in timeouts during launch, try the following:
19216 |  * - Ensure that `nodeCliInspect`
19217 |  *   ([FuseV1Options.EnableNodeCliInspectArguments](https://www.electronjs.org/docs/latest/tutorial/fuses#nodecliinspect))
19218 |  *   fuse is **not** set to `false`.
19219 |  */
19220 | export interface Electron {
19221 |   /**
19222 |    * Launches electron application specified with the
19223 |    * [`executablePath`](https://playwright.dev/docs/api/class-electron#electron-launch-option-executable-path).
19224 |    * @param options
19225 |    */
19226 |   launch(options?: {
19227 |     /**
19228 |      * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
19229 |      */
19230 |     acceptDownloads?: boolean;
19231 | 
19232 |     /**
19233 |      * Additional arguments to pass to the application when launching. You typically pass the main script name here.
19234 |      */
19235 |     args?: Array<string>;
19236 | 
19237 |     /**
19238 |      * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
19239 |      */
19240 |     bypassCSP?: boolean;
19241 | 
19242 |     /**
19243 |      * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
19244 |      * media feature, supported values are `'light'` and `'dark'`. See
19245 |      * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
19246 |      * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
19247 |      */
19248 |     colorScheme?: null|"light"|"dark"|"no-preference";
19249 | 
19250 |     /**
19251 |      * Current working directory to launch application from.
19252 |      */
19253 |     cwd?: string;
19254 | 
19255 |     /**
19256 |      * Specifies environment variables that will be visible to Electron. Defaults to `process.env`.
19257 |      */
19258 |     env?: { [key: string]: string; };
19259 | 
19260 |     /**
19261 |      * Launches given Electron application. If not specified, launches the default Electron executable installed in this
19262 |      * package, located at `node_modules/.bin/electron`.
19263 |      */
19264 |     executablePath?: string;
19265 | 
19266 |     /**
19267 |      * An object containing additional HTTP headers to be sent with every request. Defaults to none.
19268 |      */
19269 |     extraHTTPHeaders?: { [key: string]: string; };
19270 | 
19271 |     geolocation?: {
19272 |       /**
19273 |        * Latitude between -90 and 90.
19274 |        */
19275 |       latitude: number;
19276 | 
19277 |       /**
19278 |        * Longitude between -180 and 180.
19279 |        */
19280 |       longitude: number;
19281 | 
19282 |       /**
19283 |        * Non-negative accuracy value. Defaults to `0`.
19284 |        */
19285 |       accuracy?: number;
19286 |     };
19287 | 
19288 |     /**
19289 |      * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
19290 |      * origin is specified, the username and password are sent to any servers upon unauthorized responses.
19291 |      */
19292 |     httpCredentials?: {
19293 |       username: string;
19294 | 
19295 |       password: string;
19296 | 
19297 |       /**
19298 |        * Restrain sending http credentials on specific origin (scheme://host:port).
19299 |        */
19300 |       origin?: string;
19301 | 
19302 |       /**
19303 |        * This option only applies to the requests sent from corresponding
19304 |        * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
19305 |        * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
19306 |        * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
19307 |        * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
19308 |        */
19309 |       send?: "unauthorized"|"always";
19310 |     };
19311 | 
19312 |     /**
19313 |      * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
19314 |      */
19315 |     ignoreHTTPSErrors?: boolean;
19316 | 
19317 |     /**
19318 |      * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
19319 |      * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
19320 |      * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
19321 |      */
19322 |     locale?: string;
19323 | 
19324 |     /**
19325 |      * Whether to emulate network being offline. Defaults to `false`. Learn more about
19326 |      * [network emulation](https://playwright.dev/docs/emulation#offline).
19327 |      */
19328 |     offline?: boolean;
19329 | 
19330 |     /**
19331 |      * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
19332 |      * If not specified, the HAR is not recorded. Make sure to await
19333 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
19334 |      * the HAR to be saved.
19335 |      */
19336 |     recordHar?: {
19337 |       /**
19338 |        * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
19339 |        * `content` policy instead.
19340 |        */
19341 |       omitContent?: boolean;
19342 | 
19343 |       /**
19344 |        * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
19345 |        * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
19346 |        * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
19347 |        * files and to `embed` for all other file extensions.
19348 |        */
19349 |       content?: "omit"|"embed"|"attach";
19350 | 
19351 |       /**
19352 |        * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
19353 |        * default.
19354 |        */
19355 |       path: string;
19356 | 
19357 |       /**
19358 |        * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
19359 |        * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
19360 |        */
19361 |       mode?: "full"|"minimal";
19362 | 
19363 |       /**
19364 |        * A glob or regex pattern to filter requests that are stored in the HAR. When a
19365 |        * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
19366 |        * options was provided and the passed URL is a path, it gets merged via the
19367 |        * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
19368 |        */
19369 |       urlFilter?: string|RegExp;
19370 |     };
19371 | 
19372 |     /**
19373 |      * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
19374 |      * Make sure to await
19375 |      * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
19376 |      * videos to be saved.
19377 |      */
19378 |     recordVideo?: {
19379 |       /**
19380 |        * Path to the directory to put videos into.
19381 |        */
19382 |       dir: string;
19383 | 
19384 |       /**
19385 |        * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
19386 |        * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
19387 |        * each page will be scaled down if necessary to fit the specified size.
19388 |        */
19389 |       size?: {
19390 |         /**
19391 |          * Video frame width.
19392 |          */
19393 |         width: number;
19394 | 
19395 |         /**
19396 |          * Video frame height.
19397 |          */
19398 |         height: number;
19399 |       };
19400 |     };
19401 | 
19402 |     /**
19403 |      * Maximum time in milliseconds to wait for the application to start. Defaults to `30000` (30 seconds). Pass `0` to
19404 |      * disable timeout.
19405 |      */
19406 |     timeout?: number;
19407 | 
19408 |     /**
19409 |      * Changes the timezone of the context. See
19410 |      * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
19411 |      * for a list of supported timezone IDs. Defaults to the system timezone.
19412 |      */
19413 |     timezoneId?: string;
19414 | 
19415 |     /**
19416 |      * If specified, traces are saved into this directory.
19417 |      */
19418 |     tracesDir?: string;
19419 |   }): Promise<ElectronApplication>;
19420 | }
19421 | 
19422 | /**
19423 |  * [FileChooser](https://playwright.dev/docs/api/class-filechooser) objects are dispatched by the page in the
19424 |  * [page.on('filechooser')](https://playwright.dev/docs/api/class-page#page-event-file-chooser) event.
19425 |  *
19426 |  * ```js
19427 |  * // Start waiting for file chooser before clicking. Note no await.
19428 |  * const fileChooserPromise = page.waitForEvent('filechooser');
19429 |  * await page.getByText('Upload file').click();
19430 |  * const fileChooser = await fileChooserPromise;
19431 |  * await fileChooser.setFiles(path.join(__dirname, 'myfile.pdf'));
19432 |  * ```
19433 |  *
19434 |  */
19435 | export interface FileChooser {
19436 |   /**
19437 |    * Returns input element associated with this file chooser.
19438 |    */
19439 |   element(): ElementHandle;
19440 | 
19441 |   /**
19442 |    * Returns whether this file chooser accepts multiple files.
19443 |    */
19444 |   isMultiple(): boolean;
19445 | 
19446 |   /**
19447 |    * Returns page this file chooser belongs to.
19448 |    */
19449 |   page(): Page;
19450 | 
19451 |   /**
19452 |    * Sets the value of the file input this chooser is associated with. If some of the `filePaths` are relative paths,
19453 |    * then they are resolved relative to the current working directory. For empty array, clears the selected files.
19454 |    * @param files
19455 |    * @param options
19456 |    */
19457 |   setFiles(files: string|ReadonlyArray<string>|{
19458 |     /**
19459 |      * File name
19460 |      */
19461 |     name: string;
19462 | 
19463 |     /**
19464 |      * File type
19465 |      */
19466 |     mimeType: string;
19467 | 
19468 |     /**
19469 |      * File content
19470 |      */
19471 |     buffer: Buffer;
19472 |   }|ReadonlyArray<{
19473 |     /**
19474 |      * File name
19475 |      */
19476 |     name: string;
19477 | 
19478 |     /**
19479 |      * File type
19480 |      */
19481 |     mimeType: string;
19482 | 
19483 |     /**
19484 |      * File content
19485 |      */
19486 |     buffer: Buffer;
19487 |   }>, options?: {
19488 |     /**
19489 |      * This option has no effect.
19490 |      * @deprecated This option has no effect.
19491 |      */
19492 |     noWaitAfter?: boolean;
19493 | 
19494 |     /**
19495 |      * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
19496 |      * option in the config, or by using the
19497 |      * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19498 |      * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
19499 |      */
19500 |     timeout?: number;
19501 |   }): Promise<void>;
19502 | }
19503 | 
19504 | /**
19505 |  * FrameLocator represents a view to the `iframe` on the page. It captures the logic sufficient to retrieve the
19506 |  * `iframe` and locate elements in that iframe. FrameLocator can be created with either
19507 |  * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame),
19508 |  * [page.frameLocator(selector)](https://playwright.dev/docs/api/class-page#page-frame-locator) or
19509 |  * [locator.frameLocator(selector)](https://playwright.dev/docs/api/class-locator#locator-frame-locator) method.
19510 |  *
19511 |  * ```js
19512 |  * const locator = page.locator('#my-frame').contentFrame().getByText('Submit');
19513 |  * await locator.click();
19514 |  * ```
19515 |  *
19516 |  * **Strictness**
19517 |  *
19518 |  * Frame locators are strict. This means that all operations on frame locators will throw if more than one element
19519 |  * matches a given selector.
19520 |  *
19521 |  * ```js
19522 |  * // Throws if there are several frames in DOM:
19523 |  * await page.locator('.result-frame').contentFrame().getByRole('button').click();
19524 |  *
19525 |  * // Works because we explicitly tell locator to pick the first frame:
19526 |  * await page.locator('.result-frame').contentFrame().first().getByRole('button').click();
19527 |  * ```
19528 |  *
19529 |  * **Converting Locator to FrameLocator**
19530 |  *
19531 |  * If you have a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to an `iframe` it can be
19532 |  * converted to [FrameLocator](https://playwright.dev/docs/api/class-framelocator) using
19533 |  * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
19534 |  *
19535 |  * **Converting FrameLocator to Locator**
19536 |  *
19537 |  * If you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object it can be converted to
19538 |  * [Locator](https://playwright.dev/docs/api/class-locator) pointing to the same `iframe` using
19539 |  * [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
19540 |  */
19541 | export interface FrameLocator {
19542 |   /**
19543 |    * Returns locator to the first matching frame.
19544 |    * @deprecated Use [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first) followed by
19545 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19546 |    */
19547 |   first(): FrameLocator;
19548 | 
19549 |   /**
19550 |    * When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
19551 |    * in that iframe.
19552 |    * @param selector A selector to use when resolving DOM element.
19553 |    */
19554 |   frameLocator(selector: string): FrameLocator;
19555 | 
19556 |   /**
19557 |    * Allows locating elements by their alt text.
19558 |    *
19559 |    * **Usage**
19560 |    *
19561 |    * For example, this method will find the image by alt text "Playwright logo":
19562 |    *
19563 |    * ```html
19564 |    * <img alt='Playwright logo'>
19565 |    * ```
19566 |    *
19567 |    * ```js
19568 |    * await page.getByAltText('Playwright logo').click();
19569 |    * ```
19570 |    *
19571 |    * @param text Text to locate the element for.
19572 |    * @param options
19573 |    */
19574 |   getByAltText(text: string|RegExp, options?: {
19575 |     /**
19576 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19577 |      * regular expression. Note that exact match still trims whitespace.
19578 |      */
19579 |     exact?: boolean;
19580 |   }): Locator;
19581 | 
19582 |   /**
19583 |    * Allows locating input elements by the text of the associated `<label>` or `aria-labelledby` element, or by the
19584 |    * `aria-label` attribute.
19585 |    *
19586 |    * **Usage**
19587 |    *
19588 |    * For example, this method will find inputs by label "Username" and "Password" in the following DOM:
19589 |    *
19590 |    * ```html
19591 |    * <input aria-label="Username">
19592 |    * <label for="password-input">Password:</label>
19593 |    * <input id="password-input">
19594 |    * ```
19595 |    *
19596 |    * ```js
19597 |    * await page.getByLabel('Username').fill('john');
19598 |    * await page.getByLabel('Password').fill('secret');
19599 |    * ```
19600 |    *
19601 |    * @param text Text to locate the element for.
19602 |    * @param options
19603 |    */
19604 |   getByLabel(text: string|RegExp, options?: {
19605 |     /**
19606 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19607 |      * regular expression. Note that exact match still trims whitespace.
19608 |      */
19609 |     exact?: boolean;
19610 |   }): Locator;
19611 | 
19612 |   /**
19613 |    * Allows locating input elements by the placeholder text.
19614 |    *
19615 |    * **Usage**
19616 |    *
19617 |    * For example, consider the following DOM structure.
19618 |    *
19619 |    * ```html
19620 |    * <input type="email" placeholder="name@example.com" />
19621 |    * ```
19622 |    *
19623 |    * You can fill the input after locating it by the placeholder text:
19624 |    *
19625 |    * ```js
19626 |    * await page
19627 |    *     .getByPlaceholder('name@example.com')
19628 |    *     .fill('playwright@microsoft.com');
19629 |    * ```
19630 |    *
19631 |    * @param text Text to locate the element for.
19632 |    * @param options
19633 |    */
19634 |   getByPlaceholder(text: string|RegExp, options?: {
19635 |     /**
19636 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19637 |      * regular expression. Note that exact match still trims whitespace.
19638 |      */
19639 |     exact?: boolean;
19640 |   }): Locator;
19641 | 
19642 |   /**
19643 |    * Allows locating elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles),
19644 |    * [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and
19645 |    * [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
19646 |    *
19647 |    * **Usage**
19648 |    *
19649 |    * Consider the following DOM structure.
19650 |    *
19651 |    * ```html
19652 |    * <h3>Sign up</h3>
19653 |    * <label>
19654 |    *   <input type="checkbox" /> Subscribe
19655 |    * </label>
19656 |    * <br/>
19657 |    * <button>Submit</button>
19658 |    * ```
19659 |    *
19660 |    * You can locate each element by it's implicit role:
19661 |    *
19662 |    * ```js
19663 |    * await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
19664 |    *
19665 |    * await page.getByRole('checkbox', { name: 'Subscribe' }).check();
19666 |    *
19667 |    * await page.getByRole('button', { name: /submit/i }).click();
19668 |    * ```
19669 |    *
19670 |    * **Details**
19671 |    *
19672 |    * Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback
19673 |    * about the ARIA guidelines.
19674 |    *
19675 |    * Many html elements have an implicitly [defined role](https://w3c.github.io/html-aam/#html-element-role-mappings)
19676 |    * that is recognized by the role selector. You can find all the
19677 |    * [supported roles here](https://www.w3.org/TR/wai-aria-1.2/#role_definitions). ARIA guidelines **do not recommend**
19678 |    * duplicating implicit roles and attributes by setting `role` and/or `aria-*` attributes to default values.
19679 |    * @param role Required aria role.
19680 |    * @param options
19681 |    */
19682 |   getByRole(role: "alert"|"alertdialog"|"application"|"article"|"banner"|"blockquote"|"button"|"caption"|"cell"|"checkbox"|"code"|"columnheader"|"combobox"|"complementary"|"contentinfo"|"definition"|"deletion"|"dialog"|"directory"|"document"|"emphasis"|"feed"|"figure"|"form"|"generic"|"grid"|"gridcell"|"group"|"heading"|"img"|"insertion"|"link"|"list"|"listbox"|"listitem"|"log"|"main"|"marquee"|"math"|"meter"|"menu"|"menubar"|"menuitem"|"menuitemcheckbox"|"menuitemradio"|"navigation"|"none"|"note"|"option"|"paragraph"|"presentation"|"progressbar"|"radio"|"radiogroup"|"region"|"row"|"rowgroup"|"rowheader"|"scrollbar"|"search"|"searchbox"|"separator"|"slider"|"spinbutton"|"status"|"strong"|"subscript"|"superscript"|"switch"|"tab"|"table"|"tablist"|"tabpanel"|"term"|"textbox"|"time"|"timer"|"toolbar"|"tooltip"|"tree"|"treegrid"|"treeitem", options?: {
19683 |     /**
19684 |      * An attribute that is usually set by `aria-checked` or native `<input type=checkbox>` controls.
19685 |      *
19686 |      * Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
19687 |      */
19688 |     checked?: boolean;
19689 | 
19690 |     /**
19691 |      * An attribute that is usually set by `aria-disabled` or `disabled`.
19692 |      *
19693 |      * **NOTE** Unlike most other attributes, `disabled` is inherited through the DOM hierarchy. Learn more about
19694 |      * [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.2/#aria-disabled).
19695 |      *
19696 |      */
19697 |     disabled?: boolean;
19698 | 
19699 |     /**
19700 |      * Whether [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is
19701 |      * matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when
19702 |      * [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is a regular
19703 |      * expression. Note that exact match still trims whitespace.
19704 |      */
19705 |     exact?: boolean;
19706 | 
19707 |     /**
19708 |      * An attribute that is usually set by `aria-expanded`.
19709 |      *
19710 |      * Learn more about [`aria-expanded`](https://www.w3.org/TR/wai-aria-1.2/#aria-expanded).
19711 |      */
19712 |     expanded?: boolean;
19713 | 
19714 |     /**
19715 |      * Option that controls whether hidden elements are matched. By default, only non-hidden elements, as
19716 |      * [defined by ARIA](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), are matched by role selector.
19717 |      *
19718 |      * Learn more about [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden).
19719 |      */
19720 |     includeHidden?: boolean;
19721 | 
19722 |     /**
19723 |      * A number attribute that is usually present for roles `heading`, `listitem`, `row`, `treeitem`, with default values
19724 |      * for `<h1>-<h6>` elements.
19725 |      *
19726 |      * Learn more about [`aria-level`](https://www.w3.org/TR/wai-aria-1.2/#aria-level).
19727 |      */
19728 |     level?: number;
19729 | 
19730 |     /**
19731 |      * Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
19732 |      * case-insensitive and searches for a substring, use
19733 |      * [`exact`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-exact) to control
19734 |      * this behavior.
19735 |      *
19736 |      * Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
19737 |      */
19738 |     name?: string|RegExp;
19739 | 
19740 |     /**
19741 |      * An attribute that is usually set by `aria-pressed`.
19742 |      *
19743 |      * Learn more about [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed).
19744 |      */
19745 |     pressed?: boolean;
19746 | 
19747 |     /**
19748 |      * An attribute that is usually set by `aria-selected`.
19749 |      *
19750 |      * Learn more about [`aria-selected`](https://www.w3.org/TR/wai-aria-1.2/#aria-selected).
19751 |      */
19752 |     selected?: boolean;
19753 |   }): Locator;
19754 | 
19755 |   /**
19756 |    * Locate element by the test id.
19757 |    *
19758 |    * **Usage**
19759 |    *
19760 |    * Consider the following DOM structure.
19761 |    *
19762 |    * ```html
19763 |    * <button data-testid="directions">Itinéraire</button>
19764 |    * ```
19765 |    *
19766 |    * You can locate the element by it's test id:
19767 |    *
19768 |    * ```js
19769 |    * await page.getByTestId('directions').click();
19770 |    * ```
19771 |    *
19772 |    * **Details**
19773 |    *
19774 |    * By default, the `data-testid` attribute is used as a test id. Use
19775 |    * [selectors.setTestIdAttribute(attributeName)](https://playwright.dev/docs/api/class-selectors#selectors-set-test-id-attribute)
19776 |    * to configure a different test id attribute if necessary.
19777 |    *
19778 |    * ```js
19779 |    * // Set custom test id attribute from @playwright/test config:
19780 |    * import { defineConfig } from '@playwright/test';
19781 |    *
19782 |    * export default defineConfig({
19783 |    *   use: {
19784 |    *     testIdAttribute: 'data-pw'
19785 |    *   },
19786 |    * });
19787 |    * ```
19788 |    *
19789 |    * @param testId Id to locate the element by.
19790 |    */
19791 |   getByTestId(testId: string|RegExp): Locator;
19792 | 
19793 |   /**
19794 |    * Allows locating elements that contain given text.
19795 |    *
19796 |    * See also [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter) that allows to
19797 |    * match by another criteria, like an accessible role, and then filter by the text content.
19798 |    *
19799 |    * **Usage**
19800 |    *
19801 |    * Consider the following DOM structure:
19802 |    *
19803 |    * ```html
19804 |    * <div>Hello <span>world</span></div>
19805 |    * <div>Hello</div>
19806 |    * ```
19807 |    *
19808 |    * You can locate by text substring, exact string, or a regular expression:
19809 |    *
19810 |    * ```js
19811 |    * // Matches <span>
19812 |    * page.getByText('world');
19813 |    *
19814 |    * // Matches first <div>
19815 |    * page.getByText('Hello world');
19816 |    *
19817 |    * // Matches second <div>
19818 |    * page.getByText('Hello', { exact: true });
19819 |    *
19820 |    * // Matches both <div>s
19821 |    * page.getByText(/Hello/);
19822 |    *
19823 |    * // Matches second <div>
19824 |    * page.getByText(/^hello$/i);
19825 |    * ```
19826 |    *
19827 |    * **Details**
19828 |    *
19829 |    * Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into
19830 |    * one, turns line breaks into spaces and ignores leading and trailing whitespace.
19831 |    *
19832 |    * Input elements of the type `button` and `submit` are matched by their `value` instead of the text content. For
19833 |    * example, locating by text `"Log in"` matches `<input type=button value="Log in">`.
19834 |    * @param text Text to locate the element for.
19835 |    * @param options
19836 |    */
19837 |   getByText(text: string|RegExp, options?: {
19838 |     /**
19839 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19840 |      * regular expression. Note that exact match still trims whitespace.
19841 |      */
19842 |     exact?: boolean;
19843 |   }): Locator;
19844 | 
19845 |   /**
19846 |    * Allows locating elements by their title attribute.
19847 |    *
19848 |    * **Usage**
19849 |    *
19850 |    * Consider the following DOM structure.
19851 |    *
19852 |    * ```html
19853 |    * <span title='Issues count'>25 issues</span>
19854 |    * ```
19855 |    *
19856 |    * You can check the issues count after locating it by the title text:
19857 |    *
19858 |    * ```js
19859 |    * await expect(page.getByTitle('Issues count')).toHaveText('25 issues');
19860 |    * ```
19861 |    *
19862 |    * @param text Text to locate the element for.
19863 |    * @param options
19864 |    */
19865 |   getByTitle(text: string|RegExp, options?: {
19866 |     /**
19867 |      * Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a
19868 |      * regular expression. Note that exact match still trims whitespace.
19869 |      */
19870 |     exact?: boolean;
19871 |   }): Locator;
19872 | 
19873 |   /**
19874 |    * Returns locator to the last matching frame.
19875 |    * @deprecated Use [locator.last()](https://playwright.dev/docs/api/class-locator#locator-last) followed by
19876 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19877 |    */
19878 |   last(): FrameLocator;
19879 | 
19880 |   /**
19881 |    * The method finds an element matching the specified selector in the locator's subtree. It also accepts filter
19882 |    * options, similar to [locator.filter([options])](https://playwright.dev/docs/api/class-locator#locator-filter)
19883 |    * method.
19884 |    *
19885 |    * [Learn more about locators](https://playwright.dev/docs/locators).
19886 |    * @param selectorOrLocator A selector or locator to use when resolving DOM element.
19887 |    * @param options
19888 |    */
19889 |   locator(selectorOrLocator: string|Locator, options?: {
19890 |     /**
19891 |      * Narrows down the results of the method to those which contain elements matching this relative locator. For example,
19892 |      * `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
19893 |      *
19894 |      * Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not
19895 |      * the document root. For example, you can find `content` that has `div` in
19896 |      * `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
19897 |      * div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
19898 |      *
19899 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
19900 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
19901 |      */
19902 |     has?: Locator;
19903 | 
19904 |     /**
19905 |      * Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
19906 |      * outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
19907 |      *
19908 |      * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
19909 |      * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
19910 |      */
19911 |     hasNot?: Locator;
19912 | 
19913 |     /**
19914 |      * Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element.
19915 |      * When passed a [string], matching is case-insensitive and searches for a substring.
19916 |      */
19917 |     hasNotText?: string|RegExp;
19918 | 
19919 |     /**
19920 |      * Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When
19921 |      * passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
19922 |      * `<article><div>Playwright</div></article>`.
19923 |      */
19924 |     hasText?: string|RegExp;
19925 |   }): Locator;
19926 | 
19927 |   /**
19928 |    * Returns locator to the n-th matching frame. It's zero based, `nth(0)` selects the first frame.
19929 |    * @deprecated Use [locator.nth(index)](https://playwright.dev/docs/api/class-locator#locator-nth) followed by
19930 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame) instead.
19931 |    * @param index
19932 |    */
19933 |   nth(index: number): FrameLocator;
19934 | 
19935 |   /**
19936 |    * Returns a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to the same `iframe` as this
19937 |    * frame locator.
19938 |    *
19939 |    * Useful when you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object obtained
19940 |    * somewhere, and later on would like to interact with the `iframe` element.
19941 |    *
19942 |    * For a reverse operation, use
19943 |    * [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
19944 |    *
19945 |    * **Usage**
19946 |    *
19947 |    * ```js
19948 |    * const frameLocator = page.locator('iframe[name="embedded"]').contentFrame();
19949 |    * // ...
19950 |    * const locator = frameLocator.owner();
19951 |    * await expect(locator).toBeVisible();
19952 |    * ```
19953 |    *
19954 |    */
19955 |   owner(): Locator;
19956 | }
19957 | 
19958 | /**
19959 |  * Keyboard provides an api for managing a virtual keyboard. The high level api is
19960 |  * [keyboard.type(text[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-type), which takes raw
19961 |  * characters and generates proper `keydown`, `keypress`/`input`, and `keyup` events on your page.
19962 |  *
19963 |  * For finer control, you can use [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down),
19964 |  * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up), and
19965 |  * [keyboard.insertText(text)](https://playwright.dev/docs/api/class-keyboard#keyboard-insert-text) to manually fire
19966 |  * events as if they were generated from a real keyboard.
19967 |  *
19968 |  * An example of holding down `Shift` in order to select and delete some text:
19969 |  *
19970 |  * ```js
19971 |  * await page.keyboard.type('Hello World!');
19972 |  * await page.keyboard.press('ArrowLeft');
19973 |  *
19974 |  * await page.keyboard.down('Shift');
19975 |  * for (let i = 0; i < ' World'.length; i++)
19976 |  *   await page.keyboard.press('ArrowLeft');
19977 |  * await page.keyboard.up('Shift');
19978 |  *
19979 |  * await page.keyboard.press('Backspace');
19980 |  * // Result text will end up saying 'Hello!'
19981 |  * ```
19982 |  *
19983 |  * An example of pressing uppercase `A`
19984 |  *
19985 |  * ```js
19986 |  * await page.keyboard.press('Shift+KeyA');
19987 |  * // or
19988 |  * await page.keyboard.press('Shift+A');
19989 |  * ```
19990 |  *
19991 |  * An example to trigger select-all with the keyboard
19992 |  *
19993 |  * ```js
19994 |  * await page.keyboard.press('ControlOrMeta+A');
19995 |  * ```
19996 |  *
19997 |  */
19998 | export interface Keyboard {
19999 |   /**
20000 |    * Dispatches a `keydown` event.
20001 |    *
20002 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) can specify the intended
20003 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
20004 |    * to generate the text for. A superset of the
20005 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) values can be found
20006 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
20007 |    *
20008 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
20009 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
20010 |    * etc.
20011 |    *
20012 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
20013 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
20014 |    *
20015 |    * Holding down `Shift` will type the text that corresponds to the
20016 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) in the upper case.
20017 |    *
20018 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a single character, it is
20019 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
20020 |    *
20021 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a modifier key, `Shift`,
20022 |    * `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that modifier active. To release the modifier
20023 |    * key, use [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
20024 |    *
20025 |    * After the key is pressed once, subsequent calls to
20026 |    * [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) will have
20027 |    * [repeat](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat) set to true. To release the key,
20028 |    * use [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
20029 |    *
20030 |    * **NOTE** Modifier keys DO influence `keyboard.down`. Holding down `Shift` will type the text in upper case.
20031 |    *
20032 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
20033 |    */
20034 |   down(key: string): Promise<void>;
20035 | 
20036 |   /**
20037 |    * Dispatches only `input` event, does not emit the `keydown`, `keyup` or `keypress` events.
20038 |    *
20039 |    * **Usage**
20040 |    *
20041 |    * ```js
20042 |    * page.keyboard.insertText('嗨');
20043 |    * ```
20044 |    *
20045 |    * **NOTE** Modifier keys DO NOT effect `keyboard.insertText`. Holding down `Shift` will not type the text in upper
20046 |    * case.
20047 |    *
20048 |    * @param text Sets input to the specified text value.
20049 |    */
20050 |   insertText(text: string): Promise<void>;
20051 | 
20052 |   /**
20053 |    * **NOTE** In most cases, you should use
20054 |    * [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press) instead.
20055 |    *
20056 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) can specify the intended
20057 |    * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
20058 |    * to generate the text for. A superset of the
20059 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) values can be found
20060 |    * [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
20061 |    *
20062 |    * `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
20063 |    * `Delete`, `Escape`, `ArrowDown`, `End`, `Enter`, `Home`, `Insert`, `PageDown`, `PageUp`, `ArrowRight`, `ArrowUp`,
20064 |    * etc.
20065 |    *
20066 |    * Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
20067 |    * `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
20068 |    *
20069 |    * Holding down `Shift` will type the text that corresponds to the
20070 |    * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) in the upper case.
20071 |    *
20072 |    * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) is a single character, it is
20073 |    * case-sensitive, so the values `a` and `A` will generate different respective texts.
20074 |    *
20075 |    * Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
20076 |    * specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
20077 |    *
20078 |    * **Usage**
20079 |    *
20080 |    * ```js
20081 |    * const page = await browser.newPage();
20082 |    * await page.goto('https://keycode.info');
20083 |    * await page.keyboard.press('A');
20084 |    * await page.screenshot({ path: 'A.png' });
20085 |    * await page.keyboard.press('ArrowLeft');
20086 |    * await page.screenshot({ path: 'ArrowLeft.png' });
20087 |    * await page.keyboard.press('Shift+O');
20088 |    * await page.screenshot({ path: 'O.png' });
20089 |    * await browser.close();
20090 |    * ```
20091 |    *
20092 |    * Shortcut for [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
20093 |    * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
20094 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
20095 |    * @param options
20096 |    */
20097 |   press(key: string, options?: {
20098 |     /**
20099 |      * Time to wait between `keydown` and `keyup` in milliseconds. Defaults to 0.
20100 |      */
20101 |     delay?: number;
20102 |   }): Promise<void>;
20103 | 
20104 |   /**
20105 |    * **NOTE** In most cases, you should use
20106 |    * [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill) instead. You only need
20107 |    * to press keys one by one if there is special keyboard handling on the page - in this case use
20108 |    * [locator.pressSequentially(text[, options])](https://playwright.dev/docs/api/class-locator#locator-press-sequentially).
20109 |    *
20110 |    * Sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the text.
20111 |    *
20112 |    * To press a special key, like `Control` or `ArrowDown`, use
20113 |    * [keyboard.press(key[, options])](https://playwright.dev/docs/api/class-keyboard#keyboard-press).
20114 |    *
20115 |    * **Usage**
20116 |    *
20117 |    * ```js
20118 |    * await page.keyboard.type('Hello'); // Types instantly
20119 |    * await page.keyboard.type('World', { delay: 100 }); // Types slower, like a user
20120 |    * ```
20121 |    *
20122 |    * **NOTE** Modifier keys DO NOT effect `keyboard.type`. Holding down `Shift` will not type the text in upper case.
20123 |    *
20124 |    * **NOTE** For characters that are not on a US keyboard, only an `input` event will be sent.
20125 |    *
20126 |    * @param text A text to type into a focused element.
20127 |    * @param options
20128 |    */
20129 |   type(text: string, options?: {
20130 |     /**
20131 |      * Time to wait between key presses in milliseconds. Defaults to 0.
20132 |      */
20133 |     delay?: number;
20134 |   }): Promise<void>;
20135 | 
20136 |   /**
20137 |    * Dispatches a `keyup` event.
20138 |    * @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
20139 |    */
20140 |   up(key: string): Promise<void>;
20141 | }
20142 | 
20143 | /**
20144 |  * Playwright generates a lot of logs and they are accessible via the pluggable logger sink.
20145 |  *
20146 |  * ```js
20147 |  * const { chromium } = require('playwright');  // Or 'firefox' or 'webkit'.
20148 |  *
20149 |  * (async () => {
20150 |  *   const browser = await chromium.launch({
20151 |  *     logger: {
20152 |  *       isEnabled: (name, severity) => name === 'api',
20153 |  *       log: (name, severity, message, args) => console.log(`${name} ${message}`)
20154 |  *     }
20155 |  *   });
20156 |  *   // ...
20157 |  * })();
20158 |  * ```
20159 |  *
20160 |  */
20161 | export interface Logger {
20162 |   /**
20163 |    * Determines whether sink is interested in the logger with the given name and severity.
20164 |    * @param name logger name
20165 |    * @param severity
20166 |    */
20167 |   isEnabled(name: string, severity: "verbose"|"info"|"warning"|"error"): boolean;
20168 | 
20169 |   /**
20170 |    * @param name logger name
20171 |    * @param severity
20172 |    * @param message log message format
20173 |    * @param args message arguments
20174 |    * @param hints optional formatting hints
20175 |    */
20176 |   log(name: string, severity: "verbose"|"info"|"warning"|"error", message: string|Error, args: ReadonlyArray<Object>, hints: {
20177 |     /**
20178 |      * Optional preferred logger color.
20179 |      */
20180 |     color?: string;
20181 |   }): void;
20182 | }
20183 | 
20184 | /**
20185 |  * The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
20186 |  *
20187 |  * **NOTE** If you want to debug where the mouse moved, you can use the [Trace viewer](https://playwright.dev/docs/trace-viewer-intro) or
20188 |  * [Playwright Inspector](https://playwright.dev/docs/running-tests). A red dot showing the location of the mouse will be shown for every
20189 |  * mouse action.
20190 |  *
20191 |  * Every `page` object has its own Mouse, accessible with
20192 |  * [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse).
20193 |  *
20194 |  * ```js
20195 |  * // Using ‘page.mouse’ to trace a 100x100 square.
20196 |  * await page.mouse.move(0, 0);
20197 |  * await page.mouse.down();
20198 |  * await page.mouse.move(0, 100);
20199 |  * await page.mouse.move(100, 100);
20200 |  * await page.mouse.move(100, 0);
20201 |  * await page.mouse.move(0, 0);
20202 |  * await page.mouse.up();
20203 |  * ```
20204 |  *
20205 |  */
20206 | export interface Mouse {
20207 |   /**
20208 |    * Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
20209 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
20210 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
20211 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20212 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20213 |    * @param options
20214 |    */
20215 |   click(x: number, y: number, options?: {
20216 |     /**
20217 |      * Defaults to `left`.
20218 |      */
20219 |     button?: "left"|"right"|"middle";
20220 | 
20221 |     /**
20222 |      * defaults to 1. See [UIEvent.detail].
20223 |      */
20224 |     clickCount?: number;
20225 | 
20226 |     /**
20227 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
20228 |      */
20229 |     delay?: number;
20230 |   }): Promise<void>;
20231 | 
20232 |   /**
20233 |    * Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
20234 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
20235 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up),
20236 |    * [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down) and
20237 |    * [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
20238 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20239 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20240 |    * @param options
20241 |    */
20242 |   dblclick(x: number, y: number, options?: {
20243 |     /**
20244 |      * Defaults to `left`.
20245 |      */
20246 |     button?: "left"|"right"|"middle";
20247 | 
20248 |     /**
20249 |      * Time to wait between `mousedown` and `mouseup` in milliseconds. Defaults to 0.
20250 |      */
20251 |     delay?: number;
20252 |   }): Promise<void>;
20253 | 
20254 |   /**
20255 |    * Dispatches a `mousedown` event.
20256 |    * @param options
20257 |    */
20258 |   down(options?: {
20259 |     /**
20260 |      * Defaults to `left`.
20261 |      */
20262 |     button?: "left"|"right"|"middle";
20263 | 
20264 |     /**
20265 |      * defaults to 1. See [UIEvent.detail].
20266 |      */
20267 |     clickCount?: number;
20268 |   }): Promise<void>;
20269 | 
20270 |   /**
20271 |    * Dispatches a `mousemove` event.
20272 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
20273 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
20274 |    * @param options
20275 |    */
20276 |   move(x: number, y: number, options?: {
20277 |     /**
20278 |      * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
20279 |      * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
20280 |      */
20281 |     steps?: number;
20282 |   }): Promise<void>;
20283 | 
20284 |   /**
20285 |    * Dispatches a `mouseup` event.
20286 |    * @param options
20287 |    */
20288 |   up(options?: {
20289 |     /**
20290 |      * Defaults to `left`.
20291 |      */
20292 |     button?: "left"|"right"|"middle";
20293 | 
20294 |     /**
20295 |      * defaults to 1. See [UIEvent.detail].
20296 |      */
20297 |     clickCount?: number;
20298 |   }): Promise<void>;
20299 | 
20300 |   /**
20301 |    * Dispatches a `wheel` event. This method is usually used to manually scroll the page. See
20302 |    * [scrolling](https://playwright.dev/docs/input#scrolling) for alternative ways to scroll.
20303 |    *
20304 |    * **NOTE** Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling
20305 |    * to finish before returning.
20306 |    *
20307 |    * @param deltaX Pixels to scroll horizontally.
20308 |    * @param deltaY Pixels to scroll vertically.
20309 |    */
20310 |   wheel(deltaX: number, deltaY: number): Promise<void>;
20311 | }
20312 | 
20313 | /**
20314 |  * This object can be used to launch or connect to Chromium, returning instances of
20315 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20316 |  */
20317 | export const chromium: BrowserType;
20318 | 
20319 | /**
20320 |  * This object can be used to launch or connect to Firefox, returning instances of
20321 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20322 |  */
20323 | export const firefox: BrowserType;
20324 | 
20325 | /**
20326 |  * Exposes API that can be used for the Web API testing.
20327 |  */
20328 | export const request: APIRequest;
20329 | 
20330 | /**
20331 |  * Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/docs/extensibility) for more
20332 |  * information.
20333 |  */
20334 | export const selectors: Selectors;
20335 | 
20336 | /**
20337 |  * This object can be used to launch or connect to WebKit, returning instances of
20338 |  * [Browser](https://playwright.dev/docs/api/class-browser).
20339 |  */
20340 | export const webkit: BrowserType;
20341 | 
20342 | /**
20343 |  * Whenever the page sends a request for a network resource the following sequence of events are emitted by
20344 |  * [Page](https://playwright.dev/docs/api/class-page):
20345 |  * - [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) emitted when the request is
20346 |  *   issued by the page.
20347 |  * - [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response) emitted when/if the
20348 |  *   response status and headers are received for the request.
20349 |  * - [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished) emitted
20350 |  *   when the response body is downloaded and the request is complete.
20351 |  *
20352 |  * If request fails at some point, then instead of `'requestfinished'` event (and possibly instead of 'response'
20353 |  * event), the  [page.on('requestfailed')](https://playwright.dev/docs/api/class-page#page-event-request-failed) event
20354 |  * is emitted.
20355 |  *
20356 |  * **NOTE** HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request
20357 |  * will complete with `'requestfinished'` event.
20358 |  *
20359 |  * If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a
20360 |  * new request is  issued to a redirected url.
20361 |  */
20362 | export interface Request {
20363 |   /**
20364 |    * An object with all the request HTTP headers associated with this request. The header names are lower-cased.
20365 |    */
20366 |   allHeaders(): Promise<{ [key: string]: string; }>;
20367 | 
20368 |   /**
20369 |    * The method returns `null` unless this request has failed, as reported by `requestfailed` event.
20370 |    *
20371 |    * **Usage**
20372 |    *
20373 |    * Example of logging of all the failed requests:
20374 |    *
20375 |    * ```js
20376 |    * page.on('requestfailed', request => {
20377 |    *   console.log(request.url() + ' ' + request.failure().errorText);
20378 |    * });
20379 |    * ```
20380 |    *
20381 |    */
20382 |   failure(): null|{
20383 |     /**
20384 |      * Human-readable error message, e.g. `'net::ERR_FAILED'`.
20385 |      */
20386 |     errorText: string;
20387 |   };
20388 | 
20389 |   /**
20390 |    * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this request.
20391 |    *
20392 |    * **Usage**
20393 |    *
20394 |    * ```js
20395 |    * const frameUrl = request.frame().url();
20396 |    * ```
20397 |    *
20398 |    * **Details**
20399 |    *
20400 |    * Note that in some cases the frame is not available, and this method will throw.
20401 |    * - When request originates in the Service Worker. You can use `request.serviceWorker()` to check that.
20402 |    * - When navigation request is issued before the corresponding frame is created. You can use
20403 |    *   [request.isNavigationRequest()](https://playwright.dev/docs/api/class-request#request-is-navigation-request) to
20404 |    *   check that.
20405 |    *
20406 |    * Here is an example that handles all the cases:
20407 |    *
20408 |    * ```js
20409 |    * if (request.serviceWorker())
20410 |    *   console.log(`request ${request.url()} from a service worker`);
20411 |    * else if (request.isNavigationRequest())
20412 |    *   console.log(`request ${request.url()} is a navigation request`);
20413 |    * else
20414 |    *   console.log(`request ${request.url()} from a frame ${request.frame().url()}`);
20415 |    * ```
20416 |    *
20417 |    */
20418 |   frame(): Frame;
20419 | 
20420 |   /**
20421 |    * An object with the request HTTP headers. The header names are lower-cased. Note that this method does not return
20422 |    * security-related headers, including cookie-related ones. You can use
20423 |    * [request.allHeaders()](https://playwright.dev/docs/api/class-request#request-all-headers) for complete list of
20424 |    * headers that include `cookie` information.
20425 |    */
20426 |   headers(): { [key: string]: string; };
20427 | 
20428 |   /**
20429 |    * An array with all the request HTTP headers associated with this request. Unlike
20430 |    * [request.allHeaders()](https://playwright.dev/docs/api/class-request#request-all-headers), header names are NOT
20431 |    * lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
20432 |    */
20433 |   headersArray(): Promise<Array<{
20434 |     /**
20435 |      * Name of the header.
20436 |      */
20437 |     name: string;
20438 | 
20439 |     /**
20440 |      * Value of the header.
20441 |      */
20442 |     value: string;
20443 |   }>>;
20444 | 
20445 |   /**
20446 |    * Returns the value of the header matching the name. The name is case-insensitive.
20447 |    * @param name Name of the header.
20448 |    */
20449 |   headerValue(name: string): Promise<null|string>;
20450 | 
20451 |   /**
20452 |    * Whether this request is driving frame's navigation.
20453 |    *
20454 |    * Some navigation requests are issued before the corresponding frame is created, and therefore do not have
20455 |    * [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.
20456 |    */
20457 |   isNavigationRequest(): boolean;
20458 | 
20459 |   /**
20460 |    * Request's method (GET, POST, etc.)
20461 |    */
20462 |   method(): string;
20463 | 
20464 |   /**
20465 |    * Request's post body, if any.
20466 |    */
20467 |   postData(): null|string;
20468 | 
20469 |   /**
20470 |    * Request's post body in a binary form, if any.
20471 |    */
20472 |   postDataBuffer(): null|Buffer;
20473 | 
20474 |   /**
20475 |    * Returns parsed request's body for `form-urlencoded` and JSON as a fallback if any.
20476 |    *
20477 |    * When the response is `application/x-www-form-urlencoded` then a key/value object of the values will be returned.
20478 |    * Otherwise it will be parsed as JSON.
20479 |    */
20480 |   postDataJSON(): null|Serializable;
20481 | 
20482 |   /**
20483 |    * Request that was redirected by the server to this one, if any.
20484 |    *
20485 |    * When the server responds with a redirect, Playwright creates a new
20486 |    * [Request](https://playwright.dev/docs/api/class-request) object. The two requests are connected by
20487 |    * `redirectedFrom()` and `redirectedTo()` methods. When multiple server redirects has happened, it is possible to
20488 |    * construct the whole redirect chain by repeatedly calling `redirectedFrom()`.
20489 |    *
20490 |    * **Usage**
20491 |    *
20492 |    * For example, if the website `http://example.com` redirects to `https://example.com`:
20493 |    *
20494 |    * ```js
20495 |    * const response = await page.goto('http://example.com');
20496 |    * console.log(response.request().redirectedFrom().url()); // 'http://example.com'
20497 |    * ```
20498 |    *
20499 |    * If the website `https://google.com` has no redirects:
20500 |    *
20501 |    * ```js
20502 |    * const response = await page.goto('https://google.com');
20503 |    * console.log(response.request().redirectedFrom()); // null
20504 |    * ```
20505 |    *
20506 |    */
20507 |   redirectedFrom(): null|Request;
20508 | 
20509 |   /**
20510 |    * New request issued by the browser if the server responded with redirect.
20511 |    *
20512 |    * **Usage**
20513 |    *
20514 |    * This method is the opposite of
20515 |    * [request.redirectedFrom()](https://playwright.dev/docs/api/class-request#request-redirected-from):
20516 |    *
20517 |    * ```js
20518 |    * console.log(request.redirectedFrom().redirectedTo() === request); // true
20519 |    * ```
20520 |    *
20521 |    */
20522 |   redirectedTo(): null|Request;
20523 | 
20524 |   /**
20525 |    * Contains the request's resource type as it was perceived by the rendering engine. ResourceType will be one of the
20526 |    * following: `document`, `stylesheet`, `image`, `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`,
20527 |    * `eventsource`, `websocket`, `manifest`, `other`.
20528 |    */
20529 |   resourceType(): string;
20530 | 
20531 |   /**
20532 |    * Returns the matching [Response](https://playwright.dev/docs/api/class-response) object, or `null` if the response
20533 |    * was not received due to error.
20534 |    */
20535 |   response(): Promise<null|Response>;
20536 | 
20537 |   /**
20538 |    * The Service [Worker](https://playwright.dev/docs/api/class-worker) that is performing the request.
20539 |    *
20540 |    * **Details**
20541 |    *
20542 |    * This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
20543 |    *
20544 |    * Requests originated in a Service Worker do not have a
20545 |    * [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.
20546 |    */
20547 |   serviceWorker(): null|Worker;
20548 | 
20549 |   /**
20550 |    * Returns resource size information for given request.
20551 |    */
20552 |   sizes(): Promise<{
20553 |     /**
20554 |      * Size of the request body (POST data payload) in bytes. Set to 0 if there was no body.
20555 |      */
20556 |     requestBodySize: number;
20557 | 
20558 |     /**
20559 |      * Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the
20560 |      * body.
20561 |      */
20562 |     requestHeadersSize: number;
20563 | 
20564 |     /**
20565 |      * Size of the received response body (encoded) in bytes.
20566 |      */
20567 |     responseBodySize: number;
20568 | 
20569 |     /**
20570 |      * Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the
20571 |      * body.
20572 |      */
20573 |     responseHeadersSize: number;
20574 |   }>;
20575 | 
20576 |   /**
20577 |    * Returns resource timing information for given request. Most of the timing values become available upon the
20578 |    * response, `responseEnd` becomes available when request finishes. Find more information at
20579 |    * [Resource Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming).
20580 |    *
20581 |    * **Usage**
20582 |    *
20583 |    * ```js
20584 |    * const requestFinishedPromise = page.waitForEvent('requestfinished');
20585 |    * await page.goto('http://example.com');
20586 |    * const request = await requestFinishedPromise;
20587 |    * console.log(request.timing());
20588 |    * ```
20589 |    *
20590 |    */
20591 |   timing(): {
20592 |     /**
20593 |      * Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC
20594 |      */
20595 |     startTime: number;
20596 | 
20597 |     /**
20598 |      * Time immediately before the browser starts the domain name lookup for the resource. The value is given in
20599 |      * milliseconds relative to `startTime`, -1 if not available.
20600 |      */
20601 |     domainLookupStart: number;
20602 | 
20603 |     /**
20604 |      * Time immediately after the browser starts the domain name lookup for the resource. The value is given in
20605 |      * milliseconds relative to `startTime`, -1 if not available.
20606 |      */
20607 |     domainLookupEnd: number;
20608 | 
20609 |     /**
20610 |      * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20611 |      * The value is given in milliseconds relative to `startTime`, -1 if not available.
20612 |      */
20613 |     connectStart: number;
20614 | 
20615 |     /**
20616 |      * Time immediately before the browser starts the handshake process to secure the current connection. The value is
20617 |      * given in milliseconds relative to `startTime`, -1 if not available.
20618 |      */
20619 |     secureConnectionStart: number;
20620 | 
20621 |     /**
20622 |      * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20623 |      * The value is given in milliseconds relative to `startTime`, -1 if not available.
20624 |      */
20625 |     connectEnd: number;
20626 | 
20627 |     /**
20628 |      * Time immediately before the browser starts requesting the resource from the server, cache, or local resource. The
20629 |      * value is given in milliseconds relative to `startTime`, -1 if not available.
20630 |      */
20631 |     requestStart: number;
20632 | 
20633 |     /**
20634 |      * Time immediately after the browser receives the first byte of the response from the server, cache, or local
20635 |      * resource. The value is given in milliseconds relative to `startTime`, -1 if not available.
20636 |      */
20637 |     responseStart: number;
20638 | 
20639 |     /**
20640 |      * Time immediately after the browser receives the last byte of the resource or immediately before the transport
20641 |      * connection is closed, whichever comes first. The value is given in milliseconds relative to `startTime`, -1 if not
20642 |      * available.
20643 |      */
20644 |     responseEnd: number;
20645 |   };
20646 | 
20647 |   /**
20648 |    * URL of the request.
20649 |    */
20650 |   url(): string;
20651 | }
20652 | 
20653 | /**
20654 |  * [Response](https://playwright.dev/docs/api/class-response) class represents responses which are received by page.
20655 |  */
20656 | export interface Response {
20657 |   /**
20658 |    * An object with all the response HTTP headers associated with this response.
20659 |    */
20660 |   allHeaders(): Promise<{ [key: string]: string; }>;
20661 | 
20662 |   /**
20663 |    * Returns the buffer with response body.
20664 |    */
20665 |   body(): Promise<Buffer>;
20666 | 
20667 |   /**
20668 |    * Waits for this response to finish, returns always `null`.
20669 |    */
20670 |   finished(): Promise<null|Error>;
20671 | 
20672 |   /**
20673 |    * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this response.
20674 |    */
20675 |   frame(): Frame;
20676 | 
20677 |   /**
20678 |    * Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via
20679 |    * [FetchEvent.respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)).
20680 |    */
20681 |   fromServiceWorker(): boolean;
20682 | 
20683 |   /**
20684 |    * An object with the response HTTP headers. The header names are lower-cased. Note that this method does not return
20685 |    * security-related headers, including cookie-related ones. You can use
20686 |    * [response.allHeaders()](https://playwright.dev/docs/api/class-response#response-all-headers) for complete list of
20687 |    * headers that include `cookie` information.
20688 |    */
20689 |   headers(): { [key: string]: string; };
20690 | 
20691 |   /**
20692 |    * An array with all the request HTTP headers associated with this response. Unlike
20693 |    * [response.allHeaders()](https://playwright.dev/docs/api/class-response#response-all-headers), header names are NOT
20694 |    * lower-cased. Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times.
20695 |    */
20696 |   headersArray(): Promise<Array<{
20697 |     /**
20698 |      * Name of the header.
20699 |      */
20700 |     name: string;
20701 | 
20702 |     /**
20703 |      * Value of the header.
20704 |      */
20705 |     value: string;
20706 |   }>>;
20707 | 
20708 |   /**
20709 |    * Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same
20710 |    * name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\n` separator is
20711 |    * used. If no headers are found, `null` is returned.
20712 |    * @param name Name of the header.
20713 |    */
20714 |   headerValue(name: string): Promise<null|string>;
20715 | 
20716 |   /**
20717 |    * Returns all values of the headers matching the name, for example `set-cookie`. The name is case-insensitive.
20718 |    * @param name Name of the header.
20719 |    */
20720 |   headerValues(name: string): Promise<Array<string>>;
20721 | 
20722 |   /**
20723 |    * Returns the JSON representation of response body.
20724 |    *
20725 |    * This method will throw if the response body is not parsable via `JSON.parse`.
20726 |    */
20727 |   json(): Promise<Serializable>;
20728 | 
20729 |   /**
20730 |    * Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
20731 |    */
20732 |   ok(): boolean;
20733 | 
20734 |   /**
20735 |    * Returns the matching [Request](https://playwright.dev/docs/api/class-request) object.
20736 |    */
20737 |   request(): Request;
20738 | 
20739 |   /**
20740 |    * Returns SSL and other security information.
20741 |    */
20742 |   securityDetails(): Promise<null|{
20743 |     /**
20744 |      * Common Name component of the Issuer field. from the certificate. This should only be used for informational
20745 |      * purposes. Optional.
20746 |      */
20747 |     issuer?: string;
20748 | 
20749 |     /**
20750 |      * The specific TLS protocol used. (e.g. `TLS 1.3`). Optional.
20751 |      */
20752 |     protocol?: string;
20753 | 
20754 |     /**
20755 |      * Common Name component of the Subject field from the certificate. This should only be used for informational
20756 |      * purposes. Optional.
20757 |      */
20758 |     subjectName?: string;
20759 | 
20760 |     /**
20761 |      * Unix timestamp (in seconds) specifying when this cert becomes valid. Optional.
20762 |      */
20763 |     validFrom?: number;
20764 | 
20765 |     /**
20766 |      * Unix timestamp (in seconds) specifying when this cert becomes invalid. Optional.
20767 |      */
20768 |     validTo?: number;
20769 |   }>;
20770 | 
20771 |   /**
20772 |    * Returns the IP address and port of the server.
20773 |    */
20774 |   serverAddr(): Promise<null|{
20775 |     /**
20776 |      * IPv4 or IPV6 address of the server.
20777 |      */
20778 |     ipAddress: string;
20779 | 
20780 |     port: number;
20781 |   }>;
20782 | 
20783 |   /**
20784 |    * Contains the status code of the response (e.g., 200 for a success).
20785 |    */
20786 |   status(): number;
20787 | 
20788 |   /**
20789 |    * Contains the status text of the response (e.g. usually an "OK" for a success).
20790 |    */
20791 |   statusText(): string;
20792 | 
20793 |   /**
20794 |    * Returns the text representation of response body.
20795 |    */
20796 |   text(): Promise<string>;
20797 | 
20798 |   /**
20799 |    * Contains the URL of the response.
20800 |    */
20801 |   url(): string;
20802 | }
20803 | 
20804 | /**
20805 |  * Whenever a network route is set up with
20806 |  * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
20807 |  * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route),
20808 |  * the `Route` object allows to handle the route.
20809 |  *
20810 |  * Learn more about [networking](https://playwright.dev/docs/network).
20811 |  */
20812 | export interface Route {
20813 |   /**
20814 |    * Aborts the route's request.
20815 |    * @param errorCode Optional error code. Defaults to `failed`, could be one of the following:
20816 |    * - `'aborted'` - An operation was aborted (due to user action)
20817 |    * - `'accessdenied'` - Permission to access a resource, other than the network, was denied
20818 |    * - `'addressunreachable'` - The IP address is unreachable. This usually means that there is no route to the
20819 |    * specified host or network.
20820 |    * - `'blockedbyclient'` - The client chose to block the request.
20821 |    * - `'blockedbyresponse'` - The request failed because the response was delivered along with requirements which are
20822 |    * not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance).
20823 |    * - `'connectionaborted'` - A connection timed out as a result of not receiving an ACK for data sent.
20824 |    * - `'connectionclosed'` - A connection was closed (corresponding to a TCP FIN).
20825 |    * - `'connectionfailed'` - A connection attempt failed.
20826 |    * - `'connectionrefused'` - A connection attempt was refused.
20827 |    * - `'connectionreset'` - A connection was reset (corresponding to a TCP RST).
20828 |    * - `'internetdisconnected'` - The Internet connection has been lost.
20829 |    * - `'namenotresolved'` - The host name could not be resolved.
20830 |    * - `'timedout'` - An operation timed out.
20831 |    * - `'failed'` - A generic failure occurred.
20832 |    */
20833 |   abort(errorCode?: string): Promise<void>;
20834 | 
20835 |   /**
20836 |    * Sends route's request to the network with optional overrides.
20837 |    *
20838 |    * **Usage**
20839 |    *
20840 |    * ```js
20841 |    * await page.route('**\/*', async (route, request) => {
20842 |    *   // Override headers
20843 |    *   const headers = {
20844 |    *     ...request.headers(),
20845 |    *     foo: 'foo-value', // set "foo" header
20846 |    *     bar: undefined, // remove "bar" header
20847 |    *   };
20848 |    *   await route.continue({ headers });
20849 |    * });
20850 |    * ```
20851 |    *
20852 |    * **Details**
20853 |    *
20854 |    * The [`headers`](https://playwright.dev/docs/api/class-route#route-continue-option-headers) option applies to both
20855 |    * the routed request and any redirects it initiates. However,
20856 |    * [`url`](https://playwright.dev/docs/api/class-route#route-continue-option-url),
20857 |    * [`method`](https://playwright.dev/docs/api/class-route#route-continue-option-method), and
20858 |    * [`postData`](https://playwright.dev/docs/api/class-route#route-continue-option-post-data) only apply to the
20859 |    * original request and are not carried over to redirected requests.
20860 |    *
20861 |    * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) will immediately send the
20862 |    * request to the network, other matching handlers won't be invoked. Use
20863 |    * [route.fallback([options])](https://playwright.dev/docs/api/class-route#route-fallback) If you want next matching
20864 |    * handler in the chain to be invoked.
20865 |    *
20866 |    * **NOTE** Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`,
20867 |    * `Content-Length` and others, see
20868 |    * [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list). If an
20869 |    * override is provided for a forbidden header, it will be ignored and the original request header will be used.
20870 |    *
20871 |    * To set custom cookies, use
20872 |    * [browserContext.addCookies(cookies)](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-cookies).
20873 |    *
20874 |    * @param options
20875 |    */
20876 |   continue(options?: {
20877 |     /**
20878 |      * If set changes the request HTTP headers. Header values will be converted to a string.
20879 |      */
20880 |     headers?: { [key: string]: string; };
20881 | 
20882 |     /**
20883 |      * If set changes the request method (e.g. GET or POST).
20884 |      */
20885 |     method?: string;
20886 | 
20887 |     /**
20888 |      * If set changes the post data of request.
20889 |      */
20890 |     postData?: string|Buffer|Serializable;
20891 | 
20892 |     /**
20893 |      * If set changes the request URL. New URL must have same protocol as original one.
20894 |      */
20895 |     url?: string;
20896 |   }): Promise<void>;
20897 | 
20898 |   /**
20899 |    * Continues route's request with optional overrides. The method is similar to
20900 |    * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) with the difference that
20901 |    * other matching handlers will be invoked before sending the request.
20902 |    *
20903 |    * **Usage**
20904 |    *
20905 |    * When several routes match the given pattern, they run in the order opposite to their registration. That way the
20906 |    * last registered route can always override all the previous ones. In the example below, request will be handled by
20907 |    * the bottom-most handler first, then it'll fall back to the previous one and in the end will be aborted by the first
20908 |    * registered route.
20909 |    *
20910 |    * ```js
20911 |    * await page.route('**\/*', async route => {
20912 |    *   // Runs last.
20913 |    *   await route.abort();
20914 |    * });
20915 |    * await page.route('**\/*', async route => {
20916 |    *   // Runs second.
20917 |    *   await route.fallback();
20918 |    * });
20919 |    * await page.route('**\/*', async route => {
20920 |    *   // Runs first.
20921 |    *   await route.fallback();
20922 |    * });
20923 |    * ```
20924 |    *
20925 |    * Registering multiple routes is useful when you want separate handlers to handle different kinds of requests, for
20926 |    * example API calls vs page resources or GET requests vs POST requests as in the example below.
20927 |    *
20928 |    * ```js
20929 |    * // Handle GET requests.
20930 |    * await page.route('**\/*', async route => {
20931 |    *   if (route.request().method() !== 'GET') {
20932 |    *     await route.fallback();
20933 |    *     return;
20934 |    *   }
20935 |    *   // Handling GET only.
20936 |    *   // ...
20937 |    * });
20938 |    *
20939 |    * // Handle POST requests.
20940 |    * await page.route('**\/*', async route => {
20941 |    *   if (route.request().method() !== 'POST') {
20942 |    *     await route.fallback();
20943 |    *     return;
20944 |    *   }
20945 |    *   // Handling POST only.
20946 |    *   // ...
20947 |    * });
20948 |    * ```
20949 |    *
20950 |    * One can also modify request while falling back to the subsequent handler, that way intermediate route handler can
20951 |    * modify url, method, headers and postData of the request.
20952 |    *
20953 |    * ```js
20954 |    * await page.route('**\/*', async (route, request) => {
20955 |    *   // Override headers
20956 |    *   const headers = {
20957 |    *     ...request.headers(),
20958 |    *     foo: 'foo-value', // set "foo" header
20959 |    *     bar: undefined, // remove "bar" header
20960 |    *   };
20961 |    *   await route.fallback({ headers });
20962 |    * });
20963 |    * ```
20964 |    *
20965 |    * Use [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) to immediately send the
20966 |    * request to the network, other matching handlers won't be invoked in that case.
20967 |    * @param options
20968 |    */
20969 |   fallback(options?: {
20970 |     /**
20971 |      * If set changes the request HTTP headers. Header values will be converted to a string.
20972 |      */
20973 |     headers?: { [key: string]: string; };
20974 | 
20975 |     /**
20976 |      * If set changes the request method (e.g. GET or POST).
20977 |      */
20978 |     method?: string;
20979 | 
20980 |     /**
20981 |      * If set changes the post data of request.
20982 |      */
20983 |     postData?: string|Buffer|Serializable;
20984 | 
20985 |     /**
20986 |      * If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the
20987 |      * route matching, all the routes are matched using the original request URL.
20988 |      */
20989 |     url?: string;
20990 |   }): Promise<void>;
20991 | 
20992 |   /**
20993 |    * Performs the request and fetches result without fulfilling it, so that the response could be modified and then
20994 |    * fulfilled.
20995 |    *
20996 |    * **Usage**
20997 |    *
20998 |    * ```js
20999 |    * await page.route('https://dog.ceo/api/breeds/list/all', async route => {
21000 |    *   const response = await route.fetch();
21001 |    *   const json = await response.json();
21002 |    *   json.message['big_red_dog'] = [];
21003 |    *   await route.fulfill({ response, json });
21004 |    * });
21005 |    * ```
21006 |    *
21007 |    * **Details**
21008 |    *
21009 |    * Note that [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) option will apply to
21010 |    * the fetched request as well as any redirects initiated by it. If you want to only apply
21011 |    * [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) to the original request, but
21012 |    * not to redirects, look into [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue)
21013 |    * instead.
21014 |    * @param options
21015 |    */
21016 |   fetch(options?: {
21017 |     /**
21018 |      * If set changes the request HTTP headers. Header values will be converted to a string.
21019 |      */
21020 |     headers?: { [key: string]: string; };
21021 | 
21022 |     /**
21023 |      * Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
21024 |      * exceeded. Defaults to `20`. Pass `0` to not follow redirects.
21025 |      */
21026 |     maxRedirects?: number;
21027 | 
21028 |     /**
21029 |      * Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
21030 |      * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
21031 |      */
21032 |     maxRetries?: number;
21033 | 
21034 |     /**
21035 |      * If set changes the request method (e.g. GET or POST).
21036 |      */
21037 |     method?: string;
21038 | 
21039 |     /**
21040 |      * Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string
21041 |      * and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type`
21042 |      * header will be set to `application/octet-stream` if not explicitly set.
21043 |      */
21044 |     postData?: string|Buffer|Serializable;
21045 | 
21046 |     /**
21047 |      * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
21048 |      */
21049 |     timeout?: number;
21050 | 
21051 |     /**
21052 |      * If set changes the request URL. New URL must have same protocol as original one.
21053 |      */
21054 |     url?: string;
21055 |   }): Promise<APIResponse>;
21056 | 
21057 |   /**
21058 |    * Fulfills route's request with given response.
21059 |    *
21060 |    * **Usage**
21061 |    *
21062 |    * An example of fulfilling all requests with 404 responses:
21063 |    *
21064 |    * ```js
21065 |    * await page.route('**\/*', async route => {
21066 |    *   await route.fulfill({
21067 |    *     status: 404,
21068 |    *     contentType: 'text/plain',
21069 |    *     body: 'Not Found!'
21070 |    *   });
21071 |    * });
21072 |    * ```
21073 |    *
21074 |    * An example of serving static file:
21075 |    *
21076 |    * ```js
21077 |    * await page.route('**\/xhr_endpoint', route => route.fulfill({ path: 'mock_data.json' }));
21078 |    * ```
21079 |    *
21080 |    * @param options
21081 |    */
21082 |   fulfill(options?: {
21083 |     /**
21084 |      * Response body.
21085 |      */
21086 |     body?: string|Buffer;
21087 | 
21088 |     /**
21089 |      * If set, equals to setting `Content-Type` response header.
21090 |      */
21091 |     contentType?: string;
21092 | 
21093 |     /**
21094 |      * Response headers. Header values will be converted to a string.
21095 |      */
21096 |     headers?: { [key: string]: string; };
21097 | 
21098 |     /**
21099 |      * JSON response. This method will set the content type to `application/json` if not set.
21100 |      */
21101 |     json?: Serializable;
21102 | 
21103 |     /**
21104 |      * File path to respond with. The content type will be inferred from file extension. If `path` is a relative path,
21105 |      * then it is resolved relative to the current working directory.
21106 |      */
21107 |     path?: string;
21108 | 
21109 |     /**
21110 |      * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) to fulfill route's request with. Individual fields
21111 |      * of the response (such as headers) can be overridden using fulfill options.
21112 |      */
21113 |     response?: APIResponse;
21114 | 
21115 |     /**
21116 |      * Response status code, defaults to `200`.
21117 |      */
21118 |     status?: number;
21119 |   }): Promise<void>;
21120 | 
21121 |   /**
21122 |    * A request to be routed.
21123 |    */
21124 |   request(): Request;
21125 | }
21126 | 
21127 | /**
21128 |  * Selectors can be used to install custom selector engines. See [extensibility](https://playwright.dev/docs/extensibility) for more
21129 |  * information.
21130 |  */
21131 | export interface Selectors {
21132 |   /**
21133 |    * Selectors must be registered before creating the page.
21134 |    *
21135 |    * **Usage**
21136 |    *
21137 |    * An example of registering selector engine that queries elements based on a tag name:
21138 |    *
21139 |    * ```js
21140 |    * const { selectors, firefox } = require('@playwright/test');  // Or 'chromium' or 'webkit'.
21141 |    *
21142 |    * (async () => {
21143 |    *   // Must be a function that evaluates to a selector engine instance.
21144 |    *   const createTagNameEngine = () => ({
21145 |    *     // Returns the first element matching given selector in the root's subtree.
21146 |    *     query(root, selector) {
21147 |    *       return root.querySelector(selector);
21148 |    *     },
21149 |    *
21150 |    *     // Returns all elements matching given selector in the root's subtree.
21151 |    *     queryAll(root, selector) {
21152 |    *       return Array.from(root.querySelectorAll(selector));
21153 |    *     }
21154 |    *   });
21155 |    *
21156 |    *   // Register the engine. Selectors will be prefixed with "tag=".
21157 |    *   await selectors.register('tag', createTagNameEngine);
21158 |    *
21159 |    *   const browser = await firefox.launch();
21160 |    *   const page = await browser.newPage();
21161 |    *   await page.setContent(`<div><button>Click me</button></div>`);
21162 |    *
21163 |    *   // Use the selector prefixed with its name.
21164 |    *   const button = page.locator('tag=button');
21165 |    *   // We can combine it with built-in locators.
21166 |    *   await page.locator('tag=div').getByText('Click me').click();
21167 |    *   // Can use it in any methods supporting selectors.
21168 |    *   const buttonCount = await page.locator('tag=button').count();
21169 |    *
21170 |    *   await browser.close();
21171 |    * })();
21172 |    * ```
21173 |    *
21174 |    * @param name Name that is used in selectors as a prefix, e.g. `{name: 'foo'}` enables `foo=myselectorbody` selectors. May only
21175 |    * contain `[a-zA-Z0-9_]` characters.
21176 |    * @param script Script that evaluates to a selector engine instance. The script is evaluated in the page context.
21177 |    * @param options
21178 |    */
21179 |   register(name: string, script: Function|string|{
21180 |     /**
21181 |      * Path to the JavaScript file. If `path` is a relative path, then it is resolved relative to the current working
21182 |      * directory. Optional.
21183 |      */
21184 |     path?: string;
21185 | 
21186 |     /**
21187 |      * Raw script content. Optional.
21188 |      */
21189 |     content?: string;
21190 |   }, options?: {
21191 |     /**
21192 |      * Whether to run this selector engine in isolated JavaScript environment. This environment has access to the same
21193 |      * DOM, but not any JavaScript objects from the frame's scripts. Defaults to `false`. Note that running as a content
21194 |      * script is not guaranteed when this engine is used together with other registered engines.
21195 |      */
21196 |     contentScript?: boolean;
21197 |   }): Promise<void>;
21198 | 
21199 |   /**
21200 |    * Defines custom attribute name to be used in
21201 |    * [page.getByTestId(testId)](https://playwright.dev/docs/api/class-page#page-get-by-test-id). `data-testid` is used
21202 |    * by default.
21203 |    * @param attributeName Test id attribute name.
21204 |    */
21205 |   setTestIdAttribute(attributeName: string): void;
21206 | }
21207 | 
21208 | /**
21209 |  * The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on
21210 |  * the touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
21211 |  *
21212 |  * This class is limited to emulating tap gestures. For examples of other gestures simulated by manually dispatching
21213 |  * touch events, see the [emulating legacy touch events](https://playwright.dev/docs/touch-events) page.
21214 |  */
21215 | export interface Touchscreen {
21216 |   /**
21217 |    * Dispatches a `touchstart` and `touchend` event with a single touch at the position
21218 |    * ([`x`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-x),[`y`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-y)).
21219 |    *
21220 |    * **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
21221 |    * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
21222 |    * browser context is false.
21223 |    *
21224 |    * @param x X coordinate relative to the main frame's viewport in CSS pixels.
21225 |    * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
21226 |    */
21227 |   tap(x: number, y: number): Promise<void>;
21228 | }
21229 | 
21230 | /**
21231 |  * API for collecting and saving Playwright traces. Playwright traces can be opened in
21232 |  * [Trace Viewer](https://playwright.dev/docs/trace-viewer) after Playwright script runs.
21233 |  *
21234 |  * **NOTE** You probably want to
21235 |  * [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead
21236 |  * of using `context.tracing`.
21237 |  *
21238 |  * The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions
21239 |  * (like `expect` calls). We recommend
21240 |  * [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace),
21241 |  * which includes those assertions and provides a more complete trace for debugging test failures.
21242 |  *
21243 |  * Start recording a trace before performing actions. At the end, stop tracing and save it to a file.
21244 |  *
21245 |  * ```js
21246 |  * const browser = await chromium.launch();
21247 |  * const context = await browser.newContext();
21248 |  * await context.tracing.start({ screenshots: true, snapshots: true });
21249 |  * const page = await context.newPage();
21250 |  * await page.goto('https://playwright.dev');
21251 |  * expect(page.url()).toBe('https://playwright.dev');
21252 |  * await context.tracing.stop({ path: 'trace.zip' });
21253 |  * ```
21254 |  *
21255 |  */
21256 | export interface Tracing {
21257 |   /**
21258 |    * **NOTE** Use `test.step` instead when available.
21259 |    *
21260 |    * Creates a new group within the trace, assigning any subsequent API calls to this group, until
21261 |    * [tracing.groupEnd()](https://playwright.dev/docs/api/class-tracing#tracing-group-end) is called. Groups can be
21262 |    * nested and will be visible in the trace viewer.
21263 |    *
21264 |    * **Usage**
21265 |    *
21266 |    * ```js
21267 |    * // use test.step instead
21268 |    * await test.step('Log in', async () => {
21269 |    *   // ...
21270 |    * });
21271 |    * ```
21272 |    *
21273 |    * @param name Group name shown in the trace viewer.
21274 |    * @param options
21275 |    */
21276 |   group(name: string, options?: {
21277 |     /**
21278 |      * Specifies a custom location for the group to be shown in the trace viewer. Defaults to the location of the
21279 |      * [tracing.group(name[, options])](https://playwright.dev/docs/api/class-tracing#tracing-group) call.
21280 |      */
21281 |     location?: {
21282 |       file: string;
21283 | 
21284 |       line?: number;
21285 | 
21286 |       column?: number;
21287 |     };
21288 |   }): Promise<void>;
21289 | 
21290 |   /**
21291 |    * Closes the last group created by
21292 |    * [tracing.group(name[, options])](https://playwright.dev/docs/api/class-tracing#tracing-group).
21293 |    */
21294 |   groupEnd(): Promise<void>;
21295 | 
21296 |   /**
21297 |    * Start tracing.
21298 |    *
21299 |    * **NOTE** You probably want to
21300 |    * [enable tracing in your config file](https://playwright.dev/docs/api/class-testoptions#test-options-trace) instead
21301 |    * of using `Tracing.start`.
21302 |    *
21303 |    * The `context.tracing` API captures browser operations and network activity, but it doesn't record test assertions
21304 |    * (like `expect` calls). We recommend
21305 |    * [enabling tracing through Playwright Test configuration](https://playwright.dev/docs/api/class-testoptions#test-options-trace),
21306 |    * which includes those assertions and provides a more complete trace for debugging test failures.
21307 |    *
21308 |    * **Usage**
21309 |    *
21310 |    * ```js
21311 |    * await context.tracing.start({ screenshots: true, snapshots: true });
21312 |    * const page = await context.newPage();
21313 |    * await page.goto('https://playwright.dev');
21314 |    * expect(page.url()).toBe('https://playwright.dev');
21315 |    * await context.tracing.stop({ path: 'trace.zip' });
21316 |    * ```
21317 |    *
21318 |    * @param options
21319 |    */
21320 |   start(options?: {
21321 |     /**
21322 |      * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
21323 |      * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
21324 |      * specified in
21325 |      * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
21326 |      * the final trace zip file name, you need to pass `path` option to
21327 |      * [tracing.stop([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop) instead.
21328 |      */
21329 |     name?: string;
21330 | 
21331 |     /**
21332 |      * Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
21333 |      */
21334 |     screenshots?: boolean;
21335 | 
21336 |     /**
21337 |      * If this option is true tracing will
21338 |      * - capture DOM snapshot on every action
21339 |      * - record network activity
21340 |      */
21341 |     snapshots?: boolean;
21342 | 
21343 |     /**
21344 |      * Whether to include source files for trace actions.
21345 |      */
21346 |     sources?: boolean;
21347 | 
21348 |     /**
21349 |      * Trace name to be shown in the Trace Viewer.
21350 |      */
21351 |     title?: string;
21352 |   }): Promise<void>;
21353 | 
21354 |   /**
21355 |    * Start a new trace chunk. If you'd like to record multiple traces on the same
21356 |    * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), use
21357 |    * [tracing.start([options])](https://playwright.dev/docs/api/class-tracing#tracing-start) once, and then create
21358 |    * multiple trace chunks with
21359 |    * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) and
21360 |    * [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk).
21361 |    *
21362 |    * **Usage**
21363 |    *
21364 |    * ```js
21365 |    * await context.tracing.start({ screenshots: true, snapshots: true });
21366 |    * const page = await context.newPage();
21367 |    * await page.goto('https://playwright.dev');
21368 |    *
21369 |    * await context.tracing.startChunk();
21370 |    * await page.getByText('Get Started').click();
21371 |    * // Everything between startChunk and stopChunk will be recorded in the trace.
21372 |    * await context.tracing.stopChunk({ path: 'trace1.zip' });
21373 |    *
21374 |    * await context.tracing.startChunk();
21375 |    * await page.goto('http://example.com');
21376 |    * // Save a second trace file with different actions.
21377 |    * await context.tracing.stopChunk({ path: 'trace2.zip' });
21378 |    * ```
21379 |    *
21380 |    * @param options
21381 |    */
21382 |   startChunk(options?: {
21383 |     /**
21384 |      * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
21385 |      * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
21386 |      * specified in
21387 |      * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
21388 |      * the final trace zip file name, you need to pass `path` option to
21389 |      * [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk) instead.
21390 |      */
21391 |     name?: string;
21392 | 
21393 |     /**
21394 |      * Trace name to be shown in the Trace Viewer.
21395 |      */
21396 |     title?: string;
21397 |   }): Promise<void>;
21398 | 
21399 |   /**
21400 |    * Stop tracing.
21401 |    * @param options
21402 |    */
21403 |   stop(options?: {
21404 |     /**
21405 |      * Export trace into the file with the given path.
21406 |      */
21407 |     path?: string;
21408 |   }): Promise<void>;
21409 | 
21410 |   /**
21411 |    * Stop the trace chunk. See
21412 |    * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) for more details
21413 |    * about multiple trace chunks.
21414 |    * @param options
21415 |    */
21416 |   stopChunk(options?: {
21417 |     /**
21418 |      * Export trace collected since the last
21419 |      * [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) call into the
21420 |      * file with the given path.
21421 |      */
21422 |     path?: string;
21423 |   }): Promise<void>;
21424 | }
21425 | 
21426 | /**
21427 |  * When browser context is created with the `recordVideo` option, each page has a video object associated with it.
21428 |  *
21429 |  * ```js
21430 |  * console.log(await page.video().path());
21431 |  * ```
21432 |  *
21433 |  */
21434 | export interface Video {
21435 |   /**
21436 |    * Deletes the video file. Will wait for the video to finish if necessary.
21437 |    */
21438 |   delete(): Promise<void>;
21439 | 
21440 |   /**
21441 |    * Returns the file system path this video will be recorded to. The video is guaranteed to be written to the
21442 |    * filesystem upon closing the browser context. This method throws when connected remotely.
21443 |    */
21444 |   path(): Promise<string>;
21445 | 
21446 |   /**
21447 |    * Saves the video to a user-specified path. It is safe to call this method while the video is still in progress, or
21448 |    * after the page has closed. This method waits until the page is closed and the video is fully saved.
21449 |    * @param path Path where the video should be saved.
21450 |    */
21451 |   saveAs(path: string): Promise<void>;
21452 | }
21453 | 
21454 | /**
21455 |  * [WebError](https://playwright.dev/docs/api/class-weberror) class represents an unhandled exception thrown in the
21456 |  * page. It is dispatched via the
21457 |  * [browserContext.on('weberror')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-web-error)
21458 |  * event.
21459 |  *
21460 |  * ```js
21461 |  * // Log all uncaught errors to the terminal
21462 |  * context.on('weberror', webError => {
21463 |  *   console.log(`Uncaught exception: "${webError.error()}"`);
21464 |  * });
21465 |  *
21466 |  * // Navigate to a page with an exception.
21467 |  * await page.goto('data:text/html,<script>throw new Error("Test")</script>');
21468 |  * ```
21469 |  *
21470 |  */
21471 | export interface WebError {
21472 |   /**
21473 |    * Unhandled error that was thrown.
21474 |    */
21475 |   error(): Error;
21476 | 
21477 |   /**
21478 |    * The page that produced this unhandled exception, if any.
21479 |    */
21480 |   page(): null|Page;
21481 | }
21482 | 
21483 | /**
21484 |  * The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents WebSocket connections within a
21485 |  * page. It provides the ability to inspect and manipulate the data being transmitted and received.
21486 |  *
21487 |  * If you want to intercept or modify WebSocket frames, consider using
21488 |  * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute).
21489 |  */
21490 | export interface WebSocket {
21491 |   /**
21492 |    * Fired when the websocket closes.
21493 |    */
21494 |   on(event: 'close', listener: (webSocket: WebSocket) => any): this;
21495 | 
21496 |   /**
21497 |    * Fired when the websocket receives a frame.
21498 |    */
21499 |   on(event: 'framereceived', listener: (data: {
21500 |     /**
21501 |      * frame payload
21502 |      */
21503 |     payload: string|Buffer;
21504 |   }) => any): this;
21505 | 
21506 |   /**
21507 |    * Fired when the websocket sends a frame.
21508 |    */
21509 |   on(event: 'framesent', listener: (data: {
21510 |     /**
21511 |      * frame payload
21512 |      */
21513 |     payload: string|Buffer;
21514 |   }) => any): this;
21515 | 
21516 |   /**
21517 |    * Fired when the websocket has an error.
21518 |    */
21519 |   on(event: 'socketerror', listener: (string: string) => any): this;
21520 | 
21521 |   /**
21522 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21523 |    */
21524 |   once(event: 'close', listener: (webSocket: WebSocket) => any): this;
21525 | 
21526 |   /**
21527 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21528 |    */
21529 |   once(event: 'framereceived', listener: (data: {
21530 |     /**
21531 |      * frame payload
21532 |      */
21533 |     payload: string|Buffer;
21534 |   }) => any): this;
21535 | 
21536 |   /**
21537 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21538 |    */
21539 |   once(event: 'framesent', listener: (data: {
21540 |     /**
21541 |      * frame payload
21542 |      */
21543 |     payload: string|Buffer;
21544 |   }) => any): this;
21545 | 
21546 |   /**
21547 |    * Adds an event listener that will be automatically removed after it is triggered once. See `addListener` for more information about this event.
21548 |    */
21549 |   once(event: 'socketerror', listener: (string: string) => any): this;
21550 | 
21551 |   /**
21552 |    * Fired when the websocket closes.
21553 |    */
21554 |   addListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21555 | 
21556 |   /**
21557 |    * Fired when the websocket receives a frame.
21558 |    */
21559 |   addListener(event: 'framereceived', listener: (data: {
21560 |     /**
21561 |      * frame payload
21562 |      */
21563 |     payload: string|Buffer;
21564 |   }) => any): this;
21565 | 
21566 |   /**
21567 |    * Fired when the websocket sends a frame.
21568 |    */
21569 |   addListener(event: 'framesent', listener: (data: {
21570 |     /**
21571 |      * frame payload
21572 |      */
21573 |     payload: string|Buffer;
21574 |   }) => any): this;
21575 | 
21576 |   /**
21577 |    * Fired when the websocket has an error.
21578 |    */
21579 |   addListener(event: 'socketerror', listener: (string: string) => any): this;
21580 | 
21581 |   /**
21582 |    * Removes an event listener added by `on` or `addListener`.
21583 |    */
21584 |   removeListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21585 | 
21586 |   /**
21587 |    * Removes an event listener added by `on` or `addListener`.
21588 |    */
21589 |   removeListener(event: 'framereceived', listener: (data: {
21590 |     /**
21591 |      * frame payload
21592 |      */
21593 |     payload: string|Buffer;
21594 |   }) => any): this;
21595 | 
21596 |   /**
21597 |    * Removes an event listener added by `on` or `addListener`.
21598 |    */
21599 |   removeListener(event: 'framesent', listener: (data: {
21600 |     /**
21601 |      * frame payload
21602 |      */
21603 |     payload: string|Buffer;
21604 |   }) => any): this;
21605 | 
21606 |   /**
21607 |    * Removes an event listener added by `on` or `addListener`.
21608 |    */
21609 |   removeListener(event: 'socketerror', listener: (string: string) => any): this;
21610 | 
21611 |   /**
21612 |    * Removes an event listener added by `on` or `addListener`.
21613 |    */
21614 |   off(event: 'close', listener: (webSocket: WebSocket) => any): this;
21615 | 
21616 |   /**
21617 |    * Removes an event listener added by `on` or `addListener`.
21618 |    */
21619 |   off(event: 'framereceived', listener: (data: {
21620 |     /**
21621 |      * frame payload
21622 |      */
21623 |     payload: string|Buffer;
21624 |   }) => any): this;
21625 | 
21626 |   /**
21627 |    * Removes an event listener added by `on` or `addListener`.
21628 |    */
21629 |   off(event: 'framesent', listener: (data: {
21630 |     /**
21631 |      * frame payload
21632 |      */
21633 |     payload: string|Buffer;
21634 |   }) => any): this;
21635 | 
21636 |   /**
21637 |    * Removes an event listener added by `on` or `addListener`.
21638 |    */
21639 |   off(event: 'socketerror', listener: (string: string) => any): this;
21640 | 
21641 |   /**
21642 |    * Fired when the websocket closes.
21643 |    */
21644 |   prependListener(event: 'close', listener: (webSocket: WebSocket) => any): this;
21645 | 
21646 |   /**
21647 |    * Fired when the websocket receives a frame.
21648 |    */
21649 |   prependListener(event: 'framereceived', listener: (data: {
21650 |     /**
21651 |      * frame payload
21652 |      */
21653 |     payload: string|Buffer;
21654 |   }) => any): this;
21655 | 
21656 |   /**
21657 |    * Fired when the websocket sends a frame.
21658 |    */
21659 |   prependListener(event: 'framesent', listener: (data: {
21660 |     /**
21661 |      * frame payload
21662 |      */
21663 |     payload: string|Buffer;
21664 |   }) => any): this;
21665 | 
21666 |   /**
21667 |    * Fired when the websocket has an error.
21668 |    */
21669 |   prependListener(event: 'socketerror', listener: (string: string) => any): this;
21670 | 
21671 |   /**
21672 |    * Indicates that the web socket has been closed.
21673 |    */
21674 |   isClosed(): boolean;
21675 | 
21676 |   /**
21677 |    * Contains the URL of the WebSocket.
21678 |    */
21679 |   url(): string;
21680 | 
21681 |   /**
21682 |    * Fired when the websocket closes.
21683 |    */
21684 |   waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
21685 | 
21686 |   /**
21687 |    * Fired when the websocket receives a frame.
21688 |    */
21689 |   waitForEvent(event: 'framereceived', optionsOrPredicate?: { predicate?: (data: {
21690 |     /**
21691 |      * frame payload
21692 |      */
21693 |     payload: string|Buffer;
21694 |   }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
21695 |     /**
21696 |      * frame payload
21697 |      */
21698 |     payload: string|Buffer;
21699 |   }) => boolean | Promise<boolean>)): Promise<{
21700 |     /**
21701 |      * frame payload
21702 |      */
21703 |     payload: string|Buffer;
21704 |   }>;
21705 | 
21706 |   /**
21707 |    * Fired when the websocket sends a frame.
21708 |    */
21709 |   waitForEvent(event: 'framesent', optionsOrPredicate?: { predicate?: (data: {
21710 |     /**
21711 |      * frame payload
21712 |      */
21713 |     payload: string|Buffer;
21714 |   }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
21715 |     /**
21716 |      * frame payload
21717 |      */
21718 |     payload: string|Buffer;
21719 |   }) => boolean | Promise<boolean>)): Promise<{
21720 |     /**
21721 |      * frame payload
21722 |      */
21723 |     payload: string|Buffer;
21724 |   }>;
21725 | 
21726 |   /**
21727 |    * Fired when the websocket has an error.
21728 |    */
21729 |   waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: string) => boolean | Promise<boolean>, timeout?: number } | ((string: string) => boolean | Promise<boolean>)): Promise<string>;
21730 | 
21731 | }
21732 | 
21733 | export interface LaunchOptions {
21734 |   /**
21735 |    * **NOTE** Use custom browser args at your own risk, as some of them may break Playwright functionality.
21736 |    *
21737 |    * Additional arguments to pass to the browser instance. The list of Chromium flags can be found
21738 |    * [here](https://peter.sh/experiments/chromium-command-line-switches/).
21739 |    */
21740 |   args?: Array<string>;
21741 | 
21742 |   /**
21743 |    * Browser distribution channel.
21744 |    *
21745 |    * Use "chromium" to [opt in to new headless mode](https://playwright.dev/docs/browsers#chromium-new-headless-mode).
21746 |    *
21747 |    * Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or
21748 |    * "msedge-canary" to use branded [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
21749 |    */
21750 |   channel?: string;
21751 | 
21752 |   /**
21753 |    * Enable Chromium sandboxing. Defaults to `false`.
21754 |    */
21755 |   chromiumSandbox?: boolean;
21756 | 
21757 |   /**
21758 |    * If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and
21759 |    * is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were
21760 |    * created in is closed.
21761 |    */
21762 |   downloadsPath?: string;
21763 | 
21764 |   env?: { [key: string]: string|undefined; };
21765 | 
21766 |   /**
21767 |    * Path to a browser executable to run instead of the bundled one. If
21768 |    * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path) is
21769 |    * a relative path, then it is resolved relative to the current working directory. Note that Playwright only works
21770 |    * with the bundled Chromium, Firefox or WebKit, use at your own risk.
21771 |    */
21772 |   executablePath?: string;
21773 | 
21774 |   /**
21775 |    * Firefox user preferences. Learn more about the Firefox user preferences at
21776 |    * [`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
21777 |    *
21778 |    * You can also provide a path to a custom [`policies.json` file](https://mozilla.github.io/policy-templates/) via
21779 |    * `PLAYWRIGHT_FIREFOX_POLICIES_JSON` environment variable.
21780 |    */
21781 |   firefoxUserPrefs?: { [key: string]: string|number|boolean; };
21782 | 
21783 |   /**
21784 |    * Close the browser process on SIGHUP. Defaults to `true`.
21785 |    */
21786 |   handleSIGHUP?: boolean;
21787 | 
21788 |   /**
21789 |    * Close the browser process on Ctrl-C. Defaults to `true`.
21790 |    */
21791 |   handleSIGINT?: boolean;
21792 | 
21793 |   /**
21794 |    * Close the browser process on SIGTERM. Defaults to `true`.
21795 |    */
21796 |   handleSIGTERM?: boolean;
21797 | 
21798 |   /**
21799 |    * Whether to run browser in headless mode. More details for
21800 |    * [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
21801 |    * [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
21802 |    */
21803 |   headless?: boolean;
21804 | 
21805 |   /**
21806 |    * If `true`, Playwright does not pass its own configurations args and only uses the ones from
21807 |    * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-args). If an array is given,
21808 |    * then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
21809 |    */
21810 |   ignoreDefaultArgs?: boolean|Array<string>;
21811 | 
21812 |   /**
21813 |    * Logger sink for Playwright logging.
21814 |    * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
21815 |    */
21816 |   logger?: Logger;
21817 | 
21818 |   /**
21819 |    * Network proxy settings.
21820 |    */
21821 |   proxy?: {
21822 |     /**
21823 |      * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
21824 |      * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
21825 |      */
21826 |     server: string;
21827 | 
21828 |     /**
21829 |      * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
21830 |      */
21831 |     bypass?: string;
21832 | 
21833 |     /**
21834 |      * Optional username to use if HTTP proxy requires authentication.
21835 |      */
21836 |     username?: string;
21837 | 
21838 |     /**
21839 |      * Optional password to use if HTTP proxy requires authentication.
21840 |      */
21841 |     password?: string;
21842 |   };
21843 | 
21844 |   /**
21845 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21846 |    * on.
21847 |    */
21848 |   slowMo?: number;
21849 | 
21850 |   /**
21851 |    * Maximum time in milliseconds to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0`
21852 |    * to disable timeout.
21853 |    */
21854 |   timeout?: number;
21855 | 
21856 |   /**
21857 |    * If specified, traces are saved into this directory.
21858 |    */
21859 |   tracesDir?: string;
21860 | }
21861 | 
21862 | export interface ConnectOverCDPOptions {
21863 |   /**
21864 |    * @deprecated Use the first argument instead.
21865 |    */
21866 |   endpointURL?: string;
21867 | 
21868 |   /**
21869 |    * Additional HTTP headers to be sent with connect request. Optional.
21870 |    */
21871 |   headers?: { [key: string]: string; };
21872 | 
21873 |   /**
21874 |    * Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely
21875 |    * upon the file system being the same between Playwright and the Browser.
21876 |    */
21877 |   isLocal?: boolean;
21878 | 
21879 |   /**
21880 |    * Logger sink for Playwright logging. Optional.
21881 |    * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
21882 |    */
21883 |   logger?: Logger;
21884 | 
21885 |   /**
21886 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21887 |    * on. Defaults to 0.
21888 |    */
21889 |   slowMo?: number;
21890 | 
21891 |   /**
21892 |    * Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass
21893 |    * `0` to disable timeout.
21894 |    */
21895 |   timeout?: number;
21896 | }
21897 | 
21898 | export interface ConnectOptions {
21899 |   /**
21900 |    * This option exposes network available on the connecting client to the browser being connected to. Consists of a
21901 |    * list of rules separated by comma.
21902 |    *
21903 |    * Available rules:
21904 |    * 1. Hostname pattern, for example: `example.com`, `*.org:99`, `x.*.y.com`, `*foo.org`.
21905 |    * 1. IP literal, for example: `127.0.0.1`, `0.0.0.0:99`, `[::1]`, `[0:0::1]:99`.
21906 |    * 1. `<loopback>` that matches local loopback interfaces: `localhost`, `*.localhost`, `127.0.0.1`, `[::1]`.
21907 |    *
21908 |    * Some common examples:
21909 |    * 1. `"*"` to expose all network.
21910 |    * 1. `"<loopback>"` to expose localhost network.
21911 |    * 1. `"*.test.internal-domain,*.staging.internal-domain,<loopback>"` to expose test/staging deployments and
21912 |    *    localhost.
21913 |    */
21914 |   exposeNetwork?: string;
21915 | 
21916 |   /**
21917 |    * Additional HTTP headers to be sent with web socket connect request. Optional.
21918 |    */
21919 |   headers?: { [key: string]: string; };
21920 | 
21921 |   /**
21922 |    * Logger sink for Playwright logging. Optional.
21923 |    * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
21924 |    */
21925 |   logger?: Logger;
21926 | 
21927 |   /**
21928 |    * Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going
21929 |    * on. Defaults to 0.
21930 |    */
21931 |   slowMo?: number;
21932 | 
21933 |   /**
21934 |    * Maximum time in milliseconds to wait for the connection to be established. Defaults to `0` (no timeout).
21935 |    */
21936 |   timeout?: number;
21937 | }
21938 | 
21939 | export interface LocatorScreenshotOptions {
21940 |   /**
21941 |    * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
21942 |    * treatment depending on their duration:
21943 |    * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
21944 |    * - infinite animations are canceled to initial state, and then played over after the screenshot.
21945 |    *
21946 |    * Defaults to `"allow"` that leaves animations untouched.
21947 |    */
21948 |   animations?: "disabled"|"allow";
21949 | 
21950 |   /**
21951 |    * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
21952 |    * changed.  Defaults to `"hide"`.
21953 |    */
21954 |   caret?: "hide"|"initial";
21955 | 
21956 |   /**
21957 |    * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
21958 |    * box `#FF00FF` (customized by
21959 |    * [`maskColor`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-mask-color)) that completely
21960 |    * covers its bounding box. The mask is also applied to invisible elements, see
21961 |    * [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
21962 |    */
21963 |   mask?: Array<Locator>;
21964 | 
21965 |   /**
21966 |    * Specify the color of the overlay box for masked elements, in
21967 |    * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
21968 |    */
21969 |   maskColor?: string;
21970 | 
21971 |   /**
21972 |    * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
21973 |    * Defaults to `false`.
21974 |    */
21975 |   omitBackground?: boolean;
21976 | 
21977 |   /**
21978 |    * The file path to save the image to. The screenshot type will be inferred from file extension. If
21979 |    * [`path`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-path) is a relative path, then it
21980 |    * is resolved relative to the current working directory. If no path is provided, the image won't be saved to the
21981 |    * disk.
21982 |    */
21983 |   path?: string;
21984 | 
21985 |   /**
21986 |    * The quality of the image, between 0-100. Not applicable to `png` images.
21987 |    */
21988 |   quality?: number;
21989 | 
21990 |   /**
21991 |    * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
21992 |    * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
21993 |    * screenshots of high-dpi devices will be twice as large or even larger.
21994 |    *
21995 |    * Defaults to `"device"`.
21996 |    */
21997 |   scale?: "css"|"device";
21998 | 
21999 |   /**
22000 |    * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
22001 |    * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
22002 |    * the Shadow DOM and applies to the inner frames.
22003 |    */
22004 |   style?: string;
22005 | 
22006 |   /**
22007 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22008 |    * option in the config, or by using the
22009 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22010 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22011 |    */
22012 |   timeout?: number;
22013 | 
22014 |   /**
22015 |    * Specify screenshot type, defaults to `png`.
22016 |    */
22017 |   type?: "png"|"jpeg";
22018 | }
22019 | 
22020 | interface ElementHandleWaitForSelectorOptions {
22021 |   /**
22022 |    * Defaults to `'visible'`. Can be either:
22023 |    * - `'attached'` - wait for element to be present in DOM.
22024 |    * - `'detached'` - wait for element to not be present in DOM.
22025 |    * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
22026 |    *   without any content or with `display:none` has an empty bounding box and is not considered visible.
22027 |    * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
22028 |    *   `visibility:hidden`. This is opposite to the `'visible'` option.
22029 |    */
22030 |   state?: "attached"|"detached"|"visible"|"hidden";
22031 | 
22032 |   /**
22033 |    * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
22034 |    * element, the call throws an exception.
22035 |    */
22036 |   strict?: boolean;
22037 | 
22038 |   /**
22039 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22040 |    * option in the config, or by using the
22041 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22042 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22043 |    */
22044 |   timeout?: number;
22045 | }
22046 | 
22047 | export interface BrowserContextOptions {
22048 |   /**
22049 |    * Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
22050 |    */
22051 |   acceptDownloads?: boolean;
22052 | 
22053 |   /**
22054 |    * When using [page.goto(url[, options])](https://playwright.dev/docs/api/class-page#page-goto),
22055 |    * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route),
22056 |    * [page.waitForURL(url[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-url),
22057 |    * [page.waitForRequest(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-request),
22058 |    * or
22059 |    * [page.waitForResponse(urlOrPredicate[, options])](https://playwright.dev/docs/api/class-page#page-wait-for-response)
22060 |    * it takes the base URL in consideration by using the
22061 |    * [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
22062 |    * Unset by default. Examples:
22063 |    * - baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
22064 |    * - baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in
22065 |    *   `http://localhost:3000/foo/bar.html`
22066 |    * - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
22067 |    *   `http://localhost:3000/bar.html`
22068 |    */
22069 |   baseURL?: string;
22070 | 
22071 |   /**
22072 |    * Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
22073 |    */
22074 |   bypassCSP?: boolean;
22075 | 
22076 |   /**
22077 |    * TLS Client Authentication allows the server to request a client certificate and verify it.
22078 |    *
22079 |    * **Details**
22080 |    *
22081 |    * An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
22082 |    * a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
22083 |    * `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
22084 |    * with an exact match to the request origin that the certificate is valid for.
22085 |    *
22086 |    * Client certificate authentication is only active when at least one client certificate is provided. If you want to
22087 |    * reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
22088 |    * does not match any of the domains you plan to visit.
22089 |    *
22090 |    * **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
22091 |    * work by replacing `localhost` with `local.playwright`.
22092 |    *
22093 |    */
22094 |   clientCertificates?: Array<{
22095 |     /**
22096 |      * Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
22097 |      */
22098 |     origin: string;
22099 | 
22100 |     /**
22101 |      * Path to the file with the certificate in PEM format.
22102 |      */
22103 |     certPath?: string;
22104 | 
22105 |     /**
22106 |      * Direct value of the certificate in PEM format.
22107 |      */
22108 |     cert?: Buffer;
22109 | 
22110 |     /**
22111 |      * Path to the file with the private key in PEM format.
22112 |      */
22113 |     keyPath?: string;
22114 | 
22115 |     /**
22116 |      * Direct value of the private key in PEM format.
22117 |      */
22118 |     key?: Buffer;
22119 | 
22120 |     /**
22121 |      * Path to the PFX or PKCS12 encoded private key and certificate chain.
22122 |      */
22123 |     pfxPath?: string;
22124 | 
22125 |     /**
22126 |      * Direct value of the PFX or PKCS12 encoded private key and certificate chain.
22127 |      */
22128 |     pfx?: Buffer;
22129 | 
22130 |     /**
22131 |      * Passphrase for the private key (PEM or PFX).
22132 |      */
22133 |     passphrase?: string;
22134 |   }>;
22135 | 
22136 |   /**
22137 |    * Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
22138 |    * media feature, supported values are `'light'` and `'dark'`. See
22139 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
22140 |    * Passing `null` resets emulation to system defaults. Defaults to `'light'`.
22141 |    */
22142 |   colorScheme?: null|"light"|"dark"|"no-preference";
22143 | 
22144 |   /**
22145 |    * Emulates `'prefers-contrast'` media feature, supported values are `'no-preference'`, `'more'`. See
22146 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
22147 |    * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
22148 |    */
22149 |   contrast?: null|"no-preference"|"more";
22150 | 
22151 |   /**
22152 |    * Specify device scale factor (can be thought of as dpr). Defaults to `1`. Learn more about
22153 |    * [emulating devices with device scale factor](https://playwright.dev/docs/emulation#devices).
22154 |    */
22155 |   deviceScaleFactor?: number;
22156 | 
22157 |   /**
22158 |    * An object containing additional HTTP headers to be sent with every request. Defaults to none.
22159 |    */
22160 |   extraHTTPHeaders?: { [key: string]: string; };
22161 | 
22162 |   /**
22163 |    * Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See
22164 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
22165 |    * Passing `null` resets emulation to system defaults. Defaults to `'none'`.
22166 |    */
22167 |   forcedColors?: null|"active"|"none";
22168 | 
22169 |   geolocation?: Geolocation;
22170 | 
22171 |   /**
22172 |    * Specifies if viewport supports touch events. Defaults to false. Learn more about
22173 |    * [mobile emulation](https://playwright.dev/docs/emulation#devices).
22174 |    */
22175 |   hasTouch?: boolean;
22176 | 
22177 |   /**
22178 |    * Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
22179 |    * origin is specified, the username and password are sent to any servers upon unauthorized responses.
22180 |    */
22181 |   httpCredentials?: HTTPCredentials;
22182 | 
22183 |   /**
22184 |    * Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
22185 |    */
22186 |   ignoreHTTPSErrors?: boolean;
22187 | 
22188 |   /**
22189 |    * Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device,
22190 |    * so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more
22191 |    * about [mobile emulation](https://playwright.dev/docs/emulation#ismobile).
22192 |    */
22193 |   isMobile?: boolean;
22194 | 
22195 |   /**
22196 |    * Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about
22197 |    * [disabling JavaScript](https://playwright.dev/docs/emulation#javascript-enabled).
22198 |    */
22199 |   javaScriptEnabled?: boolean;
22200 | 
22201 |   /**
22202 |    * Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value,
22203 |    * `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default
22204 |    * locale. Learn more about emulation in our [emulation guide](https://playwright.dev/docs/emulation#locale--timezone).
22205 |    */
22206 |   locale?: string;
22207 | 
22208 |   /**
22209 |    * Logger sink for Playwright logging.
22210 |    * @deprecated The logs received by the logger are incomplete. Please use tracing instead.
22211 |    */
22212 |   logger?: Logger;
22213 | 
22214 |   /**
22215 |    * Whether to emulate network being offline. Defaults to `false`. Learn more about
22216 |    * [network emulation](https://playwright.dev/docs/emulation#offline).
22217 |    */
22218 |   offline?: boolean;
22219 | 
22220 |   /**
22221 |    * A list of permissions to grant to all pages in this context. See
22222 |    * [browserContext.grantPermissions(permissions[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions)
22223 |    * for more details. Defaults to none.
22224 |    */
22225 |   permissions?: Array<string>;
22226 | 
22227 |   /**
22228 |    * Network proxy settings to use with this context. Defaults to none.
22229 |    */
22230 |   proxy?: {
22231 |     /**
22232 |      * Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or
22233 |      * `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.
22234 |      */
22235 |     server: string;
22236 | 
22237 |     /**
22238 |      * Optional comma-separated domains to bypass proxy, for example `".com, chromium.org, .domain.com"`.
22239 |      */
22240 |     bypass?: string;
22241 | 
22242 |     /**
22243 |      * Optional username to use if HTTP proxy requires authentication.
22244 |      */
22245 |     username?: string;
22246 | 
22247 |     /**
22248 |      * Optional password to use if HTTP proxy requires authentication.
22249 |      */
22250 |     password?: string;
22251 |   };
22252 | 
22253 |   /**
22254 |    * Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file.
22255 |    * If not specified, the HAR is not recorded. Make sure to await
22256 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
22257 |    * the HAR to be saved.
22258 |    */
22259 |   recordHar?: {
22260 |     /**
22261 |      * Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use
22262 |      * `content` policy instead.
22263 |      */
22264 |     omitContent?: boolean;
22265 | 
22266 |     /**
22267 |      * Optional setting to control resource content management. If `omit` is specified, content is not persisted. If
22268 |      * `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is
22269 |      * specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output
22270 |      * files and to `embed` for all other file extensions.
22271 |      */
22272 |     content?: "omit"|"embed"|"attach";
22273 | 
22274 |     /**
22275 |      * Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by
22276 |      * default.
22277 |      */
22278 |     path: string;
22279 | 
22280 |     /**
22281 |      * When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page,
22282 |      * cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
22283 |      */
22284 |     mode?: "full"|"minimal";
22285 | 
22286 |     /**
22287 |      * A glob or regex pattern to filter requests that are stored in the HAR. When a
22288 |      * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
22289 |      * options was provided and the passed URL is a path, it gets merged via the
22290 |      * [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
22291 |      */
22292 |     urlFilter?: string|RegExp;
22293 |   };
22294 | 
22295 |   /**
22296 |    * Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded.
22297 |    * Make sure to await
22298 |    * [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) for
22299 |    * videos to be saved.
22300 |    */
22301 |   recordVideo?: {
22302 |     /**
22303 |      * Path to the directory to put videos into.
22304 |      */
22305 |     dir: string;
22306 | 
22307 |     /**
22308 |      * Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to
22309 |      * fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of
22310 |      * each page will be scaled down if necessary to fit the specified size.
22311 |      */
22312 |     size?: {
22313 |       /**
22314 |        * Video frame width.
22315 |        */
22316 |       width: number;
22317 | 
22318 |       /**
22319 |        * Video frame height.
22320 |        */
22321 |       height: number;
22322 |     };
22323 |   };
22324 | 
22325 |   /**
22326 |    * Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See
22327 |    * [page.emulateMedia([options])](https://playwright.dev/docs/api/class-page#page-emulate-media) for more details.
22328 |    * Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
22329 |    */
22330 |   reducedMotion?: null|"reduce"|"no-preference";
22331 | 
22332 |   /**
22333 |    * Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
22334 |    * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-viewport) is set.
22335 |    */
22336 |   screen?: {
22337 |     /**
22338 |      * page width in pixels.
22339 |      */
22340 |     width: number;
22341 | 
22342 |     /**
22343 |      * page height in pixels.
22344 |      */
22345 |     height: number;
22346 |   };
22347 | 
22348 |   /**
22349 |    * Whether to allow sites to register Service workers. Defaults to `'allow'`.
22350 |    * - `'allow'`: [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) can be
22351 |    *   registered.
22352 |    * - `'block'`: Playwright will block all registration of Service Workers.
22353 |    */
22354 |   serviceWorkers?: "allow"|"block";
22355 | 
22356 |   /**
22357 |    * Learn more about [storage state and auth](https://playwright.dev/docs/auth).
22358 |    *
22359 |    * Populates context with given storage state. This option can be used to initialize context with logged-in
22360 |    * information obtained via
22361 |    * [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state).
22362 |    */
22363 |   storageState?: string|{
22364 |     /**
22365 |      * Cookies to set for context
22366 |      */
22367 |     cookies: Array<{
22368 |       name: string;
22369 | 
22370 |       value: string;
22371 | 
22372 |       /**
22373 |        * Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like
22374 |        * this: ".example.com"
22375 |        */
22376 |       domain: string;
22377 | 
22378 |       /**
22379 |        * Domain and path are required
22380 |        */
22381 |       path: string;
22382 | 
22383 |       /**
22384 |        * Unix time in seconds.
22385 |        */
22386 |       expires: number;
22387 | 
22388 |       httpOnly: boolean;
22389 | 
22390 |       secure: boolean;
22391 | 
22392 |       /**
22393 |        * sameSite flag
22394 |        */
22395 |       sameSite: "Strict"|"Lax"|"None";
22396 |     }>;
22397 | 
22398 |     origins: Array<{
22399 |       origin: string;
22400 | 
22401 |       /**
22402 |        * localStorage to set for context
22403 |        */
22404 |       localStorage: Array<{
22405 |         name: string;
22406 | 
22407 |         value: string;
22408 |       }>;
22409 |     }>;
22410 |   };
22411 | 
22412 |   /**
22413 |    * If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
22414 |    * selectors that imply single target DOM element will throw when more than one element matches the selector. This
22415 |    * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
22416 |    * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
22417 |    */
22418 |   strictSelectors?: boolean;
22419 | 
22420 |   /**
22421 |    * Changes the timezone of the context. See
22422 |    * [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1)
22423 |    * for a list of supported timezone IDs. Defaults to the system timezone.
22424 |    */
22425 |   timezoneId?: string;
22426 | 
22427 |   /**
22428 |    * Specific user agent to use in this context.
22429 |    */
22430 |   userAgent?: string;
22431 | 
22432 |   /**
22433 |    * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
22434 |    */
22435 |   videoSize?: {
22436 |     /**
22437 |      * Video frame width.
22438 |      */
22439 |     width: number;
22440 | 
22441 |     /**
22442 |      * Video frame height.
22443 |      */
22444 |     height: number;
22445 |   };
22446 | 
22447 |   /**
22448 |    * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
22449 |    */
22450 |   videosPath?: string;
22451 | 
22452 |   /**
22453 |    * Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `null` to disable the consistent
22454 |    * viewport emulation. Learn more about [viewport emulation](https://playwright.dev/docs/emulation#viewport).
22455 |    *
22456 |    * **NOTE** The `null` value opts out from the default presets, makes viewport depend on the host window size defined
22457 |    * by the operating system. It makes the execution of the tests non-deterministic.
22458 |    *
22459 |    */
22460 |   viewport?: null|ViewportSize;
22461 | }
22462 | 
22463 | export interface ViewportSize {
22464 |   /**
22465 |    * page width in pixels.
22466 |    */
22467 |   width: number;
22468 | 
22469 |   /**
22470 |    * page height in pixels.
22471 |    */
22472 |   height: number;
22473 | }
22474 | 
22475 | export interface HTTPCredentials {
22476 |   username: string;
22477 | 
22478 |   password: string;
22479 | 
22480 |   /**
22481 |    * Restrain sending http credentials on specific origin (scheme://host:port).
22482 |    */
22483 |   origin?: string;
22484 | 
22485 |   /**
22486 |    * This option only applies to the requests sent from corresponding
22487 |    * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
22488 |    * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
22489 |    * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
22490 |    * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
22491 |    */
22492 |   send?: "unauthorized"|"always";
22493 | }
22494 | 
22495 | export interface Geolocation {
22496 |   /**
22497 |    * Latitude between -90 and 90.
22498 |    */
22499 |   latitude: number;
22500 | 
22501 |   /**
22502 |    * Longitude between -180 and 180.
22503 |    */
22504 |   longitude: number;
22505 | 
22506 |   /**
22507 |    * Non-negative accuracy value. Defaults to `0`.
22508 |    */
22509 |   accuracy?: number;
22510 | }
22511 | 
22512 | export interface Cookie {
22513 |   name: string;
22514 | 
22515 |   value: string;
22516 | 
22517 |   domain: string;
22518 | 
22519 |   path: string;
22520 | 
22521 |   /**
22522 |    * Unix time in seconds.
22523 |    */
22524 |   expires: number;
22525 | 
22526 |   httpOnly: boolean;
22527 | 
22528 |   secure: boolean;
22529 | 
22530 |   sameSite: "Strict"|"Lax"|"None";
22531 | 
22532 |   partitionKey?: string;
22533 | }
22534 | 
22535 | interface PageWaitForSelectorOptions {
22536 |   /**
22537 |    * Defaults to `'visible'`. Can be either:
22538 |    * - `'attached'` - wait for element to be present in DOM.
22539 |    * - `'detached'` - wait for element to not be present in DOM.
22540 |    * - `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element
22541 |    *   without any content or with `display:none` has an empty bounding box and is not considered visible.
22542 |    * - `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or
22543 |    *   `visibility:hidden`. This is opposite to the `'visible'` option.
22544 |    */
22545 |   state?: "attached"|"detached"|"visible"|"hidden";
22546 | 
22547 |   /**
22548 |    * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
22549 |    * element, the call throws an exception.
22550 |    */
22551 |   strict?: boolean;
22552 | 
22553 |   /**
22554 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22555 |    * option in the config, or by using the
22556 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22557 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22558 |    */
22559 |   timeout?: number;
22560 | }
22561 | 
22562 | interface PageWaitForFunctionOptions {
22563 |   /**
22564 |    * If [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is `'raf'`, then
22565 |    * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) is constantly
22566 |    * executed in `requestAnimationFrame` callback. If
22567 |    * [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is a number, then it
22568 |    * is treated as an interval in milliseconds at which the function would be executed. Defaults to `raf`.
22569 |    */
22570 |   polling?: number|"raf";
22571 | 
22572 |   /**
22573 |    * Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
22574 |    * `actionTimeout` option in the config, or by using the
22575 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22576 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22577 |    */
22578 |   timeout?: number;
22579 | }
22580 | 
22581 | export interface PageScreenshotOptions {
22582 |   /**
22583 |    * When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different
22584 |    * treatment depending on their duration:
22585 |    * - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
22586 |    * - infinite animations are canceled to initial state, and then played over after the screenshot.
22587 |    *
22588 |    * Defaults to `"allow"` that leaves animations untouched.
22589 |    */
22590 |   animations?: "disabled"|"allow";
22591 | 
22592 |   /**
22593 |    * When set to `"hide"`, screenshot will hide text caret. When set to `"initial"`, text caret behavior will not be
22594 |    * changed.  Defaults to `"hide"`.
22595 |    */
22596 |   caret?: "hide"|"initial";
22597 | 
22598 |   /**
22599 |    * An object which specifies clipping of the resulting image.
22600 |    */
22601 |   clip?: {
22602 |     /**
22603 |      * x-coordinate of top-left corner of clip area
22604 |      */
22605 |     x: number;
22606 | 
22607 |     /**
22608 |      * y-coordinate of top-left corner of clip area
22609 |      */
22610 |     y: number;
22611 | 
22612 |     /**
22613 |      * width of clipping area
22614 |      */
22615 |     width: number;
22616 | 
22617 |     /**
22618 |      * height of clipping area
22619 |      */
22620 |     height: number;
22621 |   };
22622 | 
22623 |   /**
22624 |    * When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to
22625 |    * `false`.
22626 |    */
22627 |   fullPage?: boolean;
22628 | 
22629 |   /**
22630 |    * Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
22631 |    * box `#FF00FF` (customized by
22632 |    * [`maskColor`](https://playwright.dev/docs/api/class-page#page-screenshot-option-mask-color)) that completely covers
22633 |    * its bounding box. The mask is also applied to invisible elements, see
22634 |    * [Matching only visible elements](https://playwright.dev/docs/locators#matching-only-visible-elements) to disable that.
22635 |    */
22636 |   mask?: Array<Locator>;
22637 | 
22638 |   /**
22639 |    * Specify the color of the overlay box for masked elements, in
22640 |    * [CSS color format](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). Default color is pink `#FF00FF`.
22641 |    */
22642 |   maskColor?: string;
22643 | 
22644 |   /**
22645 |    * Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
22646 |    * Defaults to `false`.
22647 |    */
22648 |   omitBackground?: boolean;
22649 | 
22650 |   /**
22651 |    * The file path to save the image to. The screenshot type will be inferred from file extension. If
22652 |    * [`path`](https://playwright.dev/docs/api/class-page#page-screenshot-option-path) is a relative path, then it is
22653 |    * resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk.
22654 |    */
22655 |   path?: string;
22656 | 
22657 |   /**
22658 |    * The quality of the image, between 0-100. Not applicable to `png` images.
22659 |    */
22660 |   quality?: number;
22661 | 
22662 |   /**
22663 |    * When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this
22664 |    * will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so
22665 |    * screenshots of high-dpi devices will be twice as large or even larger.
22666 |    *
22667 |    * Defaults to `"device"`.
22668 |    */
22669 |   scale?: "css"|"device";
22670 | 
22671 |   /**
22672 |    * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
22673 |    * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
22674 |    * the Shadow DOM and applies to the inner frames.
22675 |    */
22676 |   style?: string;
22677 | 
22678 |   /**
22679 |    * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
22680 |    * option in the config, or by using the
22681 |    * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22682 |    * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
22683 |    */
22684 |   timeout?: number;
22685 | 
22686 |   /**
22687 |    * Specify screenshot type, defaults to `png`.
22688 |    */
22689 |   type?: "png"|"jpeg";
22690 | }
22691 | 
22692 | type Devices = {
22693 |   "Blackberry PlayBook": DeviceDescriptor;
22694 |   "Blackberry PlayBook landscape": DeviceDescriptor;
22695 |   "BlackBerry Z30": DeviceDescriptor;
22696 |   "BlackBerry Z30 landscape": DeviceDescriptor;
22697 |   "Galaxy Note 3": DeviceDescriptor;
22698 |   "Galaxy Note 3 landscape": DeviceDescriptor;
22699 |   "Galaxy Note II": DeviceDescriptor;
22700 |   "Galaxy Note II landscape": DeviceDescriptor;
22701 |   "Galaxy S III": DeviceDescriptor;
22702 |   "Galaxy S III landscape": DeviceDescriptor;
22703 |   "Galaxy S5": DeviceDescriptor;
22704 |   "Galaxy S5 landscape": DeviceDescriptor;
22705 |   "Galaxy S8": DeviceDescriptor;
22706 |   "Galaxy S8 landscape": DeviceDescriptor;
22707 |   "Galaxy S9+": DeviceDescriptor;
22708 |   "Galaxy S9+ landscape": DeviceDescriptor;
22709 |   "Galaxy S24": DeviceDescriptor;
22710 |   "Galaxy S24 landscape": DeviceDescriptor;
22711 |   "Galaxy A55": DeviceDescriptor;
22712 |   "Galaxy A55 landscape": DeviceDescriptor;
22713 |   "Galaxy Tab S4": DeviceDescriptor;
22714 |   "Galaxy Tab S4 landscape": DeviceDescriptor;
22715 |   "Galaxy Tab S9": DeviceDescriptor;
22716 |   "Galaxy Tab S9 landscape": DeviceDescriptor;
22717 |   "iPad (gen 5)": DeviceDescriptor;
22718 |   "iPad (gen 5) landscape": DeviceDescriptor;
22719 |   "iPad (gen 6)": DeviceDescriptor;
22720 |   "iPad (gen 6) landscape": DeviceDescriptor;
22721 |   "iPad (gen 7)": DeviceDescriptor;
22722 |   "iPad (gen 7) landscape": DeviceDescriptor;
22723 |   "iPad (gen 11)": DeviceDescriptor;
22724 |   "iPad (gen 11) landscape": DeviceDescriptor;
22725 |   "iPad Mini": DeviceDescriptor;
22726 |   "iPad Mini landscape": DeviceDescriptor;
22727 |   "iPad Pro 11": DeviceDescriptor;
22728 |   "iPad Pro 11 landscape": DeviceDescriptor;
22729 |   "iPhone 6": DeviceDescriptor;
22730 |   "iPhone 6 landscape": DeviceDescriptor;
22731 |   "iPhone 6 Plus": DeviceDescriptor;
22732 |   "iPhone 6 Plus landscape": DeviceDescriptor;
22733 |   "iPhone 7": DeviceDescriptor;
22734 |   "iPhone 7 landscape": DeviceDescriptor;
22735 |   "iPhone 7 Plus": DeviceDescriptor;
22736 |   "iPhone 7 Plus landscape": DeviceDescriptor;
22737 |   "iPhone 8": DeviceDescriptor;
22738 |   "iPhone 8 landscape": DeviceDescriptor;
22739 |   "iPhone 8 Plus": DeviceDescriptor;
22740 |   "iPhone 8 Plus landscape": DeviceDescriptor;
22741 |   "iPhone SE": DeviceDescriptor;
22742 |   "iPhone SE landscape": DeviceDescriptor;
22743 |   "iPhone SE (3rd gen)": DeviceDescriptor;
22744 |   "iPhone SE (3rd gen) landscape": DeviceDescriptor;
22745 |   "iPhone X": DeviceDescriptor;
22746 |   "iPhone X landscape": DeviceDescriptor;
22747 |   "iPhone XR": DeviceDescriptor;
22748 |   "iPhone XR landscape": DeviceDescriptor;
22749 |   "iPhone 11": DeviceDescriptor;
22750 |   "iPhone 11 landscape": DeviceDescriptor;
22751 |   "iPhone 11 Pro": DeviceDescriptor;
22752 |   "iPhone 11 Pro landscape": DeviceDescriptor;
22753 |   "iPhone 11 Pro Max": DeviceDescriptor;
22754 |   "iPhone 11 Pro Max landscape": DeviceDescriptor;
22755 |   "iPhone 12": DeviceDescriptor;
22756 |   "iPhone 12 landscape": DeviceDescriptor;
22757 |   "iPhone 12 Pro": DeviceDescriptor;
22758 |   "iPhone 12 Pro landscape": DeviceDescriptor;
22759 |   "iPhone 12 Pro Max": DeviceDescriptor;
22760 |   "iPhone 12 Pro Max landscape": DeviceDescriptor;
22761 |   "iPhone 12 Mini": DeviceDescriptor;
22762 |   "iPhone 12 Mini landscape": DeviceDescriptor;
22763 |   "iPhone 13": DeviceDescriptor;
22764 |   "iPhone 13 landscape": DeviceDescriptor;
22765 |   "iPhone 13 Pro": DeviceDescriptor;
22766 |   "iPhone 13 Pro landscape": DeviceDescriptor;
22767 |   "iPhone 13 Pro Max": DeviceDescriptor;
22768 |   "iPhone 13 Pro Max landscape": DeviceDescriptor;
22769 |   "iPhone 13 Mini": DeviceDescriptor;
22770 |   "iPhone 13 Mini landscape": DeviceDescriptor;
22771 |   "iPhone 14": DeviceDescriptor;
22772 |   "iPhone 14 landscape": DeviceDescriptor;
22773 |   "iPhone 14 Plus": DeviceDescriptor;
22774 |   "iPhone 14 Plus landscape": DeviceDescriptor;
22775 |   "iPhone 14 Pro": DeviceDescriptor;
22776 |   "iPhone 14 Pro landscape": DeviceDescriptor;
22777 |   "iPhone 14 Pro Max": DeviceDescriptor;
22778 |   "iPhone 14 Pro Max landscape": DeviceDescriptor;
22779 |   "iPhone 15": DeviceDescriptor;
22780 |   "iPhone 15 landscape": DeviceDescriptor;
22781 |   "iPhone 15 Plus": DeviceDescriptor;
22782 |   "iPhone 15 Plus landscape": DeviceDescriptor;
22783 |   "iPhone 15 Pro": DeviceDescriptor;
22784 |   "iPhone 15 Pro landscape": DeviceDescriptor;
22785 |   "iPhone 15 Pro Max": DeviceDescriptor;
22786 |   "iPhone 15 Pro Max landscape": DeviceDescriptor;
22787 |   "Kindle Fire HDX": DeviceDescriptor;
22788 |   "Kindle Fire HDX landscape": DeviceDescriptor;
22789 |   "LG Optimus L70": DeviceDescriptor;
22790 |   "LG Optimus L70 landscape": DeviceDescriptor;
22791 |   "Microsoft Lumia 550": DeviceDescriptor;
22792 |   "Microsoft Lumia 550 landscape": DeviceDescriptor;
22793 |   "Microsoft Lumia 950": DeviceDescriptor;
22794 |   "Microsoft Lumia 950 landscape": DeviceDescriptor;
22795 |   "Nexus 10": DeviceDescriptor;
22796 |   "Nexus 10 landscape": DeviceDescriptor;
22797 |   "Nexus 4": DeviceDescriptor;
22798 |   "Nexus 4 landscape": DeviceDescriptor;
22799 |   "Nexus 5": DeviceDescriptor;
22800 |   "Nexus 5 landscape": DeviceDescriptor;
22801 |   "Nexus 5X": DeviceDescriptor;
22802 |   "Nexus 5X landscape": DeviceDescriptor;
22803 |   "Nexus 6": DeviceDescriptor;
22804 |   "Nexus 6 landscape": DeviceDescriptor;
22805 |   "Nexus 6P": DeviceDescriptor;
22806 |   "Nexus 6P landscape": DeviceDescriptor;
22807 |   "Nexus 7": DeviceDescriptor;
22808 |   "Nexus 7 landscape": DeviceDescriptor;
22809 |   "Nokia Lumia 520": DeviceDescriptor;
22810 |   "Nokia Lumia 520 landscape": DeviceDescriptor;
22811 |   "Nokia N9": DeviceDescriptor;
22812 |   "Nokia N9 landscape": DeviceDescriptor;
22813 |   "Pixel 2": DeviceDescriptor;
22814 |   "Pixel 2 landscape": DeviceDescriptor;
22815 |   "Pixel 2 XL": DeviceDescriptor;
22816 |   "Pixel 2 XL landscape": DeviceDescriptor;
22817 |   "Pixel 3": DeviceDescriptor;
22818 |   "Pixel 3 landscape": DeviceDescriptor;
22819 |   "Pixel 4": DeviceDescriptor;
22820 |   "Pixel 4 landscape": DeviceDescriptor;
22821 |   "Pixel 4a (5G)": DeviceDescriptor;
22822 |   "Pixel 4a (5G) landscape": DeviceDescriptor;
22823 |   "Pixel 5": DeviceDescriptor;
22824 |   "Pixel 5 landscape": DeviceDescriptor;
22825 |   "Pixel 7": DeviceDescriptor;
22826 |   "Pixel 7 landscape": DeviceDescriptor;
22827 |   "Moto G4": DeviceDescriptor;
22828 |   "Moto G4 landscape": DeviceDescriptor;
22829 |   "Desktop Chrome HiDPI": DeviceDescriptor;
22830 |   "Desktop Edge HiDPI": DeviceDescriptor;
22831 |   "Desktop Firefox HiDPI": DeviceDescriptor;
22832 |   "Desktop Safari": DeviceDescriptor;
22833 |   "Desktop Chrome": DeviceDescriptor;
22834 |   "Desktop Edge": DeviceDescriptor;
22835 |   "Desktop Firefox": DeviceDescriptor;
22836 |   [key: string]: DeviceDescriptor;
22837 | }
22838 | 
22839 | export interface ChromiumBrowserContext extends BrowserContext { }
22840 | export interface ChromiumBrowser extends Browser { }
22841 | export interface FirefoxBrowser extends Browser { }
22842 | export interface WebKitBrowser extends Browser { }
22843 | export interface ChromiumCoverage extends Coverage { }


------------------------------------------------------------
[23] اسم الملف: protocol.d.ts
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/types/protocol.d.ts
------------------------------------------------------------
0001 | // This is generated from /utils/protocol-types-generator/index.js
0002 | type binary = string;
0003 | export namespace Protocol {
0004 |   export namespace Accessibility {
0005 |     /**
0006 |      * Unique accessibility node identifier.
0007 |      */
0008 |     export type AXNodeId = string;
0009 |     /**
0010 |      * Enum of possible property types.
0011 |      */
0012 |     export type AXValueType = "boolean"|"tristate"|"booleanOrUndefined"|"idref"|"idrefList"|"integer"|"node"|"nodeList"|"number"|"string"|"computedString"|"token"|"tokenList"|"domRelation"|"role"|"internalRole"|"valueUndefined";
0013 |     /**
0014 |      * Enum of possible property sources.
0015 |      */
0016 |     export type AXValueSourceType = "attribute"|"implicit"|"style"|"contents"|"placeholder"|"relatedElement";
0017 |     /**
0018 |      * Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
0019 |      */
0020 |     export type AXValueNativeSourceType = "description"|"figcaption"|"label"|"labelfor"|"labelwrapped"|"legend"|"rubyannotation"|"tablecaption"|"title"|"other";
0021 |     /**
0022 |      * A single source for a computed AX property.
0023 |      */
0024 |     export interface AXValueSource {
0025 |       /**
0026 |        * What type of source this is.
0027 |        */
0028 |       type: AXValueSourceType;
0029 |       /**
0030 |        * The value of this property source.
0031 |        */
0032 |       value?: AXValue;
0033 |       /**
0034 |        * The name of the relevant attribute, if any.
0035 |        */
0036 |       attribute?: string;
0037 |       /**
0038 |        * The value of the relevant attribute, if any.
0039 |        */
0040 |       attributeValue?: AXValue;
0041 |       /**
0042 |        * Whether this source is superseded by a higher priority source.
0043 |        */
0044 |       superseded?: boolean;
0045 |       /**
0046 |        * The native markup source for this value, e.g. a `<label>` element.
0047 |        */
0048 |       nativeSource?: AXValueNativeSourceType;
0049 |       /**
0050 |        * The value, such as a node or node list, of the native source.
0051 |        */
0052 |       nativeSourceValue?: AXValue;
0053 |       /**
0054 |        * Whether the value for this property is invalid.
0055 |        */
0056 |       invalid?: boolean;
0057 |       /**
0058 |        * Reason for the value being invalid, if it is.
0059 |        */
0060 |       invalidReason?: string;
0061 |     }
0062 |     export interface AXRelatedNode {
0063 |       /**
0064 |        * The BackendNodeId of the related DOM node.
0065 |        */
0066 |       backendDOMNodeId: DOM.BackendNodeId;
0067 |       /**
0068 |        * The IDRef value provided, if any.
0069 |        */
0070 |       idref?: string;
0071 |       /**
0072 |        * The text alternative of this node in the current context.
0073 |        */
0074 |       text?: string;
0075 |     }
0076 |     export interface AXProperty {
0077 |       /**
0078 |        * The name of this property.
0079 |        */
0080 |       name: AXPropertyName;
0081 |       /**
0082 |        * The value of this property.
0083 |        */
0084 |       value: AXValue;
0085 |     }
0086 |     /**
0087 |      * A single computed AX property.
0088 |      */
0089 |     export interface AXValue {
0090 |       /**
0091 |        * The type of this value.
0092 |        */
0093 |       type: AXValueType;
0094 |       /**
0095 |        * The computed value of this property.
0096 |        */
0097 |       value?: any;
0098 |       /**
0099 |        * One or more related nodes, if applicable.
0100 |        */
0101 |       relatedNodes?: AXRelatedNode[];
0102 |       /**
0103 |        * The sources which contributed to the computation of this property.
0104 |        */
0105 |       sources?: AXValueSource[];
0106 |     }
0107 |     /**
0108 |      * Values of AXProperty name:
0109 | - from 'busy' to 'roledescription': states which apply to every AX node
0110 | - from 'live' to 'root': attributes which apply to nodes in live regions
0111 | - from 'autocomplete' to 'valuetext': attributes which apply to widgets
0112 | - from 'checked' to 'selected': states which apply to widgets
0113 | - from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
0114 | - from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
0115 |      */
0116 |     export type AXPropertyName = "actions"|"busy"|"disabled"|"editable"|"focusable"|"focused"|"hidden"|"hiddenRoot"|"invalid"|"keyshortcuts"|"settable"|"roledescription"|"live"|"atomic"|"relevant"|"root"|"autocomplete"|"hasPopup"|"level"|"multiselectable"|"orientation"|"multiline"|"readonly"|"required"|"valuemin"|"valuemax"|"valuetext"|"checked"|"expanded"|"modal"|"pressed"|"selected"|"activedescendant"|"controls"|"describedby"|"details"|"errormessage"|"flowto"|"labelledby"|"owns"|"url"|"activeFullscreenElement"|"activeModalDialog"|"activeAriaModalDialog"|"ariaHiddenElement"|"ariaHiddenSubtree"|"emptyAlt"|"emptyText"|"inertElement"|"inertSubtree"|"labelContainer"|"labelFor"|"notRendered"|"notVisible"|"presentationalRole"|"probablyPresentational"|"inactiveCarouselTabContent"|"uninteresting";
0117 |     /**
0118 |      * A node in the accessibility tree.
0119 |      */
0120 |     export interface AXNode {
0121 |       /**
0122 |        * Unique identifier for this node.
0123 |        */
0124 |       nodeId: AXNodeId;
0125 |       /**
0126 |        * Whether this node is ignored for accessibility
0127 |        */
0128 |       ignored: boolean;
0129 |       /**
0130 |        * Collection of reasons why this node is hidden.
0131 |        */
0132 |       ignoredReasons?: AXProperty[];
0133 |       /**
0134 |        * This `Node`'s role, whether explicit or implicit.
0135 |        */
0136 |       role?: AXValue;
0137 |       /**
0138 |        * This `Node`'s Chrome raw role.
0139 |        */
0140 |       chromeRole?: AXValue;
0141 |       /**
0142 |        * The accessible name for this `Node`.
0143 |        */
0144 |       name?: AXValue;
0145 |       /**
0146 |        * The accessible description for this `Node`.
0147 |        */
0148 |       description?: AXValue;
0149 |       /**
0150 |        * The value for this `Node`.
0151 |        */
0152 |       value?: AXValue;
0153 |       /**
0154 |        * All other properties
0155 |        */
0156 |       properties?: AXProperty[];
0157 |       /**
0158 |        * ID for this node's parent.
0159 |        */
0160 |       parentId?: AXNodeId;
0161 |       /**
0162 |        * IDs for each of this node's child nodes.
0163 |        */
0164 |       childIds?: AXNodeId[];
0165 |       /**
0166 |        * The backend ID for the associated DOM node, if any.
0167 |        */
0168 |       backendDOMNodeId?: DOM.BackendNodeId;
0169 |       /**
0170 |        * The frame ID for the frame associated with this nodes document.
0171 |        */
0172 |       frameId?: Page.FrameId;
0173 |     }
0174 | 
0175 |     /**
0176 |      * The loadComplete event mirrors the load complete event sent by the browser to assistive
0177 | technology when the web page has finished loading.
0178 |      */
0179 |     export type loadCompletePayload = {
0180 |       /**
0181 |        * New document root node.
0182 |        */
0183 |       root: AXNode;
0184 |     }
0185 |     /**
0186 |      * The nodesUpdated event is sent every time a previously requested node has changed the in tree.
0187 |      */
0188 |     export type nodesUpdatedPayload = {
0189 |       /**
0190 |        * Updated node data.
0191 |        */
0192 |       nodes: AXNode[];
0193 |     }
0194 | 
0195 |     /**
0196 |      * Disables the accessibility domain.
0197 |      */
0198 |     export type disableParameters = {
0199 |     }
0200 |     export type disableReturnValue = {
0201 |     }
0202 |     /**
0203 |      * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
0204 | This turns on accessibility for the page, which can impact performance until accessibility is disabled.
0205 |      */
0206 |     export type enableParameters = {
0207 |     }
0208 |     export type enableReturnValue = {
0209 |     }
0210 |     /**
0211 |      * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
0212 |      */
0213 |     export type getPartialAXTreeParameters = {
0214 |       /**
0215 |        * Identifier of the node to get the partial accessibility tree for.
0216 |        */
0217 |       nodeId?: DOM.NodeId;
0218 |       /**
0219 |        * Identifier of the backend node to get the partial accessibility tree for.
0220 |        */
0221 |       backendNodeId?: DOM.BackendNodeId;
0222 |       /**
0223 |        * JavaScript object id of the node wrapper to get the partial accessibility tree for.
0224 |        */
0225 |       objectId?: Runtime.RemoteObjectId;
0226 |       /**
0227 |        * Whether to fetch this node's ancestors, siblings and children. Defaults to true.
0228 |        */
0229 |       fetchRelatives?: boolean;
0230 |     }
0231 |     export type getPartialAXTreeReturnValue = {
0232 |       /**
0233 |        * The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
0234 | children, if requested.
0235 |        */
0236 |       nodes: AXNode[];
0237 |     }
0238 |     /**
0239 |      * Fetches the entire accessibility tree for the root Document
0240 |      */
0241 |     export type getFullAXTreeParameters = {
0242 |       /**
0243 |        * The maximum depth at which descendants of the root node should be retrieved.
0244 | If omitted, the full tree is returned.
0245 |        */
0246 |       depth?: number;
0247 |       /**
0248 |        * The frame for whose document the AX tree should be retrieved.
0249 | If omitted, the root frame is used.
0250 |        */
0251 |       frameId?: Page.FrameId;
0252 |     }
0253 |     export type getFullAXTreeReturnValue = {
0254 |       nodes: AXNode[];
0255 |     }
0256 |     /**
0257 |      * Fetches the root node.
0258 | Requires `enable()` to have been called previously.
0259 |      */
0260 |     export type getRootAXNodeParameters = {
0261 |       /**
0262 |        * The frame in whose document the node resides.
0263 | If omitted, the root frame is used.
0264 |        */
0265 |       frameId?: Page.FrameId;
0266 |     }
0267 |     export type getRootAXNodeReturnValue = {
0268 |       node: AXNode;
0269 |     }
0270 |     /**
0271 |      * Fetches a node and all ancestors up to and including the root.
0272 | Requires `enable()` to have been called previously.
0273 |      */
0274 |     export type getAXNodeAndAncestorsParameters = {
0275 |       /**
0276 |        * Identifier of the node to get.
0277 |        */
0278 |       nodeId?: DOM.NodeId;
0279 |       /**
0280 |        * Identifier of the backend node to get.
0281 |        */
0282 |       backendNodeId?: DOM.BackendNodeId;
0283 |       /**
0284 |        * JavaScript object id of the node wrapper to get.
0285 |        */
0286 |       objectId?: Runtime.RemoteObjectId;
0287 |     }
0288 |     export type getAXNodeAndAncestorsReturnValue = {
0289 |       nodes: AXNode[];
0290 |     }
0291 |     /**
0292 |      * Fetches a particular accessibility node by AXNodeId.
0293 | Requires `enable()` to have been called previously.
0294 |      */
0295 |     export type getChildAXNodesParameters = {
0296 |       id: AXNodeId;
0297 |       /**
0298 |        * The frame in whose document the node resides.
0299 | If omitted, the root frame is used.
0300 |        */
0301 |       frameId?: Page.FrameId;
0302 |     }
0303 |     export type getChildAXNodesReturnValue = {
0304 |       nodes: AXNode[];
0305 |     }
0306 |     /**
0307 |      * Query a DOM node's accessibility subtree for accessible name and role.
0308 | This command computes the name and role for all nodes in the subtree, including those that are
0309 | ignored for accessibility, and returns those that match the specified name and role. If no DOM
0310 | node is specified, or the DOM node does not exist, the command returns an error. If neither
0311 | `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
0312 |      */
0313 |     export type queryAXTreeParameters = {
0314 |       /**
0315 |        * Identifier of the node for the root to query.
0316 |        */
0317 |       nodeId?: DOM.NodeId;
0318 |       /**
0319 |        * Identifier of the backend node for the root to query.
0320 |        */
0321 |       backendNodeId?: DOM.BackendNodeId;
0322 |       /**
0323 |        * JavaScript object id of the node wrapper for the root to query.
0324 |        */
0325 |       objectId?: Runtime.RemoteObjectId;
0326 |       /**
0327 |        * Find nodes with this computed name.
0328 |        */
0329 |       accessibleName?: string;
0330 |       /**
0331 |        * Find nodes with this computed role.
0332 |        */
0333 |       role?: string;
0334 |     }
0335 |     export type queryAXTreeReturnValue = {
0336 |       /**
0337 |        * A list of `Accessibility.AXNode` matching the specified attributes,
0338 | including nodes that are ignored for accessibility.
0339 |        */
0340 |       nodes: AXNode[];
0341 |     }
0342 |   }
0343 | 
0344 |   export namespace Animation {
0345 |     /**
0346 |      * Animation instance.
0347 |      */
0348 |     export interface Animation {
0349 |       /**
0350 |        * `Animation`'s id.
0351 |        */
0352 |       id: string;
0353 |       /**
0354 |        * `Animation`'s name.
0355 |        */
0356 |       name: string;
0357 |       /**
0358 |        * `Animation`'s internal paused state.
0359 |        */
0360 |       pausedState: boolean;
0361 |       /**
0362 |        * `Animation`'s play state.
0363 |        */
0364 |       playState: string;
0365 |       /**
0366 |        * `Animation`'s playback rate.
0367 |        */
0368 |       playbackRate: number;
0369 |       /**
0370 |        * `Animation`'s start time.
0371 | Milliseconds for time based animations and
0372 | percentage [0 - 100] for scroll driven animations
0373 | (i.e. when viewOrScrollTimeline exists).
0374 |        */
0375 |       startTime: number;
0376 |       /**
0377 |        * `Animation`'s current time.
0378 |        */
0379 |       currentTime: number;
0380 |       /**
0381 |        * Animation type of `Animation`.
0382 |        */
0383 |       type: "CSSTransition"|"CSSAnimation"|"WebAnimation";
0384 |       /**
0385 |        * `Animation`'s source animation node.
0386 |        */
0387 |       source?: AnimationEffect;
0388 |       /**
0389 |        * A unique ID for `Animation` representing the sources that triggered this CSS
0390 | animation/transition.
0391 |        */
0392 |       cssId?: string;
0393 |       /**
0394 |        * View or scroll timeline
0395 |        */
0396 |       viewOrScrollTimeline?: ViewOrScrollTimeline;
0397 |     }
0398 |     /**
0399 |      * Timeline instance
0400 |      */
0401 |     export interface ViewOrScrollTimeline {
0402 |       /**
0403 |        * Scroll container node
0404 |        */
0405 |       sourceNodeId?: DOM.BackendNodeId;
0406 |       /**
0407 |        * Represents the starting scroll position of the timeline
0408 | as a length offset in pixels from scroll origin.
0409 |        */
0410 |       startOffset?: number;
0411 |       /**
0412 |        * Represents the ending scroll position of the timeline
0413 | as a length offset in pixels from scroll origin.
0414 |        */
0415 |       endOffset?: number;
0416 |       /**
0417 |        * The element whose principal box's visibility in the
0418 | scrollport defined the progress of the timeline.
0419 | Does not exist for animations with ScrollTimeline
0420 |        */
0421 |       subjectNodeId?: DOM.BackendNodeId;
0422 |       /**
0423 |        * Orientation of the scroll
0424 |        */
0425 |       axis: DOM.ScrollOrientation;
0426 |     }
0427 |     /**
0428 |      * AnimationEffect instance
0429 |      */
0430 |     export interface AnimationEffect {
0431 |       /**
0432 |        * `AnimationEffect`'s delay.
0433 |        */
0434 |       delay: number;
0435 |       /**
0436 |        * `AnimationEffect`'s end delay.
0437 |        */
0438 |       endDelay: number;
0439 |       /**
0440 |        * `AnimationEffect`'s iteration start.
0441 |        */
0442 |       iterationStart: number;
0443 |       /**
0444 |        * `AnimationEffect`'s iterations. Omitted if the value is infinite.
0445 |        */
0446 |       iterations?: number;
0447 |       /**
0448 |        * `AnimationEffect`'s iteration duration.
0449 | Milliseconds for time based animations and
0450 | percentage [0 - 100] for scroll driven animations
0451 | (i.e. when viewOrScrollTimeline exists).
0452 |        */
0453 |       duration: number;
0454 |       /**
0455 |        * `AnimationEffect`'s playback direction.
0456 |        */
0457 |       direction: string;
0458 |       /**
0459 |        * `AnimationEffect`'s fill mode.
0460 |        */
0461 |       fill: string;
0462 |       /**
0463 |        * `AnimationEffect`'s target node.
0464 |        */
0465 |       backendNodeId?: DOM.BackendNodeId;
0466 |       /**
0467 |        * `AnimationEffect`'s keyframes.
0468 |        */
0469 |       keyframesRule?: KeyframesRule;
0470 |       /**
0471 |        * `AnimationEffect`'s timing function.
0472 |        */
0473 |       easing: string;
0474 |     }
0475 |     /**
0476 |      * Keyframes Rule
0477 |      */
0478 |     export interface KeyframesRule {
0479 |       /**
0480 |        * CSS keyframed animation's name.
0481 |        */
0482 |       name?: string;
0483 |       /**
0484 |        * List of animation keyframes.
0485 |        */
0486 |       keyframes: KeyframeStyle[];
0487 |     }
0488 |     /**
0489 |      * Keyframe Style
0490 |      */
0491 |     export interface KeyframeStyle {
0492 |       /**
0493 |        * Keyframe's time offset.
0494 |        */
0495 |       offset: string;
0496 |       /**
0497 |        * `AnimationEffect`'s timing function.
0498 |        */
0499 |       easing: string;
0500 |     }
0501 | 
0502 |     /**
0503 |      * Event for when an animation has been cancelled.
0504 |      */
0505 |     export type animationCanceledPayload = {
0506 |       /**
0507 |        * Id of the animation that was cancelled.
0508 |        */
0509 |       id: string;
0510 |     }
0511 |     /**
0512 |      * Event for each animation that has been created.
0513 |      */
0514 |     export type animationCreatedPayload = {
0515 |       /**
0516 |        * Id of the animation that was created.
0517 |        */
0518 |       id: string;
0519 |     }
0520 |     /**
0521 |      * Event for animation that has been started.
0522 |      */
0523 |     export type animationStartedPayload = {
0524 |       /**
0525 |        * Animation that was started.
0526 |        */
0527 |       animation: Animation;
0528 |     }
0529 |     /**
0530 |      * Event for animation that has been updated.
0531 |      */
0532 |     export type animationUpdatedPayload = {
0533 |       /**
0534 |        * Animation that was updated.
0535 |        */
0536 |       animation: Animation;
0537 |     }
0538 | 
0539 |     /**
0540 |      * Disables animation domain notifications.
0541 |      */
0542 |     export type disableParameters = {
0543 |     }
0544 |     export type disableReturnValue = {
0545 |     }
0546 |     /**
0547 |      * Enables animation domain notifications.
0548 |      */
0549 |     export type enableParameters = {
0550 |     }
0551 |     export type enableReturnValue = {
0552 |     }
0553 |     /**
0554 |      * Returns the current time of the an animation.
0555 |      */
0556 |     export type getCurrentTimeParameters = {
0557 |       /**
0558 |        * Id of animation.
0559 |        */
0560 |       id: string;
0561 |     }
0562 |     export type getCurrentTimeReturnValue = {
0563 |       /**
0564 |        * Current time of the page.
0565 |        */
0566 |       currentTime: number;
0567 |     }
0568 |     /**
0569 |      * Gets the playback rate of the document timeline.
0570 |      */
0571 |     export type getPlaybackRateParameters = {
0572 |     }
0573 |     export type getPlaybackRateReturnValue = {
0574 |       /**
0575 |        * Playback rate for animations on page.
0576 |        */
0577 |       playbackRate: number;
0578 |     }
0579 |     /**
0580 |      * Releases a set of animations to no longer be manipulated.
0581 |      */
0582 |     export type releaseAnimationsParameters = {
0583 |       /**
0584 |        * List of animation ids to seek.
0585 |        */
0586 |       animations: string[];
0587 |     }
0588 |     export type releaseAnimationsReturnValue = {
0589 |     }
0590 |     /**
0591 |      * Gets the remote object of the Animation.
0592 |      */
0593 |     export type resolveAnimationParameters = {
0594 |       /**
0595 |        * Animation id.
0596 |        */
0597 |       animationId: string;
0598 |     }
0599 |     export type resolveAnimationReturnValue = {
0600 |       /**
0601 |        * Corresponding remote object.
0602 |        */
0603 |       remoteObject: Runtime.RemoteObject;
0604 |     }
0605 |     /**
0606 |      * Seek a set of animations to a particular time within each animation.
0607 |      */
0608 |     export type seekAnimationsParameters = {
0609 |       /**
0610 |        * List of animation ids to seek.
0611 |        */
0612 |       animations: string[];
0613 |       /**
0614 |        * Set the current time of each animation.
0615 |        */
0616 |       currentTime: number;
0617 |     }
0618 |     export type seekAnimationsReturnValue = {
0619 |     }
0620 |     /**
0621 |      * Sets the paused state of a set of animations.
0622 |      */
0623 |     export type setPausedParameters = {
0624 |       /**
0625 |        * Animations to set the pause state of.
0626 |        */
0627 |       animations: string[];
0628 |       /**
0629 |        * Paused state to set to.
0630 |        */
0631 |       paused: boolean;
0632 |     }
0633 |     export type setPausedReturnValue = {
0634 |     }
0635 |     /**
0636 |      * Sets the playback rate of the document timeline.
0637 |      */
0638 |     export type setPlaybackRateParameters = {
0639 |       /**
0640 |        * Playback rate for animations on page
0641 |        */
0642 |       playbackRate: number;
0643 |     }
0644 |     export type setPlaybackRateReturnValue = {
0645 |     }
0646 |     /**
0647 |      * Sets the timing of an animation node.
0648 |      */
0649 |     export type setTimingParameters = {
0650 |       /**
0651 |        * Animation id.
0652 |        */
0653 |       animationId: string;
0654 |       /**
0655 |        * Duration of the animation.
0656 |        */
0657 |       duration: number;
0658 |       /**
0659 |        * Delay of the animation.
0660 |        */
0661 |       delay: number;
0662 |     }
0663 |     export type setTimingReturnValue = {
0664 |     }
0665 |   }
0666 | 
0667 |   /**
0668 |    * Audits domain allows investigation of page violations and possible improvements.
0669 |    */
0670 |   export namespace Audits {
0671 |     /**
0672 |      * Information about a cookie that is affected by an inspector issue.
0673 |      */
0674 |     export interface AffectedCookie {
0675 |       /**
0676 |        * The following three properties uniquely identify a cookie
0677 |        */
0678 |       name: string;
0679 |       path: string;
0680 |       domain: string;
0681 |     }
0682 |     /**
0683 |      * Information about a request that is affected by an inspector issue.
0684 |      */
0685 |     export interface AffectedRequest {
0686 |       /**
0687 |        * The unique request id.
0688 |        */
0689 |       requestId?: Network.RequestId;
0690 |       url: string;
0691 |     }
0692 |     /**
0693 |      * Information about the frame affected by an inspector issue.
0694 |      */
0695 |     export interface AffectedFrame {
0696 |       frameId: Page.FrameId;
0697 |     }
0698 |     export type CookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"|"ExcludeSameSiteNoneInsecure"|"ExcludeSameSiteLax"|"ExcludeSameSiteStrict"|"ExcludeInvalidSameParty"|"ExcludeSamePartyCrossPartyContext"|"ExcludeDomainNonASCII"|"ExcludeThirdPartyCookieBlockedInFirstPartySet"|"ExcludeThirdPartyPhaseout"|"ExcludePortMismatch"|"ExcludeSchemeMismatch";
0699 |     export type CookieWarningReason = "WarnSameSiteUnspecifiedCrossSiteContext"|"WarnSameSiteNoneInsecure"|"WarnSameSiteUnspecifiedLaxAllowUnsafe"|"WarnSameSiteStrictLaxDowngradeStrict"|"WarnSameSiteStrictCrossDowngradeStrict"|"WarnSameSiteStrictCrossDowngradeLax"|"WarnSameSiteLaxCrossDowngradeStrict"|"WarnSameSiteLaxCrossDowngradeLax"|"WarnAttributeValueExceedsMaxSize"|"WarnDomainNonASCII"|"WarnThirdPartyPhaseout"|"WarnCrossSiteRedirectDowngradeChangesInclusion"|"WarnDeprecationTrialMetadata"|"WarnThirdPartyCookieHeuristic";
0700 |     export type CookieOperation = "SetCookie"|"ReadCookie";
0701 |     /**
0702 |      * Represents the category of insight that a cookie issue falls under.
0703 |      */
0704 |     export type InsightType = "GitHubResource"|"GracePeriod"|"Heuristics";
0705 |     /**
0706 |      * Information about the suggested solution to a cookie issue.
0707 |      */
0708 |     export interface CookieIssueInsight {
0709 |       type: InsightType;
0710 |       /**
0711 |        * Link to table entry in third-party cookie migration readiness list.
0712 |        */
0713 |       tableEntryUrl?: string;
0714 |     }
0715 |     /**
0716 |      * This information is currently necessary, as the front-end has a difficult
0717 | time finding a specific cookie. With this, we can convey specific error
0718 | information without the cookie.
0719 |      */
0720 |     export interface CookieIssueDetails {
0721 |       /**
0722 |        * If AffectedCookie is not set then rawCookieLine contains the raw
0723 | Set-Cookie header string. This hints at a problem where the
0724 | cookie line is syntactically or semantically malformed in a way
0725 | that no valid cookie could be created.
0726 |        */
0727 |       cookie?: AffectedCookie;
0728 |       rawCookieLine?: string;
0729 |       cookieWarningReasons: CookieWarningReason[];
0730 |       cookieExclusionReasons: CookieExclusionReason[];
0731 |       /**
0732 |        * Optionally identifies the site-for-cookies and the cookie url, which
0733 | may be used by the front-end as additional context.
0734 |        */
0735 |       operation: CookieOperation;
0736 |       siteForCookies?: string;
0737 |       cookieUrl?: string;
0738 |       request?: AffectedRequest;
0739 |       /**
0740 |        * The recommended solution to the issue.
0741 |        */
0742 |       insight?: CookieIssueInsight;
0743 |     }
0744 |     export type MixedContentResolutionStatus = "MixedContentBlocked"|"MixedContentAutomaticallyUpgraded"|"MixedContentWarning";
0745 |     export type MixedContentResourceType = "AttributionSrc"|"Audio"|"Beacon"|"CSPReport"|"Download"|"EventSource"|"Favicon"|"Font"|"Form"|"Frame"|"Image"|"Import"|"JSON"|"Manifest"|"Ping"|"PluginData"|"PluginResource"|"Prefetch"|"Resource"|"Script"|"ServiceWorker"|"SharedWorker"|"SpeculationRules"|"Stylesheet"|"Track"|"Video"|"Worker"|"XMLHttpRequest"|"XSLT";
0746 |     export interface MixedContentIssueDetails {
0747 |       /**
0748 |        * The type of resource causing the mixed content issue (css, js, iframe,
0749 | form,...). Marked as optional because it is mapped to from
0750 | blink::mojom::RequestContextType, which will be replaced
0751 | by network::mojom::RequestDestination
0752 |        */
0753 |       resourceType?: MixedContentResourceType;
0754 |       /**
0755 |        * The way the mixed content issue is being resolved.
0756 |        */
0757 |       resolutionStatus: MixedContentResolutionStatus;
0758 |       /**
0759 |        * The unsafe http url causing the mixed content issue.
0760 |        */
0761 |       insecureURL: string;
0762 |       /**
0763 |        * The url responsible for the call to an unsafe url.
0764 |        */
0765 |       mainResourceURL: string;
0766 |       /**
0767 |        * The mixed content request.
0768 | Does not always exist (e.g. for unsafe form submission urls).
0769 |        */
0770 |       request?: AffectedRequest;
0771 |       /**
0772 |        * Optional because not every mixed content issue is necessarily linked to a frame.
0773 |        */
0774 |       frame?: AffectedFrame;
0775 |     }
0776 |     /**
0777 |      * Enum indicating the reason a response has been blocked. These reasons are
0778 | refinements of the net error BLOCKED_BY_RESPONSE.
0779 |      */
0780 |     export type BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"|"CoopSandboxedIFrameCannotNavigateToCoopPage"|"CorpNotSameOrigin"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoep"|"CorpNotSameOriginAfterDefaultedToSameOriginByDip"|"CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip"|"CorpNotSameSite"|"SRIMessageSignatureMismatch";
0781 |     /**
0782 |      * Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
0783 | code. Currently only used for COEP/COOP, but may be extended to include
0784 | some CSP errors in the future.
0785 |      */
0786 |     export interface BlockedByResponseIssueDetails {
0787 |       request: AffectedRequest;
0788 |       parentFrame?: AffectedFrame;
0789 |       blockedFrame?: AffectedFrame;
0790 |       reason: BlockedByResponseReason;
0791 |     }
0792 |     export type HeavyAdResolutionStatus = "HeavyAdBlocked"|"HeavyAdWarning";
0793 |     export type HeavyAdReason = "NetworkTotalLimit"|"CpuTotalLimit"|"CpuPeakLimit";
0794 |     export interface HeavyAdIssueDetails {
0795 |       /**
0796 |        * The resolution status, either blocking the content or warning.
0797 |        */
0798 |       resolution: HeavyAdResolutionStatus;
0799 |       /**
0800 |        * The reason the ad was blocked, total network or cpu or peak cpu.
0801 |        */
0802 |       reason: HeavyAdReason;
0803 |       /**
0804 |        * The frame that was blocked.
0805 |        */
0806 |       frame: AffectedFrame;
0807 |     }
0808 |     export type ContentSecurityPolicyViolationType = "kInlineViolation"|"kEvalViolation"|"kURLViolation"|"kSRIViolation"|"kTrustedTypesSinkViolation"|"kTrustedTypesPolicyViolation"|"kWasmEvalViolation";
0809 |     export interface SourceCodeLocation {
0810 |       scriptId?: Runtime.ScriptId;
0811 |       url: string;
0812 |       lineNumber: number;
0813 |       columnNumber: number;
0814 |     }
0815 |     export interface ContentSecurityPolicyIssueDetails {
0816 |       /**
0817 |        * The url not included in allowed sources.
0818 |        */
0819 |       blockedURL?: string;
0820 |       /**
0821 |        * Specific directive that is violated, causing the CSP issue.
0822 |        */
0823 |       violatedDirective: string;
0824 |       isReportOnly: boolean;
0825 |       contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType;
0826 |       frameAncestor?: AffectedFrame;
0827 |       sourceCodeLocation?: SourceCodeLocation;
0828 |       violatingNodeId?: DOM.BackendNodeId;
0829 |     }
0830 |     export type SharedArrayBufferIssueType = "TransferIssue"|"CreationIssue";
0831 |     /**
0832 |      * Details for a issue arising from an SAB being instantiated in, or
0833 | transferred to a context that is not cross-origin isolated.
0834 |      */
0835 |     export interface SharedArrayBufferIssueDetails {
0836 |       sourceCodeLocation: SourceCodeLocation;
0837 |       isWarning: boolean;
0838 |       type: SharedArrayBufferIssueType;
0839 |     }
0840 |     export interface LowTextContrastIssueDetails {
0841 |       violatingNodeId: DOM.BackendNodeId;
0842 |       violatingNodeSelector: string;
0843 |       contrastRatio: number;
0844 |       thresholdAA: number;
0845 |       thresholdAAA: number;
0846 |       fontSize: string;
0847 |       fontWeight: string;
0848 |     }
0849 |     /**
0850 |      * Details for a CORS related issue, e.g. a warning or error related to
0851 | CORS RFC1918 enforcement.
0852 |      */
0853 |     export interface CorsIssueDetails {
0854 |       corsErrorStatus: Network.CorsErrorStatus;
0855 |       isWarning: boolean;
0856 |       request: AffectedRequest;
0857 |       location?: SourceCodeLocation;
0858 |       initiatorOrigin?: string;
0859 |       resourceIPAddressSpace?: Network.IPAddressSpace;
0860 |       clientSecurityState?: Network.ClientSecurityState;
0861 |     }
0862 |     export type AttributionReportingIssueType = "PermissionPolicyDisabled"|"UntrustworthyReportingOrigin"|"InsecureContext"|"InvalidHeader"|"InvalidRegisterTriggerHeader"|"SourceAndTriggerHeaders"|"SourceIgnored"|"TriggerIgnored"|"OsSourceIgnored"|"OsTriggerIgnored"|"InvalidRegisterOsSourceHeader"|"InvalidRegisterOsTriggerHeader"|"WebAndOsHeaders"|"NoWebOrOsSupport"|"NavigationRegistrationWithoutTransientUserActivation"|"InvalidInfoHeader"|"NoRegisterSourceHeader"|"NoRegisterTriggerHeader"|"NoRegisterOsSourceHeader"|"NoRegisterOsTriggerHeader"|"NavigationRegistrationUniqueScopeAlreadySet";
0863 |     export type SharedDictionaryError = "UseErrorCrossOriginNoCorsRequest"|"UseErrorDictionaryLoadFailure"|"UseErrorMatchingDictionaryNotUsed"|"UseErrorUnexpectedContentDictionaryHeader"|"WriteErrorCossOriginNoCorsRequest"|"WriteErrorDisallowedBySettings"|"WriteErrorExpiredResponse"|"WriteErrorFeatureDisabled"|"WriteErrorInsufficientResources"|"WriteErrorInvalidMatchField"|"WriteErrorInvalidStructuredHeader"|"WriteErrorInvalidTTLField"|"WriteErrorNavigationRequest"|"WriteErrorNoMatchField"|"WriteErrorNonIntegerTTLField"|"WriteErrorNonListMatchDestField"|"WriteErrorNonSecureContext"|"WriteErrorNonStringIdField"|"WriteErrorNonStringInMatchDestList"|"WriteErrorNonStringMatchField"|"WriteErrorNonTokenTypeField"|"WriteErrorRequestAborted"|"WriteErrorShuttingDown"|"WriteErrorTooLongIdField"|"WriteErrorUnsupportedType";
0864 |     export type SRIMessageSignatureError = "MissingSignatureHeader"|"MissingSignatureInputHeader"|"InvalidSignatureHeader"|"InvalidSignatureInputHeader"|"SignatureHeaderValueIsNotByteSequence"|"SignatureHeaderValueIsParameterized"|"SignatureHeaderValueIsIncorrectLength"|"SignatureInputHeaderMissingLabel"|"SignatureInputHeaderValueNotInnerList"|"SignatureInputHeaderValueMissingComponents"|"SignatureInputHeaderInvalidComponentType"|"SignatureInputHeaderInvalidComponentName"|"SignatureInputHeaderInvalidHeaderComponentParameter"|"SignatureInputHeaderInvalidDerivedComponentParameter"|"SignatureInputHeaderKeyIdLength"|"SignatureInputHeaderInvalidParameter"|"SignatureInputHeaderMissingRequiredParameters"|"ValidationFailedSignatureExpired"|"ValidationFailedInvalidLength"|"ValidationFailedSignatureMismatch"|"ValidationFailedIntegrityMismatch";
0865 |     export type UnencodedDigestError = "MalformedDictionary"|"UnknownAlgorithm"|"IncorrectDigestType"|"IncorrectDigestLength";
0866 |     /**
0867 |      * Details for issues around "Attribution Reporting API" usage.
0868 | Explainer: https://github.com/WICG/attribution-reporting-api
0869 |      */
0870 |     export interface AttributionReportingIssueDetails {
0871 |       violationType: AttributionReportingIssueType;
0872 |       request?: AffectedRequest;
0873 |       violatingNodeId?: DOM.BackendNodeId;
0874 |       invalidParameter?: string;
0875 |     }
0876 |     /**
0877 |      * Details for issues about documents in Quirks Mode
0878 | or Limited Quirks Mode that affects page layouting.
0879 |      */
0880 |     export interface QuirksModeIssueDetails {
0881 |       /**
0882 |        * If false, it means the document's mode is "quirks"
0883 | instead of "limited-quirks".
0884 |        */
0885 |       isLimitedQuirksMode: boolean;
0886 |       documentNodeId: DOM.BackendNodeId;
0887 |       url: string;
0888 |       frameId: Page.FrameId;
0889 |       loaderId: Network.LoaderId;
0890 |     }
0891 |     export interface NavigatorUserAgentIssueDetails {
0892 |       url: string;
0893 |       location?: SourceCodeLocation;
0894 |     }
0895 |     export interface SharedDictionaryIssueDetails {
0896 |       sharedDictionaryError: SharedDictionaryError;
0897 |       request: AffectedRequest;
0898 |     }
0899 |     export interface SRIMessageSignatureIssueDetails {
0900 |       error: SRIMessageSignatureError;
0901 |       signatureBase: string;
0902 |       integrityAssertions: string[];
0903 |       request: AffectedRequest;
0904 |     }
0905 |     export interface UnencodedDigestIssueDetails {
0906 |       error: UnencodedDigestError;
0907 |       request: AffectedRequest;
0908 |     }
0909 |     export type GenericIssueErrorType = "FormLabelForNameError"|"FormDuplicateIdForInputError"|"FormInputWithNoLabelError"|"FormAutocompleteAttributeEmptyError"|"FormEmptyIdAndNameAttributesForInputError"|"FormAriaLabelledByToNonExistingIdError"|"FormInputAssignedAutocompleteValueToIdOrNameAttributeError"|"FormLabelHasNeitherForNorNestedInputError"|"FormLabelForMatchesNonExistingIdError"|"FormInputHasWrongButWellIntendedAutocompleteValueError"|"ResponseWasBlockedByORB"|"NavigationEntryMarkedSkippable"|"AutofillAndManualTextPolicyControlledFeaturesInfo"|"AutofillPolicyControlledFeatureInfo"|"ManualTextPolicyControlledFeatureInfo";
0910 |     /**
0911 |      * Depending on the concrete errorType, different properties are set.
0912 |      */
0913 |     export interface GenericIssueDetails {
0914 |       /**
0915 |        * Issues with the same errorType are aggregated in the frontend.
0916 |        */
0917 |       errorType: GenericIssueErrorType;
0918 |       frameId?: Page.FrameId;
0919 |       violatingNodeId?: DOM.BackendNodeId;
0920 |       violatingNodeAttribute?: string;
0921 |       request?: AffectedRequest;
0922 |     }
0923 |     /**
0924 |      * This issue tracks information needed to print a deprecation message.
0925 | https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
0926 |      */
0927 |     export interface DeprecationIssueDetails {
0928 |       affectedFrame?: AffectedFrame;
0929 |       sourceCodeLocation: SourceCodeLocation;
0930 |       /**
0931 |        * One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
0932 |        */
0933 |       type: string;
0934 |     }
0935 |     /**
0936 |      * This issue warns about sites in the redirect chain of a finished navigation
0937 | that may be flagged as trackers and have their state cleared if they don't
0938 | receive a user interaction. Note that in this context 'site' means eTLD+1.
0939 | For example, if the URL `https://example.test:80/bounce` was in the
0940 | redirect chain, the site reported would be `example.test`.
0941 |      */
0942 |     export interface BounceTrackingIssueDetails {
0943 |       trackingSites: string[];
0944 |     }
0945 |     /**
0946 |      * This issue warns about third-party sites that are accessing cookies on the
0947 | current page, and have been permitted due to having a global metadata grant.
0948 | Note that in this context 'site' means eTLD+1. For example, if the URL
0949 | `https://example.test:80/web_page` was accessing cookies, the site reported
0950 | would be `example.test`.
0951 |      */
0952 |     export interface CookieDeprecationMetadataIssueDetails {
0953 |       allowedSites: string[];
0954 |       optOutPercentage: number;
0955 |       isOptOutTopLevel: boolean;
0956 |       operation: CookieOperation;
0957 |     }
0958 |     export type ClientHintIssueReason = "MetaTagAllowListInvalidOrigin"|"MetaTagModifiedHTML";
0959 |     export interface FederatedAuthRequestIssueDetails {
0960 |       federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason;
0961 |     }
0962 |     /**
0963 |      * Represents the failure reason when a federated authentication reason fails.
0964 | Should be updated alongside RequestIdTokenStatus in
0965 | third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
0966 | all cases except for success.
0967 |      */
0968 |     export type FederatedAuthRequestIssueReason = "ShouldEmbargo"|"TooManyRequests"|"WellKnownHttpNotFound"|"WellKnownNoResponse"|"WellKnownInvalidResponse"|"WellKnownListEmpty"|"WellKnownInvalidContentType"|"ConfigNotInWellKnown"|"WellKnownTooBig"|"ConfigHttpNotFound"|"ConfigNoResponse"|"ConfigInvalidResponse"|"ConfigInvalidContentType"|"ClientMetadataHttpNotFound"|"ClientMetadataNoResponse"|"ClientMetadataInvalidResponse"|"ClientMetadataInvalidContentType"|"IdpNotPotentiallyTrustworthy"|"DisabledInSettings"|"DisabledInFlags"|"ErrorFetchingSignin"|"InvalidSigninResponse"|"AccountsHttpNotFound"|"AccountsNoResponse"|"AccountsInvalidResponse"|"AccountsListEmpty"|"AccountsInvalidContentType"|"IdTokenHttpNotFound"|"IdTokenNoResponse"|"IdTokenInvalidResponse"|"IdTokenIdpErrorResponse"|"IdTokenCrossSiteIdpErrorResponse"|"IdTokenInvalidRequest"|"IdTokenInvalidContentType"|"ErrorIdToken"|"Canceled"|"RpPageNotVisible"|"SilentMediationFailure"|"ThirdPartyCookiesBlocked"|"NotSignedInWithIdp"|"MissingTransientUserActivation"|"ReplacedByActiveMode"|"InvalidFieldsSpecified"|"RelyingPartyOriginIsOpaque"|"TypeNotMatching"|"UiDismissedNoEmbargo"|"CorsError"|"SuppressedBySegmentationPlatform";
0969 |     export interface FederatedAuthUserInfoRequestIssueDetails {
0970 |       federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason;
0971 |     }
0972 |     /**
0973 |      * Represents the failure reason when a getUserInfo() call fails.
0974 | Should be updated alongside FederatedAuthUserInfoRequestResult in
0975 | third_party/blink/public/mojom/devtools/inspector_issue.mojom.
0976 |      */
0977 |     export type FederatedAuthUserInfoRequestIssueReason = "NotSameOrigin"|"NotIframe"|"NotPotentiallyTrustworthy"|"NoApiPermission"|"NotSignedInWithIdp"|"NoAccountSharingPermission"|"InvalidConfigOrWellKnown"|"InvalidAccountsResponse"|"NoReturningUserFromFetchedAccounts";
0978 |     /**
0979 |      * This issue tracks client hints related issues. It's used to deprecate old
0980 | features, encourage the use of new ones, and provide general guidance.
0981 |      */
0982 |     export interface ClientHintIssueDetails {
0983 |       sourceCodeLocation: SourceCodeLocation;
0984 |       clientHintIssueReason: ClientHintIssueReason;
0985 |     }
0986 |     export interface FailedRequestInfo {
0987 |       /**
0988 |        * The URL that failed to load.
0989 |        */
0990 |       url: string;
0991 |       /**
0992 |        * The failure message for the failed request.
0993 |        */
0994 |       failureMessage: string;
0995 |       requestId?: Network.RequestId;
0996 |     }
0997 |     export type PartitioningBlobURLInfo = "BlockedCrossPartitionFetching"|"EnforceNoopenerForNavigation";
0998 |     export interface PartitioningBlobURLIssueDetails {
0999 |       /**
1000 |        * The BlobURL that failed to load.
1001 |        */
1002 |       url: string;
1003 |       /**
1004 |        * Additional information about the Partitioning Blob URL issue.
1005 |        */
1006 |       partitioningBlobURLInfo: PartitioningBlobURLInfo;
1007 |     }
1008 |     export type ElementAccessibilityIssueReason = "DisallowedSelectChild"|"DisallowedOptGroupChild"|"NonPhrasingContentOptionChild"|"InteractiveContentOptionChild"|"InteractiveContentLegendChild"|"InteractiveContentSummaryDescendant";
1009 |     /**
1010 |      * This issue warns about errors in the select or summary element content model.
1011 |      */
1012 |     export interface ElementAccessibilityIssueDetails {
1013 |       nodeId: DOM.BackendNodeId;
1014 |       elementAccessibilityIssueReason: ElementAccessibilityIssueReason;
1015 |       hasDisallowedAttributes: boolean;
1016 |     }
1017 |     export type StyleSheetLoadingIssueReason = "LateImportRule"|"RequestFailed";
1018 |     /**
1019 |      * This issue warns when a referenced stylesheet couldn't be loaded.
1020 |      */
1021 |     export interface StylesheetLoadingIssueDetails {
1022 |       /**
1023 |        * Source code position that referenced the failing stylesheet.
1024 |        */
1025 |       sourceCodeLocation: SourceCodeLocation;
1026 |       /**
1027 |        * Reason why the stylesheet couldn't be loaded.
1028 |        */
1029 |       styleSheetLoadingIssueReason: StyleSheetLoadingIssueReason;
1030 |       /**
1031 |        * Contains additional info when the failure was due to a request.
1032 |        */
1033 |       failedRequestInfo?: FailedRequestInfo;
1034 |     }
1035 |     export type PropertyRuleIssueReason = "InvalidSyntax"|"InvalidInitialValue"|"InvalidInherits"|"InvalidName";
1036 |     /**
1037 |      * This issue warns about errors in property rules that lead to property
1038 | registrations being ignored.
1039 |      */
1040 |     export interface PropertyRuleIssueDetails {
1041 |       /**
1042 |        * Source code position of the property rule.
1043 |        */
1044 |       sourceCodeLocation: SourceCodeLocation;
1045 |       /**
1046 |        * Reason why the property rule was discarded.
1047 |        */
1048 |       propertyRuleIssueReason: PropertyRuleIssueReason;
1049 |       /**
1050 |        * The value of the property rule property that failed to parse
1051 |        */
1052 |       propertyValue?: string;
1053 |     }
1054 |     export type UserReidentificationIssueType = "BlockedFrameNavigation"|"BlockedSubresource"|"NoisedCanvasReadback";
1055 |     /**
1056 |      * This issue warns about uses of APIs that may be considered misuse to
1057 | re-identify users.
1058 |      */
1059 |     export interface UserReidentificationIssueDetails {
1060 |       type: UserReidentificationIssueType;
1061 |       /**
1062 |        * Applies to BlockedFrameNavigation and BlockedSubresource issue types.
1063 |        */
1064 |       request?: AffectedRequest;
1065 |       /**
1066 |        * Applies to NoisedCanvasReadback issue type.
1067 |        */
1068 |       sourceCodeLocation?: SourceCodeLocation;
1069 |     }
1070 |     export type PermissionElementIssueType = "InvalidType"|"FencedFrameDisallowed"|"CspFrameAncestorsMissing"|"PermissionsPolicyBlocked"|"PaddingRightUnsupported"|"PaddingBottomUnsupported"|"InsetBoxShadowUnsupported"|"RequestInProgress"|"UntrustedEvent"|"RegistrationFailed"|"TypeNotSupported"|"InvalidTypeActivation"|"SecurityChecksFailed"|"ActivationDisabled"|"GeolocationDeprecated"|"InvalidDisplayStyle"|"NonOpaqueColor"|"LowContrast"|"FontSizeTooSmall"|"FontSizeTooLarge"|"InvalidSizeValue";
1071 |     /**
1072 |      * This issue warns about improper usage of the <permission> element.
1073 |      */
1074 |     export interface PermissionElementIssueDetails {
1075 |       issueType: PermissionElementIssueType;
1076 |       /**
1077 |        * The value of the type attribute.
1078 |        */
1079 |       type?: string;
1080 |       /**
1081 |        * The node ID of the <permission> element.
1082 |        */
1083 |       nodeId?: DOM.BackendNodeId;
1084 |       /**
1085 |        * True if the issue is a warning, false if it is an error.
1086 |        */
1087 |       isWarning?: boolean;
1088 |       /**
1089 |        * Fields for message construction:
1090 | Used for messages that reference a specific permission name
1091 |        */
1092 |       permissionName?: string;
1093 |       /**
1094 |        * Used for messages about occlusion
1095 |        */
1096 |       occluderNodeInfo?: string;
1097 |       /**
1098 |        * Used for messages about occluder's parent
1099 |        */
1100 |       occluderParentNodeInfo?: string;
1101 |       /**
1102 |        * Used for messages about activation disabled reason
1103 |        */
1104 |       disableReason?: string;
1105 |     }
1106 |     /**
1107 |      * A unique identifier for the type of issue. Each type may use one of the
1108 | optional fields in InspectorIssueDetails to convey more specific
1109 | information about the kind of issue.
1110 |      */
1111 |     export type InspectorIssueCode = "CookieIssue"|"MixedContentIssue"|"BlockedByResponseIssue"|"HeavyAdIssue"|"ContentSecurityPolicyIssue"|"SharedArrayBufferIssue"|"LowTextContrastIssue"|"CorsIssue"|"AttributionReportingIssue"|"QuirksModeIssue"|"PartitioningBlobURLIssue"|"NavigatorUserAgentIssue"|"GenericIssue"|"DeprecationIssue"|"ClientHintIssue"|"FederatedAuthRequestIssue"|"BounceTrackingIssue"|"CookieDeprecationMetadataIssue"|"StylesheetLoadingIssue"|"FederatedAuthUserInfoRequestIssue"|"PropertyRuleIssue"|"SharedDictionaryIssue"|"ElementAccessibilityIssue"|"SRIMessageSignatureIssue"|"UnencodedDigestIssue"|"UserReidentificationIssue"|"PermissionElementIssue";
1112 |     /**
1113 |      * This struct holds a list of optional fields with additional information
1114 | specific to the kind of issue. When adding a new issue code, please also
1115 | add a new optional field to this type.
1116 |      */
1117 |     export interface InspectorIssueDetails {
1118 |       cookieIssueDetails?: CookieIssueDetails;
1119 |       mixedContentIssueDetails?: MixedContentIssueDetails;
1120 |       blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
1121 |       heavyAdIssueDetails?: HeavyAdIssueDetails;
1122 |       contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
1123 |       sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails;
1124 |       lowTextContrastIssueDetails?: LowTextContrastIssueDetails;
1125 |       corsIssueDetails?: CorsIssueDetails;
1126 |       attributionReportingIssueDetails?: AttributionReportingIssueDetails;
1127 |       quirksModeIssueDetails?: QuirksModeIssueDetails;
1128 |       partitioningBlobURLIssueDetails?: PartitioningBlobURLIssueDetails;
1129 |       navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails;
1130 |       genericIssueDetails?: GenericIssueDetails;
1131 |       deprecationIssueDetails?: DeprecationIssueDetails;
1132 |       clientHintIssueDetails?: ClientHintIssueDetails;
1133 |       federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails;
1134 |       bounceTrackingIssueDetails?: BounceTrackingIssueDetails;
1135 |       cookieDeprecationMetadataIssueDetails?: CookieDeprecationMetadataIssueDetails;
1136 |       stylesheetLoadingIssueDetails?: StylesheetLoadingIssueDetails;
1137 |       propertyRuleIssueDetails?: PropertyRuleIssueDetails;
1138 |       federatedAuthUserInfoRequestIssueDetails?: FederatedAuthUserInfoRequestIssueDetails;
1139 |       sharedDictionaryIssueDetails?: SharedDictionaryIssueDetails;
1140 |       elementAccessibilityIssueDetails?: ElementAccessibilityIssueDetails;
1141 |       sriMessageSignatureIssueDetails?: SRIMessageSignatureIssueDetails;
1142 |       unencodedDigestIssueDetails?: UnencodedDigestIssueDetails;
1143 |       userReidentificationIssueDetails?: UserReidentificationIssueDetails;
1144 |       permissionElementIssueDetails?: PermissionElementIssueDetails;
1145 |     }
1146 |     /**
1147 |      * A unique id for a DevTools inspector issue. Allows other entities (e.g.
1148 | exceptions, CDP message, console messages, etc.) to reference an issue.
1149 |      */
1150 |     export type IssueId = string;
1151 |     /**
1152 |      * An inspector issue reported from the back-end.
1153 |      */
1154 |     export interface InspectorIssue {
1155 |       code: InspectorIssueCode;
1156 |       details: InspectorIssueDetails;
1157 |       /**
1158 |        * A unique id for this issue. May be omitted if no other entity (e.g.
1159 | exception, CDP message, etc.) is referencing this issue.
1160 |        */
1161 |       issueId?: IssueId;
1162 |     }
1163 | 
1164 |     export type issueAddedPayload = {
1165 |       issue: InspectorIssue;
1166 |     }
1167 | 
1168 |     /**
1169 |      * Returns the response body and size if it were re-encoded with the specified settings. Only
1170 | applies to images.
1171 |      */
1172 |     export type getEncodedResponseParameters = {
1173 |       /**
1174 |        * Identifier of the network request to get content for.
1175 |        */
1176 |       requestId: Network.RequestId;
1177 |       /**
1178 |        * The encoding to use.
1179 |        */
1180 |       encoding: "webp"|"jpeg"|"png";
1181 |       /**
1182 |        * The quality of the encoding (0-1). (defaults to 1)
1183 |        */
1184 |       quality?: number;
1185 |       /**
1186 |        * Whether to only return the size information (defaults to false).
1187 |        */
1188 |       sizeOnly?: boolean;
1189 |     }
1190 |     export type getEncodedResponseReturnValue = {
1191 |       /**
1192 |        * The encoded body as a base64 string. Omitted if sizeOnly is true.
1193 |        */
1194 |       body?: binary;
1195 |       /**
1196 |        * Size before re-encoding.
1197 |        */
1198 |       originalSize: number;
1199 |       /**
1200 |        * Size after re-encoding.
1201 |        */
1202 |       encodedSize: number;
1203 |     }
1204 |     /**
1205 |      * Disables issues domain, prevents further issues from being reported to the client.
1206 |      */
1207 |     export type disableParameters = {
1208 |     }
1209 |     export type disableReturnValue = {
1210 |     }
1211 |     /**
1212 |      * Enables issues domain, sends the issues collected so far to the client by means of the
1213 | `issueAdded` event.
1214 |      */
1215 |     export type enableParameters = {
1216 |     }
1217 |     export type enableReturnValue = {
1218 |     }
1219 |     /**
1220 |      * Runs the contrast check for the target page. Found issues are reported
1221 | using Audits.issueAdded event.
1222 |      */
1223 |     export type checkContrastParameters = {
1224 |       /**
1225 |        * Whether to report WCAG AAA level issues. Default is false.
1226 |        */
1227 |       reportAAA?: boolean;
1228 |     }
1229 |     export type checkContrastReturnValue = {
1230 |     }
1231 |     /**
1232 |      * Runs the form issues check for the target page. Found issues are reported
1233 | using Audits.issueAdded event.
1234 |      */
1235 |     export type checkFormsIssuesParameters = {
1236 |     }
1237 |     export type checkFormsIssuesReturnValue = {
1238 |       formIssues: GenericIssueDetails[];
1239 |     }
1240 |   }
1241 | 
1242 |   /**
1243 |    * Defines commands and events for Autofill.
1244 |    */
1245 |   export namespace Autofill {
1246 |     export interface CreditCard {
1247 |       /**
1248 |        * 16-digit credit card number.
1249 |        */
1250 |       number: string;
1251 |       /**
1252 |        * Name of the credit card owner.
1253 |        */
1254 |       name: string;
1255 |       /**
1256 |        * 2-digit expiry month.
1257 |        */
1258 |       expiryMonth: string;
1259 |       /**
1260 |        * 4-digit expiry year.
1261 |        */
1262 |       expiryYear: string;
1263 |       /**
1264 |        * 3-digit card verification code.
1265 |        */
1266 |       cvc: string;
1267 |     }
1268 |     export interface AddressField {
1269 |       /**
1270 |        * address field name, for example GIVEN_NAME.
1271 | The full list of supported field names:
1272 | https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
1273 |        */
1274 |       name: string;
1275 |       /**
1276 |        * address field value, for example Jon Doe.
1277 |        */
1278 |       value: string;
1279 |     }
1280 |     /**
1281 |      * A list of address fields.
1282 |      */
1283 |     export interface AddressFields {
1284 |       fields: AddressField[];
1285 |     }
1286 |     export interface Address {
1287 |       /**
1288 |        * fields and values defining an address.
1289 |        */
1290 |       fields: AddressField[];
1291 |     }
1292 |     /**
1293 |      * Defines how an address can be displayed like in chrome://settings/addresses.
1294 | Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such.
1295 | The following address UI for instance:
1296 | [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]]
1297 | should allow the receiver to render:
1298 | Jon Doe
1299 | Munich 81456
1300 |      */
1301 |     export interface AddressUI {
1302 |       /**
1303 |        * A two dimension array containing the representation of values from an address profile.
1304 |        */
1305 |       addressFields: AddressFields[];
1306 |     }
1307 |     /**
1308 |      * Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
1309 |      */
1310 |     export type FillingStrategy = "autocompleteAttribute"|"autofillInferred";
1311 |     export interface FilledField {
1312 |       /**
1313 |        * The type of the field, e.g text, password etc.
1314 |        */
1315 |       htmlType: string;
1316 |       /**
1317 |        * the html id
1318 |        */
1319 |       id: string;
1320 |       /**
1321 |        * the html name
1322 |        */
1323 |       name: string;
1324 |       /**
1325 |        * the field value
1326 |        */
1327 |       value: string;
1328 |       /**
1329 |        * The actual field type, e.g FAMILY_NAME
1330 |        */
1331 |       autofillType: string;
1332 |       /**
1333 |        * The filling strategy
1334 |        */
1335 |       fillingStrategy: FillingStrategy;
1336 |       /**
1337 |        * The frame the field belongs to
1338 |        */
1339 |       frameId: Page.FrameId;
1340 |       /**
1341 |        * The form field's DOM node
1342 |        */
1343 |       fieldId: DOM.BackendNodeId;
1344 |     }
1345 | 
1346 |     /**
1347 |      * Emitted when an address form is filled.
1348 |      */
1349 |     export type addressFormFilledPayload = {
1350 |       /**
1351 |        * Information about the fields that were filled
1352 |        */
1353 |       filledFields: FilledField[];
1354 |       /**
1355 |        * An UI representation of the address used to fill the form.
1356 | Consists of a 2D array where each child represents an address/profile line.
1357 |        */
1358 |       addressUi: AddressUI;
1359 |     }
1360 | 
1361 |     /**
1362 |      * Trigger autofill on a form identified by the fieldId.
1363 | If the field and related form cannot be autofilled, returns an error.
1364 |      */
1365 |     export type triggerParameters = {
1366 |       /**
1367 |        * Identifies a field that serves as an anchor for autofill.
1368 |        */
1369 |       fieldId: DOM.BackendNodeId;
1370 |       /**
1371 |        * Identifies the frame that field belongs to.
1372 |        */
1373 |       frameId?: Page.FrameId;
1374 |       /**
1375 |        * Credit card information to fill out the form. Credit card data is not saved.  Mutually exclusive with `address`.
1376 |        */
1377 |       card?: CreditCard;
1378 |       /**
1379 |        * Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.
1380 |        */
1381 |       address?: Address;
1382 |     }
1383 |     export type triggerReturnValue = {
1384 |     }
1385 |     /**
1386 |      * Set addresses so that developers can verify their forms implementation.
1387 |      */
1388 |     export type setAddressesParameters = {
1389 |       addresses: Address[];
1390 |     }
1391 |     export type setAddressesReturnValue = {
1392 |     }
1393 |     /**
1394 |      * Disables autofill domain notifications.
1395 |      */
1396 |     export type disableParameters = {
1397 |     }
1398 |     export type disableReturnValue = {
1399 |     }
1400 |     /**
1401 |      * Enables autofill domain notifications.
1402 |      */
1403 |     export type enableParameters = {
1404 |     }
1405 |     export type enableReturnValue = {
1406 |     }
1407 |   }
1408 | 
1409 |   /**
1410 |    * Defines events for background web platform features.
1411 |    */
1412 |   export namespace BackgroundService {
1413 |     /**
1414 |      * The Background Service that will be associated with the commands/events.
1415 | Every Background Service operates independently, but they share the same
1416 | API.
1417 |      */
1418 |     export type ServiceName = "backgroundFetch"|"backgroundSync"|"pushMessaging"|"notifications"|"paymentHandler"|"periodicBackgroundSync";
1419 |     /**
1420 |      * A key-value pair for additional event information to pass along.
1421 |      */
1422 |     export interface EventMetadata {
1423 |       key: string;
1424 |       value: string;
1425 |     }
1426 |     export interface BackgroundServiceEvent {
1427 |       /**
1428 |        * Timestamp of the event (in seconds).
1429 |        */
1430 |       timestamp: Network.TimeSinceEpoch;
1431 |       /**
1432 |        * The origin this event belongs to.
1433 |        */
1434 |       origin: string;
1435 |       /**
1436 |        * The Service Worker ID that initiated the event.
1437 |        */
1438 |       serviceWorkerRegistrationId: ServiceWorker.RegistrationID;
1439 |       /**
1440 |        * The Background Service this event belongs to.
1441 |        */
1442 |       service: ServiceName;
1443 |       /**
1444 |        * A description of the event.
1445 |        */
1446 |       eventName: string;
1447 |       /**
1448 |        * An identifier that groups related events together.
1449 |        */
1450 |       instanceId: string;
1451 |       /**
1452 |        * A list of event-specific information.
1453 |        */
1454 |       eventMetadata: EventMetadata[];
1455 |       /**
1456 |        * Storage key this event belongs to.
1457 |        */
1458 |       storageKey: string;
1459 |     }
1460 | 
1461 |     /**
1462 |      * Called when the recording state for the service has been updated.
1463 |      */
1464 |     export type recordingStateChangedPayload = {
1465 |       isRecording: boolean;
1466 |       service: ServiceName;
1467 |     }
1468 |     /**
1469 |      * Called with all existing backgroundServiceEvents when enabled, and all new
1470 | events afterwards if enabled and recording.
1471 |      */
1472 |     export type backgroundServiceEventReceivedPayload = {
1473 |       backgroundServiceEvent: BackgroundServiceEvent;
1474 |     }
1475 | 
1476 |     /**
1477 |      * Enables event updates for the service.
1478 |      */
1479 |     export type startObservingParameters = {
1480 |       service: ServiceName;
1481 |     }
1482 |     export type startObservingReturnValue = {
1483 |     }
1484 |     /**
1485 |      * Disables event updates for the service.
1486 |      */
1487 |     export type stopObservingParameters = {
1488 |       service: ServiceName;
1489 |     }
1490 |     export type stopObservingReturnValue = {
1491 |     }
1492 |     /**
1493 |      * Set the recording state for the service.
1494 |      */
1495 |     export type setRecordingParameters = {
1496 |       shouldRecord: boolean;
1497 |       service: ServiceName;
1498 |     }
1499 |     export type setRecordingReturnValue = {
1500 |     }
1501 |     /**
1502 |      * Clears all stored data for the service.
1503 |      */
1504 |     export type clearEventsParameters = {
1505 |       service: ServiceName;
1506 |     }
1507 |     export type clearEventsReturnValue = {
1508 |     }
1509 |   }
1510 | 
1511 |   /**
1512 |    * This domain allows configuring virtual Bluetooth devices to test
1513 | the web-bluetooth API.
1514 |    */
1515 |   export namespace BluetoothEmulation {
1516 |     /**
1517 |      * Indicates the various states of Central.
1518 |      */
1519 |     export type CentralState = "absent"|"powered-off"|"powered-on";
1520 |     /**
1521 |      * Indicates the various types of GATT event.
1522 |      */
1523 |     export type GATTOperationType = "connection"|"discovery";
1524 |     /**
1525 |      * Indicates the various types of characteristic write.
1526 |      */
1527 |     export type CharacteristicWriteType = "write-default-deprecated"|"write-with-response"|"write-without-response";
1528 |     /**
1529 |      * Indicates the various types of characteristic operation.
1530 |      */
1531 |     export type CharacteristicOperationType = "read"|"write"|"subscribe-to-notifications"|"unsubscribe-from-notifications";
1532 |     /**
1533 |      * Indicates the various types of descriptor operation.
1534 |      */
1535 |     export type DescriptorOperationType = "read"|"write";
1536 |     /**
1537 |      * Stores the manufacturer data
1538 |      */
1539 |     export interface ManufacturerData {
1540 |       /**
1541 |        * Company identifier
1542 | https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml
1543 | https://usb.org/developers
1544 |        */
1545 |       key: number;
1546 |       /**
1547 |        * Manufacturer-specific data
1548 |        */
1549 |       data: binary;
1550 |     }
1551 |     /**
1552 |      * Stores the byte data of the advertisement packet sent by a Bluetooth device.
1553 |      */
1554 |     export interface ScanRecord {
1555 |       name?: string;
1556 |       uuids?: string[];
1557 |       /**
1558 |        * Stores the external appearance description of the device.
1559 |        */
1560 |       appearance?: number;
1561 |       /**
1562 |        * Stores the transmission power of a broadcasting device.
1563 |        */
1564 |       txPower?: number;
1565 |       /**
1566 |        * Key is the company identifier and the value is an array of bytes of
1567 | manufacturer specific data.
1568 |        */
1569 |       manufacturerData?: ManufacturerData[];
1570 |     }
1571 |     /**
1572 |      * Stores the advertisement packet information that is sent by a Bluetooth device.
1573 |      */
1574 |     export interface ScanEntry {
1575 |       deviceAddress: string;
1576 |       rssi: number;
1577 |       scanRecord: ScanRecord;
1578 |     }
1579 |     /**
1580 |      * Describes the properties of a characteristic. This follows Bluetooth Core
1581 | Specification BT 4.2 Vol 3 Part G 3.3.1. Characteristic Properties.
1582 |      */
1583 |     export interface CharacteristicProperties {
1584 |       broadcast?: boolean;
1585 |       read?: boolean;
1586 |       writeWithoutResponse?: boolean;
1587 |       write?: boolean;
1588 |       notify?: boolean;
1589 |       indicate?: boolean;
1590 |       authenticatedSignedWrites?: boolean;
1591 |       extendedProperties?: boolean;
1592 |     }
1593 | 
1594 |     /**
1595 |      * Event for when a GATT operation of |type| to the peripheral with |address|
1596 | happened.
1597 |      */
1598 |     export type gattOperationReceivedPayload = {
1599 |       address: string;
1600 |       type: GATTOperationType;
1601 |     }
1602 |     /**
1603 |      * Event for when a characteristic operation of |type| to the characteristic
1604 | respresented by |characteristicId| happened. |data| and |writeType| is
1605 | expected to exist when |type| is write.
1606 |      */
1607 |     export type characteristicOperationReceivedPayload = {
1608 |       characteristicId: string;
1609 |       type: CharacteristicOperationType;
1610 |       data?: binary;
1611 |       writeType?: CharacteristicWriteType;
1612 |     }
1613 |     /**
1614 |      * Event for when a descriptor operation of |type| to the descriptor
1615 | respresented by |descriptorId| happened. |data| is expected to exist when
1616 | |type| is write.
1617 |      */
1618 |     export type descriptorOperationReceivedPayload = {
1619 |       descriptorId: string;
1620 |       type: DescriptorOperationType;
1621 |       data?: binary;
1622 |     }
1623 | 
1624 |     /**
1625 |      * Enable the BluetoothEmulation domain.
1626 |      */
1627 |     export type enableParameters = {
1628 |       /**
1629 |        * State of the simulated central.
1630 |        */
1631 |       state: CentralState;
1632 |       /**
1633 |        * If the simulated central supports low-energy.
1634 |        */
1635 |       leSupported: boolean;
1636 |     }
1637 |     export type enableReturnValue = {
1638 |     }
1639 |     /**
1640 |      * Set the state of the simulated central.
1641 |      */
1642 |     export type setSimulatedCentralStateParameters = {
1643 |       /**
1644 |        * State of the simulated central.
1645 |        */
1646 |       state: CentralState;
1647 |     }
1648 |     export type setSimulatedCentralStateReturnValue = {
1649 |     }
1650 |     /**
1651 |      * Disable the BluetoothEmulation domain.
1652 |      */
1653 |     export type disableParameters = {
1654 |     }
1655 |     export type disableReturnValue = {
1656 |     }
1657 |     /**
1658 |      * Simulates a peripheral with |address|, |name| and |knownServiceUuids|
1659 | that has already been connected to the system.
1660 |      */
1661 |     export type simulatePreconnectedPeripheralParameters = {
1662 |       address: string;
1663 |       name: string;
1664 |       manufacturerData: ManufacturerData[];
1665 |       knownServiceUuids: string[];
1666 |     }
1667 |     export type simulatePreconnectedPeripheralReturnValue = {
1668 |     }
1669 |     /**
1670 |      * Simulates an advertisement packet described in |entry| being received by
1671 | the central.
1672 |      */
1673 |     export type simulateAdvertisementParameters = {
1674 |       entry: ScanEntry;
1675 |     }
1676 |     export type simulateAdvertisementReturnValue = {
1677 |     }
1678 |     /**
1679 |      * Simulates the response code from the peripheral with |address| for a
1680 | GATT operation of |type|. The |code| value follows the HCI Error Codes from
1681 | Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
1682 |      */
1683 |     export type simulateGATTOperationResponseParameters = {
1684 |       address: string;
1685 |       type: GATTOperationType;
1686 |       code: number;
1687 |     }
1688 |     export type simulateGATTOperationResponseReturnValue = {
1689 |     }
1690 |     /**
1691 |      * Simulates the response from the characteristic with |characteristicId| for a
1692 | characteristic operation of |type|. The |code| value follows the Error
1693 | Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
1694 | The |data| is expected to exist when simulating a successful read operation
1695 | response.
1696 |      */
1697 |     export type simulateCharacteristicOperationResponseParameters = {
1698 |       characteristicId: string;
1699 |       type: CharacteristicOperationType;
1700 |       code: number;
1701 |       data?: binary;
1702 |     }
1703 |     export type simulateCharacteristicOperationResponseReturnValue = {
1704 |     }
1705 |     /**
1706 |      * Simulates the response from the descriptor with |descriptorId| for a
1707 | descriptor operation of |type|. The |code| value follows the Error
1708 | Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response.
1709 | The |data| is expected to exist when simulating a successful read operation
1710 | response.
1711 |      */
1712 |     export type simulateDescriptorOperationResponseParameters = {
1713 |       descriptorId: string;
1714 |       type: DescriptorOperationType;
1715 |       code: number;
1716 |       data?: binary;
1717 |     }
1718 |     export type simulateDescriptorOperationResponseReturnValue = {
1719 |     }
1720 |     /**
1721 |      * Adds a service with |serviceUuid| to the peripheral with |address|.
1722 |      */
1723 |     export type addServiceParameters = {
1724 |       address: string;
1725 |       serviceUuid: string;
1726 |     }
1727 |     export type addServiceReturnValue = {
1728 |       /**
1729 |        * An identifier that uniquely represents this service.
1730 |        */
1731 |       serviceId: string;
1732 |     }
1733 |     /**
1734 |      * Removes the service respresented by |serviceId| from the simulated central.
1735 |      */
1736 |     export type removeServiceParameters = {
1737 |       serviceId: string;
1738 |     }
1739 |     export type removeServiceReturnValue = {
1740 |     }
1741 |     /**
1742 |      * Adds a characteristic with |characteristicUuid| and |properties| to the
1743 | service represented by |serviceId|.
1744 |      */
1745 |     export type addCharacteristicParameters = {
1746 |       serviceId: string;
1747 |       characteristicUuid: string;
1748 |       properties: CharacteristicProperties;
1749 |     }
1750 |     export type addCharacteristicReturnValue = {
1751 |       /**
1752 |        * An identifier that uniquely represents this characteristic.
1753 |        */
1754 |       characteristicId: string;
1755 |     }
1756 |     /**
1757 |      * Removes the characteristic respresented by |characteristicId| from the
1758 | simulated central.
1759 |      */
1760 |     export type removeCharacteristicParameters = {
1761 |       characteristicId: string;
1762 |     }
1763 |     export type removeCharacteristicReturnValue = {
1764 |     }
1765 |     /**
1766 |      * Adds a descriptor with |descriptorUuid| to the characteristic respresented
1767 | by |characteristicId|.
1768 |      */
1769 |     export type addDescriptorParameters = {
1770 |       characteristicId: string;
1771 |       descriptorUuid: string;
1772 |     }
1773 |     export type addDescriptorReturnValue = {
1774 |       /**
1775 |        * An identifier that uniquely represents this descriptor.
1776 |        */
1777 |       descriptorId: string;
1778 |     }
1779 |     /**
1780 |      * Removes the descriptor with |descriptorId| from the simulated central.
1781 |      */
1782 |     export type removeDescriptorParameters = {
1783 |       descriptorId: string;
1784 |     }
1785 |     export type removeDescriptorReturnValue = {
1786 |     }
1787 |     /**
1788 |      * Simulates a GATT disconnection from the peripheral with |address|.
1789 |      */
1790 |     export type simulateGATTDisconnectionParameters = {
1791 |       address: string;
1792 |     }
1793 |     export type simulateGATTDisconnectionReturnValue = {
1794 |     }
1795 |   }
1796 | 
1797 |   /**
1798 |    * The Browser domain defines methods and events for browser managing.
1799 |    */
1800 |   export namespace Browser {
1801 |     export type BrowserContextID = string;
1802 |     export type WindowID = number;
1803 |     /**
1804 |      * The state of the browser window.
1805 |      */
1806 |     export type WindowState = "normal"|"minimized"|"maximized"|"fullscreen";
1807 |     /**
1808 |      * Browser window bounds information
1809 |      */
1810 |     export interface Bounds {
1811 |       /**
1812 |        * The offset from the left edge of the screen to the window in pixels.
1813 |        */
1814 |       left?: number;
1815 |       /**
1816 |        * The offset from the top edge of the screen to the window in pixels.
1817 |        */
1818 |       top?: number;
1819 |       /**
1820 |        * The window width in pixels.
1821 |        */
1822 |       width?: number;
1823 |       /**
1824 |        * The window height in pixels.
1825 |        */
1826 |       height?: number;
1827 |       /**
1828 |        * The window state. Default to normal.
1829 |        */
1830 |       windowState?: WindowState;
1831 |     }
1832 |     export type PermissionType = "ar"|"audioCapture"|"automaticFullscreen"|"backgroundFetch"|"backgroundSync"|"cameraPanTiltZoom"|"capturedSurfaceControl"|"clipboardReadWrite"|"clipboardSanitizedWrite"|"displayCapture"|"durableStorage"|"geolocation"|"handTracking"|"idleDetection"|"keyboardLock"|"localFonts"|"localNetwork"|"localNetworkAccess"|"loopbackNetwork"|"midi"|"midiSysex"|"nfc"|"notifications"|"paymentHandler"|"periodicBackgroundSync"|"pointerLock"|"protectedMediaIdentifier"|"sensors"|"smartCard"|"speakerSelection"|"storageAccess"|"topLevelStorageAccess"|"videoCapture"|"vr"|"wakeLockScreen"|"wakeLockSystem"|"webAppInstallation"|"webPrinting"|"windowManagement";
1833 |     export type PermissionSetting = "granted"|"denied"|"prompt";
1834 |     /**
1835 |      * Definition of PermissionDescriptor defined in the Permissions API:
1836 | https://w3c.github.io/permissions/#dom-permissiondescriptor.
1837 |      */
1838 |     export interface PermissionDescriptor {
1839 |       /**
1840 |        * Name of permission.
1841 | See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
1842 |        */
1843 |       name: string;
1844 |       /**
1845 |        * For "midi" permission, may also specify sysex control.
1846 |        */
1847 |       sysex?: boolean;
1848 |       /**
1849 |        * For "push" permission, may specify userVisibleOnly.
1850 | Note that userVisibleOnly = true is the only currently supported type.
1851 |        */
1852 |       userVisibleOnly?: boolean;
1853 |       /**
1854 |        * For "clipboard" permission, may specify allowWithoutSanitization.
1855 |        */
1856 |       allowWithoutSanitization?: boolean;
1857 |       /**
1858 |        * For "fullscreen" permission, must specify allowWithoutGesture:true.
1859 |        */
1860 |       allowWithoutGesture?: boolean;
1861 |       /**
1862 |        * For "camera" permission, may specify panTiltZoom.
1863 |        */
1864 |       panTiltZoom?: boolean;
1865 |     }
1866 |     /**
1867 |      * Browser command ids used by executeBrowserCommand.
1868 |      */
1869 |     export type BrowserCommandId = "openTabSearch"|"closeTabSearch"|"openGlic";
1870 |     /**
1871 |      * Chrome histogram bucket.
1872 |      */
1873 |     export interface Bucket {
1874 |       /**
1875 |        * Minimum value (inclusive).
1876 |        */
1877 |       low: number;
1878 |       /**
1879 |        * Maximum value (exclusive).
1880 |        */
1881 |       high: number;
1882 |       /**
1883 |        * Number of samples.
1884 |        */
1885 |       count: number;
1886 |     }
1887 |     /**
1888 |      * Chrome histogram.
1889 |      */
1890 |     export interface Histogram {
1891 |       /**
1892 |        * Name.
1893 |        */
1894 |       name: string;
1895 |       /**
1896 |        * Sum of sample values.
1897 |        */
1898 |       sum: number;
1899 |       /**
1900 |        * Total number of samples.
1901 |        */
1902 |       count: number;
1903 |       /**
1904 |        * Buckets.
1905 |        */
1906 |       buckets: Bucket[];
1907 |     }
1908 |     export type PrivacySandboxAPI = "BiddingAndAuctionServices"|"TrustedKeyValue";
1909 | 
1910 |     /**
1911 |      * Fired when page is about to start a download.
1912 |      */
1913 |     export type downloadWillBeginPayload = {
1914 |       /**
1915 |        * Id of the frame that caused the download to begin.
1916 |        */
1917 |       frameId: Page.FrameId;
1918 |       /**
1919 |        * Global unique identifier of the download.
1920 |        */
1921 |       guid: string;
1922 |       /**
1923 |        * URL of the resource being downloaded.
1924 |        */
1925 |       url: string;
1926 |       /**
1927 |        * Suggested file name of the resource (the actual name of the file saved on disk may differ).
1928 |        */
1929 |       suggestedFilename: string;
1930 |     }
1931 |     /**
1932 |      * Fired when download makes progress. Last call has |done| == true.
1933 |      */
1934 |     export type downloadProgressPayload = {
1935 |       /**
1936 |        * Global unique identifier of the download.
1937 |        */
1938 |       guid: string;
1939 |       /**
1940 |        * Total expected bytes to download.
1941 |        */
1942 |       totalBytes: number;
1943 |       /**
1944 |        * Total bytes received.
1945 |        */
1946 |       receivedBytes: number;
1947 |       /**
1948 |        * Download status.
1949 |        */
1950 |       state: "inProgress"|"completed"|"canceled";
1951 |       /**
1952 |        * If download is "completed", provides the path of the downloaded file.
1953 | Depending on the platform, it is not guaranteed to be set, nor the file
1954 | is guaranteed to exist.
1955 |        */
1956 |       filePath?: string;
1957 |     }
1958 | 
1959 |     /**
1960 |      * Set permission settings for given embedding and embedded origins.
1961 |      */
1962 |     export type setPermissionParameters = {
1963 |       /**
1964 |        * Descriptor of permission to override.
1965 |        */
1966 |       permission: PermissionDescriptor;
1967 |       /**
1968 |        * Setting of the permission.
1969 |        */
1970 |       setting: PermissionSetting;
1971 |       /**
1972 |        * Embedding origin the permission applies to, all origins if not specified.
1973 |        */
1974 |       origin?: string;
1975 |       /**
1976 |        * Embedded origin the permission applies to. It is ignored unless the embedding origin is
1977 | present and valid. If the embedding origin is provided but the embedded origin isn't, the
1978 | embedding origin is used as the embedded origin.
1979 |        */
1980 |       embeddedOrigin?: string;
1981 |       /**
1982 |        * Context to override. When omitted, default browser context is used.
1983 |        */
1984 |       browserContextId?: BrowserContextID;
1985 |     }
1986 |     export type setPermissionReturnValue = {
1987 |     }
1988 |     /**
1989 |      * Grant specific permissions to the given origin and reject all others. Deprecated. Use
1990 | setPermission instead.
1991 |      */
1992 |     export type grantPermissionsParameters = {
1993 |       permissions: PermissionType[];
1994 |       /**
1995 |        * Origin the permission applies to, all origins if not specified.
1996 |        */
1997 |       origin?: string;
1998 |       /**
1999 |        * BrowserContext to override permissions. When omitted, default browser context is used.
2000 |        */
2001 |       browserContextId?: BrowserContextID;
2002 |     }
2003 |     export type grantPermissionsReturnValue = {
2004 |     }
2005 |     /**
2006 |      * Reset all permission management for all origins.
2007 |      */
2008 |     export type resetPermissionsParameters = {
2009 |       /**
2010 |        * BrowserContext to reset permissions. When omitted, default browser context is used.
2011 |        */
2012 |       browserContextId?: BrowserContextID;
2013 |     }
2014 |     export type resetPermissionsReturnValue = {
2015 |     }
2016 |     /**
2017 |      * Set the behavior when downloading a file.
2018 |      */
2019 |     export type setDownloadBehaviorParameters = {
2020 |       /**
2021 |        * Whether to allow all or deny all download requests, or use default Chrome behavior if
2022 | available (otherwise deny). |allowAndName| allows download and names files according to
2023 | their download guids.
2024 |        */
2025 |       behavior: "deny"|"allow"|"allowAndName"|"default";
2026 |       /**
2027 |        * BrowserContext to set download behavior. When omitted, default browser context is used.
2028 |        */
2029 |       browserContextId?: BrowserContextID;
2030 |       /**
2031 |        * The default path to save downloaded files to. This is required if behavior is set to 'allow'
2032 | or 'allowAndName'.
2033 |        */
2034 |       downloadPath?: string;
2035 |       /**
2036 |        * Whether to emit download events (defaults to false).
2037 |        */
2038 |       eventsEnabled?: boolean;
2039 |     }
2040 |     export type setDownloadBehaviorReturnValue = {
2041 |     }
2042 |     /**
2043 |      * Cancel a download if in progress
2044 |      */
2045 |     export type cancelDownloadParameters = {
2046 |       /**
2047 |        * Global unique identifier of the download.
2048 |        */
2049 |       guid: string;
2050 |       /**
2051 |        * BrowserContext to perform the action in. When omitted, default browser context is used.
2052 |        */
2053 |       browserContextId?: BrowserContextID;
2054 |     }
2055 |     export type cancelDownloadReturnValue = {
2056 |     }
2057 |     /**
2058 |      * Close browser gracefully.
2059 |      */
2060 |     export type closeParameters = {
2061 |     }
2062 |     export type closeReturnValue = {
2063 |     }
2064 |     /**
2065 |      * Crashes browser on the main thread.
2066 |      */
2067 |     export type crashParameters = {
2068 |     }
2069 |     export type crashReturnValue = {
2070 |     }
2071 |     /**
2072 |      * Crashes GPU process.
2073 |      */
2074 |     export type crashGpuProcessParameters = {
2075 |     }
2076 |     export type crashGpuProcessReturnValue = {
2077 |     }
2078 |     /**
2079 |      * Returns version information.
2080 |      */
2081 |     export type getVersionParameters = {
2082 |     }
2083 |     export type getVersionReturnValue = {
2084 |       /**
2085 |        * Protocol version.
2086 |        */
2087 |       protocolVersion: string;
2088 |       /**
2089 |        * Product name.
2090 |        */
2091 |       product: string;
2092 |       /**
2093 |        * Product revision.
2094 |        */
2095 |       revision: string;
2096 |       /**
2097 |        * User-Agent.
2098 |        */
2099 |       userAgent: string;
2100 |       /**
2101 |        * V8 version.
2102 |        */
2103 |       jsVersion: string;
2104 |     }
2105 |     /**
2106 |      * Returns the command line switches for the browser process if, and only if
2107 | --enable-automation is on the commandline.
2108 |      */
2109 |     export type getBrowserCommandLineParameters = {
2110 |     }
2111 |     export type getBrowserCommandLineReturnValue = {
2112 |       /**
2113 |        * Commandline parameters
2114 |        */
2115 |       arguments: string[];
2116 |     }
2117 |     /**
2118 |      * Get Chrome histograms.
2119 |      */
2120 |     export type getHistogramsParameters = {
2121 |       /**
2122 |        * Requested substring in name. Only histograms which have query as a
2123 | substring in their name are extracted. An empty or absent query returns
2124 | all histograms.
2125 |        */
2126 |       query?: string;
2127 |       /**
2128 |        * If true, retrieve delta since last delta call.
2129 |        */
2130 |       delta?: boolean;
2131 |     }
2132 |     export type getHistogramsReturnValue = {
2133 |       /**
2134 |        * Histograms.
2135 |        */
2136 |       histograms: Histogram[];
2137 |     }
2138 |     /**
2139 |      * Get a Chrome histogram by name.
2140 |      */
2141 |     export type getHistogramParameters = {
2142 |       /**
2143 |        * Requested histogram name.
2144 |        */
2145 |       name: string;
2146 |       /**
2147 |        * If true, retrieve delta since last delta call.
2148 |        */
2149 |       delta?: boolean;
2150 |     }
2151 |     export type getHistogramReturnValue = {
2152 |       /**
2153 |        * Histogram.
2154 |        */
2155 |       histogram: Histogram;
2156 |     }
2157 |     /**
2158 |      * Get position and size of the browser window.
2159 |      */
2160 |     export type getWindowBoundsParameters = {
2161 |       /**
2162 |        * Browser window id.
2163 |        */
2164 |       windowId: WindowID;
2165 |     }
2166 |     export type getWindowBoundsReturnValue = {
2167 |       /**
2168 |        * Bounds information of the window. When window state is 'minimized', the restored window
2169 | position and size are returned.
2170 |        */
2171 |       bounds: Bounds;
2172 |     }
2173 |     /**
2174 |      * Get the browser window that contains the devtools target.
2175 |      */
2176 |     export type getWindowForTargetParameters = {
2177 |       /**
2178 |        * Devtools agent host id. If called as a part of the session, associated targetId is used.
2179 |        */
2180 |       targetId?: Target.TargetID;
2181 |     }
2182 |     export type getWindowForTargetReturnValue = {
2183 |       /**
2184 |        * Browser window id.
2185 |        */
2186 |       windowId: WindowID;
2187 |       /**
2188 |        * Bounds information of the window. When window state is 'minimized', the restored window
2189 | position and size are returned.
2190 |        */
2191 |       bounds: Bounds;
2192 |     }
2193 |     /**
2194 |      * Set position and/or size of the browser window.
2195 |      */
2196 |     export type setWindowBoundsParameters = {
2197 |       /**
2198 |        * Browser window id.
2199 |        */
2200 |       windowId: WindowID;
2201 |       /**
2202 |        * New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
2203 | with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
2204 |        */
2205 |       bounds: Bounds;
2206 |     }
2207 |     export type setWindowBoundsReturnValue = {
2208 |     }
2209 |     /**
2210 |      * Set size of the browser contents resizing browser window as necessary.
2211 |      */
2212 |     export type setContentsSizeParameters = {
2213 |       /**
2214 |        * Browser window id.
2215 |        */
2216 |       windowId: WindowID;
2217 |       /**
2218 |        * The window contents width in DIP. Assumes current width if omitted.
2219 | Must be specified if 'height' is omitted.
2220 |        */
2221 |       width?: number;
2222 |       /**
2223 |        * The window contents height in DIP. Assumes current height if omitted.
2224 | Must be specified if 'width' is omitted.
2225 |        */
2226 |       height?: number;
2227 |     }
2228 |     export type setContentsSizeReturnValue = {
2229 |     }
2230 |     /**
2231 |      * Set dock tile details, platform-specific.
2232 |      */
2233 |     export type setDockTileParameters = {
2234 |       badgeLabel?: string;
2235 |       /**
2236 |        * Png encoded image.
2237 |        */
2238 |       image?: binary;
2239 |     }
2240 |     export type setDockTileReturnValue = {
2241 |     }
2242 |     /**
2243 |      * Invoke custom browser commands used by telemetry.
2244 |      */
2245 |     export type executeBrowserCommandParameters = {
2246 |       commandId: BrowserCommandId;
2247 |     }
2248 |     export type executeBrowserCommandReturnValue = {
2249 |     }
2250 |     /**
2251 |      * Allows a site to use privacy sandbox features that require enrollment
2252 | without the site actually being enrolled. Only supported on page targets.
2253 |      */
2254 |     export type addPrivacySandboxEnrollmentOverrideParameters = {
2255 |       url: string;
2256 |     }
2257 |     export type addPrivacySandboxEnrollmentOverrideReturnValue = {
2258 |     }
2259 |     /**
2260 |      * Configures encryption keys used with a given privacy sandbox API to talk
2261 | to a trusted coordinator.  Since this is intended for test automation only,
2262 | coordinatorOrigin must be a .test domain. No existing coordinator
2263 | configuration for the origin may exist.
2264 |      */
2265 |     export type addPrivacySandboxCoordinatorKeyConfigParameters = {
2266 |       api: PrivacySandboxAPI;
2267 |       coordinatorOrigin: string;
2268 |       keyConfig: string;
2269 |       /**
2270 |        * BrowserContext to perform the action in. When omitted, default browser
2271 | context is used.
2272 |        */
2273 |       browserContextId?: BrowserContextID;
2274 |     }
2275 |     export type addPrivacySandboxCoordinatorKeyConfigReturnValue = {
2276 |     }
2277 |   }
2278 | 
2279 |   /**
2280 |    * This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
2281 | have an associated `id` used in subsequent operations on the related object. Each object type has
2282 | a specific `id` structure, and those are not interchangeable between objects of different kinds.
2283 | CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
2284 | can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
2285 | subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
2286 |    */
2287 |   export namespace CSS {
2288 |     /**
2289 |      * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
2290 | stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
2291 | inspector" rules), "regular" for regular stylesheets.
2292 |      */
2293 |     export type StyleSheetOrigin = "injected"|"user-agent"|"inspector"|"regular";
2294 |     /**
2295 |      * CSS rule collection for a single pseudo style.
2296 |      */
2297 |     export interface PseudoElementMatches {
2298 |       /**
2299 |        * Pseudo element type.
2300 |        */
2301 |       pseudoType: DOM.PseudoType;
2302 |       /**
2303 |        * Pseudo element custom ident.
2304 |        */
2305 |       pseudoIdentifier?: string;
2306 |       /**
2307 |        * Matches of CSS rules applicable to the pseudo style.
2308 |        */
2309 |       matches: RuleMatch[];
2310 |     }
2311 |     /**
2312 |      * CSS style coming from animations with the name of the animation.
2313 |      */
2314 |     export interface CSSAnimationStyle {
2315 |       /**
2316 |        * The name of the animation.
2317 |        */
2318 |       name?: string;
2319 |       /**
2320 |        * The style coming from the animation.
2321 |        */
2322 |       style: CSSStyle;
2323 |     }
2324 |     /**
2325 |      * Inherited CSS rule collection from ancestor node.
2326 |      */
2327 |     export interface InheritedStyleEntry {
2328 |       /**
2329 |        * The ancestor node's inline style, if any, in the style inheritance chain.
2330 |        */
2331 |       inlineStyle?: CSSStyle;
2332 |       /**
2333 |        * Matches of CSS rules matching the ancestor node in the style inheritance chain.
2334 |        */
2335 |       matchedCSSRules: RuleMatch[];
2336 |     }
2337 |     /**
2338 |      * Inherited CSS style collection for animated styles from ancestor node.
2339 |      */
2340 |     export interface InheritedAnimatedStyleEntry {
2341 |       /**
2342 |        * Styles coming from the animations of the ancestor, if any, in the style inheritance chain.
2343 |        */
2344 |       animationStyles?: CSSAnimationStyle[];
2345 |       /**
2346 |        * The style coming from the transitions of the ancestor, if any, in the style inheritance chain.
2347 |        */
2348 |       transitionsStyle?: CSSStyle;
2349 |     }
2350 |     /**
2351 |      * Inherited pseudo element matches from pseudos of an ancestor node.
2352 |      */
2353 |     export interface InheritedPseudoElementMatches {
2354 |       /**
2355 |        * Matches of pseudo styles from the pseudos of an ancestor node.
2356 |        */
2357 |       pseudoElements: PseudoElementMatches[];
2358 |     }
2359 |     /**
2360 |      * Match data for a CSS rule.
2361 |      */
2362 |     export interface RuleMatch {
2363 |       /**
2364 |        * CSS rule in the match.
2365 |        */
2366 |       rule: CSSRule;
2367 |       /**
2368 |        * Matching selector indices in the rule's selectorList selectors (0-based).
2369 |        */
2370 |       matchingSelectors: number[];
2371 |     }
2372 |     /**
2373 |      * Data for a simple selector (these are delimited by commas in a selector list).
2374 |      */
2375 |     export interface Value {
2376 |       /**
2377 |        * Value text.
2378 |        */
2379 |       text: string;
2380 |       /**
2381 |        * Value range in the underlying resource (if available).
2382 |        */
2383 |       range?: SourceRange;
2384 |       /**
2385 |        * Specificity of the selector.
2386 |        */
2387 |       specificity?: Specificity;
2388 |     }
2389 |     /**
2390 |      * Specificity:
2391 | https://drafts.csswg.org/selectors/#specificity-rules
2392 |      */
2393 |     export interface Specificity {
2394 |       /**
2395 |        * The a component, which represents the number of ID selectors.
2396 |        */
2397 |       a: number;
2398 |       /**
2399 |        * The b component, which represents the number of class selectors, attributes selectors, and
2400 | pseudo-classes.
2401 |        */
2402 |       b: number;
2403 |       /**
2404 |        * The c component, which represents the number of type selectors and pseudo-elements.
2405 |        */
2406 |       c: number;
2407 |     }
2408 |     /**
2409 |      * Selector list data.
2410 |      */
2411 |     export interface SelectorList {
2412 |       /**
2413 |        * Selectors in the list.
2414 |        */
2415 |       selectors: Value[];
2416 |       /**
2417 |        * Rule selector text.
2418 |        */
2419 |       text: string;
2420 |     }
2421 |     /**
2422 |      * CSS stylesheet metainformation.
2423 |      */
2424 |     export interface CSSStyleSheetHeader {
2425 |       /**
2426 |        * The stylesheet identifier.
2427 |        */
2428 |       styleSheetId: DOM.StyleSheetId;
2429 |       /**
2430 |        * Owner frame identifier.
2431 |        */
2432 |       frameId: Page.FrameId;
2433 |       /**
2434 |        * Stylesheet resource URL. Empty if this is a constructed stylesheet created using
2435 | new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported
2436 | as a CSS module script).
2437 |        */
2438 |       sourceURL: string;
2439 |       /**
2440 |        * URL of source map associated with the stylesheet (if any).
2441 |        */
2442 |       sourceMapURL?: string;
2443 |       /**
2444 |        * Stylesheet origin.
2445 |        */
2446 |       origin: StyleSheetOrigin;
2447 |       /**
2448 |        * Stylesheet title.
2449 |        */
2450 |       title: string;
2451 |       /**
2452 |        * The backend id for the owner node of the stylesheet.
2453 |        */
2454 |       ownerNode?: DOM.BackendNodeId;
2455 |       /**
2456 |        * Denotes whether the stylesheet is disabled.
2457 |        */
2458 |       disabled: boolean;
2459 |       /**
2460 |        * Whether the sourceURL field value comes from the sourceURL comment.
2461 |        */
2462 |       hasSourceURL?: boolean;
2463 |       /**
2464 |        * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for
2465 | document.written STYLE tags.
2466 |        */
2467 |       isInline: boolean;
2468 |       /**
2469 |        * Whether this stylesheet is mutable. Inline stylesheets become mutable
2470 | after they have been modified via CSSOM API.
2471 | `<link>` element's stylesheets become mutable only if DevTools modifies them.
2472 | Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
2473 |        */
2474 |       isMutable: boolean;
2475 |       /**
2476 |        * True if this stylesheet is created through new CSSStyleSheet() or imported as a
2477 | CSS module script.
2478 |        */
2479 |       isConstructed: boolean;
2480 |       /**
2481 |        * Line offset of the stylesheet within the resource (zero based).
2482 |        */
2483 |       startLine: number;
2484 |       /**
2485 |        * Column offset of the stylesheet within the resource (zero based).
2486 |        */
2487 |       startColumn: number;
2488 |       /**
2489 |        * Size of the content (in characters).
2490 |        */
2491 |       length: number;
2492 |       /**
2493 |        * Line offset of the end of the stylesheet within the resource (zero based).
2494 |        */
2495 |       endLine: number;
2496 |       /**
2497 |        * Column offset of the end of the stylesheet within the resource (zero based).
2498 |        */
2499 |       endColumn: number;
2500 |       /**
2501 |        * If the style sheet was loaded from a network resource, this indicates when the resource failed to load
2502 |        */
2503 |       loadingFailed?: boolean;
2504 |     }
2505 |     /**
2506 |      * CSS rule representation.
2507 |      */
2508 |     export interface CSSRule {
2509 |       /**
2510 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2511 | stylesheet rules) this rule came from.
2512 |        */
2513 |       styleSheetId?: DOM.StyleSheetId;
2514 |       /**
2515 |        * Rule selector data.
2516 |        */
2517 |       selectorList: SelectorList;
2518 |       /**
2519 |        * Array of selectors from ancestor style rules, sorted by distance from the current rule.
2520 |        */
2521 |       nestingSelectors?: string[];
2522 |       /**
2523 |        * Parent stylesheet's origin.
2524 |        */
2525 |       origin: StyleSheetOrigin;
2526 |       /**
2527 |        * Associated style declaration.
2528 |        */
2529 |       style: CSSStyle;
2530 |       /**
2531 |        * The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
2532 |        */
2533 |       originTreeScopeNodeId?: DOM.BackendNodeId;
2534 |       /**
2535 |        * Media list array (for rules involving media queries). The array enumerates media queries
2536 | starting with the innermost one, going outwards.
2537 |        */
2538 |       media?: CSSMedia[];
2539 |       /**
2540 |        * Container query list array (for rules involving container queries).
2541 | The array enumerates container queries starting with the innermost one, going outwards.
2542 |        */
2543 |       containerQueries?: CSSContainerQuery[];
2544 |       /**
2545 |        * @supports CSS at-rule array.
2546 | The array enumerates @supports at-rules starting with the innermost one, going outwards.
2547 |        */
2548 |       supports?: CSSSupports[];
2549 |       /**
2550 |        * Cascade layer array. Contains the layer hierarchy that this rule belongs to starting
2551 | with the innermost layer and going outwards.
2552 |        */
2553 |       layers?: CSSLayer[];
2554 |       /**
2555 |        * @scope CSS at-rule array.
2556 | The array enumerates @scope at-rules starting with the innermost one, going outwards.
2557 |        */
2558 |       scopes?: CSSScope[];
2559 |       /**
2560 |        * The array keeps the types of ancestor CSSRules from the innermost going outwards.
2561 |        */
2562 |       ruleTypes?: CSSRuleType[];
2563 |       /**
2564 |        * @starting-style CSS at-rule array.
2565 | The array enumerates @starting-style at-rules starting with the innermost one, going outwards.
2566 |        */
2567 |       startingStyles?: CSSStartingStyle[];
2568 |     }
2569 |     /**
2570 |      * Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.
2571 | This list only contains rule types that are collected during the ancestor rule collection.
2572 |      */
2573 |     export type CSSRuleType = "MediaRule"|"SupportsRule"|"ContainerRule"|"LayerRule"|"ScopeRule"|"StyleRule"|"StartingStyleRule";
2574 |     /**
2575 |      * CSS coverage information.
2576 |      */
2577 |     export interface RuleUsage {
2578 |       /**
2579 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2580 | stylesheet rules) this rule came from.
2581 |        */
2582 |       styleSheetId: DOM.StyleSheetId;
2583 |       /**
2584 |        * Offset of the start of the rule (including selector) from the beginning of the stylesheet.
2585 |        */
2586 |       startOffset: number;
2587 |       /**
2588 |        * Offset of the end of the rule body from the beginning of the stylesheet.
2589 |        */
2590 |       endOffset: number;
2591 |       /**
2592 |        * Indicates whether the rule was actually used by some element in the page.
2593 |        */
2594 |       used: boolean;
2595 |     }
2596 |     /**
2597 |      * Text range within a resource. All numbers are zero-based.
2598 |      */
2599 |     export interface SourceRange {
2600 |       /**
2601 |        * Start line of range.
2602 |        */
2603 |       startLine: number;
2604 |       /**
2605 |        * Start column of range (inclusive).
2606 |        */
2607 |       startColumn: number;
2608 |       /**
2609 |        * End line of range
2610 |        */
2611 |       endLine: number;
2612 |       /**
2613 |        * End column of range (exclusive).
2614 |        */
2615 |       endColumn: number;
2616 |     }
2617 |     export interface ShorthandEntry {
2618 |       /**
2619 |        * Shorthand name.
2620 |        */
2621 |       name: string;
2622 |       /**
2623 |        * Shorthand value.
2624 |        */
2625 |       value: string;
2626 |       /**
2627 |        * Whether the property has "!important" annotation (implies `false` if absent).
2628 |        */
2629 |       important?: boolean;
2630 |     }
2631 |     export interface CSSComputedStyleProperty {
2632 |       /**
2633 |        * Computed style property name.
2634 |        */
2635 |       name: string;
2636 |       /**
2637 |        * Computed style property value.
2638 |        */
2639 |       value: string;
2640 |     }
2641 |     export interface ComputedStyleExtraFields {
2642 |       /**
2643 |        * Returns whether or not this node is being rendered with base appearance,
2644 | which happens when it has its appearance property set to base/base-select
2645 | or it is in the subtree of an element being rendered with base appearance.
2646 |        */
2647 |       isAppearanceBase: boolean;
2648 |     }
2649 |     /**
2650 |      * CSS style representation.
2651 |      */
2652 |     export interface CSSStyle {
2653 |       /**
2654 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
2655 | stylesheet rules) this rule came from.
2656 |        */
2657 |       styleSheetId?: DOM.StyleSheetId;
2658 |       /**
2659 |        * CSS properties in the style.
2660 |        */
2661 |       cssProperties: CSSProperty[];
2662 |       /**
2663 |        * Computed values for all shorthands found in the style.
2664 |        */
2665 |       shorthandEntries: ShorthandEntry[];
2666 |       /**
2667 |        * Style declaration text (if available).
2668 |        */
2669 |       cssText?: string;
2670 |       /**
2671 |        * Style declaration range in the enclosing stylesheet (if available).
2672 |        */
2673 |       range?: SourceRange;
2674 |     }
2675 |     /**
2676 |      * CSS property declaration data.
2677 |      */
2678 |     export interface CSSProperty {
2679 |       /**
2680 |        * The property name.
2681 |        */
2682 |       name: string;
2683 |       /**
2684 |        * The property value.
2685 |        */
2686 |       value: string;
2687 |       /**
2688 |        * Whether the property has "!important" annotation (implies `false` if absent).
2689 |        */
2690 |       important?: boolean;
2691 |       /**
2692 |        * Whether the property is implicit (implies `false` if absent).
2693 |        */
2694 |       implicit?: boolean;
2695 |       /**
2696 |        * The full property text as specified in the style.
2697 |        */
2698 |       text?: string;
2699 |       /**
2700 |        * Whether the property is understood by the browser (implies `true` if absent).
2701 |        */
2702 |       parsedOk?: boolean;
2703 |       /**
2704 |        * Whether the property is disabled by the user (present for source-based properties only).
2705 |        */
2706 |       disabled?: boolean;
2707 |       /**
2708 |        * The entire property range in the enclosing style declaration (if available).
2709 |        */
2710 |       range?: SourceRange;
2711 |       /**
2712 |        * Parsed longhand components of this property if it is a shorthand.
2713 | This field will be empty if the given property is not a shorthand.
2714 |        */
2715 |       longhandProperties?: CSSProperty[];
2716 |     }
2717 |     /**
2718 |      * CSS media rule descriptor.
2719 |      */
2720 |     export interface CSSMedia {
2721 |       /**
2722 |        * Media query text.
2723 |        */
2724 |       text: string;
2725 |       /**
2726 |        * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if
2727 | specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked
2728 | stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline
2729 | stylesheet's STYLE tag.
2730 |        */
2731 |       source: "mediaRule"|"importRule"|"linkedSheet"|"inlineSheet";
2732 |       /**
2733 |        * URL of the document containing the media query description.
2734 |        */
2735 |       sourceURL?: string;
2736 |       /**
2737 |        * The associated rule (@media or @import) header range in the enclosing stylesheet (if
2738 | available).
2739 |        */
2740 |       range?: SourceRange;
2741 |       /**
2742 |        * Identifier of the stylesheet containing this object (if exists).
2743 |        */
2744 |       styleSheetId?: DOM.StyleSheetId;
2745 |       /**
2746 |        * Array of media queries.
2747 |        */
2748 |       mediaList?: MediaQuery[];
2749 |     }
2750 |     /**
2751 |      * Media query descriptor.
2752 |      */
2753 |     export interface MediaQuery {
2754 |       /**
2755 |        * Array of media query expressions.
2756 |        */
2757 |       expressions: MediaQueryExpression[];
2758 |       /**
2759 |        * Whether the media query condition is satisfied.
2760 |        */
2761 |       active: boolean;
2762 |     }
2763 |     /**
2764 |      * Media query expression descriptor.
2765 |      */
2766 |     export interface MediaQueryExpression {
2767 |       /**
2768 |        * Media query expression value.
2769 |        */
2770 |       value: number;
2771 |       /**
2772 |        * Media query expression units.
2773 |        */
2774 |       unit: string;
2775 |       /**
2776 |        * Media query expression feature.
2777 |        */
2778 |       feature: string;
2779 |       /**
2780 |        * The associated range of the value text in the enclosing stylesheet (if available).
2781 |        */
2782 |       valueRange?: SourceRange;
2783 |       /**
2784 |        * Computed length of media query expression (if applicable).
2785 |        */
2786 |       computedLength?: number;
2787 |     }
2788 |     /**
2789 |      * CSS container query rule descriptor.
2790 |      */
2791 |     export interface CSSContainerQuery {
2792 |       /**
2793 |        * Container query text.
2794 |        */
2795 |       text: string;
2796 |       /**
2797 |        * The associated rule header range in the enclosing stylesheet (if
2798 | available).
2799 |        */
2800 |       range?: SourceRange;
2801 |       /**
2802 |        * Identifier of the stylesheet containing this object (if exists).
2803 |        */
2804 |       styleSheetId?: DOM.StyleSheetId;
2805 |       /**
2806 |        * Optional name for the container.
2807 |        */
2808 |       name?: string;
2809 |       /**
2810 |        * Optional physical axes queried for the container.
2811 |        */
2812 |       physicalAxes?: DOM.PhysicalAxes;
2813 |       /**
2814 |        * Optional logical axes queried for the container.
2815 |        */
2816 |       logicalAxes?: DOM.LogicalAxes;
2817 |       /**
2818 |        * true if the query contains scroll-state() queries.
2819 |        */
2820 |       queriesScrollState?: boolean;
2821 |       /**
2822 |        * true if the query contains anchored() queries.
2823 |        */
2824 |       queriesAnchored?: boolean;
2825 |     }
2826 |     /**
2827 |      * CSS Supports at-rule descriptor.
2828 |      */
2829 |     export interface CSSSupports {
2830 |       /**
2831 |        * Supports rule text.
2832 |        */
2833 |       text: string;
2834 |       /**
2835 |        * Whether the supports condition is satisfied.
2836 |        */
2837 |       active: boolean;
2838 |       /**
2839 |        * The associated rule header range in the enclosing stylesheet (if
2840 | available).
2841 |        */
2842 |       range?: SourceRange;
2843 |       /**
2844 |        * Identifier of the stylesheet containing this object (if exists).
2845 |        */
2846 |       styleSheetId?: DOM.StyleSheetId;
2847 |     }
2848 |     /**
2849 |      * CSS Scope at-rule descriptor.
2850 |      */
2851 |     export interface CSSScope {
2852 |       /**
2853 |        * Scope rule text.
2854 |        */
2855 |       text: string;
2856 |       /**
2857 |        * The associated rule header range in the enclosing stylesheet (if
2858 | available).
2859 |        */
2860 |       range?: SourceRange;
2861 |       /**
2862 |        * Identifier of the stylesheet containing this object (if exists).
2863 |        */
2864 |       styleSheetId?: DOM.StyleSheetId;
2865 |     }
2866 |     /**
2867 |      * CSS Layer at-rule descriptor.
2868 |      */
2869 |     export interface CSSLayer {
2870 |       /**
2871 |        * Layer name.
2872 |        */
2873 |       text: string;
2874 |       /**
2875 |        * The associated rule header range in the enclosing stylesheet (if
2876 | available).
2877 |        */
2878 |       range?: SourceRange;
2879 |       /**
2880 |        * Identifier of the stylesheet containing this object (if exists).
2881 |        */
2882 |       styleSheetId?: DOM.StyleSheetId;
2883 |     }
2884 |     /**
2885 |      * CSS Starting Style at-rule descriptor.
2886 |      */
2887 |     export interface CSSStartingStyle {
2888 |       /**
2889 |        * The associated rule header range in the enclosing stylesheet (if
2890 | available).
2891 |        */
2892 |       range?: SourceRange;
2893 |       /**
2894 |        * Identifier of the stylesheet containing this object (if exists).
2895 |        */
2896 |       styleSheetId?: DOM.StyleSheetId;
2897 |     }
2898 |     /**
2899 |      * CSS Layer data.
2900 |      */
2901 |     export interface CSSLayerData {
2902 |       /**
2903 |        * Layer name.
2904 |        */
2905 |       name: string;
2906 |       /**
2907 |        * Direct sub-layers
2908 |        */
2909 |       subLayers?: CSSLayerData[];
2910 |       /**
2911 |        * Layer order. The order determines the order of the layer in the cascade order.
2912 | A higher number has higher priority in the cascade order.
2913 |        */
2914 |       order: number;
2915 |     }
2916 |     /**
2917 |      * Information about amount of glyphs that were rendered with given font.
2918 |      */
2919 |     export interface PlatformFontUsage {
2920 |       /**
2921 |        * Font's family name reported by platform.
2922 |        */
2923 |       familyName: string;
2924 |       /**
2925 |        * Font's PostScript name reported by platform.
2926 |        */
2927 |       postScriptName: string;
2928 |       /**
2929 |        * Indicates if the font was downloaded or resolved locally.
2930 |        */
2931 |       isCustomFont: boolean;
2932 |       /**
2933 |        * Amount of glyphs that were rendered with this font.
2934 |        */
2935 |       glyphCount: number;
2936 |     }
2937 |     /**
2938 |      * Information about font variation axes for variable fonts
2939 |      */
2940 |     export interface FontVariationAxis {
2941 |       /**
2942 |        * The font-variation-setting tag (a.k.a. "axis tag").
2943 |        */
2944 |       tag: string;
2945 |       /**
2946 |        * Human-readable variation name in the default language (normally, "en").
2947 |        */
2948 |       name: string;
2949 |       /**
2950 |        * The minimum value (inclusive) the font supports for this tag.
2951 |        */
2952 |       minValue: number;
2953 |       /**
2954 |        * The maximum value (inclusive) the font supports for this tag.
2955 |        */
2956 |       maxValue: number;
2957 |       /**
2958 |        * The default value.
2959 |        */
2960 |       defaultValue: number;
2961 |     }
2962 |     /**
2963 |      * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
2964 | and additional information such as platformFontFamily and fontVariationAxes.
2965 |      */
2966 |     export interface FontFace {
2967 |       /**
2968 |        * The font-family.
2969 |        */
2970 |       fontFamily: string;
2971 |       /**
2972 |        * The font-style.
2973 |        */
2974 |       fontStyle: string;
2975 |       /**
2976 |        * The font-variant.
2977 |        */
2978 |       fontVariant: string;
2979 |       /**
2980 |        * The font-weight.
2981 |        */
2982 |       fontWeight: string;
2983 |       /**
2984 |        * The font-stretch.
2985 |        */
2986 |       fontStretch: string;
2987 |       /**
2988 |        * The font-display.
2989 |        */
2990 |       fontDisplay: string;
2991 |       /**
2992 |        * The unicode-range.
2993 |        */
2994 |       unicodeRange: string;
2995 |       /**
2996 |        * The src.
2997 |        */
2998 |       src: string;
2999 |       /**
3000 |        * The resolved platform font family
3001 |        */
3002 |       platformFontFamily: string;
3003 |       /**
3004 |        * Available variation settings (a.k.a. "axes").
3005 |        */
3006 |       fontVariationAxes?: FontVariationAxis[];
3007 |     }
3008 |     /**
3009 |      * CSS try rule representation.
3010 |      */
3011 |     export interface CSSTryRule {
3012 |       /**
3013 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3014 | stylesheet rules) this rule came from.
3015 |        */
3016 |       styleSheetId?: DOM.StyleSheetId;
3017 |       /**
3018 |        * Parent stylesheet's origin.
3019 |        */
3020 |       origin: StyleSheetOrigin;
3021 |       /**
3022 |        * Associated style declaration.
3023 |        */
3024 |       style: CSSStyle;
3025 |     }
3026 |     /**
3027 |      * CSS @position-try rule representation.
3028 |      */
3029 |     export interface CSSPositionTryRule {
3030 |       /**
3031 |        * The prelude dashed-ident name
3032 |        */
3033 |       name: Value;
3034 |       /**
3035 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3036 | stylesheet rules) this rule came from.
3037 |        */
3038 |       styleSheetId?: DOM.StyleSheetId;
3039 |       /**
3040 |        * Parent stylesheet's origin.
3041 |        */
3042 |       origin: StyleSheetOrigin;
3043 |       /**
3044 |        * Associated style declaration.
3045 |        */
3046 |       style: CSSStyle;
3047 |       active: boolean;
3048 |     }
3049 |     /**
3050 |      * CSS keyframes rule representation.
3051 |      */
3052 |     export interface CSSKeyframesRule {
3053 |       /**
3054 |        * Animation name.
3055 |        */
3056 |       animationName: Value;
3057 |       /**
3058 |        * List of keyframes.
3059 |        */
3060 |       keyframes: CSSKeyframeRule[];
3061 |     }
3062 |     /**
3063 |      * Representation of a custom property registration through CSS.registerProperty
3064 |      */
3065 |     export interface CSSPropertyRegistration {
3066 |       propertyName: string;
3067 |       initialValue?: Value;
3068 |       inherits: boolean;
3069 |       syntax: string;
3070 |     }
3071 |     /**
3072 |      * CSS generic @rule representation.
3073 |      */
3074 |     export interface CSSAtRule {
3075 |       /**
3076 |        * Type of at-rule.
3077 |        */
3078 |       type: "font-face"|"font-feature-values"|"font-palette-values";
3079 |       /**
3080 |        * Subsection of font-feature-values, if this is a subsection.
3081 |        */
3082 |       subsection?: "swash"|"annotation"|"ornaments"|"stylistic"|"styleset"|"character-variant";
3083 |       /**
3084 |        * LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType)
3085 | Associated name, if applicable.
3086 |        */
3087 |       name?: Value;
3088 |       /**
3089 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3090 | stylesheet rules) this rule came from.
3091 |        */
3092 |       styleSheetId?: DOM.StyleSheetId;
3093 |       /**
3094 |        * Parent stylesheet's origin.
3095 |        */
3096 |       origin: StyleSheetOrigin;
3097 |       /**
3098 |        * Associated style declaration.
3099 |        */
3100 |       style: CSSStyle;
3101 |     }
3102 |     /**
3103 |      * CSS property at-rule representation.
3104 |      */
3105 |     export interface CSSPropertyRule {
3106 |       /**
3107 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3108 | stylesheet rules) this rule came from.
3109 |        */
3110 |       styleSheetId?: DOM.StyleSheetId;
3111 |       /**
3112 |        * Parent stylesheet's origin.
3113 |        */
3114 |       origin: StyleSheetOrigin;
3115 |       /**
3116 |        * Associated property name.
3117 |        */
3118 |       propertyName: Value;
3119 |       /**
3120 |        * Associated style declaration.
3121 |        */
3122 |       style: CSSStyle;
3123 |     }
3124 |     /**
3125 |      * CSS function argument representation.
3126 |      */
3127 |     export interface CSSFunctionParameter {
3128 |       /**
3129 |        * The parameter name.
3130 |        */
3131 |       name: string;
3132 |       /**
3133 |        * The parameter type.
3134 |        */
3135 |       type: string;
3136 |     }
3137 |     /**
3138 |      * CSS function conditional block representation.
3139 |      */
3140 |     export interface CSSFunctionConditionNode {
3141 |       /**
3142 |        * Media query for this conditional block. Only one type of condition should be set.
3143 |        */
3144 |       media?: CSSMedia;
3145 |       /**
3146 |        * Container query for this conditional block. Only one type of condition should be set.
3147 |        */
3148 |       containerQueries?: CSSContainerQuery;
3149 |       /**
3150 |        * @supports CSS at-rule condition. Only one type of condition should be set.
3151 |        */
3152 |       supports?: CSSSupports;
3153 |       /**
3154 |        * Block body.
3155 |        */
3156 |       children: CSSFunctionNode[];
3157 |       /**
3158 |        * The condition text.
3159 |        */
3160 |       conditionText: string;
3161 |     }
3162 |     /**
3163 |      * Section of the body of a CSS function rule.
3164 |      */
3165 |     export interface CSSFunctionNode {
3166 |       /**
3167 |        * A conditional block. If set, style should not be set.
3168 |        */
3169 |       condition?: CSSFunctionConditionNode;
3170 |       /**
3171 |        * Values set by this node. If set, condition should not be set.
3172 |        */
3173 |       style?: CSSStyle;
3174 |     }
3175 |     /**
3176 |      * CSS function at-rule representation.
3177 |      */
3178 |     export interface CSSFunctionRule {
3179 |       /**
3180 |        * Name of the function.
3181 |        */
3182 |       name: Value;
3183 |       /**
3184 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3185 | stylesheet rules) this rule came from.
3186 |        */
3187 |       styleSheetId?: DOM.StyleSheetId;
3188 |       /**
3189 |        * Parent stylesheet's origin.
3190 |        */
3191 |       origin: StyleSheetOrigin;
3192 |       /**
3193 |        * List of parameters.
3194 |        */
3195 |       parameters: CSSFunctionParameter[];
3196 |       /**
3197 |        * Function body.
3198 |        */
3199 |       children: CSSFunctionNode[];
3200 |     }
3201 |     /**
3202 |      * CSS keyframe rule representation.
3203 |      */
3204 |     export interface CSSKeyframeRule {
3205 |       /**
3206 |        * The css style sheet identifier (absent for user agent stylesheet and user-specified
3207 | stylesheet rules) this rule came from.
3208 |        */
3209 |       styleSheetId?: DOM.StyleSheetId;
3210 |       /**
3211 |        * Parent stylesheet's origin.
3212 |        */
3213 |       origin: StyleSheetOrigin;
3214 |       /**
3215 |        * Associated key text.
3216 |        */
3217 |       keyText: Value;
3218 |       /**
3219 |        * Associated style declaration.
3220 |        */
3221 |       style: CSSStyle;
3222 |     }
3223 |     /**
3224 |      * A descriptor of operation to mutate style declaration text.
3225 |      */
3226 |     export interface StyleDeclarationEdit {
3227 |       /**
3228 |        * The css style sheet identifier.
3229 |        */
3230 |       styleSheetId: DOM.StyleSheetId;
3231 |       /**
3232 |        * The range of the style text in the enclosing stylesheet.
3233 |        */
3234 |       range: SourceRange;
3235 |       /**
3236 |        * New style text.
3237 |        */
3238 |       text: string;
3239 |     }
3240 | 
3241 |     /**
3242 |      * Fires whenever a web font is updated.  A non-empty font parameter indicates a successfully loaded
3243 | web font.
3244 |      */
3245 |     export type fontsUpdatedPayload = {
3246 |       /**
3247 |        * The web font that has loaded.
3248 |        */
3249 |       font?: FontFace;
3250 |     }
3251 |     /**
3252 |      * Fires whenever a MediaQuery result changes (for example, after a browser window has been
3253 | resized.) The current implementation considers only viewport-dependent media features.
3254 |      */
3255 |     export type mediaQueryResultChangedPayload = void;
3256 |     /**
3257 |      * Fired whenever an active document stylesheet is added.
3258 |      */
3259 |     export type styleSheetAddedPayload = {
3260 |       /**
3261 |        * Added stylesheet metainfo.
3262 |        */
3263 |       header: CSSStyleSheetHeader;
3264 |     }
3265 |     /**
3266 |      * Fired whenever a stylesheet is changed as a result of the client operation.
3267 |      */
3268 |     export type styleSheetChangedPayload = {
3269 |       styleSheetId: DOM.StyleSheetId;
3270 |     }
3271 |     /**
3272 |      * Fired whenever an active document stylesheet is removed.
3273 |      */
3274 |     export type styleSheetRemovedPayload = {
3275 |       /**
3276 |        * Identifier of the removed stylesheet.
3277 |        */
3278 |       styleSheetId: DOM.StyleSheetId;
3279 |     }
3280 |     export type computedStyleUpdatedPayload = {
3281 |       /**
3282 |        * The node id that has updated computed styles.
3283 |        */
3284 |       nodeId: DOM.NodeId;
3285 |     }
3286 | 
3287 |     /**
3288 |      * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
3289 | position specified by `location`.
3290 |      */
3291 |     export type addRuleParameters = {
3292 |       /**
3293 |        * The css style sheet identifier where a new rule should be inserted.
3294 |        */
3295 |       styleSheetId: DOM.StyleSheetId;
3296 |       /**
3297 |        * The text of a new rule.
3298 |        */
3299 |       ruleText: string;
3300 |       /**
3301 |        * Text position of a new rule in the target style sheet.
3302 |        */
3303 |       location: SourceRange;
3304 |       /**
3305 |        * NodeId for the DOM node in whose context custom property declarations for registered properties should be
3306 | validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
3307 | incorrect results if the declaration contains a var() for example.
3308 |        */
3309 |       nodeForPropertySyntaxValidation?: DOM.NodeId;
3310 |     }
3311 |     export type addRuleReturnValue = {
3312 |       /**
3313 |        * The newly created rule.
3314 |        */
3315 |       rule: CSSRule;
3316 |     }
3317 |     /**
3318 |      * Returns all class names from specified stylesheet.
3319 |      */
3320 |     export type collectClassNamesParameters = {
3321 |       styleSheetId: DOM.StyleSheetId;
3322 |     }
3323 |     export type collectClassNamesReturnValue = {
3324 |       /**
3325 |        * Class name list.
3326 |        */
3327 |       classNames: string[];
3328 |     }
3329 |     /**
3330 |      * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
3331 |      */
3332 |     export type createStyleSheetParameters = {
3333 |       /**
3334 |        * Identifier of the frame where "via-inspector" stylesheet should be created.
3335 |        */
3336 |       frameId: Page.FrameId;
3337 |       /**
3338 |        * If true, creates a new stylesheet for every call. If false,
3339 | returns a stylesheet previously created by a call with force=false
3340 | for the frame's document if it exists or creates a new stylesheet
3341 | (default: false).
3342 |        */
3343 |       force?: boolean;
3344 |     }
3345 |     export type createStyleSheetReturnValue = {
3346 |       /**
3347 |        * Identifier of the created "via-inspector" stylesheet.
3348 |        */
3349 |       styleSheetId: DOM.StyleSheetId;
3350 |     }
3351 |     /**
3352 |      * Disables the CSS agent for the given page.
3353 |      */
3354 |     export type disableParameters = {
3355 |     }
3356 |     export type disableReturnValue = {
3357 |     }
3358 |     /**
3359 |      * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
3360 | enabled until the result of this command is received.
3361 |      */
3362 |     export type enableParameters = {
3363 |     }
3364 |     export type enableReturnValue = {
3365 |     }
3366 |     /**
3367 |      * Ensures that the given node will have specified pseudo-classes whenever its style is computed by
3368 | the browser.
3369 |      */
3370 |     export type forcePseudoStateParameters = {
3371 |       /**
3372 |        * The element id for which to force the pseudo state.
3373 |        */
3374 |       nodeId: DOM.NodeId;
3375 |       /**
3376 |        * Element pseudo classes to force when computing the element's style.
3377 |        */
3378 |       forcedPseudoClasses: string[];
3379 |     }
3380 |     export type forcePseudoStateReturnValue = {
3381 |     }
3382 |     /**
3383 |      * Ensures that the given node is in its starting-style state.
3384 |      */
3385 |     export type forceStartingStyleParameters = {
3386 |       /**
3387 |        * The element id for which to force the starting-style state.
3388 |        */
3389 |       nodeId: DOM.NodeId;
3390 |       /**
3391 |        * Boolean indicating if this is on or off.
3392 |        */
3393 |       forced: boolean;
3394 |     }
3395 |     export type forceStartingStyleReturnValue = {
3396 |     }
3397 |     export type getBackgroundColorsParameters = {
3398 |       /**
3399 |        * Id of the node to get background colors for.
3400 |        */
3401 |       nodeId: DOM.NodeId;
3402 |     }
3403 |     export type getBackgroundColorsReturnValue = {
3404 |       /**
3405 |        * The range of background colors behind this element, if it contains any visible text. If no
3406 | visible text is present, this will be undefined. In the case of a flat background color,
3407 | this will consist of simply that color. In the case of a gradient, this will consist of each
3408 | of the color stops. For anything more complicated, this will be an empty array. Images will
3409 | be ignored (as if the image had failed to load).
3410 |        */
3411 |       backgroundColors?: string[];
3412 |       /**
3413 |        * The computed font size for this node, as a CSS computed value string (e.g. '12px').
3414 |        */
3415 |       computedFontSize?: string;
3416 |       /**
3417 |        * The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or
3418 | '100').
3419 |        */
3420 |       computedFontWeight?: string;
3421 |     }
3422 |     /**
3423 |      * Returns the computed style for a DOM node identified by `nodeId`.
3424 |      */
3425 |     export type getComputedStyleForNodeParameters = {
3426 |       nodeId: DOM.NodeId;
3427 |     }
3428 |     export type getComputedStyleForNodeReturnValue = {
3429 |       /**
3430 |        * Computed style for the specified DOM node.
3431 |        */
3432 |       computedStyle: CSSComputedStyleProperty[];
3433 |       /**
3434 |        * A list of non-standard "extra fields" which blink stores alongside each
3435 | computed style.
3436 |        */
3437 |       extraFields: ComputedStyleExtraFields;
3438 |     }
3439 |     /**
3440 |      * Resolve the specified values in the context of the provided element.
3441 | For example, a value of '1em' is evaluated according to the computed
3442 | 'font-size' of the element and a value 'calc(1px + 2px)' will be
3443 | resolved to '3px'.
3444 | If the `propertyName` was specified the `values` are resolved as if
3445 | they were property's declaration. If a value cannot be parsed according
3446 | to the provided property syntax, the value is parsed using combined
3447 | syntax as if null `propertyName` was provided. If the value cannot be
3448 | resolved even then, return the provided value without any changes.
3449 |      */
3450 |     export type resolveValuesParameters = {
3451 |       /**
3452 |        * Cascade-dependent keywords (revert/revert-layer) do not work.
3453 |        */
3454 |       values: string[];
3455 |       /**
3456 |        * Id of the node in whose context the expression is evaluated
3457 |        */
3458 |       nodeId: DOM.NodeId;
3459 |       /**
3460 |        * Only longhands and custom property names are accepted.
3461 |        */
3462 |       propertyName?: string;
3463 |       /**
3464 |        * Pseudo element type, only works for pseudo elements that generate
3465 | elements in the tree, such as ::before and ::after.
3466 |        */
3467 |       pseudoType?: DOM.PseudoType;
3468 |       /**
3469 |        * Pseudo element custom ident.
3470 |        */
3471 |       pseudoIdentifier?: string;
3472 |     }
3473 |     export type resolveValuesReturnValue = {
3474 |       results: string[];
3475 |     }
3476 |     export type getLonghandPropertiesParameters = {
3477 |       shorthandName: string;
3478 |       value: string;
3479 |     }
3480 |     export type getLonghandPropertiesReturnValue = {
3481 |       longhandProperties: CSSProperty[];
3482 |     }
3483 |     /**
3484 |      * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
3485 | attributes) for a DOM node identified by `nodeId`.
3486 |      */
3487 |     export type getInlineStylesForNodeParameters = {
3488 |       nodeId: DOM.NodeId;
3489 |     }
3490 |     export type getInlineStylesForNodeReturnValue = {
3491 |       /**
3492 |        * Inline style for the specified DOM node.
3493 |        */
3494 |       inlineStyle?: CSSStyle;
3495 |       /**
3496 |        * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
3497 |        */
3498 |       attributesStyle?: CSSStyle;
3499 |     }
3500 |     /**
3501 |      * Returns the styles coming from animations & transitions
3502 | including the animation & transition styles coming from inheritance chain.
3503 |      */
3504 |     export type getAnimatedStylesForNodeParameters = {
3505 |       nodeId: DOM.NodeId;
3506 |     }
3507 |     export type getAnimatedStylesForNodeReturnValue = {
3508 |       /**
3509 |        * Styles coming from animations.
3510 |        */
3511 |       animationStyles?: CSSAnimationStyle[];
3512 |       /**
3513 |        * Style coming from transitions.
3514 |        */
3515 |       transitionsStyle?: CSSStyle;
3516 |       /**
3517 |        * Inherited style entries for animationsStyle and transitionsStyle from
3518 | the inheritance chain of the element.
3519 |        */
3520 |       inherited?: InheritedAnimatedStyleEntry[];
3521 |     }
3522 |     /**
3523 |      * Returns requested styles for a DOM node identified by `nodeId`.
3524 |      */
3525 |     export type getMatchedStylesForNodeParameters = {
3526 |       nodeId: DOM.NodeId;
3527 |     }
3528 |     export type getMatchedStylesForNodeReturnValue = {
3529 |       /**
3530 |        * Inline style for the specified DOM node.
3531 |        */
3532 |       inlineStyle?: CSSStyle;
3533 |       /**
3534 |        * Attribute-defined element style (e.g. resulting from "width=20 height=100%").
3535 |        */
3536 |       attributesStyle?: CSSStyle;
3537 |       /**
3538 |        * CSS rules matching this node, from all applicable stylesheets.
3539 |        */
3540 |       matchedCSSRules?: RuleMatch[];
3541 |       /**
3542 |        * Pseudo style matches for this node.
3543 |        */
3544 |       pseudoElements?: PseudoElementMatches[];
3545 |       /**
3546 |        * A chain of inherited styles (from the immediate node parent up to the DOM tree root).
3547 |        */
3548 |       inherited?: InheritedStyleEntry[];
3549 |       /**
3550 |        * A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
3551 |        */
3552 |       inheritedPseudoElements?: InheritedPseudoElementMatches[];
3553 |       /**
3554 |        * A list of CSS keyframed animations matching this node.
3555 |        */
3556 |       cssKeyframesRules?: CSSKeyframesRule[];
3557 |       /**
3558 |        * A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
3559 |        */
3560 |       cssPositionTryRules?: CSSPositionTryRule[];
3561 |       /**
3562 |        * Index of the active fallback in the applied position-try-fallback property,
3563 | will not be set if there is no active position-try fallback.
3564 |        */
3565 |       activePositionFallbackIndex?: number;
3566 |       /**
3567 |        * A list of CSS at-property rules matching this node.
3568 |        */
3569 |       cssPropertyRules?: CSSPropertyRule[];
3570 |       /**
3571 |        * A list of CSS property registrations matching this node.
3572 |        */
3573 |       cssPropertyRegistrations?: CSSPropertyRegistration[];
3574 |       /**
3575 |        * A list of simple @rules matching this node or its pseudo-elements.
3576 |        */
3577 |       cssAtRules?: CSSAtRule[];
3578 |       /**
3579 |        * Id of the first parent element that does not have display: contents.
3580 |        */
3581 |       parentLayoutNodeId?: DOM.NodeId;
3582 |       /**
3583 |        * A list of CSS at-function rules referenced by styles of this node.
3584 |        */
3585 |       cssFunctionRules?: CSSFunctionRule[];
3586 |     }
3587 |     /**
3588 |      * Returns the values of the default UA-defined environment variables used in env()
3589 |      */
3590 |     export type getEnvironmentVariablesParameters = {
3591 |     }
3592 |     export type getEnvironmentVariablesReturnValue = {
3593 |       environmentVariables: { [key: string]: string };
3594 |     }
3595 |     /**
3596 |      * Returns all media queries parsed by the rendering engine.
3597 |      */
3598 |     export type getMediaQueriesParameters = {
3599 |     }
3600 |     export type getMediaQueriesReturnValue = {
3601 |       medias: CSSMedia[];
3602 |     }
3603 |     /**
3604 |      * Requests information about platform fonts which we used to render child TextNodes in the given
3605 | node.
3606 |      */
3607 |     export type getPlatformFontsForNodeParameters = {
3608 |       nodeId: DOM.NodeId;
3609 |     }
3610 |     export type getPlatformFontsForNodeReturnValue = {
3611 |       /**
3612 |        * Usage statistics for every employed platform font.
3613 |        */
3614 |       fonts: PlatformFontUsage[];
3615 |     }
3616 |     /**
3617 |      * Returns the current textual content for a stylesheet.
3618 |      */
3619 |     export type getStyleSheetTextParameters = {
3620 |       styleSheetId: DOM.StyleSheetId;
3621 |     }
3622 |     export type getStyleSheetTextReturnValue = {
3623 |       /**
3624 |        * The stylesheet text.
3625 |        */
3626 |       text: string;
3627 |     }
3628 |     /**
3629 |      * Returns all layers parsed by the rendering engine for the tree scope of a node.
3630 | Given a DOM element identified by nodeId, getLayersForNode returns the root
3631 | layer for the nearest ancestor document or shadow root. The layer root contains
3632 | the full layer tree for the tree scope and their ordering.
3633 |      */
3634 |     export type getLayersForNodeParameters = {
3635 |       nodeId: DOM.NodeId;
3636 |     }
3637 |     export type getLayersForNodeReturnValue = {
3638 |       rootLayer: CSSLayerData;
3639 |     }
3640 |     /**
3641 |      * Given a CSS selector text and a style sheet ID, getLocationForSelector
3642 | returns an array of locations of the CSS selector in the style sheet.
3643 |      */
3644 |     export type getLocationForSelectorParameters = {
3645 |       styleSheetId: DOM.StyleSheetId;
3646 |       selectorText: string;
3647 |     }
3648 |     export type getLocationForSelectorReturnValue = {
3649 |       ranges: SourceRange[];
3650 |     }
3651 |     /**
3652 |      * Starts tracking the given node for the computed style updates
3653 | and whenever the computed style is updated for node, it queues
3654 | a `computedStyleUpdated` event with throttling.
3655 | There can only be 1 node tracked for computed style updates
3656 | so passing a new node id removes tracking from the previous node.
3657 | Pass `undefined` to disable tracking.
3658 |      */
3659 |     export type trackComputedStyleUpdatesForNodeParameters = {
3660 |       nodeId?: DOM.NodeId;
3661 |     }
3662 |     export type trackComputedStyleUpdatesForNodeReturnValue = {
3663 |     }
3664 |     /**
3665 |      * Starts tracking the given computed styles for updates. The specified array of properties
3666 | replaces the one previously specified. Pass empty array to disable tracking.
3667 | Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
3668 | The changes to computed style properties are only tracked for nodes pushed to the front-end
3669 | by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
3670 | to the front-end, no updates will be issued for the node.
3671 |      */
3672 |     export type trackComputedStyleUpdatesParameters = {
3673 |       propertiesToTrack: CSSComputedStyleProperty[];
3674 |     }
3675 |     export type trackComputedStyleUpdatesReturnValue = {
3676 |     }
3677 |     /**
3678 |      * Polls the next batch of computed style updates.
3679 |      */
3680 |     export type takeComputedStyleUpdatesParameters = {
3681 |     }
3682 |     export type takeComputedStyleUpdatesReturnValue = {
3683 |       /**
3684 |        * The list of node Ids that have their tracked computed styles updated.
3685 |        */
3686 |       nodeIds: DOM.NodeId[];
3687 |     }
3688 |     /**
3689 |      * Find a rule with the given active property for the given node and set the new value for this
3690 | property
3691 |      */
3692 |     export type setEffectivePropertyValueForNodeParameters = {
3693 |       /**
3694 |        * The element id for which to set property.
3695 |        */
3696 |       nodeId: DOM.NodeId;
3697 |       propertyName: string;
3698 |       value: string;
3699 |     }
3700 |     export type setEffectivePropertyValueForNodeReturnValue = {
3701 |     }
3702 |     /**
3703 |      * Modifies the property rule property name.
3704 |      */
3705 |     export type setPropertyRulePropertyNameParameters = {
3706 |       styleSheetId: DOM.StyleSheetId;
3707 |       range: SourceRange;
3708 |       propertyName: string;
3709 |     }
3710 |     export type setPropertyRulePropertyNameReturnValue = {
3711 |       /**
3712 |        * The resulting key text after modification.
3713 |        */
3714 |       propertyName: Value;
3715 |     }
3716 |     /**
3717 |      * Modifies the keyframe rule key text.
3718 |      */
3719 |     export type setKeyframeKeyParameters = {
3720 |       styleSheetId: DOM.StyleSheetId;
3721 |       range: SourceRange;
3722 |       keyText: string;
3723 |     }
3724 |     export type setKeyframeKeyReturnValue = {
3725 |       /**
3726 |        * The resulting key text after modification.
3727 |        */
3728 |       keyText: Value;
3729 |     }
3730 |     /**
3731 |      * Modifies the rule selector.
3732 |      */
3733 |     export type setMediaTextParameters = {
3734 |       styleSheetId: DOM.StyleSheetId;
3735 |       range: SourceRange;
3736 |       text: string;
3737 |     }
3738 |     export type setMediaTextReturnValue = {
3739 |       /**
3740 |        * The resulting CSS media rule after modification.
3741 |        */
3742 |       media: CSSMedia;
3743 |     }
3744 |     /**
3745 |      * Modifies the expression of a container query.
3746 |      */
3747 |     export type setContainerQueryTextParameters = {
3748 |       styleSheetId: DOM.StyleSheetId;
3749 |       range: SourceRange;
3750 |       text: string;
3751 |     }
3752 |     export type setContainerQueryTextReturnValue = {
3753 |       /**
3754 |        * The resulting CSS container query rule after modification.
3755 |        */
3756 |       containerQuery: CSSContainerQuery;
3757 |     }
3758 |     /**
3759 |      * Modifies the expression of a supports at-rule.
3760 |      */
3761 |     export type setSupportsTextParameters = {
3762 |       styleSheetId: DOM.StyleSheetId;
3763 |       range: SourceRange;
3764 |       text: string;
3765 |     }
3766 |     export type setSupportsTextReturnValue = {
3767 |       /**
3768 |        * The resulting CSS Supports rule after modification.
3769 |        */
3770 |       supports: CSSSupports;
3771 |     }
3772 |     /**
3773 |      * Modifies the expression of a scope at-rule.
3774 |      */
3775 |     export type setScopeTextParameters = {
3776 |       styleSheetId: DOM.StyleSheetId;
3777 |       range: SourceRange;
3778 |       text: string;
3779 |     }
3780 |     export type setScopeTextReturnValue = {
3781 |       /**
3782 |        * The resulting CSS Scope rule after modification.
3783 |        */
3784 |       scope: CSSScope;
3785 |     }
3786 |     /**
3787 |      * Modifies the rule selector.
3788 |      */
3789 |     export type setRuleSelectorParameters = {
3790 |       styleSheetId: DOM.StyleSheetId;
3791 |       range: SourceRange;
3792 |       selector: string;
3793 |     }
3794 |     export type setRuleSelectorReturnValue = {
3795 |       /**
3796 |        * The resulting selector list after modification.
3797 |        */
3798 |       selectorList: SelectorList;
3799 |     }
3800 |     /**
3801 |      * Sets the new stylesheet text.
3802 |      */
3803 |     export type setStyleSheetTextParameters = {
3804 |       styleSheetId: DOM.StyleSheetId;
3805 |       text: string;
3806 |     }
3807 |     export type setStyleSheetTextReturnValue = {
3808 |       /**
3809 |        * URL of source map associated with script (if any).
3810 |        */
3811 |       sourceMapURL?: string;
3812 |     }
3813 |     /**
3814 |      * Applies specified style edits one after another in the given order.
3815 |      */
3816 |     export type setStyleTextsParameters = {
3817 |       edits: StyleDeclarationEdit[];
3818 |       /**
3819 |        * NodeId for the DOM node in whose context custom property declarations for registered properties should be
3820 | validated. If omitted, declarations in the new rule text can only be validated statically, which may produce
3821 | incorrect results if the declaration contains a var() for example.
3822 |        */
3823 |       nodeForPropertySyntaxValidation?: DOM.NodeId;
3824 |     }
3825 |     export type setStyleTextsReturnValue = {
3826 |       /**
3827 |        * The resulting styles after modification.
3828 |        */
3829 |       styles: CSSStyle[];
3830 |     }
3831 |     /**
3832 |      * Enables the selector recording.
3833 |      */
3834 |     export type startRuleUsageTrackingParameters = {
3835 |     }
3836 |     export type startRuleUsageTrackingReturnValue = {
3837 |     }
3838 |     /**
3839 |      * Stop tracking rule usage and return the list of rules that were used since last call to
3840 | `takeCoverageDelta` (or since start of coverage instrumentation).
3841 |      */
3842 |     export type stopRuleUsageTrackingParameters = {
3843 |     }
3844 |     export type stopRuleUsageTrackingReturnValue = {
3845 |       ruleUsage: RuleUsage[];
3846 |     }
3847 |     /**
3848 |      * Obtain list of rules that became used since last call to this method (or since start of coverage
3849 | instrumentation).
3850 |      */
3851 |     export type takeCoverageDeltaParameters = {
3852 |     }
3853 |     export type takeCoverageDeltaReturnValue = {
3854 |       coverage: RuleUsage[];
3855 |       /**
3856 |        * Monotonically increasing time, in seconds.
3857 |        */
3858 |       timestamp: number;
3859 |     }
3860 |     /**
3861 |      * Enables/disables rendering of local CSS fonts (enabled by default).
3862 |      */
3863 |     export type setLocalFontsEnabledParameters = {
3864 |       /**
3865 |        * Whether rendering of local fonts is enabled.
3866 |        */
3867 |       enabled: boolean;
3868 |     }
3869 |     export type setLocalFontsEnabledReturnValue = {
3870 |     }
3871 |   }
3872 | 
3873 |   export namespace CacheStorage {
3874 |     /**
3875 |      * Unique identifier of the Cache object.
3876 |      */
3877 |     export type CacheId = string;
3878 |     /**
3879 |      * type of HTTP response cached
3880 |      */
3881 |     export type CachedResponseType = "basic"|"cors"|"default"|"error"|"opaqueResponse"|"opaqueRedirect";
3882 |     /**
3883 |      * Data entry.
3884 |      */
3885 |     export interface DataEntry {
3886 |       /**
3887 |        * Request URL.
3888 |        */
3889 |       requestURL: string;
3890 |       /**
3891 |        * Request method.
3892 |        */
3893 |       requestMethod: string;
3894 |       /**
3895 |        * Request headers
3896 |        */
3897 |       requestHeaders: Header[];
3898 |       /**
3899 |        * Number of seconds since epoch.
3900 |        */
3901 |       responseTime: number;
3902 |       /**
3903 |        * HTTP response status code.
3904 |        */
3905 |       responseStatus: number;
3906 |       /**
3907 |        * HTTP response status text.
3908 |        */
3909 |       responseStatusText: string;
3910 |       /**
3911 |        * HTTP response type
3912 |        */
3913 |       responseType: CachedResponseType;
3914 |       /**
3915 |        * Response headers
3916 |        */
3917 |       responseHeaders: Header[];
3918 |     }
3919 |     /**
3920 |      * Cache identifier.
3921 |      */
3922 |     export interface Cache {
3923 |       /**
3924 |        * An opaque unique id of the cache.
3925 |        */
3926 |       cacheId: CacheId;
3927 |       /**
3928 |        * Security origin of the cache.
3929 |        */
3930 |       securityOrigin: string;
3931 |       /**
3932 |        * Storage key of the cache.
3933 |        */
3934 |       storageKey: string;
3935 |       /**
3936 |        * Storage bucket of the cache.
3937 |        */
3938 |       storageBucket?: Storage.StorageBucket;
3939 |       /**
3940 |        * The name of the cache.
3941 |        */
3942 |       cacheName: string;
3943 |     }
3944 |     export interface Header {
3945 |       name: string;
3946 |       value: string;
3947 |     }
3948 |     /**
3949 |      * Cached response
3950 |      */
3951 |     export interface CachedResponse {
3952 |       /**
3953 |        * Entry content, base64-encoded.
3954 |        */
3955 |       body: binary;
3956 |     }
3957 | 
3958 | 
3959 |     /**
3960 |      * Deletes a cache.
3961 |      */
3962 |     export type deleteCacheParameters = {
3963 |       /**
3964 |        * Id of cache for deletion.
3965 |        */
3966 |       cacheId: CacheId;
3967 |     }
3968 |     export type deleteCacheReturnValue = {
3969 |     }
3970 |     /**
3971 |      * Deletes a cache entry.
3972 |      */
3973 |     export type deleteEntryParameters = {
3974 |       /**
3975 |        * Id of cache where the entry will be deleted.
3976 |        */
3977 |       cacheId: CacheId;
3978 |       /**
3979 |        * URL spec of the request.
3980 |        */
3981 |       request: string;
3982 |     }
3983 |     export type deleteEntryReturnValue = {
3984 |     }
3985 |     /**
3986 |      * Requests cache names.
3987 |      */
3988 |     export type requestCacheNamesParameters = {
3989 |       /**
3990 |        * At least and at most one of securityOrigin, storageKey, storageBucket must be specified.
3991 | Security origin.
3992 |        */
3993 |       securityOrigin?: string;
3994 |       /**
3995 |        * Storage key.
3996 |        */
3997 |       storageKey?: string;
3998 |       /**
3999 |        * Storage bucket. If not specified, it uses the default bucket.
4000 |        */
4001 |       storageBucket?: Storage.StorageBucket;
4002 |     }
4003 |     export type requestCacheNamesReturnValue = {
4004 |       /**
4005 |        * Caches for the security origin.
4006 |        */
4007 |       caches: Cache[];
4008 |     }
4009 |     /**
4010 |      * Fetches cache entry.
4011 |      */
4012 |     export type requestCachedResponseParameters = {
4013 |       /**
4014 |        * Id of cache that contains the entry.
4015 |        */
4016 |       cacheId: CacheId;
4017 |       /**
4018 |        * URL spec of the request.
4019 |        */
4020 |       requestURL: string;
4021 |       /**
4022 |        * headers of the request.
4023 |        */
4024 |       requestHeaders: Header[];
4025 |     }
4026 |     export type requestCachedResponseReturnValue = {
4027 |       /**
4028 |        * Response read from the cache.
4029 |        */
4030 |       response: CachedResponse;
4031 |     }
4032 |     /**
4033 |      * Requests data from cache.
4034 |      */
4035 |     export type requestEntriesParameters = {
4036 |       /**
4037 |        * ID of cache to get entries from.
4038 |        */
4039 |       cacheId: CacheId;
4040 |       /**
4041 |        * Number of records to skip.
4042 |        */
4043 |       skipCount?: number;
4044 |       /**
4045 |        * Number of records to fetch.
4046 |        */
4047 |       pageSize?: number;
4048 |       /**
4049 |        * If present, only return the entries containing this substring in the path
4050 |        */
4051 |       pathFilter?: string;
4052 |     }
4053 |     export type requestEntriesReturnValue = {
4054 |       /**
4055 |        * Array of object store data entries.
4056 |        */
4057 |       cacheDataEntries: DataEntry[];
4058 |       /**
4059 |        * Count of returned entries from this storage. If pathFilter is empty, it
4060 | is the count of all entries from this storage.
4061 |        */
4062 |       returnCount: number;
4063 |     }
4064 |   }
4065 | 
4066 |   /**
4067 |    * A domain for interacting with Cast, Presentation API, and Remote Playback API
4068 | functionalities.
4069 |    */
4070 |   export namespace Cast {
4071 |     export interface Sink {
4072 |       name: string;
4073 |       id: string;
4074 |       /**
4075 |        * Text describing the current session. Present only if there is an active
4076 | session on the sink.
4077 |        */
4078 |       session?: string;
4079 |     }
4080 | 
4081 |     /**
4082 |      * This is fired whenever the list of available sinks changes. A sink is a
4083 | device or a software surface that you can cast to.
4084 |      */
4085 |     export type sinksUpdatedPayload = {
4086 |       sinks: Sink[];
4087 |     }
4088 |     /**
4089 |      * This is fired whenever the outstanding issue/error message changes.
4090 | |issueMessage| is empty if there is no issue.
4091 |      */
4092 |     export type issueUpdatedPayload = {
4093 |       issueMessage: string;
4094 |     }
4095 | 
4096 |     /**
4097 |      * Starts observing for sinks that can be used for tab mirroring, and if set,
4098 | sinks compatible with |presentationUrl| as well. When sinks are found, a
4099 | |sinksUpdated| event is fired.
4100 | Also starts observing for issue messages. When an issue is added or removed,
4101 | an |issueUpdated| event is fired.
4102 |      */
4103 |     export type enableParameters = {
4104 |       presentationUrl?: string;
4105 |     }
4106 |     export type enableReturnValue = {
4107 |     }
4108 |     /**
4109 |      * Stops observing for sinks and issues.
4110 |      */
4111 |     export type disableParameters = {
4112 |     }
4113 |     export type disableReturnValue = {
4114 |     }
4115 |     /**
4116 |      * Sets a sink to be used when the web page requests the browser to choose a
4117 | sink via Presentation API, Remote Playback API, or Cast SDK.
4118 |      */
4119 |     export type setSinkToUseParameters = {
4120 |       sinkName: string;
4121 |     }
4122 |     export type setSinkToUseReturnValue = {
4123 |     }
4124 |     /**
4125 |      * Starts mirroring the desktop to the sink.
4126 |      */
4127 |     export type startDesktopMirroringParameters = {
4128 |       sinkName: string;
4129 |     }
4130 |     export type startDesktopMirroringReturnValue = {
4131 |     }
4132 |     /**
4133 |      * Starts mirroring the tab to the sink.
4134 |      */
4135 |     export type startTabMirroringParameters = {
4136 |       sinkName: string;
4137 |     }
4138 |     export type startTabMirroringReturnValue = {
4139 |     }
4140 |     /**
4141 |      * Stops the active Cast session on the sink.
4142 |      */
4143 |     export type stopCastingParameters = {
4144 |       sinkName: string;
4145 |     }
4146 |     export type stopCastingReturnValue = {
4147 |     }
4148 |   }
4149 | 
4150 |   /**
4151 |    * This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
4152 | that has an `id`. This `id` can be used to get additional information on the Node, resolve it into
4153 | the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
4154 | nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
4155 | and never sends the same node twice. It is client's responsibility to collect information about
4156 | the nodes that were sent to the client. Note that `iframe` owner elements will return
4157 | corresponding document elements as their child nodes.
4158 |    */
4159 |   export namespace DOM {
4160 |     /**
4161 |      * Unique DOM node identifier.
4162 |      */
4163 |     export type NodeId = number;
4164 |     /**
4165 |      * Unique DOM node identifier used to reference a node that may not have been pushed to the
4166 | front-end.
4167 |      */
4168 |     export type BackendNodeId = number;
4169 |     /**
4170 |      * Unique identifier for a CSS stylesheet.
4171 |      */
4172 |     export type StyleSheetId = string;
4173 |     /**
4174 |      * Backend node with a friendly name.
4175 |      */
4176 |     export interface BackendNode {
4177 |       /**
4178 |        * `Node`'s nodeType.
4179 |        */
4180 |       nodeType: number;
4181 |       /**
4182 |        * `Node`'s nodeName.
4183 |        */
4184 |       nodeName: string;
4185 |       backendNodeId: BackendNodeId;
4186 |     }
4187 |     /**
4188 |      * Pseudo element type.
4189 |      */
4190 |     export type PseudoType = "first-line"|"first-letter"|"checkmark"|"before"|"after"|"picker-icon"|"interest-hint"|"marker"|"backdrop"|"column"|"selection"|"search-text"|"target-text"|"spelling-error"|"grammar-error"|"highlight"|"first-line-inherited"|"scroll-marker"|"scroll-marker-group"|"scroll-button"|"scrollbar"|"scrollbar-thumb"|"scrollbar-button"|"scrollbar-track"|"scrollbar-track-piece"|"scrollbar-corner"|"resizer"|"input-list-button"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-group-children"|"view-transition-old"|"view-transition-new"|"placeholder"|"file-selector-button"|"details-content"|"picker"|"permission-icon"|"overscroll-area-parent";
4191 |     /**
4192 |      * Shadow root type.
4193 |      */
4194 |     export type ShadowRootType = "user-agent"|"open"|"closed";
4195 |     /**
4196 |      * Document compatibility mode.
4197 |      */
4198 |     export type CompatibilityMode = "QuirksMode"|"LimitedQuirksMode"|"NoQuirksMode";
4199 |     /**
4200 |      * ContainerSelector physical axes
4201 |      */
4202 |     export type PhysicalAxes = "Horizontal"|"Vertical"|"Both";
4203 |     /**
4204 |      * ContainerSelector logical axes
4205 |      */
4206 |     export type LogicalAxes = "Inline"|"Block"|"Both";
4207 |     /**
4208 |      * Physical scroll orientation
4209 |      */
4210 |     export type ScrollOrientation = "horizontal"|"vertical";
4211 |     /**
4212 |      * DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.
4213 | DOMNode is a base node mirror type.
4214 |      */
4215 |     export interface Node {
4216 |       /**
4217 |        * Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend
4218 | will only push node with given `id` once. It is aware of all requested nodes and will only
4219 | fire DOM events for nodes known to the client.
4220 |        */
4221 |       nodeId: NodeId;
4222 |       /**
4223 |        * The id of the parent node if any.
4224 |        */
4225 |       parentId?: NodeId;
4226 |       /**
4227 |        * The BackendNodeId for this node.
4228 |        */
4229 |       backendNodeId: BackendNodeId;
4230 |       /**
4231 |        * `Node`'s nodeType.
4232 |        */
4233 |       nodeType: number;
4234 |       /**
4235 |        * `Node`'s nodeName.
4236 |        */
4237 |       nodeName: string;
4238 |       /**
4239 |        * `Node`'s localName.
4240 |        */
4241 |       localName: string;
4242 |       /**
4243 |        * `Node`'s nodeValue.
4244 |        */
4245 |       nodeValue: string;
4246 |       /**
4247 |        * Child count for `Container` nodes.
4248 |        */
4249 |       childNodeCount?: number;
4250 |       /**
4251 |        * Child nodes of this node when requested with children.
4252 |        */
4253 |       children?: Node[];
4254 |       /**
4255 |        * Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
4256 |        */
4257 |       attributes?: string[];
4258 |       /**
4259 |        * Document URL that `Document` or `FrameOwner` node points to.
4260 |        */
4261 |       documentURL?: string;
4262 |       /**
4263 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
4264 |        */
4265 |       baseURL?: string;
4266 |       /**
4267 |        * `DocumentType`'s publicId.
4268 |        */
4269 |       publicId?: string;
4270 |       /**
4271 |        * `DocumentType`'s systemId.
4272 |        */
4273 |       systemId?: string;
4274 |       /**
4275 |        * `DocumentType`'s internalSubset.
4276 |        */
4277 |       internalSubset?: string;
4278 |       /**
4279 |        * `Document`'s XML version in case of XML documents.
4280 |        */
4281 |       xmlVersion?: string;
4282 |       /**
4283 |        * `Attr`'s name.
4284 |        */
4285 |       name?: string;
4286 |       /**
4287 |        * `Attr`'s value.
4288 |        */
4289 |       value?: string;
4290 |       /**
4291 |        * Pseudo element type for this node.
4292 |        */
4293 |       pseudoType?: PseudoType;
4294 |       /**
4295 |        * Pseudo element identifier for this node. Only present if there is a
4296 | valid pseudoType.
4297 |        */
4298 |       pseudoIdentifier?: string;
4299 |       /**
4300 |        * Shadow root type.
4301 |        */
4302 |       shadowRootType?: ShadowRootType;
4303 |       /**
4304 |        * Frame ID for frame owner elements.
4305 |        */
4306 |       frameId?: Page.FrameId;
4307 |       /**
4308 |        * Content document for frame owner elements.
4309 |        */
4310 |       contentDocument?: Node;
4311 |       /**
4312 |        * Shadow root list for given element host.
4313 |        */
4314 |       shadowRoots?: Node[];
4315 |       /**
4316 |        * Content document fragment for template elements.
4317 |        */
4318 |       templateContent?: Node;
4319 |       /**
4320 |        * Pseudo elements associated with this node.
4321 |        */
4322 |       pseudoElements?: Node[];
4323 |       /**
4324 |        * Deprecated, as the HTML Imports API has been removed (crbug.com/937746).
4325 | This property used to return the imported document for the HTMLImport links.
4326 | The property is always undefined now.
4327 |        */
4328 |       importedDocument?: Node;
4329 |       /**
4330 |        * Distributed nodes for given insertion point.
4331 |        */
4332 |       distributedNodes?: BackendNode[];
4333 |       /**
4334 |        * Whether the node is SVG.
4335 |        */
4336 |       isSVG?: boolean;
4337 |       compatibilityMode?: CompatibilityMode;
4338 |       assignedSlot?: BackendNode;
4339 |       isScrollable?: boolean;
4340 |       affectedByStartingStyles?: boolean;
4341 |       adoptedStyleSheets?: StyleSheetId[];
4342 |     }
4343 |     /**
4344 |      * A structure to hold the top-level node of a detached tree and an array of its retained descendants.
4345 |      */
4346 |     export interface DetachedElementInfo {
4347 |       treeNode: Node;
4348 |       retainedNodeIds: NodeId[];
4349 |     }
4350 |     /**
4351 |      * A structure holding an RGBA color.
4352 |      */
4353 |     export interface RGBA {
4354 |       /**
4355 |        * The red component, in the [0-255] range.
4356 |        */
4357 |       r: number;
4358 |       /**
4359 |        * The green component, in the [0-255] range.
4360 |        */
4361 |       g: number;
4362 |       /**
4363 |        * The blue component, in the [0-255] range.
4364 |        */
4365 |       b: number;
4366 |       /**
4367 |        * The alpha component, in the [0-1] range (default: 1).
4368 |        */
4369 |       a?: number;
4370 |     }
4371 |     /**
4372 |      * An array of quad vertices, x immediately followed by y for each point, points clock-wise.
4373 |      */
4374 |     export type Quad = number[];
4375 |     /**
4376 |      * Box model.
4377 |      */
4378 |     export interface BoxModel {
4379 |       /**
4380 |        * Content box
4381 |        */
4382 |       content: Quad;
4383 |       /**
4384 |        * Padding box
4385 |        */
4386 |       padding: Quad;
4387 |       /**
4388 |        * Border box
4389 |        */
4390 |       border: Quad;
4391 |       /**
4392 |        * Margin box
4393 |        */
4394 |       margin: Quad;
4395 |       /**
4396 |        * Node width
4397 |        */
4398 |       width: number;
4399 |       /**
4400 |        * Node height
4401 |        */
4402 |       height: number;
4403 |       /**
4404 |        * Shape outside coordinates
4405 |        */
4406 |       shapeOutside?: ShapeOutsideInfo;
4407 |     }
4408 |     /**
4409 |      * CSS Shape Outside details.
4410 |      */
4411 |     export interface ShapeOutsideInfo {
4412 |       /**
4413 |        * Shape bounds
4414 |        */
4415 |       bounds: Quad;
4416 |       /**
4417 |        * Shape coordinate details
4418 |        */
4419 |       shape: any[];
4420 |       /**
4421 |        * Margin shape bounds
4422 |        */
4423 |       marginShape: any[];
4424 |     }
4425 |     /**
4426 |      * Rectangle.
4427 |      */
4428 |     export interface Rect {
4429 |       /**
4430 |        * X coordinate
4431 |        */
4432 |       x: number;
4433 |       /**
4434 |        * Y coordinate
4435 |        */
4436 |       y: number;
4437 |       /**
4438 |        * Rectangle width
4439 |        */
4440 |       width: number;
4441 |       /**
4442 |        * Rectangle height
4443 |        */
4444 |       height: number;
4445 |     }
4446 |     export interface CSSComputedStyleProperty {
4447 |       /**
4448 |        * Computed style property name.
4449 |        */
4450 |       name: string;
4451 |       /**
4452 |        * Computed style property value.
4453 |        */
4454 |       value: string;
4455 |     }
4456 | 
4457 |     /**
4458 |      * Fired when `Element`'s attribute is modified.
4459 |      */
4460 |     export type attributeModifiedPayload = {
4461 |       /**
4462 |        * Id of the node that has changed.
4463 |        */
4464 |       nodeId: NodeId;
4465 |       /**
4466 |        * Attribute name.
4467 |        */
4468 |       name: string;
4469 |       /**
4470 |        * Attribute value.
4471 |        */
4472 |       value: string;
4473 |     }
4474 |     /**
4475 |      * Fired when `Element`'s adoptedStyleSheets are modified.
4476 |      */
4477 |     export type adoptedStyleSheetsModifiedPayload = {
4478 |       /**
4479 |        * Id of the node that has changed.
4480 |        */
4481 |       nodeId: NodeId;
4482 |       /**
4483 |        * New adoptedStyleSheets array.
4484 |        */
4485 |       adoptedStyleSheets: StyleSheetId[];
4486 |     }
4487 |     /**
4488 |      * Fired when `Element`'s attribute is removed.
4489 |      */
4490 |     export type attributeRemovedPayload = {
4491 |       /**
4492 |        * Id of the node that has changed.
4493 |        */
4494 |       nodeId: NodeId;
4495 |       /**
4496 |        * A ttribute name.
4497 |        */
4498 |       name: string;
4499 |     }
4500 |     /**
4501 |      * Mirrors `DOMCharacterDataModified` event.
4502 |      */
4503 |     export type characterDataModifiedPayload = {
4504 |       /**
4505 |        * Id of the node that has changed.
4506 |        */
4507 |       nodeId: NodeId;
4508 |       /**
4509 |        * New text value.
4510 |        */
4511 |       characterData: string;
4512 |     }
4513 |     /**
4514 |      * Fired when `Container`'s child node count has changed.
4515 |      */
4516 |     export type childNodeCountUpdatedPayload = {
4517 |       /**
4518 |        * Id of the node that has changed.
4519 |        */
4520 |       nodeId: NodeId;
4521 |       /**
4522 |        * New node count.
4523 |        */
4524 |       childNodeCount: number;
4525 |     }
4526 |     /**
4527 |      * Mirrors `DOMNodeInserted` event.
4528 |      */
4529 |     export type childNodeInsertedPayload = {
4530 |       /**
4531 |        * Id of the node that has changed.
4532 |        */
4533 |       parentNodeId: NodeId;
4534 |       /**
4535 |        * Id of the previous sibling.
4536 |        */
4537 |       previousNodeId: NodeId;
4538 |       /**
4539 |        * Inserted node data.
4540 |        */
4541 |       node: Node;
4542 |     }
4543 |     /**
4544 |      * Mirrors `DOMNodeRemoved` event.
4545 |      */
4546 |     export type childNodeRemovedPayload = {
4547 |       /**
4548 |        * Parent id.
4549 |        */
4550 |       parentNodeId: NodeId;
4551 |       /**
4552 |        * Id of the node that has been removed.
4553 |        */
4554 |       nodeId: NodeId;
4555 |     }
4556 |     /**
4557 |      * Called when distribution is changed.
4558 |      */
4559 |     export type distributedNodesUpdatedPayload = {
4560 |       /**
4561 |        * Insertion point where distributed nodes were updated.
4562 |        */
4563 |       insertionPointId: NodeId;
4564 |       /**
4565 |        * Distributed nodes for given insertion point.
4566 |        */
4567 |       distributedNodes: BackendNode[];
4568 |     }
4569 |     /**
4570 |      * Fired when `Document` has been totally updated. Node ids are no longer valid.
4571 |      */
4572 |     export type documentUpdatedPayload = void;
4573 |     /**
4574 |      * Fired when `Element`'s inline style is modified via a CSS property modification.
4575 |      */
4576 |     export type inlineStyleInvalidatedPayload = {
4577 |       /**
4578 |        * Ids of the nodes for which the inline styles have been invalidated.
4579 |        */
4580 |       nodeIds: NodeId[];
4581 |     }
4582 |     /**
4583 |      * Called when a pseudo element is added to an element.
4584 |      */
4585 |     export type pseudoElementAddedPayload = {
4586 |       /**
4587 |        * Pseudo element's parent element id.
4588 |        */
4589 |       parentId: NodeId;
4590 |       /**
4591 |        * The added pseudo element.
4592 |        */
4593 |       pseudoElement: Node;
4594 |     }
4595 |     /**
4596 |      * Called when top layer elements are changed.
4597 |      */
4598 |     export type topLayerElementsUpdatedPayload = void;
4599 |     /**
4600 |      * Fired when a node's scrollability state changes.
4601 |      */
4602 |     export type scrollableFlagUpdatedPayload = {
4603 |       /**
4604 |        * The id of the node.
4605 |        */
4606 |       nodeId: DOM.NodeId;
4607 |       /**
4608 |        * If the node is scrollable.
4609 |        */
4610 |       isScrollable: boolean;
4611 |     }
4612 |     /**
4613 |      * Fired when a node's starting styles changes.
4614 |      */
4615 |     export type affectedByStartingStylesFlagUpdatedPayload = {
4616 |       /**
4617 |        * The id of the node.
4618 |        */
4619 |       nodeId: DOM.NodeId;
4620 |       /**
4621 |        * If the node has starting styles.
4622 |        */
4623 |       affectedByStartingStyles: boolean;
4624 |     }
4625 |     /**
4626 |      * Called when a pseudo element is removed from an element.
4627 |      */
4628 |     export type pseudoElementRemovedPayload = {
4629 |       /**
4630 |        * Pseudo element's parent element id.
4631 |        */
4632 |       parentId: NodeId;
4633 |       /**
4634 |        * The removed pseudo element id.
4635 |        */
4636 |       pseudoElementId: NodeId;
4637 |     }
4638 |     /**
4639 |      * Fired when backend wants to provide client with the missing DOM structure. This happens upon
4640 | most of the calls requesting node ids.
4641 |      */
4642 |     export type setChildNodesPayload = {
4643 |       /**
4644 |        * Parent node id to populate with children.
4645 |        */
4646 |       parentId: NodeId;
4647 |       /**
4648 |        * Child nodes array.
4649 |        */
4650 |       nodes: Node[];
4651 |     }
4652 |     /**
4653 |      * Called when shadow root is popped from the element.
4654 |      */
4655 |     export type shadowRootPoppedPayload = {
4656 |       /**
4657 |        * Host element id.
4658 |        */
4659 |       hostId: NodeId;
4660 |       /**
4661 |        * Shadow root id.
4662 |        */
4663 |       rootId: NodeId;
4664 |     }
4665 |     /**
4666 |      * Called when shadow root is pushed into the element.
4667 |      */
4668 |     export type shadowRootPushedPayload = {
4669 |       /**
4670 |        * Host element id.
4671 |        */
4672 |       hostId: NodeId;
4673 |       /**
4674 |        * Shadow root.
4675 |        */
4676 |       root: Node;
4677 |     }
4678 | 
4679 |     /**
4680 |      * Collects class names for the node with given id and all of it's child nodes.
4681 |      */
4682 |     export type collectClassNamesFromSubtreeParameters = {
4683 |       /**
4684 |        * Id of the node to collect class names.
4685 |        */
4686 |       nodeId: NodeId;
4687 |     }
4688 |     export type collectClassNamesFromSubtreeReturnValue = {
4689 |       /**
4690 |        * Class name list.
4691 |        */
4692 |       classNames: string[];
4693 |     }
4694 |     /**
4695 |      * Creates a deep copy of the specified node and places it into the target container before the
4696 | given anchor.
4697 |      */
4698 |     export type copyToParameters = {
4699 |       /**
4700 |        * Id of the node to copy.
4701 |        */
4702 |       nodeId: NodeId;
4703 |       /**
4704 |        * Id of the element to drop the copy into.
4705 |        */
4706 |       targetNodeId: NodeId;
4707 |       /**
4708 |        * Drop the copy before this node (if absent, the copy becomes the last child of
4709 | `targetNodeId`).
4710 |        */
4711 |       insertBeforeNodeId?: NodeId;
4712 |     }
4713 |     export type copyToReturnValue = {
4714 |       /**
4715 |        * Id of the node clone.
4716 |        */
4717 |       nodeId: NodeId;
4718 |     }
4719 |     /**
4720 |      * Describes node given its id, does not require domain to be enabled. Does not start tracking any
4721 | objects, can be used for automation.
4722 |      */
4723 |     export type describeNodeParameters = {
4724 |       /**
4725 |        * Identifier of the node.
4726 |        */
4727 |       nodeId?: NodeId;
4728 |       /**
4729 |        * Identifier of the backend node.
4730 |        */
4731 |       backendNodeId?: BackendNodeId;
4732 |       /**
4733 |        * JavaScript object id of the node wrapper.
4734 |        */
4735 |       objectId?: Runtime.RemoteObjectId;
4736 |       /**
4737 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4738 | entire subtree or provide an integer larger than 0.
4739 |        */
4740 |       depth?: number;
4741 |       /**
4742 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4743 | (default is false).
4744 |        */
4745 |       pierce?: boolean;
4746 |     }
4747 |     export type describeNodeReturnValue = {
4748 |       /**
4749 |        * Node description.
4750 |        */
4751 |       node: Node;
4752 |     }
4753 |     /**
4754 |      * Scrolls the specified rect of the given node into view if not already visible.
4755 | Note: exactly one between nodeId, backendNodeId and objectId should be passed
4756 | to identify the node.
4757 |      */
4758 |     export type scrollIntoViewIfNeededParameters = {
4759 |       /**
4760 |        * Identifier of the node.
4761 |        */
4762 |       nodeId?: NodeId;
4763 |       /**
4764 |        * Identifier of the backend node.
4765 |        */
4766 |       backendNodeId?: BackendNodeId;
4767 |       /**
4768 |        * JavaScript object id of the node wrapper.
4769 |        */
4770 |       objectId?: Runtime.RemoteObjectId;
4771 |       /**
4772 |        * The rect to be scrolled into view, relative to the node's border box, in CSS pixels.
4773 | When omitted, center of the node will be used, similar to Element.scrollIntoView.
4774 |        */
4775 |       rect?: Rect;
4776 |     }
4777 |     export type scrollIntoViewIfNeededReturnValue = {
4778 |     }
4779 |     /**
4780 |      * Disables DOM agent for the given page.
4781 |      */
4782 |     export type disableParameters = {
4783 |     }
4784 |     export type disableReturnValue = {
4785 |     }
4786 |     /**
4787 |      * Discards search results from the session with the given id. `getSearchResults` should no longer
4788 | be called for that search.
4789 |      */
4790 |     export type discardSearchResultsParameters = {
4791 |       /**
4792 |        * Unique search session identifier.
4793 |        */
4794 |       searchId: string;
4795 |     }
4796 |     export type discardSearchResultsReturnValue = {
4797 |     }
4798 |     /**
4799 |      * Enables DOM agent for the given page.
4800 |      */
4801 |     export type enableParameters = {
4802 |       /**
4803 |        * Whether to include whitespaces in the children array of returned Nodes.
4804 |        */
4805 |       includeWhitespace?: "none"|"all";
4806 |     }
4807 |     export type enableReturnValue = {
4808 |     }
4809 |     /**
4810 |      * Focuses the given element.
4811 |      */
4812 |     export type focusParameters = {
4813 |       /**
4814 |        * Identifier of the node.
4815 |        */
4816 |       nodeId?: NodeId;
4817 |       /**
4818 |        * Identifier of the backend node.
4819 |        */
4820 |       backendNodeId?: BackendNodeId;
4821 |       /**
4822 |        * JavaScript object id of the node wrapper.
4823 |        */
4824 |       objectId?: Runtime.RemoteObjectId;
4825 |     }
4826 |     export type focusReturnValue = {
4827 |     }
4828 |     /**
4829 |      * Returns attributes for the specified node.
4830 |      */
4831 |     export type getAttributesParameters = {
4832 |       /**
4833 |        * Id of the node to retrieve attributes for.
4834 |        */
4835 |       nodeId: NodeId;
4836 |     }
4837 |     export type getAttributesReturnValue = {
4838 |       /**
4839 |        * An interleaved array of node attribute names and values.
4840 |        */
4841 |       attributes: string[];
4842 |     }
4843 |     /**
4844 |      * Returns boxes for the given node.
4845 |      */
4846 |     export type getBoxModelParameters = {
4847 |       /**
4848 |        * Identifier of the node.
4849 |        */
4850 |       nodeId?: NodeId;
4851 |       /**
4852 |        * Identifier of the backend node.
4853 |        */
4854 |       backendNodeId?: BackendNodeId;
4855 |       /**
4856 |        * JavaScript object id of the node wrapper.
4857 |        */
4858 |       objectId?: Runtime.RemoteObjectId;
4859 |     }
4860 |     export type getBoxModelReturnValue = {
4861 |       /**
4862 |        * Box model for the node.
4863 |        */
4864 |       model: BoxModel;
4865 |     }
4866 |     /**
4867 |      * Returns quads that describe node position on the page. This method
4868 | might return multiple quads for inline nodes.
4869 |      */
4870 |     export type getContentQuadsParameters = {
4871 |       /**
4872 |        * Identifier of the node.
4873 |        */
4874 |       nodeId?: NodeId;
4875 |       /**
4876 |        * Identifier of the backend node.
4877 |        */
4878 |       backendNodeId?: BackendNodeId;
4879 |       /**
4880 |        * JavaScript object id of the node wrapper.
4881 |        */
4882 |       objectId?: Runtime.RemoteObjectId;
4883 |     }
4884 |     export type getContentQuadsReturnValue = {
4885 |       /**
4886 |        * Quads that describe node layout relative to viewport.
4887 |        */
4888 |       quads: Quad[];
4889 |     }
4890 |     /**
4891 |      * Returns the root DOM node (and optionally the subtree) to the caller.
4892 | Implicitly enables the DOM domain events for the current target.
4893 |      */
4894 |     export type getDocumentParameters = {
4895 |       /**
4896 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4897 | entire subtree or provide an integer larger than 0.
4898 |        */
4899 |       depth?: number;
4900 |       /**
4901 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4902 | (default is false).
4903 |        */
4904 |       pierce?: boolean;
4905 |     }
4906 |     export type getDocumentReturnValue = {
4907 |       /**
4908 |        * Resulting node.
4909 |        */
4910 |       root: Node;
4911 |     }
4912 |     /**
4913 |      * Returns the root DOM node (and optionally the subtree) to the caller.
4914 | Deprecated, as it is not designed to work well with the rest of the DOM agent.
4915 | Use DOMSnapshot.captureSnapshot instead.
4916 |      */
4917 |     export type getFlattenedDocumentParameters = {
4918 |       /**
4919 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
4920 | entire subtree or provide an integer larger than 0.
4921 |        */
4922 |       depth?: number;
4923 |       /**
4924 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
4925 | (default is false).
4926 |        */
4927 |       pierce?: boolean;
4928 |     }
4929 |     export type getFlattenedDocumentReturnValue = {
4930 |       /**
4931 |        * Resulting node.
4932 |        */
4933 |       nodes: Node[];
4934 |     }
4935 |     /**
4936 |      * Finds nodes with a given computed style in a subtree.
4937 |      */
4938 |     export type getNodesForSubtreeByStyleParameters = {
4939 |       /**
4940 |        * Node ID pointing to the root of a subtree.
4941 |        */
4942 |       nodeId: NodeId;
4943 |       /**
4944 |        * The style to filter nodes by (includes nodes if any of properties matches).
4945 |        */
4946 |       computedStyles: CSSComputedStyleProperty[];
4947 |       /**
4948 |        * Whether or not iframes and shadow roots in the same target should be traversed when returning the
4949 | results (default is false).
4950 |        */
4951 |       pierce?: boolean;
4952 |     }
4953 |     export type getNodesForSubtreeByStyleReturnValue = {
4954 |       /**
4955 |        * Resulting nodes.
4956 |        */
4957 |       nodeIds: NodeId[];
4958 |     }
4959 |     /**
4960 |      * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
4961 | either returned or not.
4962 |      */
4963 |     export type getNodeForLocationParameters = {
4964 |       /**
4965 |        * X coordinate.
4966 |        */
4967 |       x: number;
4968 |       /**
4969 |        * Y coordinate.
4970 |        */
4971 |       y: number;
4972 |       /**
4973 |        * False to skip to the nearest non-UA shadow root ancestor (default: false).
4974 |        */
4975 |       includeUserAgentShadowDOM?: boolean;
4976 |       /**
4977 |        * Whether to ignore pointer-events: none on elements and hit test them.
4978 |        */
4979 |       ignorePointerEventsNone?: boolean;
4980 |     }
4981 |     export type getNodeForLocationReturnValue = {
4982 |       /**
4983 |        * Resulting node.
4984 |        */
4985 |       backendNodeId: BackendNodeId;
4986 |       /**
4987 |        * Frame this node belongs to.
4988 |        */
4989 |       frameId: Page.FrameId;
4990 |       /**
4991 |        * Id of the node at given coordinates, only when enabled and requested document.
4992 |        */
4993 |       nodeId?: NodeId;
4994 |     }
4995 |     /**
4996 |      * Returns node's HTML markup.
4997 |      */
4998 |     export type getOuterHTMLParameters = {
4999 |       /**
5000 |        * Identifier of the node.
5001 |        */
5002 |       nodeId?: NodeId;
5003 |       /**
5004 |        * Identifier of the backend node.
5005 |        */
5006 |       backendNodeId?: BackendNodeId;
5007 |       /**
5008 |        * JavaScript object id of the node wrapper.
5009 |        */
5010 |       objectId?: Runtime.RemoteObjectId;
5011 |       /**
5012 |        * Include all shadow roots. Equals to false if not specified.
5013 |        */
5014 |       includeShadowDOM?: boolean;
5015 |     }
5016 |     export type getOuterHTMLReturnValue = {
5017 |       /**
5018 |        * Outer HTML markup.
5019 |        */
5020 |       outerHTML: string;
5021 |     }
5022 |     /**
5023 |      * Returns the id of the nearest ancestor that is a relayout boundary.
5024 |      */
5025 |     export type getRelayoutBoundaryParameters = {
5026 |       /**
5027 |        * Id of the node.
5028 |        */
5029 |       nodeId: NodeId;
5030 |     }
5031 |     export type getRelayoutBoundaryReturnValue = {
5032 |       /**
5033 |        * Relayout boundary node id for the given node.
5034 |        */
5035 |       nodeId: NodeId;
5036 |     }
5037 |     /**
5038 |      * Returns search results from given `fromIndex` to given `toIndex` from the search with the given
5039 | identifier.
5040 |      */
5041 |     export type getSearchResultsParameters = {
5042 |       /**
5043 |        * Unique search session identifier.
5044 |        */
5045 |       searchId: string;
5046 |       /**
5047 |        * Start index of the search result to be returned.
5048 |        */
5049 |       fromIndex: number;
5050 |       /**
5051 |        * End index of the search result to be returned.
5052 |        */
5053 |       toIndex: number;
5054 |     }
5055 |     export type getSearchResultsReturnValue = {
5056 |       /**
5057 |        * Ids of the search result nodes.
5058 |        */
5059 |       nodeIds: NodeId[];
5060 |     }
5061 |     /**
5062 |      * Hides any highlight.
5063 |      */
5064 |     export type hideHighlightParameters = {
5065 |     }
5066 |     export type hideHighlightReturnValue = {
5067 |     }
5068 |     /**
5069 |      * Highlights DOM node.
5070 |      */
5071 |     export type highlightNodeParameters = {
5072 |     }
5073 |     export type highlightNodeReturnValue = {
5074 |     }
5075 |     /**
5076 |      * Highlights given rectangle.
5077 |      */
5078 |     export type highlightRectParameters = {
5079 |     }
5080 |     export type highlightRectReturnValue = {
5081 |     }
5082 |     /**
5083 |      * Marks last undoable state.
5084 |      */
5085 |     export type markUndoableStateParameters = {
5086 |     }
5087 |     export type markUndoableStateReturnValue = {
5088 |     }
5089 |     /**
5090 |      * Moves node into the new container, places it before the given anchor.
5091 |      */
5092 |     export type moveToParameters = {
5093 |       /**
5094 |        * Id of the node to move.
5095 |        */
5096 |       nodeId: NodeId;
5097 |       /**
5098 |        * Id of the element to drop the moved node into.
5099 |        */
5100 |       targetNodeId: NodeId;
5101 |       /**
5102 |        * Drop node before this one (if absent, the moved node becomes the last child of
5103 | `targetNodeId`).
5104 |        */
5105 |       insertBeforeNodeId?: NodeId;
5106 |     }
5107 |     export type moveToReturnValue = {
5108 |       /**
5109 |        * New id of the moved node.
5110 |        */
5111 |       nodeId: NodeId;
5112 |     }
5113 |     /**
5114 |      * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
5115 | `cancelSearch` to end this search session.
5116 |      */
5117 |     export type performSearchParameters = {
5118 |       /**
5119 |        * Plain text or query selector or XPath search query.
5120 |        */
5121 |       query: string;
5122 |       /**
5123 |        * True to search in user agent shadow DOM.
5124 |        */
5125 |       includeUserAgentShadowDOM?: boolean;
5126 |     }
5127 |     export type performSearchReturnValue = {
5128 |       /**
5129 |        * Unique search session identifier.
5130 |        */
5131 |       searchId: string;
5132 |       /**
5133 |        * Number of search results.
5134 |        */
5135 |       resultCount: number;
5136 |     }
5137 |     /**
5138 |      * Requests that the node is sent to the caller given its path. // FIXME, use XPath
5139 |      */
5140 |     export type pushNodeByPathToFrontendParameters = {
5141 |       /**
5142 |        * Path to node in the proprietary format.
5143 |        */
5144 |       path: string;
5145 |     }
5146 |     export type pushNodeByPathToFrontendReturnValue = {
5147 |       /**
5148 |        * Id of the node for given path.
5149 |        */
5150 |       nodeId: NodeId;
5151 |     }
5152 |     /**
5153 |      * Requests that a batch of nodes is sent to the caller given their backend node ids.
5154 |      */
5155 |     export type pushNodesByBackendIdsToFrontendParameters = {
5156 |       /**
5157 |        * The array of backend node ids.
5158 |        */
5159 |       backendNodeIds: BackendNodeId[];
5160 |     }
5161 |     export type pushNodesByBackendIdsToFrontendReturnValue = {
5162 |       /**
5163 |        * The array of ids of pushed nodes that correspond to the backend ids specified in
5164 | backendNodeIds.
5165 |        */
5166 |       nodeIds: NodeId[];
5167 |     }
5168 |     /**
5169 |      * Executes `querySelector` on a given node.
5170 |      */
5171 |     export type querySelectorParameters = {
5172 |       /**
5173 |        * Id of the node to query upon.
5174 |        */
5175 |       nodeId: NodeId;
5176 |       /**
5177 |        * Selector string.
5178 |        */
5179 |       selector: string;
5180 |     }
5181 |     export type querySelectorReturnValue = {
5182 |       /**
5183 |        * Query selector result.
5184 |        */
5185 |       nodeId: NodeId;
5186 |     }
5187 |     /**
5188 |      * Executes `querySelectorAll` on a given node.
5189 |      */
5190 |     export type querySelectorAllParameters = {
5191 |       /**
5192 |        * Id of the node to query upon.
5193 |        */
5194 |       nodeId: NodeId;
5195 |       /**
5196 |        * Selector string.
5197 |        */
5198 |       selector: string;
5199 |     }
5200 |     export type querySelectorAllReturnValue = {
5201 |       /**
5202 |        * Query selector result.
5203 |        */
5204 |       nodeIds: NodeId[];
5205 |     }
5206 |     /**
5207 |      * Returns NodeIds of current top layer elements.
5208 | Top layer is rendered closest to the user within a viewport, therefore its elements always
5209 | appear on top of all other content.
5210 |      */
5211 |     export type getTopLayerElementsParameters = {
5212 |     }
5213 |     export type getTopLayerElementsReturnValue = {
5214 |       /**
5215 |        * NodeIds of top layer elements
5216 |        */
5217 |       nodeIds: NodeId[];
5218 |     }
5219 |     /**
5220 |      * Returns the NodeId of the matched element according to certain relations.
5221 |      */
5222 |     export type getElementByRelationParameters = {
5223 |       /**
5224 |        * Id of the node from which to query the relation.
5225 |        */
5226 |       nodeId: NodeId;
5227 |       /**
5228 |        * Type of relation to get.
5229 |        */
5230 |       relation: "PopoverTarget"|"InterestTarget"|"CommandFor";
5231 |     }
5232 |     export type getElementByRelationReturnValue = {
5233 |       /**
5234 |        * NodeId of the element matching the queried relation.
5235 |        */
5236 |       nodeId: NodeId;
5237 |     }
5238 |     /**
5239 |      * Re-does the last undone action.
5240 |      */
5241 |     export type redoParameters = {
5242 |     }
5243 |     export type redoReturnValue = {
5244 |     }
5245 |     /**
5246 |      * Removes attribute with given name from an element with given id.
5247 |      */
5248 |     export type removeAttributeParameters = {
5249 |       /**
5250 |        * Id of the element to remove attribute from.
5251 |        */
5252 |       nodeId: NodeId;
5253 |       /**
5254 |        * Name of the attribute to remove.
5255 |        */
5256 |       name: string;
5257 |     }
5258 |     export type removeAttributeReturnValue = {
5259 |     }
5260 |     /**
5261 |      * Removes node with given id.
5262 |      */
5263 |     export type removeNodeParameters = {
5264 |       /**
5265 |        * Id of the node to remove.
5266 |        */
5267 |       nodeId: NodeId;
5268 |     }
5269 |     export type removeNodeReturnValue = {
5270 |     }
5271 |     /**
5272 |      * Requests that children of the node with given id are returned to the caller in form of
5273 | `setChildNodes` events where not only immediate children are retrieved, but all children down to
5274 | the specified depth.
5275 |      */
5276 |     export type requestChildNodesParameters = {
5277 |       /**
5278 |        * Id of the node to get children for.
5279 |        */
5280 |       nodeId: NodeId;
5281 |       /**
5282 |        * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
5283 | entire subtree or provide an integer larger than 0.
5284 |        */
5285 |       depth?: number;
5286 |       /**
5287 |        * Whether or not iframes and shadow roots should be traversed when returning the sub-tree
5288 | (default is false).
5289 |        */
5290 |       pierce?: boolean;
5291 |     }
5292 |     export type requestChildNodesReturnValue = {
5293 |     }
5294 |     /**
5295 |      * Requests that the node is sent to the caller given the JavaScript node object reference. All
5296 | nodes that form the path from the node to the root are also sent to the client as a series of
5297 | `setChildNodes` notifications.
5298 |      */
5299 |     export type requestNodeParameters = {
5300 |       /**
5301 |        * JavaScript object id to convert into node.
5302 |        */
5303 |       objectId: Runtime.RemoteObjectId;
5304 |     }
5305 |     export type requestNodeReturnValue = {
5306 |       /**
5307 |        * Node id for given object.
5308 |        */
5309 |       nodeId: NodeId;
5310 |     }
5311 |     /**
5312 |      * Resolves the JavaScript node object for a given NodeId or BackendNodeId.
5313 |      */
5314 |     export type resolveNodeParameters = {
5315 |       /**
5316 |        * Id of the node to resolve.
5317 |        */
5318 |       nodeId?: NodeId;
5319 |       /**
5320 |        * Backend identifier of the node to resolve.
5321 |        */
5322 |       backendNodeId?: DOM.BackendNodeId;
5323 |       /**
5324 |        * Symbolic group name that can be used to release multiple objects.
5325 |        */
5326 |       objectGroup?: string;
5327 |       /**
5328 |        * Execution context in which to resolve the node.
5329 |        */
5330 |       executionContextId?: Runtime.ExecutionContextId;
5331 |     }
5332 |     export type resolveNodeReturnValue = {
5333 |       /**
5334 |        * JavaScript object wrapper for given node.
5335 |        */
5336 |       object: Runtime.RemoteObject;
5337 |     }
5338 |     /**
5339 |      * Sets attribute for an element with given id.
5340 |      */
5341 |     export type setAttributeValueParameters = {
5342 |       /**
5343 |        * Id of the element to set attribute for.
5344 |        */
5345 |       nodeId: NodeId;
5346 |       /**
5347 |        * Attribute name.
5348 |        */
5349 |       name: string;
5350 |       /**
5351 |        * Attribute value.
5352 |        */
5353 |       value: string;
5354 |     }
5355 |     export type setAttributeValueReturnValue = {
5356 |     }
5357 |     /**
5358 |      * Sets attributes on element with given id. This method is useful when user edits some existing
5359 | attribute value and types in several attribute name/value pairs.
5360 |      */
5361 |     export type setAttributesAsTextParameters = {
5362 |       /**
5363 |        * Id of the element to set attributes for.
5364 |        */
5365 |       nodeId: NodeId;
5366 |       /**
5367 |        * Text with a number of attributes. Will parse this text using HTML parser.
5368 |        */
5369 |       text: string;
5370 |       /**
5371 |        * Attribute name to replace with new attributes derived from text in case text parsed
5372 | successfully.
5373 |        */
5374 |       name?: string;
5375 |     }
5376 |     export type setAttributesAsTextReturnValue = {
5377 |     }
5378 |     /**
5379 |      * Sets files for the given file input element.
5380 |      */
5381 |     export type setFileInputFilesParameters = {
5382 |       /**
5383 |        * Array of file paths to set.
5384 |        */
5385 |       files: string[];
5386 |       /**
5387 |        * Identifier of the node.
5388 |        */
5389 |       nodeId?: NodeId;
5390 |       /**
5391 |        * Identifier of the backend node.
5392 |        */
5393 |       backendNodeId?: BackendNodeId;
5394 |       /**
5395 |        * JavaScript object id of the node wrapper.
5396 |        */
5397 |       objectId?: Runtime.RemoteObjectId;
5398 |     }
5399 |     export type setFileInputFilesReturnValue = {
5400 |     }
5401 |     /**
5402 |      * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
5403 |      */
5404 |     export type setNodeStackTracesEnabledParameters = {
5405 |       /**
5406 |        * Enable or disable.
5407 |        */
5408 |       enable: boolean;
5409 |     }
5410 |     export type setNodeStackTracesEnabledReturnValue = {
5411 |     }
5412 |     /**
5413 |      * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
5414 |      */
5415 |     export type getNodeStackTracesParameters = {
5416 |       /**
5417 |        * Id of the node to get stack traces for.
5418 |        */
5419 |       nodeId: NodeId;
5420 |     }
5421 |     export type getNodeStackTracesReturnValue = {
5422 |       /**
5423 |        * Creation stack trace, if available.
5424 |        */
5425 |       creation?: Runtime.StackTrace;
5426 |     }
5427 |     /**
5428 |      * Returns file information for the given
5429 | File wrapper.
5430 |      */
5431 |     export type getFileInfoParameters = {
5432 |       /**
5433 |        * JavaScript object id of the node wrapper.
5434 |        */
5435 |       objectId: Runtime.RemoteObjectId;
5436 |     }
5437 |     export type getFileInfoReturnValue = {
5438 |       path: string;
5439 |     }
5440 |     /**
5441 |      * Returns list of detached nodes
5442 |      */
5443 |     export type getDetachedDomNodesParameters = {
5444 |     }
5445 |     export type getDetachedDomNodesReturnValue = {
5446 |       /**
5447 |        * The list of detached nodes
5448 |        */
5449 |       detachedNodes: DetachedElementInfo[];
5450 |     }
5451 |     /**
5452 |      * Enables console to refer to the node with given id via $x (see Command Line API for more details
5453 | $x functions).
5454 |      */
5455 |     export type setInspectedNodeParameters = {
5456 |       /**
5457 |        * DOM node id to be accessible by means of $x command line API.
5458 |        */
5459 |       nodeId: NodeId;
5460 |     }
5461 |     export type setInspectedNodeReturnValue = {
5462 |     }
5463 |     /**
5464 |      * Sets node name for a node with given id.
5465 |      */
5466 |     export type setNodeNameParameters = {
5467 |       /**
5468 |        * Id of the node to set name for.
5469 |        */
5470 |       nodeId: NodeId;
5471 |       /**
5472 |        * New node's name.
5473 |        */
5474 |       name: string;
5475 |     }
5476 |     export type setNodeNameReturnValue = {
5477 |       /**
5478 |        * New node's id.
5479 |        */
5480 |       nodeId: NodeId;
5481 |     }
5482 |     /**
5483 |      * Sets node value for a node with given id.
5484 |      */
5485 |     export type setNodeValueParameters = {
5486 |       /**
5487 |        * Id of the node to set value for.
5488 |        */
5489 |       nodeId: NodeId;
5490 |       /**
5491 |        * New node's value.
5492 |        */
5493 |       value: string;
5494 |     }
5495 |     export type setNodeValueReturnValue = {
5496 |     }
5497 |     /**
5498 |      * Sets node HTML markup, returns new node id.
5499 |      */
5500 |     export type setOuterHTMLParameters = {
5501 |       /**
5502 |        * Id of the node to set markup for.
5503 |        */
5504 |       nodeId: NodeId;
5505 |       /**
5506 |        * Outer HTML markup to set.
5507 |        */
5508 |       outerHTML: string;
5509 |     }
5510 |     export type setOuterHTMLReturnValue = {
5511 |     }
5512 |     /**
5513 |      * Undoes the last performed action.
5514 |      */
5515 |     export type undoParameters = {
5516 |     }
5517 |     export type undoReturnValue = {
5518 |     }
5519 |     /**
5520 |      * Returns iframe node that owns iframe with the given domain.
5521 |      */
5522 |     export type getFrameOwnerParameters = {
5523 |       frameId: Page.FrameId;
5524 |     }
5525 |     export type getFrameOwnerReturnValue = {
5526 |       /**
5527 |        * Resulting node.
5528 |        */
5529 |       backendNodeId: BackendNodeId;
5530 |       /**
5531 |        * Id of the node at given coordinates, only when enabled and requested document.
5532 |        */
5533 |       nodeId?: NodeId;
5534 |     }
5535 |     /**
5536 |      * Returns the query container of the given node based on container query
5537 | conditions: containerName, physical and logical axes, and whether it queries
5538 | scroll-state or anchored elements. If no axes are provided and
5539 | queriesScrollState is false, the style container is returned, which is the
5540 | direct parent or the closest element with a matching container-name.
5541 |      */
5542 |     export type getContainerForNodeParameters = {
5543 |       nodeId: NodeId;
5544 |       containerName?: string;
5545 |       physicalAxes?: PhysicalAxes;
5546 |       logicalAxes?: LogicalAxes;
5547 |       queriesScrollState?: boolean;
5548 |       queriesAnchored?: boolean;
5549 |     }
5550 |     export type getContainerForNodeReturnValue = {
5551 |       /**
5552 |        * The container node for the given node, or null if not found.
5553 |        */
5554 |       nodeId?: NodeId;
5555 |     }
5556 |     /**
5557 |      * Returns the descendants of a container query container that have
5558 | container queries against this container.
5559 |      */
5560 |     export type getQueryingDescendantsForContainerParameters = {
5561 |       /**
5562 |        * Id of the container node to find querying descendants from.
5563 |        */
5564 |       nodeId: NodeId;
5565 |     }
5566 |     export type getQueryingDescendantsForContainerReturnValue = {
5567 |       /**
5568 |        * Descendant nodes with container queries against the given container.
5569 |        */
5570 |       nodeIds: NodeId[];
5571 |     }
5572 |     /**
5573 |      * Returns the target anchor element of the given anchor query according to
5574 | https://www.w3.org/TR/css-anchor-position-1/#target.
5575 |      */
5576 |     export type getAnchorElementParameters = {
5577 |       /**
5578 |        * Id of the positioned element from which to find the anchor.
5579 |        */
5580 |       nodeId: NodeId;
5581 |       /**
5582 |        * An optional anchor specifier, as defined in
5583 | https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier.
5584 | If not provided, it will return the implicit anchor element for
5585 | the given positioned element.
5586 |        */
5587 |       anchorSpecifier?: string;
5588 |     }
5589 |     export type getAnchorElementReturnValue = {
5590 |       /**
5591 |        * The anchor element of the given anchor query.
5592 |        */
5593 |       nodeId: NodeId;
5594 |     }
5595 |     /**
5596 |      * When enabling, this API force-opens the popover identified by nodeId
5597 | and keeps it open until disabled.
5598 |      */
5599 |     export type forceShowPopoverParameters = {
5600 |       /**
5601 |        * Id of the popover HTMLElement
5602 |        */
5603 |       nodeId: NodeId;
5604 |       /**
5605 |        * If true, opens the popover and keeps it open. If false, closes the
5606 | popover if it was previously force-opened.
5607 |        */
5608 |       enable: boolean;
5609 |     }
5610 |     export type forceShowPopoverReturnValue = {
5611 |       /**
5612 |        * List of popovers that were closed in order to respect popover stacking order.
5613 |        */
5614 |       nodeIds: NodeId[];
5615 |     }
5616 |   }
5617 | 
5618 |   /**
5619 |    * DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript
5620 | execution will stop on these operations as if there was a regular breakpoint set.
5621 |    */
5622 |   export namespace DOMDebugger {
5623 |     /**
5624 |      * DOM breakpoint type.
5625 |      */
5626 |     export type DOMBreakpointType = "subtree-modified"|"attribute-modified"|"node-removed";
5627 |     /**
5628 |      * CSP Violation type.
5629 |      */
5630 |     export type CSPViolationType = "trustedtype-sink-violation"|"trustedtype-policy-violation";
5631 |     /**
5632 |      * Object event listener.
5633 |      */
5634 |     export interface EventListener {
5635 |       /**
5636 |        * `EventListener`'s type.
5637 |        */
5638 |       type: string;
5639 |       /**
5640 |        * `EventListener`'s useCapture.
5641 |        */
5642 |       useCapture: boolean;
5643 |       /**
5644 |        * `EventListener`'s passive flag.
5645 |        */
5646 |       passive: boolean;
5647 |       /**
5648 |        * `EventListener`'s once flag.
5649 |        */
5650 |       once: boolean;
5651 |       /**
5652 |        * Script id of the handler code.
5653 |        */
5654 |       scriptId: Runtime.ScriptId;
5655 |       /**
5656 |        * Line number in the script (0-based).
5657 |        */
5658 |       lineNumber: number;
5659 |       /**
5660 |        * Column number in the script (0-based).
5661 |        */
5662 |       columnNumber: number;
5663 |       /**
5664 |        * Event handler function value.
5665 |        */
5666 |       handler?: Runtime.RemoteObject;
5667 |       /**
5668 |        * Event original handler function value.
5669 |        */
5670 |       originalHandler?: Runtime.RemoteObject;
5671 |       /**
5672 |        * Node the listener is added to (if any).
5673 |        */
5674 |       backendNodeId?: DOM.BackendNodeId;
5675 |     }
5676 | 
5677 | 
5678 |     /**
5679 |      * Returns event listeners of the given object.
5680 |      */
5681 |     export type getEventListenersParameters = {
5682 |       /**
5683 |        * Identifier of the object to return listeners for.
5684 |        */
5685 |       objectId: Runtime.RemoteObjectId;
5686 |       /**
5687 |        * The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the
5688 | entire subtree or provide an integer larger than 0.
5689 |        */
5690 |       depth?: number;
5691 |       /**
5692 |        * Whether or not iframes and shadow roots should be traversed when returning the subtree
5693 | (default is false). Reports listeners for all contexts if pierce is enabled.
5694 |        */
5695 |       pierce?: boolean;
5696 |     }
5697 |     export type getEventListenersReturnValue = {
5698 |       /**
5699 |        * Array of relevant listeners.
5700 |        */
5701 |       listeners: EventListener[];
5702 |     }
5703 |     /**
5704 |      * Removes DOM breakpoint that was set using `setDOMBreakpoint`.
5705 |      */
5706 |     export type removeDOMBreakpointParameters = {
5707 |       /**
5708 |        * Identifier of the node to remove breakpoint from.
5709 |        */
5710 |       nodeId: DOM.NodeId;
5711 |       /**
5712 |        * Type of the breakpoint to remove.
5713 |        */
5714 |       type: DOMBreakpointType;
5715 |     }
5716 |     export type removeDOMBreakpointReturnValue = {
5717 |     }
5718 |     /**
5719 |      * Removes breakpoint on particular DOM event.
5720 |      */
5721 |     export type removeEventListenerBreakpointParameters = {
5722 |       /**
5723 |        * Event name.
5724 |        */
5725 |       eventName: string;
5726 |       /**
5727 |        * EventTarget interface name.
5728 |        */
5729 |       targetName?: string;
5730 |     }
5731 |     export type removeEventListenerBreakpointReturnValue = {
5732 |     }
5733 |     /**
5734 |      * Removes breakpoint on particular native event.
5735 |      */
5736 |     export type removeInstrumentationBreakpointParameters = {
5737 |       /**
5738 |        * Instrumentation name to stop on.
5739 |        */
5740 |       eventName: string;
5741 |     }
5742 |     export type removeInstrumentationBreakpointReturnValue = {
5743 |     }
5744 |     /**
5745 |      * Removes breakpoint from XMLHttpRequest.
5746 |      */
5747 |     export type removeXHRBreakpointParameters = {
5748 |       /**
5749 |        * Resource URL substring.
5750 |        */
5751 |       url: string;
5752 |     }
5753 |     export type removeXHRBreakpointReturnValue = {
5754 |     }
5755 |     /**
5756 |      * Sets breakpoint on particular CSP violations.
5757 |      */
5758 |     export type setBreakOnCSPViolationParameters = {
5759 |       /**
5760 |        * CSP Violations to stop upon.
5761 |        */
5762 |       violationTypes: CSPViolationType[];
5763 |     }
5764 |     export type setBreakOnCSPViolationReturnValue = {
5765 |     }
5766 |     /**
5767 |      * Sets breakpoint on particular operation with DOM.
5768 |      */
5769 |     export type setDOMBreakpointParameters = {
5770 |       /**
5771 |        * Identifier of the node to set breakpoint on.
5772 |        */
5773 |       nodeId: DOM.NodeId;
5774 |       /**
5775 |        * Type of the operation to stop upon.
5776 |        */
5777 |       type: DOMBreakpointType;
5778 |     }
5779 |     export type setDOMBreakpointReturnValue = {
5780 |     }
5781 |     /**
5782 |      * Sets breakpoint on particular DOM event.
5783 |      */
5784 |     export type setEventListenerBreakpointParameters = {
5785 |       /**
5786 |        * DOM Event name to stop on (any DOM event will do).
5787 |        */
5788 |       eventName: string;
5789 |       /**
5790 |        * EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any
5791 | EventTarget.
5792 |        */
5793 |       targetName?: string;
5794 |     }
5795 |     export type setEventListenerBreakpointReturnValue = {
5796 |     }
5797 |     /**
5798 |      * Sets breakpoint on particular native event.
5799 |      */
5800 |     export type setInstrumentationBreakpointParameters = {
5801 |       /**
5802 |        * Instrumentation name to stop on.
5803 |        */
5804 |       eventName: string;
5805 |     }
5806 |     export type setInstrumentationBreakpointReturnValue = {
5807 |     }
5808 |     /**
5809 |      * Sets breakpoint on XMLHttpRequest.
5810 |      */
5811 |     export type setXHRBreakpointParameters = {
5812 |       /**
5813 |        * Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
5814 |        */
5815 |       url: string;
5816 |     }
5817 |     export type setXHRBreakpointReturnValue = {
5818 |     }
5819 |   }
5820 | 
5821 |   /**
5822 |    * This domain facilitates obtaining document snapshots with DOM, layout, and style information.
5823 |    */
5824 |   export namespace DOMSnapshot {
5825 |     /**
5826 |      * A Node in the DOM tree.
5827 |      */
5828 |     export interface DOMNode {
5829 |       /**
5830 |        * `Node`'s nodeType.
5831 |        */
5832 |       nodeType: number;
5833 |       /**
5834 |        * `Node`'s nodeName.
5835 |        */
5836 |       nodeName: string;
5837 |       /**
5838 |        * `Node`'s nodeValue.
5839 |        */
5840 |       nodeValue: string;
5841 |       /**
5842 |        * Only set for textarea elements, contains the text value.
5843 |        */
5844 |       textValue?: string;
5845 |       /**
5846 |        * Only set for input elements, contains the input's associated text value.
5847 |        */
5848 |       inputValue?: string;
5849 |       /**
5850 |        * Only set for radio and checkbox input elements, indicates if the element has been checked
5851 |        */
5852 |       inputChecked?: boolean;
5853 |       /**
5854 |        * Only set for option elements, indicates if the element has been selected
5855 |        */
5856 |       optionSelected?: boolean;
5857 |       /**
5858 |        * `Node`'s id, corresponds to DOM.Node.backendNodeId.
5859 |        */
5860 |       backendNodeId: DOM.BackendNodeId;
5861 |       /**
5862 |        * The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if
5863 | any.
5864 |        */
5865 |       childNodeIndexes?: number[];
5866 |       /**
5867 |        * Attributes of an `Element` node.
5868 |        */
5869 |       attributes?: NameValue[];
5870 |       /**
5871 |        * Indexes of pseudo elements associated with this node in the `domNodes` array returned by
5872 | `getSnapshot`, if any.
5873 |        */
5874 |       pseudoElementIndexes?: number[];
5875 |       /**
5876 |        * The index of the node's related layout tree node in the `layoutTreeNodes` array returned by
5877 | `getSnapshot`, if any.
5878 |        */
5879 |       layoutNodeIndex?: number;
5880 |       /**
5881 |        * Document URL that `Document` or `FrameOwner` node points to.
5882 |        */
5883 |       documentURL?: string;
5884 |       /**
5885 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
5886 |        */
5887 |       baseURL?: string;
5888 |       /**
5889 |        * Only set for documents, contains the document's content language.
5890 |        */
5891 |       contentLanguage?: string;
5892 |       /**
5893 |        * Only set for documents, contains the document's character set encoding.
5894 |        */
5895 |       documentEncoding?: string;
5896 |       /**
5897 |        * `DocumentType` node's publicId.
5898 |        */
5899 |       publicId?: string;
5900 |       /**
5901 |        * `DocumentType` node's systemId.
5902 |        */
5903 |       systemId?: string;
5904 |       /**
5905 |        * Frame ID for frame owner elements and also for the document node.
5906 |        */
5907 |       frameId?: Page.FrameId;
5908 |       /**
5909 |        * The index of a frame owner element's content document in the `domNodes` array returned by
5910 | `getSnapshot`, if any.
5911 |        */
5912 |       contentDocumentIndex?: number;
5913 |       /**
5914 |        * Type of a pseudo element node.
5915 |        */
5916 |       pseudoType?: DOM.PseudoType;
5917 |       /**
5918 |        * Shadow root type.
5919 |        */
5920 |       shadowRootType?: DOM.ShadowRootType;
5921 |       /**
5922 |        * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
5923 | event listeners attached via JavaScript as well as anchor tags that naturally navigate when
5924 | clicked.
5925 |        */
5926 |       isClickable?: boolean;
5927 |       /**
5928 |        * Details of the node's event listeners, if any.
5929 |        */
5930 |       eventListeners?: DOMDebugger.EventListener[];
5931 |       /**
5932 |        * The selected url for nodes with a srcset attribute.
5933 |        */
5934 |       currentSourceURL?: string;
5935 |       /**
5936 |        * The url of the script (if any) that generates this node.
5937 |        */
5938 |       originURL?: string;
5939 |       /**
5940 |        * Scroll offsets, set when this node is a Document.
5941 |        */
5942 |       scrollOffsetX?: number;
5943 |       scrollOffsetY?: number;
5944 |     }
5945 |     /**
5946 |      * Details of post layout rendered text positions. The exact layout should not be regarded as
5947 | stable and may change between versions.
5948 |      */
5949 |     export interface InlineTextBox {
5950 |       /**
5951 |        * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
5952 |        */
5953 |       boundingBox: DOM.Rect;
5954 |       /**
5955 |        * The starting index in characters, for this post layout textbox substring. Characters that
5956 | would be represented as a surrogate pair in UTF-16 have length 2.
5957 |        */
5958 |       startCharacterIndex: number;
5959 |       /**
5960 |        * The number of characters in this post layout textbox substring. Characters that would be
5961 | represented as a surrogate pair in UTF-16 have length 2.
5962 |        */
5963 |       numCharacters: number;
5964 |     }
5965 |     /**
5966 |      * Details of an element in the DOM tree with a LayoutObject.
5967 |      */
5968 |     export interface LayoutTreeNode {
5969 |       /**
5970 |        * The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
5971 |        */
5972 |       domNodeIndex: number;
5973 |       /**
5974 |        * The bounding box in document coordinates. Note that scroll offset of the document is ignored.
5975 |        */
5976 |       boundingBox: DOM.Rect;
5977 |       /**
5978 |        * Contents of the LayoutText, if any.
5979 |        */
5980 |       layoutText?: string;
5981 |       /**
5982 |        * The post-layout inline text nodes, if any.
5983 |        */
5984 |       inlineTextNodes?: InlineTextBox[];
5985 |       /**
5986 |        * Index into the `computedStyles` array returned by `getSnapshot`.
5987 |        */
5988 |       styleIndex?: number;
5989 |       /**
5990 |        * Global paint order index, which is determined by the stacking order of the nodes. Nodes
5991 | that are painted together will have the same index. Only provided if includePaintOrder in
5992 | getSnapshot was true.
5993 |        */
5994 |       paintOrder?: number;
5995 |       /**
5996 |        * Set to true to indicate the element begins a new stacking context.
5997 |        */
5998 |       isStackingContext?: boolean;
5999 |     }
6000 |     /**
6001 |      * A subset of the full ComputedStyle as defined by the request whitelist.
6002 |      */
6003 |     export interface ComputedStyle {
6004 |       /**
6005 |        * Name/value pairs of computed style properties.
6006 |        */
6007 |       properties: NameValue[];
6008 |     }
6009 |     /**
6010 |      * A name/value pair.
6011 |      */
6012 |     export interface NameValue {
6013 |       /**
6014 |        * Attribute/property name.
6015 |        */
6016 |       name: string;
6017 |       /**
6018 |        * Attribute/property value.
6019 |        */
6020 |       value: string;
6021 |     }
6022 |     /**
6023 |      * Index of the string in the strings table.
6024 |      */
6025 |     export type StringIndex = number;
6026 |     /**
6027 |      * Index of the string in the strings table.
6028 |      */
6029 |     export type ArrayOfStrings = StringIndex[];
6030 |     /**
6031 |      * Data that is only present on rare nodes.
6032 |      */
6033 |     export interface RareStringData {
6034 |       index: number[];
6035 |       value: StringIndex[];
6036 |     }
6037 |     export interface RareBooleanData {
6038 |       index: number[];
6039 |     }
6040 |     export interface RareIntegerData {
6041 |       index: number[];
6042 |       value: number[];
6043 |     }
6044 |     export type Rectangle = number[];
6045 |     /**
6046 |      * Document snapshot.
6047 |      */
6048 |     export interface DocumentSnapshot {
6049 |       /**
6050 |        * Document URL that `Document` or `FrameOwner` node points to.
6051 |        */
6052 |       documentURL: StringIndex;
6053 |       /**
6054 |        * Document title.
6055 |        */
6056 |       title: StringIndex;
6057 |       /**
6058 |        * Base URL that `Document` or `FrameOwner` node uses for URL completion.
6059 |        */
6060 |       baseURL: StringIndex;
6061 |       /**
6062 |        * Contains the document's content language.
6063 |        */
6064 |       contentLanguage: StringIndex;
6065 |       /**
6066 |        * Contains the document's character set encoding.
6067 |        */
6068 |       encodingName: StringIndex;
6069 |       /**
6070 |        * `DocumentType` node's publicId.
6071 |        */
6072 |       publicId: StringIndex;
6073 |       /**
6074 |        * `DocumentType` node's systemId.
6075 |        */
6076 |       systemId: StringIndex;
6077 |       /**
6078 |        * Frame ID for frame owner elements and also for the document node.
6079 |        */
6080 |       frameId: StringIndex;
6081 |       /**
6082 |        * A table with dom nodes.
6083 |        */
6084 |       nodes: NodeTreeSnapshot;
6085 |       /**
6086 |        * The nodes in the layout tree.
6087 |        */
6088 |       layout: LayoutTreeSnapshot;
6089 |       /**
6090 |        * The post-layout inline text nodes.
6091 |        */
6092 |       textBoxes: TextBoxSnapshot;
6093 |       /**
6094 |        * Horizontal scroll offset.
6095 |        */
6096 |       scrollOffsetX?: number;
6097 |       /**
6098 |        * Vertical scroll offset.
6099 |        */
6100 |       scrollOffsetY?: number;
6101 |       /**
6102 |        * Document content width.
6103 |        */
6104 |       contentWidth?: number;
6105 |       /**
6106 |        * Document content height.
6107 |        */
6108 |       contentHeight?: number;
6109 |     }
6110 |     /**
6111 |      * Table containing nodes.
6112 |      */
6113 |     export interface NodeTreeSnapshot {
6114 |       /**
6115 |        * Parent node index.
6116 |        */
6117 |       parentIndex?: number[];
6118 |       /**
6119 |        * `Node`'s nodeType.
6120 |        */
6121 |       nodeType?: number[];
6122 |       /**
6123 |        * Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
6124 |        */
6125 |       shadowRootType?: RareStringData;
6126 |       /**
6127 |        * `Node`'s nodeName.
6128 |        */
6129 |       nodeName?: StringIndex[];
6130 |       /**
6131 |        * `Node`'s nodeValue.
6132 |        */
6133 |       nodeValue?: StringIndex[];
6134 |       /**
6135 |        * `Node`'s id, corresponds to DOM.Node.backendNodeId.
6136 |        */
6137 |       backendNodeId?: DOM.BackendNodeId[];
6138 |       /**
6139 |        * Attributes of an `Element` node. Flatten name, value pairs.
6140 |        */
6141 |       attributes?: ArrayOfStrings[];
6142 |       /**
6143 |        * Only set for textarea elements, contains the text value.
6144 |        */
6145 |       textValue?: RareStringData;
6146 |       /**
6147 |        * Only set for input elements, contains the input's associated text value.
6148 |        */
6149 |       inputValue?: RareStringData;
6150 |       /**
6151 |        * Only set for radio and checkbox input elements, indicates if the element has been checked
6152 |        */
6153 |       inputChecked?: RareBooleanData;
6154 |       /**
6155 |        * Only set for option elements, indicates if the element has been selected
6156 |        */
6157 |       optionSelected?: RareBooleanData;
6158 |       /**
6159 |        * The index of the document in the list of the snapshot documents.
6160 |        */
6161 |       contentDocumentIndex?: RareIntegerData;
6162 |       /**
6163 |        * Type of a pseudo element node.
6164 |        */
6165 |       pseudoType?: RareStringData;
6166 |       /**
6167 |        * Pseudo element identifier for this node. Only present if there is a
6168 | valid pseudoType.
6169 |        */
6170 |       pseudoIdentifier?: RareStringData;
6171 |       /**
6172 |        * Whether this DOM node responds to mouse clicks. This includes nodes that have had click
6173 | event listeners attached via JavaScript as well as anchor tags that naturally navigate when
6174 | clicked.
6175 |        */
6176 |       isClickable?: RareBooleanData;
6177 |       /**
6178 |        * The selected url for nodes with a srcset attribute.
6179 |        */
6180 |       currentSourceURL?: RareStringData;
6181 |       /**
6182 |        * The url of the script (if any) that generates this node.
6183 |        */
6184 |       originURL?: RareStringData;
6185 |     }
6186 |     /**
6187 |      * Table of details of an element in the DOM tree with a LayoutObject.
6188 |      */
6189 |     export interface LayoutTreeSnapshot {
6190 |       /**
6191 |        * Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
6192 |        */
6193 |       nodeIndex: number[];
6194 |       /**
6195 |        * Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
6196 |        */
6197 |       styles: ArrayOfStrings[];
6198 |       /**
6199 |        * The absolute position bounding box.
6200 |        */
6201 |       bounds: Rectangle[];
6202 |       /**
6203 |        * Contents of the LayoutText, if any.
6204 |        */
6205 |       text: StringIndex[];
6206 |       /**
6207 |        * Stacking context information.
6208 |        */
6209 |       stackingContexts: RareBooleanData;
6210 |       /**
6211 |        * Global paint order index, which is determined by the stacking order of the nodes. Nodes
6212 | that are painted together will have the same index. Only provided if includePaintOrder in
6213 | captureSnapshot was true.
6214 |        */
6215 |       paintOrders?: number[];
6216 |       /**
6217 |        * The offset rect of nodes. Only available when includeDOMRects is set to true
6218 |        */
6219 |       offsetRects?: Rectangle[];
6220 |       /**
6221 |        * The scroll rect of nodes. Only available when includeDOMRects is set to true
6222 |        */
6223 |       scrollRects?: Rectangle[];
6224 |       /**
6225 |        * The client rect of nodes. Only available when includeDOMRects is set to true
6226 |        */
6227 |       clientRects?: Rectangle[];
6228 |       /**
6229 |        * The list of background colors that are blended with colors of overlapping elements.
6230 |        */
6231 |       blendedBackgroundColors?: StringIndex[];
6232 |       /**
6233 |        * The list of computed text opacities.
6234 |        */
6235 |       textColorOpacities?: number[];
6236 |     }
6237 |     /**
6238 |      * Table of details of the post layout rendered text positions. The exact layout should not be regarded as
6239 | stable and may change between versions.
6240 |      */
6241 |     export interface TextBoxSnapshot {
6242 |       /**
6243 |        * Index of the layout tree node that owns this box collection.
6244 |        */
6245 |       layoutIndex: number[];
6246 |       /**
6247 |        * The absolute position bounding box.
6248 |        */
6249 |       bounds: Rectangle[];
6250 |       /**
6251 |        * The starting index in characters, for this post layout textbox substring. Characters that
6252 | would be represented as a surrogate pair in UTF-16 have length 2.
6253 |        */
6254 |       start: number[];
6255 |       /**
6256 |        * The number of characters in this post layout textbox substring. Characters that would be
6257 | represented as a surrogate pair in UTF-16 have length 2.
6258 |        */
6259 |       length: number[];
6260 |     }
6261 | 
6262 | 
6263 |     /**
6264 |      * Disables DOM snapshot agent for the given page.
6265 |      */
6266 |     export type disableParameters = {
6267 |     }
6268 |     export type disableReturnValue = {
6269 |     }
6270 |     /**
6271 |      * Enables DOM snapshot agent for the given page.
6272 |      */
6273 |     export type enableParameters = {
6274 |     }
6275 |     export type enableReturnValue = {
6276 |     }
6277 |     /**
6278 |      * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
6279 | template contents, and imported documents) in a flattened array, as well as layout and
6280 | white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
6281 | flattened.
6282 |      */
6283 |     export type getSnapshotParameters = {
6284 |       /**
6285 |        * Whitelist of computed styles to return.
6286 |        */
6287 |       computedStyleWhitelist: string[];
6288 |       /**
6289 |        * Whether or not to retrieve details of DOM listeners (default false).
6290 |        */
6291 |       includeEventListeners?: boolean;
6292 |       /**
6293 |        * Whether to determine and include the paint order index of LayoutTreeNodes (default false).
6294 |        */
6295 |       includePaintOrder?: boolean;
6296 |       /**
6297 |        * Whether to include UA shadow tree in the snapshot (default false).
6298 |        */
6299 |       includeUserAgentShadowTree?: boolean;
6300 |     }
6301 |     export type getSnapshotReturnValue = {
6302 |       /**
6303 |        * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
6304 |        */
6305 |       domNodes: DOMNode[];
6306 |       /**
6307 |        * The nodes in the layout tree.
6308 |        */
6309 |       layoutTreeNodes: LayoutTreeNode[];
6310 |       /**
6311 |        * Whitelisted ComputedStyle properties for each node in the layout tree.
6312 |        */
6313 |       computedStyles: ComputedStyle[];
6314 |     }
6315 |     /**
6316 |      * Returns a document snapshot, including the full DOM tree of the root node (including iframes,
6317 | template contents, and imported documents) in a flattened array, as well as layout and
6318 | white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
6319 | flattened.
6320 |      */
6321 |     export type captureSnapshotParameters = {
6322 |       /**
6323 |        * Whitelist of computed styles to return.
6324 |        */
6325 |       computedStyles: string[];
6326 |       /**
6327 |        * Whether to include layout object paint orders into the snapshot.
6328 |        */
6329 |       includePaintOrder?: boolean;
6330 |       /**
6331 |        * Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
6332 |        */
6333 |       includeDOMRects?: boolean;
6334 |       /**
6335 |        * Whether to include blended background colors in the snapshot (default: false).
6336 | Blended background color is achieved by blending background colors of all elements
6337 | that overlap with the current element.
6338 |        */
6339 |       includeBlendedBackgroundColors?: boolean;
6340 |       /**
6341 |        * Whether to include text color opacity in the snapshot (default: false).
6342 | An element might have the opacity property set that affects the text color of the element.
6343 | The final text color opacity is computed based on the opacity of all overlapping elements.
6344 |        */
6345 |       includeTextColorOpacities?: boolean;
6346 |     }
6347 |     export type captureSnapshotReturnValue = {
6348 |       /**
6349 |        * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
6350 |        */
6351 |       documents: DocumentSnapshot[];
6352 |       /**
6353 |        * Shared string table that all string properties refer to with indexes.
6354 |        */
6355 |       strings: string[];
6356 |     }
6357 |   }
6358 | 
6359 |   /**
6360 |    * Query and modify DOM storage.
6361 |    */
6362 |   export namespace DOMStorage {
6363 |     export type SerializedStorageKey = string;
6364 |     /**
6365 |      * DOM Storage identifier.
6366 |      */
6367 |     export interface StorageId {
6368 |       /**
6369 |        * Security origin for the storage.
6370 |        */
6371 |       securityOrigin?: string;
6372 |       /**
6373 |        * Represents a key by which DOM Storage keys its CachedStorageAreas
6374 |        */
6375 |       storageKey?: SerializedStorageKey;
6376 |       /**
6377 |        * Whether the storage is local storage (not session storage).
6378 |        */
6379 |       isLocalStorage: boolean;
6380 |     }
6381 |     /**
6382 |      * DOM Storage item.
6383 |      */
6384 |     export type Item = string[];
6385 | 
6386 |     export type domStorageItemAddedPayload = {
6387 |       storageId: StorageId;
6388 |       key: string;
6389 |       newValue: string;
6390 |     }
6391 |     export type domStorageItemRemovedPayload = {
6392 |       storageId: StorageId;
6393 |       key: string;
6394 |     }
6395 |     export type domStorageItemUpdatedPayload = {
6396 |       storageId: StorageId;
6397 |       key: string;
6398 |       oldValue: string;
6399 |       newValue: string;
6400 |     }
6401 |     export type domStorageItemsClearedPayload = {
6402 |       storageId: StorageId;
6403 |     }
6404 | 
6405 |     export type clearParameters = {
6406 |       storageId: StorageId;
6407 |     }
6408 |     export type clearReturnValue = {
6409 |     }
6410 |     /**
6411 |      * Disables storage tracking, prevents storage events from being sent to the client.
6412 |      */
6413 |     export type disableParameters = {
6414 |     }
6415 |     export type disableReturnValue = {
6416 |     }
6417 |     /**
6418 |      * Enables storage tracking, storage events will now be delivered to the client.
6419 |      */
6420 |     export type enableParameters = {
6421 |     }
6422 |     export type enableReturnValue = {
6423 |     }
6424 |     export type getDOMStorageItemsParameters = {
6425 |       storageId: StorageId;
6426 |     }
6427 |     export type getDOMStorageItemsReturnValue = {
6428 |       entries: Item[];
6429 |     }
6430 |     export type removeDOMStorageItemParameters = {
6431 |       storageId: StorageId;
6432 |       key: string;
6433 |     }
6434 |     export type removeDOMStorageItemReturnValue = {
6435 |     }
6436 |     export type setDOMStorageItemParameters = {
6437 |       storageId: StorageId;
6438 |       key: string;
6439 |       value: string;
6440 |     }
6441 |     export type setDOMStorageItemReturnValue = {
6442 |     }
6443 |   }
6444 | 
6445 |   export namespace DeviceAccess {
6446 |     /**
6447 |      * Device request id.
6448 |      */
6449 |     export type RequestId = string;
6450 |     /**
6451 |      * A device id.
6452 |      */
6453 |     export type DeviceId = string;
6454 |     /**
6455 |      * Device information displayed in a user prompt to select a device.
6456 |      */
6457 |     export interface PromptDevice {
6458 |       id: DeviceId;
6459 |       /**
6460 |        * Display name as it appears in a device request user prompt.
6461 |        */
6462 |       name: string;
6463 |     }
6464 | 
6465 |     /**
6466 |      * A device request opened a user prompt to select a device. Respond with the
6467 | selectPrompt or cancelPrompt command.
6468 |      */
6469 |     export type deviceRequestPromptedPayload = {
6470 |       id: RequestId;
6471 |       devices: PromptDevice[];
6472 |     }
6473 | 
6474 |     /**
6475 |      * Enable events in this domain.
6476 |      */
6477 |     export type enableParameters = {
6478 |     }
6479 |     export type enableReturnValue = {
6480 |     }
6481 |     /**
6482 |      * Disable events in this domain.
6483 |      */
6484 |     export type disableParameters = {
6485 |     }
6486 |     export type disableReturnValue = {
6487 |     }
6488 |     /**
6489 |      * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
6490 |      */
6491 |     export type selectPromptParameters = {
6492 |       id: RequestId;
6493 |       deviceId: DeviceId;
6494 |     }
6495 |     export type selectPromptReturnValue = {
6496 |     }
6497 |     /**
6498 |      * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
6499 |      */
6500 |     export type cancelPromptParameters = {
6501 |       id: RequestId;
6502 |     }
6503 |     export type cancelPromptReturnValue = {
6504 |     }
6505 |   }
6506 | 
6507 |   export namespace DeviceOrientation {
6508 | 
6509 | 
6510 |     /**
6511 |      * Clears the overridden Device Orientation.
6512 |      */
6513 |     export type clearDeviceOrientationOverrideParameters = {
6514 |     }
6515 |     export type clearDeviceOrientationOverrideReturnValue = {
6516 |     }
6517 |     /**
6518 |      * Overrides the Device Orientation.
6519 |      */
6520 |     export type setDeviceOrientationOverrideParameters = {
6521 |       /**
6522 |        * Mock alpha
6523 |        */
6524 |       alpha: number;
6525 |       /**
6526 |        * Mock beta
6527 |        */
6528 |       beta: number;
6529 |       /**
6530 |        * Mock gamma
6531 |        */
6532 |       gamma: number;
6533 |     }
6534 |     export type setDeviceOrientationOverrideReturnValue = {
6535 |     }
6536 |   }
6537 | 
6538 |   /**
6539 |    * This domain emulates different environments for the page.
6540 |    */
6541 |   export namespace Emulation {
6542 |     export interface SafeAreaInsets {
6543 |       /**
6544 |        * Overrides safe-area-inset-top.
6545 |        */
6546 |       top?: number;
6547 |       /**
6548 |        * Overrides safe-area-max-inset-top.
6549 |        */
6550 |       topMax?: number;
6551 |       /**
6552 |        * Overrides safe-area-inset-left.
6553 |        */
6554 |       left?: number;
6555 |       /**
6556 |        * Overrides safe-area-max-inset-left.
6557 |        */
6558 |       leftMax?: number;
6559 |       /**
6560 |        * Overrides safe-area-inset-bottom.
6561 |        */
6562 |       bottom?: number;
6563 |       /**
6564 |        * Overrides safe-area-max-inset-bottom.
6565 |        */
6566 |       bottomMax?: number;
6567 |       /**
6568 |        * Overrides safe-area-inset-right.
6569 |        */
6570 |       right?: number;
6571 |       /**
6572 |        * Overrides safe-area-max-inset-right.
6573 |        */
6574 |       rightMax?: number;
6575 |     }
6576 |     /**
6577 |      * Screen orientation.
6578 |      */
6579 |     export interface ScreenOrientation {
6580 |       /**
6581 |        * Orientation type.
6582 |        */
6583 |       type: "portraitPrimary"|"portraitSecondary"|"landscapePrimary"|"landscapeSecondary";
6584 |       /**
6585 |        * Orientation angle.
6586 |        */
6587 |       angle: number;
6588 |     }
6589 |     export interface DisplayFeature {
6590 |       /**
6591 |        * Orientation of a display feature in relation to screen
6592 |        */
6593 |       orientation: "vertical"|"horizontal";
6594 |       /**
6595 |        * The offset from the screen origin in either the x (for vertical
6596 | orientation) or y (for horizontal orientation) direction.
6597 |        */
6598 |       offset: number;
6599 |       /**
6600 |        * A display feature may mask content such that it is not physically
6601 | displayed - this length along with the offset describes this area.
6602 | A display feature that only splits content will have a 0 mask_length.
6603 |        */
6604 |       maskLength: number;
6605 |     }
6606 |     export interface DevicePosture {
6607 |       /**
6608 |        * Current posture of the device
6609 |        */
6610 |       type: "continuous"|"folded";
6611 |     }
6612 |     export interface MediaFeature {
6613 |       name: string;
6614 |       value: string;
6615 |     }
6616 |     /**
6617 |      * advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
6618 | allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
6619 | pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
6620 | resource fetches.
6621 |      */
6622 |     export type VirtualTimePolicy = "advance"|"pause"|"pauseIfNetworkFetchesPending";
6623 |     /**
6624 |      * Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
6625 |      */
6626 |     export interface UserAgentBrandVersion {
6627 |       brand: string;
6628 |       version: string;
6629 |     }
6630 |     /**
6631 |      * Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
6632 | Missing optional values will be filled in by the target with what it would normally use.
6633 |      */
6634 |     export interface UserAgentMetadata {
6635 |       /**
6636 |        * Brands appearing in Sec-CH-UA.
6637 |        */
6638 |       brands?: UserAgentBrandVersion[];
6639 |       /**
6640 |        * Brands appearing in Sec-CH-UA-Full-Version-List.
6641 |        */
6642 |       fullVersionList?: UserAgentBrandVersion[];
6643 |       fullVersion?: string;
6644 |       platform: string;
6645 |       platformVersion: string;
6646 |       architecture: string;
6647 |       model: string;
6648 |       mobile: boolean;
6649 |       bitness?: string;
6650 |       wow64?: boolean;
6651 |       /**
6652 |        * Used to specify User Agent form-factor values.
6653 | See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors
6654 |        */
6655 |       formFactors?: string[];
6656 |     }
6657 |     /**
6658 |      * Used to specify sensor types to emulate.
6659 | See https://w3c.github.io/sensors/#automation for more information.
6660 |      */
6661 |     export type SensorType = "absolute-orientation"|"accelerometer"|"ambient-light"|"gravity"|"gyroscope"|"linear-acceleration"|"magnetometer"|"relative-orientation";
6662 |     export interface SensorMetadata {
6663 |       available?: boolean;
6664 |       minimumFrequency?: number;
6665 |       maximumFrequency?: number;
6666 |     }
6667 |     export interface SensorReadingSingle {
6668 |       value: number;
6669 |     }
6670 |     export interface SensorReadingXYZ {
6671 |       x: number;
6672 |       y: number;
6673 |       z: number;
6674 |     }
6675 |     export interface SensorReadingQuaternion {
6676 |       x: number;
6677 |       y: number;
6678 |       z: number;
6679 |       w: number;
6680 |     }
6681 |     export interface SensorReading {
6682 |       single?: SensorReadingSingle;
6683 |       xyz?: SensorReadingXYZ;
6684 |       quaternion?: SensorReadingQuaternion;
6685 |     }
6686 |     export type PressureSource = "cpu";
6687 |     export type PressureState = "nominal"|"fair"|"serious"|"critical";
6688 |     export interface PressureMetadata {
6689 |       available?: boolean;
6690 |     }
6691 |     export interface WorkAreaInsets {
6692 |       /**
6693 |        * Work area top inset in pixels. Default is 0;
6694 |        */
6695 |       top?: number;
6696 |       /**
6697 |        * Work area left inset in pixels. Default is 0;
6698 |        */
6699 |       left?: number;
6700 |       /**
6701 |        * Work area bottom inset in pixels. Default is 0;
6702 |        */
6703 |       bottom?: number;
6704 |       /**
6705 |        * Work area right inset in pixels. Default is 0;
6706 |        */
6707 |       right?: number;
6708 |     }
6709 |     export type ScreenId = string;
6710 |     /**
6711 |      * Screen information similar to the one returned by window.getScreenDetails() method,
6712 | see https://w3c.github.io/window-management/#screendetailed.
6713 |      */
6714 |     export interface ScreenInfo {
6715 |       /**
6716 |        * Offset of the left edge of the screen.
6717 |        */
6718 |       left: number;
6719 |       /**
6720 |        * Offset of the top edge of the screen.
6721 |        */
6722 |       top: number;
6723 |       /**
6724 |        * Width of the screen.
6725 |        */
6726 |       width: number;
6727 |       /**
6728 |        * Height of the screen.
6729 |        */
6730 |       height: number;
6731 |       /**
6732 |        * Offset of the left edge of the available screen area.
6733 |        */
6734 |       availLeft: number;
6735 |       /**
6736 |        * Offset of the top edge of the available screen area.
6737 |        */
6738 |       availTop: number;
6739 |       /**
6740 |        * Width of the available screen area.
6741 |        */
6742 |       availWidth: number;
6743 |       /**
6744 |        * Height of the available screen area.
6745 |        */
6746 |       availHeight: number;
6747 |       /**
6748 |        * Specifies the screen's device pixel ratio.
6749 |        */
6750 |       devicePixelRatio: number;
6751 |       /**
6752 |        * Specifies the screen's orientation.
6753 |        */
6754 |       orientation: ScreenOrientation;
6755 |       /**
6756 |        * Specifies the screen's color depth in bits.
6757 |        */
6758 |       colorDepth: number;
6759 |       /**
6760 |        * Indicates whether the device has multiple screens.
6761 |        */
6762 |       isExtended: boolean;
6763 |       /**
6764 |        * Indicates whether the screen is internal to the device or external, attached to the device.
6765 |        */
6766 |       isInternal: boolean;
6767 |       /**
6768 |        * Indicates whether the screen is set as the the operating system primary screen.
6769 |        */
6770 |       isPrimary: boolean;
6771 |       /**
6772 |        * Specifies the descriptive label for the screen.
6773 |        */
6774 |       label: string;
6775 |       /**
6776 |        * Specifies the unique identifier of the screen.
6777 |        */
6778 |       id: ScreenId;
6779 |     }
6780 |     /**
6781 |      * Enum of image types that can be disabled.
6782 |      */
6783 |     export type DisabledImageType = "avif"|"webp";
6784 | 
6785 |     /**
6786 |      * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
6787 |      */
6788 |     export type virtualTimeBudgetExpiredPayload = void;
6789 | 
6790 |     /**
6791 |      * Tells whether emulation is supported.
6792 |      */
6793 |     export type canEmulateParameters = {
6794 |     }
6795 |     export type canEmulateReturnValue = {
6796 |       /**
6797 |        * True if emulation is supported.
6798 |        */
6799 |       result: boolean;
6800 |     }
6801 |     /**
6802 |      * Clears the overridden device metrics.
6803 |      */
6804 |     export type clearDeviceMetricsOverrideParameters = {
6805 |     }
6806 |     export type clearDeviceMetricsOverrideReturnValue = {
6807 |     }
6808 |     /**
6809 |      * Clears the overridden Geolocation Position and Error.
6810 |      */
6811 |     export type clearGeolocationOverrideParameters = {
6812 |     }
6813 |     export type clearGeolocationOverrideReturnValue = {
6814 |     }
6815 |     /**
6816 |      * Requests that page scale factor is reset to initial values.
6817 |      */
6818 |     export type resetPageScaleFactorParameters = {
6819 |     }
6820 |     export type resetPageScaleFactorReturnValue = {
6821 |     }
6822 |     /**
6823 |      * Enables or disables simulating a focused and active page.
6824 |      */
6825 |     export type setFocusEmulationEnabledParameters = {
6826 |       /**
6827 |        * Whether to enable to disable focus emulation.
6828 |        */
6829 |       enabled: boolean;
6830 |     }
6831 |     export type setFocusEmulationEnabledReturnValue = {
6832 |     }
6833 |     /**
6834 |      * Automatically render all web contents using a dark theme.
6835 |      */
6836 |     export type setAutoDarkModeOverrideParameters = {
6837 |       /**
6838 |        * Whether to enable or disable automatic dark mode.
6839 | If not specified, any existing override will be cleared.
6840 |        */
6841 |       enabled?: boolean;
6842 |     }
6843 |     export type setAutoDarkModeOverrideReturnValue = {
6844 |     }
6845 |     /**
6846 |      * Enables CPU throttling to emulate slow CPUs.
6847 |      */
6848 |     export type setCPUThrottlingRateParameters = {
6849 |       /**
6850 |        * Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
6851 |        */
6852 |       rate: number;
6853 |     }
6854 |     export type setCPUThrottlingRateReturnValue = {
6855 |     }
6856 |     /**
6857 |      * Sets or clears an override of the default background color of the frame. This override is used
6858 | if the content does not specify one.
6859 |      */
6860 |     export type setDefaultBackgroundColorOverrideParameters = {
6861 |       /**
6862 |        * RGBA of the default background color. If not specified, any existing override will be
6863 | cleared.
6864 |        */
6865 |       color?: DOM.RGBA;
6866 |     }
6867 |     export type setDefaultBackgroundColorOverrideReturnValue = {
6868 |     }
6869 |     /**
6870 |      * Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the
6871 | respective variables to be undefined, even if previously overridden.
6872 |      */
6873 |     export type setSafeAreaInsetsOverrideParameters = {
6874 |       insets: SafeAreaInsets;
6875 |     }
6876 |     export type setSafeAreaInsetsOverrideReturnValue = {
6877 |     }
6878 |     /**
6879 |      * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
6880 | window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
6881 | query results).
6882 |      */
6883 |     export type setDeviceMetricsOverrideParameters = {
6884 |       /**
6885 |        * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
6886 |        */
6887 |       width: number;
6888 |       /**
6889 |        * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
6890 |        */
6891 |       height: number;
6892 |       /**
6893 |        * Overriding device scale factor value. 0 disables the override.
6894 |        */
6895 |       deviceScaleFactor: number;
6896 |       /**
6897 |        * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
6898 | autosizing and more.
6899 |        */
6900 |       mobile: boolean;
6901 |       /**
6902 |        * Scale to apply to resulting view image.
6903 |        */
6904 |       scale?: number;
6905 |       /**
6906 |        * Overriding screen width value in pixels (minimum 0, maximum 10000000).
6907 |        */
6908 |       screenWidth?: number;
6909 |       /**
6910 |        * Overriding screen height value in pixels (minimum 0, maximum 10000000).
6911 |        */
6912 |       screenHeight?: number;
6913 |       /**
6914 |        * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
6915 |        */
6916 |       positionX?: number;
6917 |       /**
6918 |        * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
6919 |        */
6920 |       positionY?: number;
6921 |       /**
6922 |        * Do not set visible view size, rely upon explicit setVisibleSize call.
6923 |        */
6924 |       dontSetVisibleSize?: boolean;
6925 |       /**
6926 |        * Screen orientation override.
6927 |        */
6928 |       screenOrientation?: ScreenOrientation;
6929 |       /**
6930 |        * If set, the visible area of the page will be overridden to this viewport. This viewport
6931 | change is not observed by the page, e.g. viewport-relative elements do not change positions.
6932 |        */
6933 |       viewport?: Page.Viewport;
6934 |       /**
6935 |        * If set, the display feature of a multi-segment screen. If not set, multi-segment support
6936 | is turned-off.
6937 | Deprecated, use Emulation.setDisplayFeaturesOverride.
6938 |        */
6939 |       displayFeature?: DisplayFeature;
6940 |       /**
6941 |        * If set, the posture of a foldable device. If not set the posture is set
6942 | to continuous.
6943 | Deprecated, use Emulation.setDevicePostureOverride.
6944 |        */
6945 |       devicePosture?: DevicePosture;
6946 |     }
6947 |     export type setDeviceMetricsOverrideReturnValue = {
6948 |     }
6949 |     /**
6950 |      * Start reporting the given posture value to the Device Posture API.
6951 | This override can also be set in setDeviceMetricsOverride().
6952 |      */
6953 |     export type setDevicePostureOverrideParameters = {
6954 |       posture: DevicePosture;
6955 |     }
6956 |     export type setDevicePostureOverrideReturnValue = {
6957 |     }
6958 |     /**
6959 |      * Clears a device posture override set with either setDeviceMetricsOverride()
6960 | or setDevicePostureOverride() and starts using posture information from the
6961 | platform again.
6962 | Does nothing if no override is set.
6963 |      */
6964 |     export type clearDevicePostureOverrideParameters = {
6965 |     }
6966 |     export type clearDevicePostureOverrideReturnValue = {
6967 |     }
6968 |     /**
6969 |      * Start using the given display features to pupulate the Viewport Segments API.
6970 | This override can also be set in setDeviceMetricsOverride().
6971 |      */
6972 |     export type setDisplayFeaturesOverrideParameters = {
6973 |       features: DisplayFeature[];
6974 |     }
6975 |     export type setDisplayFeaturesOverrideReturnValue = {
6976 |     }
6977 |     /**
6978 |      * Clears the display features override set with either setDeviceMetricsOverride()
6979 | or setDisplayFeaturesOverride() and starts using display features from the
6980 | platform again.
6981 | Does nothing if no override is set.
6982 |      */
6983 |     export type clearDisplayFeaturesOverrideParameters = {
6984 |     }
6985 |     export type clearDisplayFeaturesOverrideReturnValue = {
6986 |     }
6987 |     export type setScrollbarsHiddenParameters = {
6988 |       /**
6989 |        * Whether scrollbars should be always hidden.
6990 |        */
6991 |       hidden: boolean;
6992 |     }
6993 |     export type setScrollbarsHiddenReturnValue = {
6994 |     }
6995 |     export type setDocumentCookieDisabledParameters = {
6996 |       /**
6997 |        * Whether document.coookie API should be disabled.
6998 |        */
6999 |       disabled: boolean;
7000 |     }
7001 |     export type setDocumentCookieDisabledReturnValue = {
7002 |     }
7003 |     export type setEmitTouchEventsForMouseParameters = {
7004 |       /**
7005 |        * Whether touch emulation based on mouse input should be enabled.
7006 |        */
7007 |       enabled: boolean;
7008 |       /**
7009 |        * Touch/gesture events configuration. Default: current platform.
7010 |        */
7011 |       configuration?: "mobile"|"desktop";
7012 |     }
7013 |     export type setEmitTouchEventsForMouseReturnValue = {
7014 |     }
7015 |     /**
7016 |      * Emulates the given media type or media feature for CSS media queries.
7017 |      */
7018 |     export type setEmulatedMediaParameters = {
7019 |       /**
7020 |        * Media type to emulate. Empty string disables the override.
7021 |        */
7022 |       media?: string;
7023 |       /**
7024 |        * Media features to emulate.
7025 |        */
7026 |       features?: MediaFeature[];
7027 |     }
7028 |     export type setEmulatedMediaReturnValue = {
7029 |     }
7030 |     /**
7031 |      * Emulates the given vision deficiency.
7032 |      */
7033 |     export type setEmulatedVisionDeficiencyParameters = {
7034 |       /**
7035 |        * Vision deficiency to emulate. Order: best-effort emulations come first, followed by any
7036 | physiologically accurate emulations for medically recognized color vision deficiencies.
7037 |        */
7038 |       type: "none"|"blurredVision"|"reducedContrast"|"achromatopsia"|"deuteranopia"|"protanopia"|"tritanopia";
7039 |     }
7040 |     export type setEmulatedVisionDeficiencyReturnValue = {
7041 |     }
7042 |     /**
7043 |      * Emulates the given OS text scale.
7044 |      */
7045 |     export type setEmulatedOSTextScaleParameters = {
7046 |       scale?: number;
7047 |     }
7048 |     export type setEmulatedOSTextScaleReturnValue = {
7049 |     }
7050 |     /**
7051 |      * Overrides the Geolocation Position or Error. Omitting latitude, longitude or
7052 | accuracy emulates position unavailable.
7053 |      */
7054 |     export type setGeolocationOverrideParameters = {
7055 |       /**
7056 |        * Mock latitude
7057 |        */
7058 |       latitude?: number;
7059 |       /**
7060 |        * Mock longitude
7061 |        */
7062 |       longitude?: number;
7063 |       /**
7064 |        * Mock accuracy
7065 |        */
7066 |       accuracy?: number;
7067 |       /**
7068 |        * Mock altitude
7069 |        */
7070 |       altitude?: number;
7071 |       /**
7072 |        * Mock altitudeAccuracy
7073 |        */
7074 |       altitudeAccuracy?: number;
7075 |       /**
7076 |        * Mock heading
7077 |        */
7078 |       heading?: number;
7079 |       /**
7080 |        * Mock speed
7081 |        */
7082 |       speed?: number;
7083 |     }
7084 |     export type setGeolocationOverrideReturnValue = {
7085 |     }
7086 |     export type getOverriddenSensorInformationParameters = {
7087 |       type: SensorType;
7088 |     }
7089 |     export type getOverriddenSensorInformationReturnValue = {
7090 |       requestedSamplingFrequency: number;
7091 |     }
7092 |     /**
7093 |      * Overrides a platform sensor of a given type. If |enabled| is true, calls to
7094 | Sensor.start() will use a virtual sensor as backend rather than fetching
7095 | data from a real hardware sensor. Otherwise, existing virtual
7096 | sensor-backend Sensor objects will fire an error event and new calls to
7097 | Sensor.start() will attempt to use a real sensor instead.
7098 |      */
7099 |     export type setSensorOverrideEnabledParameters = {
7100 |       enabled: boolean;
7101 |       type: SensorType;
7102 |       metadata?: SensorMetadata;
7103 |     }
7104 |     export type setSensorOverrideEnabledReturnValue = {
7105 |     }
7106 |     /**
7107 |      * Updates the sensor readings reported by a sensor type previously overridden
7108 | by setSensorOverrideEnabled.
7109 |      */
7110 |     export type setSensorOverrideReadingsParameters = {
7111 |       type: SensorType;
7112 |       reading: SensorReading;
7113 |     }
7114 |     export type setSensorOverrideReadingsReturnValue = {
7115 |     }
7116 |     /**
7117 |      * Overrides a pressure source of a given type, as used by the Compute
7118 | Pressure API, so that updates to PressureObserver.observe() are provided
7119 | via setPressureStateOverride instead of being retrieved from
7120 | platform-provided telemetry data.
7121 |      */
7122 |     export type setPressureSourceOverrideEnabledParameters = {
7123 |       enabled: boolean;
7124 |       source: PressureSource;
7125 |       metadata?: PressureMetadata;
7126 |     }
7127 |     export type setPressureSourceOverrideEnabledReturnValue = {
7128 |     }
7129 |     /**
7130 |      * TODO: OBSOLETE: To remove when setPressureDataOverride is merged.
7131 | Provides a given pressure state that will be processed and eventually be
7132 | delivered to PressureObserver users. |source| must have been previously
7133 | overridden by setPressureSourceOverrideEnabled.
7134 |      */
7135 |     export type setPressureStateOverrideParameters = {
7136 |       source: PressureSource;
7137 |       state: PressureState;
7138 |     }
7139 |     export type setPressureStateOverrideReturnValue = {
7140 |     }
7141 |     /**
7142 |      * Provides a given pressure data set that will be processed and eventually be
7143 | delivered to PressureObserver users. |source| must have been previously
7144 | overridden by setPressureSourceOverrideEnabled.
7145 |      */
7146 |     export type setPressureDataOverrideParameters = {
7147 |       source: PressureSource;
7148 |       state: PressureState;
7149 |       ownContributionEstimate?: number;
7150 |     }
7151 |     export type setPressureDataOverrideReturnValue = {
7152 |     }
7153 |     /**
7154 |      * Overrides the Idle state.
7155 |      */
7156 |     export type setIdleOverrideParameters = {
7157 |       /**
7158 |        * Mock isUserActive
7159 |        */
7160 |       isUserActive: boolean;
7161 |       /**
7162 |        * Mock isScreenUnlocked
7163 |        */
7164 |       isScreenUnlocked: boolean;
7165 |     }
7166 |     export type setIdleOverrideReturnValue = {
7167 |     }
7168 |     /**
7169 |      * Clears Idle state overrides.
7170 |      */
7171 |     export type clearIdleOverrideParameters = {
7172 |     }
7173 |     export type clearIdleOverrideReturnValue = {
7174 |     }
7175 |     /**
7176 |      * Overrides value returned by the javascript navigator object.
7177 |      */
7178 |     export type setNavigatorOverridesParameters = {
7179 |       /**
7180 |        * The platform navigator.platform should return.
7181 |        */
7182 |       platform: string;
7183 |     }
7184 |     export type setNavigatorOverridesReturnValue = {
7185 |     }
7186 |     /**
7187 |      * Sets a specified page scale factor.
7188 |      */
7189 |     export type setPageScaleFactorParameters = {
7190 |       /**
7191 |        * Page scale factor.
7192 |        */
7193 |       pageScaleFactor: number;
7194 |     }
7195 |     export type setPageScaleFactorReturnValue = {
7196 |     }
7197 |     /**
7198 |      * Switches script execution in the page.
7199 |      */
7200 |     export type setScriptExecutionDisabledParameters = {
7201 |       /**
7202 |        * Whether script execution should be disabled in the page.
7203 |        */
7204 |       value: boolean;
7205 |     }
7206 |     export type setScriptExecutionDisabledReturnValue = {
7207 |     }
7208 |     /**
7209 |      * Enables touch on platforms which do not support them.
7210 |      */
7211 |     export type setTouchEmulationEnabledParameters = {
7212 |       /**
7213 |        * Whether the touch event emulation should be enabled.
7214 |        */
7215 |       enabled: boolean;
7216 |       /**
7217 |        * Maximum touch points supported. Defaults to one.
7218 |        */
7219 |       maxTouchPoints?: number;
7220 |     }
7221 |     export type setTouchEmulationEnabledReturnValue = {
7222 |     }
7223 |     /**
7224 |      * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
7225 | the current virtual time policy.  Note this supersedes any previous time budget.
7226 |      */
7227 |     export type setVirtualTimePolicyParameters = {
7228 |       policy: VirtualTimePolicy;
7229 |       /**
7230 |        * If set, after this many virtual milliseconds have elapsed virtual time will be paused and a
7231 | virtualTimeBudgetExpired event is sent.
7232 |        */
7233 |       budget?: number;
7234 |       /**
7235 |        * If set this specifies the maximum number of tasks that can be run before virtual is forced
7236 | forwards to prevent deadlock.
7237 |        */
7238 |       maxVirtualTimeTaskStarvationCount?: number;
7239 |       /**
7240 |        * If set, base::Time::Now will be overridden to initially return this value.
7241 |        */
7242 |       initialVirtualTime?: Network.TimeSinceEpoch;
7243 |     }
7244 |     export type setVirtualTimePolicyReturnValue = {
7245 |       /**
7246 |        * Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
7247 |        */
7248 |       virtualTimeTicksBase: number;
7249 |     }
7250 |     /**
7251 |      * Overrides default host system locale with the specified one.
7252 |      */
7253 |     export type setLocaleOverrideParameters = {
7254 |       /**
7255 |        * ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and
7256 | restores default host system locale.
7257 |        */
7258 |       locale?: string;
7259 |     }
7260 |     export type setLocaleOverrideReturnValue = {
7261 |     }
7262 |     /**
7263 |      * Overrides default host system timezone with the specified one.
7264 |      */
7265 |     export type setTimezoneOverrideParameters = {
7266 |       /**
7267 |        * The timezone identifier. List of supported timezones:
7268 | https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt
7269 | If empty, disables the override and restores default host system timezone.
7270 |        */
7271 |       timezoneId: string;
7272 |     }
7273 |     export type setTimezoneOverrideReturnValue = {
7274 |     }
7275 |     /**
7276 |      * Resizes the frame/viewport of the page. Note that this does not affect the frame's container
7277 | (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
7278 | on Android.
7279 |      */
7280 |     export type setVisibleSizeParameters = {
7281 |       /**
7282 |        * Frame width (DIP).
7283 |        */
7284 |       width: number;
7285 |       /**
7286 |        * Frame height (DIP).
7287 |        */
7288 |       height: number;
7289 |     }
7290 |     export type setVisibleSizeReturnValue = {
7291 |     }
7292 |     export type setDisabledImageTypesParameters = {
7293 |       /**
7294 |        * Image types to disable.
7295 |        */
7296 |       imageTypes: DisabledImageType[];
7297 |     }
7298 |     export type setDisabledImageTypesReturnValue = {
7299 |     }
7300 |     /**
7301 |      * Override the value of navigator.connection.saveData
7302 |      */
7303 |     export type setDataSaverOverrideParameters = {
7304 |       /**
7305 |        * Override value. Omitting the parameter disables the override.
7306 |        */
7307 |       dataSaverEnabled?: boolean;
7308 |     }
7309 |     export type setDataSaverOverrideReturnValue = {
7310 |     }
7311 |     export type setHardwareConcurrencyOverrideParameters = {
7312 |       /**
7313 |        * Hardware concurrency to report
7314 |        */
7315 |       hardwareConcurrency: number;
7316 |     }
7317 |     export type setHardwareConcurrencyOverrideReturnValue = {
7318 |     }
7319 |     /**
7320 |      * Allows overriding user agent with the given string.
7321 | `userAgentMetadata` must be set for Client Hint headers to be sent.
7322 |      */
7323 |     export type setUserAgentOverrideParameters = {
7324 |       /**
7325 |        * User agent to use.
7326 |        */
7327 |       userAgent: string;
7328 |       /**
7329 |        * Browser language to emulate.
7330 |        */
7331 |       acceptLanguage?: string;
7332 |       /**
7333 |        * The platform navigator.platform should return.
7334 |        */
7335 |       platform?: string;
7336 |       /**
7337 |        * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
7338 |        */
7339 |       userAgentMetadata?: UserAgentMetadata;
7340 |     }
7341 |     export type setUserAgentOverrideReturnValue = {
7342 |     }
7343 |     /**
7344 |      * Allows overriding the automation flag.
7345 |      */
7346 |     export type setAutomationOverrideParameters = {
7347 |       /**
7348 |        * Whether the override should be enabled.
7349 |        */
7350 |       enabled: boolean;
7351 |     }
7352 |     export type setAutomationOverrideReturnValue = {
7353 |     }
7354 |     /**
7355 |      * Allows overriding the difference between the small and large viewport sizes, which determine the
7356 | value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.
7357 |      */
7358 |     export type setSmallViewportHeightDifferenceOverrideParameters = {
7359 |       /**
7360 |        * This will cause an element of size 100svh to be `difference` pixels smaller than an element
7361 | of size 100lvh.
7362 |        */
7363 |       difference: number;
7364 |     }
7365 |     export type setSmallViewportHeightDifferenceOverrideReturnValue = {
7366 |     }
7367 |     /**
7368 |      * Returns device's screen configuration.
7369 |      */
7370 |     export type getScreenInfosParameters = {
7371 |     }
7372 |     export type getScreenInfosReturnValue = {
7373 |       screenInfos: ScreenInfo[];
7374 |     }
7375 |     /**
7376 |      * Add a new screen to the device. Only supported in headless mode.
7377 |      */
7378 |     export type addScreenParameters = {
7379 |       /**
7380 |        * Offset of the left edge of the screen in pixels.
7381 |        */
7382 |       left: number;
7383 |       /**
7384 |        * Offset of the top edge of the screen in pixels.
7385 |        */
7386 |       top: number;
7387 |       /**
7388 |        * The width of the screen in pixels.
7389 |        */
7390 |       width: number;
7391 |       /**
7392 |        * The height of the screen in pixels.
7393 |        */
7394 |       height: number;
7395 |       /**
7396 |        * Specifies the screen's work area. Default is entire screen.
7397 |        */
7398 |       workAreaInsets?: WorkAreaInsets;
7399 |       /**
7400 |        * Specifies the screen's device pixel ratio. Default is 1.
7401 |        */
7402 |       devicePixelRatio?: number;
7403 |       /**
7404 |        * Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.
7405 |        */
7406 |       rotation?: number;
7407 |       /**
7408 |        * Specifies the screen's color depth in bits. Default is 24.
7409 |        */
7410 |       colorDepth?: number;
7411 |       /**
7412 |        * Specifies the descriptive label for the screen. Default is none.
7413 |        */
7414 |       label?: string;
7415 |       /**
7416 |        * Indicates whether the screen is internal to the device or external, attached to the device. Default is false.
7417 |        */
7418 |       isInternal?: boolean;
7419 |     }
7420 |     export type addScreenReturnValue = {
7421 |       screenInfo: ScreenInfo;
7422 |     }
7423 |     /**
7424 |      * Remove screen from the device. Only supported in headless mode.
7425 |      */
7426 |     export type removeScreenParameters = {
7427 |       screenId: ScreenId;
7428 |     }
7429 |     export type removeScreenReturnValue = {
7430 |     }
7431 |   }
7432 | 
7433 |   /**
7434 |    * EventBreakpoints permits setting JavaScript breakpoints on operations and events
7435 | occurring in native code invoked from JavaScript. Once breakpoint is hit, it is
7436 | reported through Debugger domain, similarly to regular breakpoints being hit.
7437 |    */
7438 |   export namespace EventBreakpoints {
7439 | 
7440 | 
7441 |     /**
7442 |      * Sets breakpoint on particular native event.
7443 |      */
7444 |     export type setInstrumentationBreakpointParameters = {
7445 |       /**
7446 |        * Instrumentation name to stop on.
7447 |        */
7448 |       eventName: string;
7449 |     }
7450 |     export type setInstrumentationBreakpointReturnValue = {
7451 |     }
7452 |     /**
7453 |      * Removes breakpoint on particular native event.
7454 |      */
7455 |     export type removeInstrumentationBreakpointParameters = {
7456 |       /**
7457 |        * Instrumentation name to stop on.
7458 |        */
7459 |       eventName: string;
7460 |     }
7461 |     export type removeInstrumentationBreakpointReturnValue = {
7462 |     }
7463 |     /**
7464 |      * Removes all breakpoints
7465 |      */
7466 |     export type disableParameters = {
7467 |     }
7468 |     export type disableReturnValue = {
7469 |     }
7470 |   }
7471 | 
7472 |   /**
7473 |    * Defines commands and events for browser extensions.
7474 |    */
7475 |   export namespace Extensions {
7476 |     /**
7477 |      * Storage areas.
7478 |      */
7479 |     export type StorageArea = "session"|"local"|"sync"|"managed";
7480 | 
7481 | 
7482 |     /**
7483 |      * Installs an unpacked extension from the filesystem similar to
7484 | --load-extension CLI flags. Returns extension ID once the extension
7485 | has been installed. Available if the client is connected using the
7486 | --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
7487 | flag is set.
7488 |      */
7489 |     export type loadUnpackedParameters = {
7490 |       /**
7491 |        * Absolute file path.
7492 |        */
7493 |       path: string;
7494 |     }
7495 |     export type loadUnpackedReturnValue = {
7496 |       /**
7497 |        * Extension id.
7498 |        */
7499 |       id: string;
7500 |     }
7501 |     /**
7502 |      * Uninstalls an unpacked extension (others not supported) from the profile.
7503 | Available if the client is connected using the --remote-debugging-pipe flag
7504 | and the --enable-unsafe-extension-debugging.
7505 |      */
7506 |     export type uninstallParameters = {
7507 |       /**
7508 |        * Extension id.
7509 |        */
7510 |       id: string;
7511 |     }
7512 |     export type uninstallReturnValue = {
7513 |     }
7514 |     /**
7515 |      * Gets data from extension storage in the given `storageArea`. If `keys` is
7516 | specified, these are used to filter the result.
7517 |      */
7518 |     export type getStorageItemsParameters = {
7519 |       /**
7520 |        * ID of extension.
7521 |        */
7522 |       id: string;
7523 |       /**
7524 |        * StorageArea to retrieve data from.
7525 |        */
7526 |       storageArea: StorageArea;
7527 |       /**
7528 |        * Keys to retrieve.
7529 |        */
7530 |       keys?: string[];
7531 |     }
7532 |     export type getStorageItemsReturnValue = {
7533 |       data: { [key: string]: string };
7534 |     }
7535 |     /**
7536 |      * Removes `keys` from extension storage in the given `storageArea`.
7537 |      */
7538 |     export type removeStorageItemsParameters = {
7539 |       /**
7540 |        * ID of extension.
7541 |        */
7542 |       id: string;
7543 |       /**
7544 |        * StorageArea to remove data from.
7545 |        */
7546 |       storageArea: StorageArea;
7547 |       /**
7548 |        * Keys to remove.
7549 |        */
7550 |       keys: string[];
7551 |     }
7552 |     export type removeStorageItemsReturnValue = {
7553 |     }
7554 |     /**
7555 |      * Clears extension storage in the given `storageArea`.
7556 |      */
7557 |     export type clearStorageItemsParameters = {
7558 |       /**
7559 |        * ID of extension.
7560 |        */
7561 |       id: string;
7562 |       /**
7563 |        * StorageArea to remove data from.
7564 |        */
7565 |       storageArea: StorageArea;
7566 |     }
7567 |     export type clearStorageItemsReturnValue = {
7568 |     }
7569 |     /**
7570 |      * Sets `values` in extension storage in the given `storageArea`. The provided `values`
7571 | will be merged with existing values in the storage area.
7572 |      */
7573 |     export type setStorageItemsParameters = {
7574 |       /**
7575 |        * ID of extension.
7576 |        */
7577 |       id: string;
7578 |       /**
7579 |        * StorageArea to set data in.
7580 |        */
7581 |       storageArea: StorageArea;
7582 |       /**
7583 |        * Values to set.
7584 |        */
7585 |       values: { [key: string]: string };
7586 |     }
7587 |     export type setStorageItemsReturnValue = {
7588 |     }
7589 |   }
7590 | 
7591 |   /**
7592 |    * This domain allows interacting with the FedCM dialog.
7593 |    */
7594 |   export namespace FedCm {
7595 |     /**
7596 |      * Whether this is a sign-up or sign-in action for this account, i.e.
7597 | whether this account has ever been used to sign in to this RP before.
7598 |      */
7599 |     export type LoginState = "SignIn"|"SignUp";
7600 |     /**
7601 |      * The types of FedCM dialogs.
7602 |      */
7603 |     export type DialogType = "AccountChooser"|"AutoReauthn"|"ConfirmIdpLogin"|"Error";
7604 |     /**
7605 |      * The buttons on the FedCM dialog.
7606 |      */
7607 |     export type DialogButton = "ConfirmIdpLoginContinue"|"ErrorGotIt"|"ErrorMoreDetails";
7608 |     /**
7609 |      * The URLs that each account has
7610 |      */
7611 |     export type AccountUrlType = "TermsOfService"|"PrivacyPolicy";
7612 |     /**
7613 |      * Corresponds to IdentityRequestAccount
7614 |      */
7615 |     export interface Account {
7616 |       accountId: string;
7617 |       email: string;
7618 |       name: string;
7619 |       givenName: string;
7620 |       pictureUrl: string;
7621 |       idpConfigUrl: string;
7622 |       idpLoginUrl: string;
7623 |       loginState: LoginState;
7624 |       /**
7625 |        * These two are only set if the loginState is signUp
7626 |        */
7627 |       termsOfServiceUrl?: string;
7628 |       privacyPolicyUrl?: string;
7629 |     }
7630 | 
7631 |     export type dialogShownPayload = {
7632 |       dialogId: string;
7633 |       dialogType: DialogType;
7634 |       accounts: Account[];
7635 |       /**
7636 |        * These exist primarily so that the caller can verify the
7637 | RP context was used appropriately.
7638 |        */
7639 |       title: string;
7640 |       subtitle?: string;
7641 |     }
7642 |     /**
7643 |      * Triggered when a dialog is closed, either by user action, JS abort,
7644 | or a command below.
7645 |      */
7646 |     export type dialogClosedPayload = {
7647 |       dialogId: string;
7648 |     }
7649 | 
7650 |     export type enableParameters = {
7651 |       /**
7652 |        * Allows callers to disable the promise rejection delay that would
7653 | normally happen, if this is unimportant to what's being tested.
7654 | (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
7655 |        */
7656 |       disableRejectionDelay?: boolean;
7657 |     }
7658 |     export type enableReturnValue = {
7659 |     }
7660 |     export type disableParameters = {
7661 |     }
7662 |     export type disableReturnValue = {
7663 |     }
7664 |     export type selectAccountParameters = {
7665 |       dialogId: string;
7666 |       accountIndex: number;
7667 |     }
7668 |     export type selectAccountReturnValue = {
7669 |     }
7670 |     export type clickDialogButtonParameters = {
7671 |       dialogId: string;
7672 |       dialogButton: DialogButton;
7673 |     }
7674 |     export type clickDialogButtonReturnValue = {
7675 |     }
7676 |     export type openUrlParameters = {
7677 |       dialogId: string;
7678 |       accountIndex: number;
7679 |       accountUrlType: AccountUrlType;
7680 |     }
7681 |     export type openUrlReturnValue = {
7682 |     }
7683 |     export type dismissDialogParameters = {
7684 |       dialogId: string;
7685 |       triggerCooldown?: boolean;
7686 |     }
7687 |     export type dismissDialogReturnValue = {
7688 |     }
7689 |     /**
7690 |      * Resets the cooldown time, if any, to allow the next FedCM call to show
7691 | a dialog even if one was recently dismissed by the user.
7692 |      */
7693 |     export type resetCooldownParameters = {
7694 |     }
7695 |     export type resetCooldownReturnValue = {
7696 |     }
7697 |   }
7698 | 
7699 |   /**
7700 |    * A domain for letting clients substitute browser's network layer with client code.
7701 |    */
7702 |   export namespace Fetch {
7703 |     /**
7704 |      * Unique request identifier.
7705 | Note that this does not identify individual HTTP requests that are part of
7706 | a network request.
7707 |      */
7708 |     export type RequestId = string;
7709 |     /**
7710 |      * Stages of the request to handle. Request will intercept before the request is
7711 | sent. Response will intercept after the response is received (but before response
7712 | body is received).
7713 |      */
7714 |     export type RequestStage = "Request"|"Response";
7715 |     export interface RequestPattern {
7716 |       /**
7717 |        * Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is
7718 | backslash. Omitting is equivalent to `"*"`.
7719 |        */
7720 |       urlPattern?: string;
7721 |       /**
7722 |        * If set, only requests for matching resource types will be intercepted.
7723 |        */
7724 |       resourceType?: Network.ResourceType;
7725 |       /**
7726 |        * Stage at which to begin intercepting requests. Default is Request.
7727 |        */
7728 |       requestStage?: RequestStage;
7729 |     }
7730 |     /**
7731 |      * Response HTTP header entry
7732 |      */
7733 |     export interface HeaderEntry {
7734 |       name: string;
7735 |       value: string;
7736 |     }
7737 |     /**
7738 |      * Authorization challenge for HTTP status code 401 or 407.
7739 |      */
7740 |     export interface AuthChallenge {
7741 |       /**
7742 |        * Source of the authentication challenge.
7743 |        */
7744 |       source?: "Server"|"Proxy";
7745 |       /**
7746 |        * Origin of the challenger.
7747 |        */
7748 |       origin: string;
7749 |       /**
7750 |        * The authentication scheme used, such as basic or digest
7751 |        */
7752 |       scheme: string;
7753 |       /**
7754 |        * The realm of the challenge. May be empty.
7755 |        */
7756 |       realm: string;
7757 |     }
7758 |     /**
7759 |      * Response to an AuthChallenge.
7760 |      */
7761 |     export interface AuthChallengeResponse {
7762 |       /**
7763 |        * The decision on what to do in response to the authorization challenge.  Default means
7764 | deferring to the default behavior of the net stack, which will likely either the Cancel
7765 | authentication or display a popup dialog box.
7766 |        */
7767 |       response: "Default"|"CancelAuth"|"ProvideCredentials";
7768 |       /**
7769 |        * The username to provide, possibly empty. Should only be set if response is
7770 | ProvideCredentials.
7771 |        */
7772 |       username?: string;
7773 |       /**
7774 |        * The password to provide, possibly empty. Should only be set if response is
7775 | ProvideCredentials.
7776 |        */
7777 |       password?: string;
7778 |     }
7779 | 
7780 |     /**
7781 |      * Issued when the domain is enabled and the request URL matches the
7782 | specified filter. The request is paused until the client responds
7783 | with one of continueRequest, failRequest or fulfillRequest.
7784 | The stage of the request can be determined by presence of responseErrorReason
7785 | and responseStatusCode -- the request is at the response stage if either
7786 | of these fields is present and in the request stage otherwise.
7787 | Redirect responses and subsequent requests are reported similarly to regular
7788 | responses and requests. Redirect responses may be distinguished by the value
7789 | of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with
7790 | presence of the `location` header. Requests resulting from a redirect will
7791 | have `redirectedRequestId` field set.
7792 |      */
7793 |     export type requestPausedPayload = {
7794 |       /**
7795 |        * Each request the page makes will have a unique id.
7796 |        */
7797 |       requestId: RequestId;
7798 |       /**
7799 |        * The details of the request.
7800 |        */
7801 |       request: Network.Request;
7802 |       /**
7803 |        * The id of the frame that initiated the request.
7804 |        */
7805 |       frameId: Page.FrameId;
7806 |       /**
7807 |        * How the requested resource will be used.
7808 |        */
7809 |       resourceType: Network.ResourceType;
7810 |       /**
7811 |        * Response error if intercepted at response stage.
7812 |        */
7813 |       responseErrorReason?: Network.ErrorReason;
7814 |       /**
7815 |        * Response code if intercepted at response stage.
7816 |        */
7817 |       responseStatusCode?: number;
7818 |       /**
7819 |        * Response status text if intercepted at response stage.
7820 |        */
7821 |       responseStatusText?: string;
7822 |       /**
7823 |        * Response headers if intercepted at the response stage.
7824 |        */
7825 |       responseHeaders?: HeaderEntry[];
7826 |       /**
7827 |        * If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,
7828 | then this networkId will be the same as the requestId present in the requestWillBeSent event.
7829 |        */
7830 |       networkId?: Network.RequestId;
7831 |       /**
7832 |        * If the request is due to a redirect response from the server, the id of the request that
7833 | has caused the redirect.
7834 |        */
7835 |       redirectedRequestId?: RequestId;
7836 |     }
7837 |     /**
7838 |      * Issued when the domain is enabled with handleAuthRequests set to true.
7839 | The request is paused until client responds with continueWithAuth.
7840 |      */
7841 |     export type authRequiredPayload = {
7842 |       /**
7843 |        * Each request the page makes will have a unique id.
7844 |        */
7845 |       requestId: RequestId;
7846 |       /**
7847 |        * The details of the request.
7848 |        */
7849 |       request: Network.Request;
7850 |       /**
7851 |        * The id of the frame that initiated the request.
7852 |        */
7853 |       frameId: Page.FrameId;
7854 |       /**
7855 |        * How the requested resource will be used.
7856 |        */
7857 |       resourceType: Network.ResourceType;
7858 |       /**
7859 |        * Details of the Authorization Challenge encountered.
7860 | If this is set, client should respond with continueRequest that
7861 | contains AuthChallengeResponse.
7862 |        */
7863 |       authChallenge: AuthChallenge;
7864 |     }
7865 | 
7866 |     /**
7867 |      * Disables the fetch domain.
7868 |      */
7869 |     export type disableParameters = {
7870 |     }
7871 |     export type disableReturnValue = {
7872 |     }
7873 |     /**
7874 |      * Enables issuing of requestPaused events. A request will be paused until client
7875 | calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.
7876 |      */
7877 |     export type enableParameters = {
7878 |       /**
7879 |        * If specified, only requests matching any of these patterns will produce
7880 | fetchRequested event and will be paused until clients response. If not set,
7881 | all requests will be affected.
7882 |        */
7883 |       patterns?: RequestPattern[];
7884 |       /**
7885 |        * If true, authRequired events will be issued and requests will be paused
7886 | expecting a call to continueWithAuth.
7887 |        */
7888 |       handleAuthRequests?: boolean;
7889 |     }
7890 |     export type enableReturnValue = {
7891 |     }
7892 |     /**
7893 |      * Causes the request to fail with specified reason.
7894 |      */
7895 |     export type failRequestParameters = {
7896 |       /**
7897 |        * An id the client received in requestPaused event.
7898 |        */
7899 |       requestId: RequestId;
7900 |       /**
7901 |        * Causes the request to fail with the given reason.
7902 |        */
7903 |       errorReason: Network.ErrorReason;
7904 |     }
7905 |     export type failRequestReturnValue = {
7906 |     }
7907 |     /**
7908 |      * Provides response to the request.
7909 |      */
7910 |     export type fulfillRequestParameters = {
7911 |       /**
7912 |        * An id the client received in requestPaused event.
7913 |        */
7914 |       requestId: RequestId;
7915 |       /**
7916 |        * An HTTP response code.
7917 |        */
7918 |       responseCode: number;
7919 |       /**
7920 |        * Response headers.
7921 |        */
7922 |       responseHeaders?: HeaderEntry[];
7923 |       /**
7924 |        * Alternative way of specifying response headers as a \0-separated
7925 | series of name: value pairs. Prefer the above method unless you
7926 | need to represent some non-UTF8 values that can't be transmitted
7927 | over the protocol as text.
7928 |        */
7929 |       binaryResponseHeaders?: binary;
7930 |       /**
7931 |        * A response body. If absent, original response body will be used if
7932 | the request is intercepted at the response stage and empty body
7933 | will be used if the request is intercepted at the request stage.
7934 |        */
7935 |       body?: binary;
7936 |       /**
7937 |        * A textual representation of responseCode.
7938 | If absent, a standard phrase matching responseCode is used.
7939 |        */
7940 |       responsePhrase?: string;
7941 |     }
7942 |     export type fulfillRequestReturnValue = {
7943 |     }
7944 |     /**
7945 |      * Continues the request, optionally modifying some of its parameters.
7946 |      */
7947 |     export type continueRequestParameters = {
7948 |       /**
7949 |        * An id the client received in requestPaused event.
7950 |        */
7951 |       requestId: RequestId;
7952 |       /**
7953 |        * If set, the request url will be modified in a way that's not observable by page.
7954 |        */
7955 |       url?: string;
7956 |       /**
7957 |        * If set, the request method is overridden.
7958 |        */
7959 |       method?: string;
7960 |       /**
7961 |        * If set, overrides the post data in the request.
7962 |        */
7963 |       postData?: binary;
7964 |       /**
7965 |        * If set, overrides the request headers. Note that the overrides do not
7966 | extend to subsequent redirect hops, if a redirect happens. Another override
7967 | may be applied to a different request produced by a redirect.
7968 |        */
7969 |       headers?: HeaderEntry[];
7970 |       /**
7971 |        * If set, overrides response interception behavior for this request.
7972 |        */
7973 |       interceptResponse?: boolean;
7974 |     }
7975 |     export type continueRequestReturnValue = {
7976 |     }
7977 |     /**
7978 |      * Continues a request supplying authChallengeResponse following authRequired event.
7979 |      */
7980 |     export type continueWithAuthParameters = {
7981 |       /**
7982 |        * An id the client received in authRequired event.
7983 |        */
7984 |       requestId: RequestId;
7985 |       /**
7986 |        * Response to  with an authChallenge.
7987 |        */
7988 |       authChallengeResponse: AuthChallengeResponse;
7989 |     }
7990 |     export type continueWithAuthReturnValue = {
7991 |     }
7992 |     /**
7993 |      * Continues loading of the paused response, optionally modifying the
7994 | response headers. If either responseCode or headers are modified, all of them
7995 | must be present.
7996 |      */
7997 |     export type continueResponseParameters = {
7998 |       /**
7999 |        * An id the client received in requestPaused event.
8000 |        */
8001 |       requestId: RequestId;
8002 |       /**
8003 |        * An HTTP response code. If absent, original response code will be used.
8004 |        */
8005 |       responseCode?: number;
8006 |       /**
8007 |        * A textual representation of responseCode.
8008 | If absent, a standard phrase matching responseCode is used.
8009 |        */
8010 |       responsePhrase?: string;
8011 |       /**
8012 |        * Response headers. If absent, original response headers will be used.
8013 |        */
8014 |       responseHeaders?: HeaderEntry[];
8015 |       /**
8016 |        * Alternative way of specifying response headers as a \0-separated
8017 | series of name: value pairs. Prefer the above method unless you
8018 | need to represent some non-UTF8 values that can't be transmitted
8019 | over the protocol as text.
8020 |        */
8021 |       binaryResponseHeaders?: binary;
8022 |     }
8023 |     export type continueResponseReturnValue = {
8024 |     }
8025 |     /**
8026 |      * Causes the body of the response to be received from the server and
8027 | returned as a single string. May only be issued for a request that
8028 | is paused in the Response stage and is mutually exclusive with
8029 | takeResponseBodyForInterceptionAsStream. Calling other methods that
8030 | affect the request or disabling fetch domain before body is received
8031 | results in an undefined behavior.
8032 | Note that the response body is not available for redirects. Requests
8033 | paused in the _redirect received_ state may be differentiated by
8034 | `responseCode` and presence of `location` response header, see
8035 | comments to `requestPaused` for details.
8036 |      */
8037 |     export type getResponseBodyParameters = {
8038 |       /**
8039 |        * Identifier for the intercepted request to get body for.
8040 |        */
8041 |       requestId: RequestId;
8042 |     }
8043 |     export type getResponseBodyReturnValue = {
8044 |       /**
8045 |        * Response body.
8046 |        */
8047 |       body: string;
8048 |       /**
8049 |        * True, if content was sent as base64.
8050 |        */
8051 |       base64Encoded: boolean;
8052 |     }
8053 |     /**
8054 |      * Returns a handle to the stream representing the response body.
8055 | The request must be paused in the HeadersReceived stage.
8056 | Note that after this command the request can't be continued
8057 | as is -- client either needs to cancel it or to provide the
8058 | response body.
8059 | The stream only supports sequential read, IO.read will fail if the position
8060 | is specified.
8061 | This method is mutually exclusive with getResponseBody.
8062 | Calling other methods that affect the request or disabling fetch
8063 | domain before body is received results in an undefined behavior.
8064 |      */
8065 |     export type takeResponseBodyAsStreamParameters = {
8066 |       requestId: RequestId;
8067 |     }
8068 |     export type takeResponseBodyAsStreamReturnValue = {
8069 |       stream: IO.StreamHandle;
8070 |     }
8071 |   }
8072 | 
8073 |   export namespace FileSystem {
8074 |     export interface File {
8075 |       name: string;
8076 |       /**
8077 |        * Timestamp
8078 |        */
8079 |       lastModified: Network.TimeSinceEpoch;
8080 |       /**
8081 |        * Size in bytes
8082 |        */
8083 |       size: number;
8084 |       type: string;
8085 |     }
8086 |     export interface Directory {
8087 |       name: string;
8088 |       nestedDirectories: string[];
8089 |       /**
8090 |        * Files that are directly nested under this directory.
8091 |        */
8092 |       nestedFiles: File[];
8093 |     }
8094 |     export interface BucketFileSystemLocator {
8095 |       /**
8096 |        * Storage key
8097 |        */
8098 |       storageKey: Storage.SerializedStorageKey;
8099 |       /**
8100 |        * Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)
8101 |        */
8102 |       bucketName?: string;
8103 |       /**
8104 |        * Path to the directory using each path component as an array item.
8105 |        */
8106 |       pathComponents: string[];
8107 |     }
8108 | 
8109 | 
8110 |     export type getDirectoryParameters = {
8111 |       bucketFileSystemLocator: BucketFileSystemLocator;
8112 |     }
8113 |     export type getDirectoryReturnValue = {
8114 |       /**
8115 |        * Returns the directory object at the path.
8116 |        */
8117 |       directory: Directory;
8118 |     }
8119 |   }
8120 | 
8121 |   /**
8122 |    * This domain provides experimental commands only supported in headless mode.
8123 |    */
8124 |   export namespace HeadlessExperimental {
8125 |     /**
8126 |      * Encoding options for a screenshot.
8127 |      */
8128 |     export interface ScreenshotParams {
8129 |       /**
8130 |        * Image compression format (defaults to png).
8131 |        */
8132 |       format?: "jpeg"|"png"|"webp";
8133 |       /**
8134 |        * Compression quality from range [0..100] (jpeg and webp only).
8135 |        */
8136 |       quality?: number;
8137 |       /**
8138 |        * Optimize image encoding for speed, not for resulting size (defaults to false)
8139 |        */
8140 |       optimizeForSpeed?: boolean;
8141 |     }
8142 | 
8143 | 
8144 |     /**
8145 |      * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
8146 | screenshot from the resulting frame. Requires that the target was created with enabled
8147 | BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
8148 | https://goo.gle/chrome-headless-rendering for more background.
8149 |      */
8150 |     export type beginFrameParameters = {
8151 |       /**
8152 |        * Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,
8153 | the current time will be used.
8154 |        */
8155 |       frameTimeTicks?: number;
8156 |       /**
8157 |        * The interval between BeginFrames that is reported to the compositor, in milliseconds.
8158 | Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
8159 |        */
8160 |       interval?: number;
8161 |       /**
8162 |        * Whether updates should not be committed and drawn onto the display. False by default. If
8163 | true, only side effects of the BeginFrame will be run, such as layout and animations, but
8164 | any visual updates may not be visible on the display or in screenshots.
8165 |        */
8166 |       noDisplayUpdates?: boolean;
8167 |       /**
8168 |        * If set, a screenshot of the frame will be captured and returned in the response. Otherwise,
8169 | no screenshot will be captured. Note that capturing a screenshot can fail, for example,
8170 | during renderer initialization. In such a case, no screenshot data will be returned.
8171 |        */
8172 |       screenshot?: ScreenshotParams;
8173 |     }
8174 |     export type beginFrameReturnValue = {
8175 |       /**
8176 |        * Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the
8177 | display. Reported for diagnostic uses, may be removed in the future.
8178 |        */
8179 |       hasDamage: boolean;
8180 |       /**
8181 |        * Base64-encoded image data of the screenshot, if one was requested and successfully taken.
8182 |        */
8183 |       screenshotData?: binary;
8184 |     }
8185 |     /**
8186 |      * Disables headless events for the target.
8187 |      */
8188 |     export type disableParameters = {
8189 |     }
8190 |     export type disableReturnValue = {
8191 |     }
8192 |     /**
8193 |      * Enables headless events for the target.
8194 |      */
8195 |     export type enableParameters = {
8196 |     }
8197 |     export type enableReturnValue = {
8198 |     }
8199 |   }
8200 | 
8201 |   /**
8202 |    * Input/Output operations for streams produced by DevTools.
8203 |    */
8204 |   export namespace IO {
8205 |     /**
8206 |      * This is either obtained from another method or specified as `blob:<uuid>` where
8207 | `<uuid>` is an UUID of a Blob.
8208 |      */
8209 |     export type StreamHandle = string;
8210 | 
8211 | 
8212 |     /**
8213 |      * Close the stream, discard any temporary backing storage.
8214 |      */
8215 |     export type closeParameters = {
8216 |       /**
8217 |        * Handle of the stream to close.
8218 |        */
8219 |       handle: StreamHandle;
8220 |     }
8221 |     export type closeReturnValue = {
8222 |     }
8223 |     /**
8224 |      * Read a chunk of the stream
8225 |      */
8226 |     export type readParameters = {
8227 |       /**
8228 |        * Handle of the stream to read.
8229 |        */
8230 |       handle: StreamHandle;
8231 |       /**
8232 |        * Seek to the specified offset before reading (if not specified, proceed with offset
8233 | following the last read). Some types of streams may only support sequential reads.
8234 |        */
8235 |       offset?: number;
8236 |       /**
8237 |        * Maximum number of bytes to read (left upon the agent discretion if not specified).
8238 |        */
8239 |       size?: number;
8240 |     }
8241 |     export type readReturnValue = {
8242 |       /**
8243 |        * Set if the data is base64-encoded
8244 |        */
8245 |       base64Encoded?: boolean;
8246 |       /**
8247 |        * Data that were read.
8248 |        */
8249 |       data: string;
8250 |       /**
8251 |        * Set if the end-of-file condition occurred while reading.
8252 |        */
8253 |       eof: boolean;
8254 |     }
8255 |     /**
8256 |      * Return UUID of Blob object specified by a remote object id.
8257 |      */
8258 |     export type resolveBlobParameters = {
8259 |       /**
8260 |        * Object id of a Blob object wrapper.
8261 |        */
8262 |       objectId: Runtime.RemoteObjectId;
8263 |     }
8264 |     export type resolveBlobReturnValue = {
8265 |       /**
8266 |        * UUID of the specified Blob.
8267 |        */
8268 |       uuid: string;
8269 |     }
8270 |   }
8271 | 
8272 |   export namespace IndexedDB {
8273 |     /**
8274 |      * Database with an array of object stores.
8275 |      */
8276 |     export interface DatabaseWithObjectStores {
8277 |       /**
8278 |        * Database name.
8279 |        */
8280 |       name: string;
8281 |       /**
8282 |        * Database version (type is not 'integer', as the standard
8283 | requires the version number to be 'unsigned long long')
8284 |        */
8285 |       version: number;
8286 |       /**
8287 |        * Object stores in this database.
8288 |        */
8289 |       objectStores: ObjectStore[];
8290 |     }
8291 |     /**
8292 |      * Object store.
8293 |      */
8294 |     export interface ObjectStore {
8295 |       /**
8296 |        * Object store name.
8297 |        */
8298 |       name: string;
8299 |       /**
8300 |        * Object store key path.
8301 |        */
8302 |       keyPath: KeyPath;
8303 |       /**
8304 |        * If true, object store has auto increment flag set.
8305 |        */
8306 |       autoIncrement: boolean;
8307 |       /**
8308 |        * Indexes in this object store.
8309 |        */
8310 |       indexes: ObjectStoreIndex[];
8311 |     }
8312 |     /**
8313 |      * Object store index.
8314 |      */
8315 |     export interface ObjectStoreIndex {
8316 |       /**
8317 |        * Index name.
8318 |        */
8319 |       name: string;
8320 |       /**
8321 |        * Index key path.
8322 |        */
8323 |       keyPath: KeyPath;
8324 |       /**
8325 |        * If true, index is unique.
8326 |        */
8327 |       unique: boolean;
8328 |       /**
8329 |        * If true, index allows multiple entries for a key.
8330 |        */
8331 |       multiEntry: boolean;
8332 |     }
8333 |     /**
8334 |      * Key.
8335 |      */
8336 |     export interface Key {
8337 |       /**
8338 |        * Key type.
8339 |        */
8340 |       type: "number"|"string"|"date"|"array";
8341 |       /**
8342 |        * Number value.
8343 |        */
8344 |       number?: number;
8345 |       /**
8346 |        * String value.
8347 |        */
8348 |       string?: string;
8349 |       /**
8350 |        * Date value.
8351 |        */
8352 |       date?: number;
8353 |       /**
8354 |        * Array value.
8355 |        */
8356 |       array?: Key[];
8357 |     }
8358 |     /**
8359 |      * Key range.
8360 |      */
8361 |     export interface KeyRange {
8362 |       /**
8363 |        * Lower bound.
8364 |        */
8365 |       lower?: Key;
8366 |       /**
8367 |        * Upper bound.
8368 |        */
8369 |       upper?: Key;
8370 |       /**
8371 |        * If true lower bound is open.
8372 |        */
8373 |       lowerOpen: boolean;
8374 |       /**
8375 |        * If true upper bound is open.
8376 |        */
8377 |       upperOpen: boolean;
8378 |     }
8379 |     /**
8380 |      * Data entry.
8381 |      */
8382 |     export interface DataEntry {
8383 |       /**
8384 |        * Key object.
8385 |        */
8386 |       key: Runtime.RemoteObject;
8387 |       /**
8388 |        * Primary key object.
8389 |        */
8390 |       primaryKey: Runtime.RemoteObject;
8391 |       /**
8392 |        * Value object.
8393 |        */
8394 |       value: Runtime.RemoteObject;
8395 |     }
8396 |     /**
8397 |      * Key path.
8398 |      */
8399 |     export interface KeyPath {
8400 |       /**
8401 |        * Key path type.
8402 |        */
8403 |       type: "null"|"string"|"array";
8404 |       /**
8405 |        * String value.
8406 |        */
8407 |       string?: string;
8408 |       /**
8409 |        * Array value.
8410 |        */
8411 |       array?: string[];
8412 |     }
8413 | 
8414 | 
8415 |     /**
8416 |      * Clears all entries from an object store.
8417 |      */
8418 |     export type clearObjectStoreParameters = {
8419 |       /**
8420 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8421 | Security origin.
8422 |        */
8423 |       securityOrigin?: string;
8424 |       /**
8425 |        * Storage key.
8426 |        */
8427 |       storageKey?: string;
8428 |       /**
8429 |        * Storage bucket. If not specified, it uses the default bucket.
8430 |        */
8431 |       storageBucket?: Storage.StorageBucket;
8432 |       /**
8433 |        * Database name.
8434 |        */
8435 |       databaseName: string;
8436 |       /**
8437 |        * Object store name.
8438 |        */
8439 |       objectStoreName: string;
8440 |     }
8441 |     export type clearObjectStoreReturnValue = {
8442 |     }
8443 |     /**
8444 |      * Deletes a database.
8445 |      */
8446 |     export type deleteDatabaseParameters = {
8447 |       /**
8448 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8449 | Security origin.
8450 |        */
8451 |       securityOrigin?: string;
8452 |       /**
8453 |        * Storage key.
8454 |        */
8455 |       storageKey?: string;
8456 |       /**
8457 |        * Storage bucket. If not specified, it uses the default bucket.
8458 |        */
8459 |       storageBucket?: Storage.StorageBucket;
8460 |       /**
8461 |        * Database name.
8462 |        */
8463 |       databaseName: string;
8464 |     }
8465 |     export type deleteDatabaseReturnValue = {
8466 |     }
8467 |     /**
8468 |      * Delete a range of entries from an object store
8469 |      */
8470 |     export type deleteObjectStoreEntriesParameters = {
8471 |       /**
8472 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8473 | Security origin.
8474 |        */
8475 |       securityOrigin?: string;
8476 |       /**
8477 |        * Storage key.
8478 |        */
8479 |       storageKey?: string;
8480 |       /**
8481 |        * Storage bucket. If not specified, it uses the default bucket.
8482 |        */
8483 |       storageBucket?: Storage.StorageBucket;
8484 |       databaseName: string;
8485 |       objectStoreName: string;
8486 |       /**
8487 |        * Range of entry keys to delete
8488 |        */
8489 |       keyRange: KeyRange;
8490 |     }
8491 |     export type deleteObjectStoreEntriesReturnValue = {
8492 |     }
8493 |     /**
8494 |      * Disables events from backend.
8495 |      */
8496 |     export type disableParameters = {
8497 |     }
8498 |     export type disableReturnValue = {
8499 |     }
8500 |     /**
8501 |      * Enables events from backend.
8502 |      */
8503 |     export type enableParameters = {
8504 |     }
8505 |     export type enableReturnValue = {
8506 |     }
8507 |     /**
8508 |      * Requests data from object store or index.
8509 |      */
8510 |     export type requestDataParameters = {
8511 |       /**
8512 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8513 | Security origin.
8514 |        */
8515 |       securityOrigin?: string;
8516 |       /**
8517 |        * Storage key.
8518 |        */
8519 |       storageKey?: string;
8520 |       /**
8521 |        * Storage bucket. If not specified, it uses the default bucket.
8522 |        */
8523 |       storageBucket?: Storage.StorageBucket;
8524 |       /**
8525 |        * Database name.
8526 |        */
8527 |       databaseName: string;
8528 |       /**
8529 |        * Object store name.
8530 |        */
8531 |       objectStoreName: string;
8532 |       /**
8533 |        * Index name. If not specified, it performs an object store data request.
8534 |        */
8535 |       indexName?: string;
8536 |       /**
8537 |        * Number of records to skip.
8538 |        */
8539 |       skipCount: number;
8540 |       /**
8541 |        * Number of records to fetch.
8542 |        */
8543 |       pageSize: number;
8544 |       /**
8545 |        * Key range.
8546 |        */
8547 |       keyRange?: KeyRange;
8548 |     }
8549 |     export type requestDataReturnValue = {
8550 |       /**
8551 |        * Array of object store data entries.
8552 |        */
8553 |       objectStoreDataEntries: DataEntry[];
8554 |       /**
8555 |        * If true, there are more entries to fetch in the given range.
8556 |        */
8557 |       hasMore: boolean;
8558 |     }
8559 |     /**
8560 |      * Gets metadata of an object store.
8561 |      */
8562 |     export type getMetadataParameters = {
8563 |       /**
8564 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8565 | Security origin.
8566 |        */
8567 |       securityOrigin?: string;
8568 |       /**
8569 |        * Storage key.
8570 |        */
8571 |       storageKey?: string;
8572 |       /**
8573 |        * Storage bucket. If not specified, it uses the default bucket.
8574 |        */
8575 |       storageBucket?: Storage.StorageBucket;
8576 |       /**
8577 |        * Database name.
8578 |        */
8579 |       databaseName: string;
8580 |       /**
8581 |        * Object store name.
8582 |        */
8583 |       objectStoreName: string;
8584 |     }
8585 |     export type getMetadataReturnValue = {
8586 |       /**
8587 |        * the entries count
8588 |        */
8589 |       entriesCount: number;
8590 |       /**
8591 |        * the current value of key generator, to become the next inserted
8592 | key into the object store. Valid if objectStore.autoIncrement
8593 | is true.
8594 |        */
8595 |       keyGeneratorValue: number;
8596 |     }
8597 |     /**
8598 |      * Requests database with given name in given frame.
8599 |      */
8600 |     export type requestDatabaseParameters = {
8601 |       /**
8602 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8603 | Security origin.
8604 |        */
8605 |       securityOrigin?: string;
8606 |       /**
8607 |        * Storage key.
8608 |        */
8609 |       storageKey?: string;
8610 |       /**
8611 |        * Storage bucket. If not specified, it uses the default bucket.
8612 |        */
8613 |       storageBucket?: Storage.StorageBucket;
8614 |       /**
8615 |        * Database name.
8616 |        */
8617 |       databaseName: string;
8618 |     }
8619 |     export type requestDatabaseReturnValue = {
8620 |       /**
8621 |        * Database with an array of object stores.
8622 |        */
8623 |       databaseWithObjectStores: DatabaseWithObjectStores;
8624 |     }
8625 |     /**
8626 |      * Requests database names for given security origin.
8627 |      */
8628 |     export type requestDatabaseNamesParameters = {
8629 |       /**
8630 |        * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.
8631 | Security origin.
8632 |        */
8633 |       securityOrigin?: string;
8634 |       /**
8635 |        * Storage key.
8636 |        */
8637 |       storageKey?: string;
8638 |       /**
8639 |        * Storage bucket. If not specified, it uses the default bucket.
8640 |        */
8641 |       storageBucket?: Storage.StorageBucket;
8642 |     }
8643 |     export type requestDatabaseNamesReturnValue = {
8644 |       /**
8645 |        * Database names for origin.
8646 |        */
8647 |       databaseNames: string[];
8648 |     }
8649 |   }
8650 | 
8651 |   export namespace Input {
8652 |     export interface TouchPoint {
8653 |       /**
8654 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
8655 |        */
8656 |       x: number;
8657 |       /**
8658 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
8659 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
8660 |        */
8661 |       y: number;
8662 |       /**
8663 |        * X radius of the touch area (default: 1.0).
8664 |        */
8665 |       radiusX?: number;
8666 |       /**
8667 |        * Y radius of the touch area (default: 1.0).
8668 |        */
8669 |       radiusY?: number;
8670 |       /**
8671 |        * Rotation angle (default: 0.0).
8672 |        */
8673 |       rotationAngle?: number;
8674 |       /**
8675 |        * Force (default: 1.0).
8676 |        */
8677 |       force?: number;
8678 |       /**
8679 |        * The normalized tangential pressure, which has a range of [-1,1] (default: 0).
8680 |        */
8681 |       tangentialPressure?: number;
8682 |       /**
8683 |        * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
8684 |        */
8685 |       tiltX?: number;
8686 |       /**
8687 |        * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
8688 |        */
8689 |       tiltY?: number;
8690 |       /**
8691 |        * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
8692 |        */
8693 |       twist?: number;
8694 |       /**
8695 |        * Identifier used to track touch sources between events, must be unique within an event.
8696 |        */
8697 |       id?: number;
8698 |     }
8699 |     export type GestureSourceType = "default"|"touch"|"mouse";
8700 |     export type MouseButton = "none"|"left"|"middle"|"right"|"back"|"forward";
8701 |     /**
8702 |      * UTC time in seconds, counted from January 1, 1970.
8703 |      */
8704 |     export type TimeSinceEpoch = number;
8705 |     export interface DragDataItem {
8706 |       /**
8707 |        * Mime type of the dragged data.
8708 |        */
8709 |       mimeType: string;
8710 |       /**
8711 |        * Depending of the value of `mimeType`, it contains the dragged link,
8712 | text, HTML markup or any other data.
8713 |        */
8714 |       data: string;
8715 |       /**
8716 |        * Title associated with a link. Only valid when `mimeType` == "text/uri-list".
8717 |        */
8718 |       title?: string;
8719 |       /**
8720 |        * Stores the base URL for the contained markup. Only valid when `mimeType`
8721 | == "text/html".
8722 |        */
8723 |       baseURL?: string;
8724 |     }
8725 |     export interface DragData {
8726 |       items: DragDataItem[];
8727 |       /**
8728 |        * List of filenames that should be included when dropping
8729 |        */
8730 |       files?: string[];
8731 |       /**
8732 |        * Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
8733 |        */
8734 |       dragOperationsMask: number;
8735 |     }
8736 | 
8737 |     /**
8738 |      * Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to
8739 | restore normal drag and drop behavior.
8740 |      */
8741 |     export type dragInterceptedPayload = {
8742 |       data: DragData;
8743 |     }
8744 | 
8745 |     /**
8746 |      * Dispatches a drag event into the page.
8747 |      */
8748 |     export type dispatchDragEventParameters = {
8749 |       /**
8750 |        * Type of the drag event.
8751 |        */
8752 |       type: "dragEnter"|"dragOver"|"drop"|"dragCancel";
8753 |       /**
8754 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
8755 |        */
8756 |       x: number;
8757 |       /**
8758 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
8759 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
8760 |        */
8761 |       y: number;
8762 |       data: DragData;
8763 |       /**
8764 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
8765 | (default: 0).
8766 |        */
8767 |       modifiers?: number;
8768 |     }
8769 |     export type dispatchDragEventReturnValue = {
8770 |     }
8771 |     /**
8772 |      * Dispatches a key event to the page.
8773 |      */
8774 |     export type dispatchKeyEventParameters = {
8775 |       /**
8776 |        * Type of the key event.
8777 |        */
8778 |       type: "keyDown"|"keyUp"|"rawKeyDown"|"char";
8779 |       /**
8780 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
8781 | (default: 0).
8782 |        */
8783 |       modifiers?: number;
8784 |       /**
8785 |        * Time at which the event occurred.
8786 |        */
8787 |       timestamp?: TimeSinceEpoch;
8788 |       /**
8789 |        * Text as generated by processing a virtual key code with a keyboard layout. Not needed for
8790 | for `keyUp` and `rawKeyDown` events (default: "")
8791 |        */
8792 |       text?: string;
8793 |       /**
8794 |        * Text that would have been generated by the keyboard if no modifiers were pressed (except for
8795 | shift). Useful for shortcut (accelerator) key handling (default: "").
8796 |        */
8797 |       unmodifiedText?: string;
8798 |       /**
8799 |        * Unique key identifier (e.g., 'U+0041') (default: "").
8800 |        */
8801 |       keyIdentifier?: string;
8802 |       /**
8803 |        * Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
8804 |        */
8805 |       code?: string;
8806 |       /**
8807 |        * Unique DOM defined string value describing the meaning of the key in the context of active
8808 | modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
8809 |        */
8810 |       key?: string;
8811 |       /**
8812 |        * Windows virtual key code (default: 0).
8813 |        */
8814 |       windowsVirtualKeyCode?: number;
8815 |       /**
8816 |        * Native virtual key code (default: 0).
8817 |        */
8818 |       nativeVirtualKeyCode?: number;
8819 |       /**
8820 |        * Whether the event was generated from auto repeat (default: false).
8821 |        */
8822 |       autoRepeat?: boolean;
8823 |       /**
8824 |        * Whether the event was generated from the keypad (default: false).
8825 |        */
8826 |       isKeypad?: boolean;
8827 |       /**
8828 |        * Whether the event was a system key event (default: false).
8829 |        */
8830 |       isSystemKey?: boolean;
8831 |       /**
8832 |        * Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:
8833 | 0).
8834 |        */
8835 |       location?: number;
8836 |       /**
8837 |        * Editing commands to send with the key event (e.g., 'selectAll') (default: []).
8838 | These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
8839 | See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
8840 |        */
8841 |       commands?: string[];
8842 |     }
8843 |     export type dispatchKeyEventReturnValue = {
8844 |     }
8845 |     /**
8846 |      * This method emulates inserting text that doesn't come from a key press,
8847 | for example an emoji keyboard or an IME.
8848 |      */
8849 |     export type insertTextParameters = {
8850 |       /**
8851 |        * The text to insert.
8852 |        */
8853 |       text: string;
8854 |     }
8855 |     export type insertTextReturnValue = {
8856 |     }
8857 |     /**
8858 |      * This method sets the current candidate text for IME.
8859 | Use imeCommitComposition to commit the final text.
8860 | Use imeSetComposition with empty string as text to cancel composition.
8861 |      */
8862 |     export type imeSetCompositionParameters = {
8863 |       /**
8864 |        * The text to insert
8865 |        */
8866 |       text: string;
8867 |       /**
8868 |        * selection start
8869 |        */
8870 |       selectionStart: number;
8871 |       /**
8872 |        * selection end
8873 |        */
8874 |       selectionEnd: number;
8875 |       /**
8876 |        * replacement start
8877 |        */
8878 |       replacementStart?: number;
8879 |       /**
8880 |        * replacement end
8881 |        */
8882 |       replacementEnd?: number;
8883 |     }
8884 |     export type imeSetCompositionReturnValue = {
8885 |     }
8886 |     /**
8887 |      * Dispatches a mouse event to the page.
8888 |      */
8889 |     export type dispatchMouseEventParameters = {
8890 |       /**
8891 |        * Type of the mouse event.
8892 |        */
8893 |       type: "mousePressed"|"mouseReleased"|"mouseMoved"|"mouseWheel";
8894 |       /**
8895 |        * X coordinate of the event relative to the main frame's viewport in CSS pixels.
8896 |        */
8897 |       x: number;
8898 |       /**
8899 |        * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to
8900 | the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
8901 |        */
8902 |       y: number;
8903 |       /**
8904 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
8905 | (default: 0).
8906 |        */
8907 |       modifiers?: number;
8908 |       /**
8909 |        * Time at which the event occurred.
8910 |        */
8911 |       timestamp?: TimeSinceEpoch;
8912 |       /**
8913 |        * Mouse button (default: "none").
8914 |        */
8915 |       button?: MouseButton;
8916 |       /**
8917 |        * A number indicating which buttons are pressed on the mouse when a mouse event is triggered.
8918 | Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
8919 |        */
8920 |       buttons?: number;
8921 |       /**
8922 |        * Number of times the mouse button was clicked (default: 0).
8923 |        */
8924 |       clickCount?: number;
8925 |       /**
8926 |        * The normalized pressure, which has a range of [0,1] (default: 0).
8927 |        */
8928 |       force?: number;
8929 |       /**
8930 |        * The normalized tangential pressure, which has a range of [-1,1] (default: 0).
8931 |        */
8932 |       tangentialPressure?: number;
8933 |       /**
8934 |        * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
8935 |        */
8936 |       tiltX?: number;
8937 |       /**
8938 |        * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
8939 |        */
8940 |       tiltY?: number;
8941 |       /**
8942 |        * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
8943 |        */
8944 |       twist?: number;
8945 |       /**
8946 |        * X delta in CSS pixels for mouse wheel event (default: 0).
8947 |        */
8948 |       deltaX?: number;
8949 |       /**
8950 |        * Y delta in CSS pixels for mouse wheel event (default: 0).
8951 |        */
8952 |       deltaY?: number;
8953 |       /**
8954 |        * Pointer type (default: "mouse").
8955 |        */
8956 |       pointerType?: "mouse"|"pen";
8957 |     }
8958 |     export type dispatchMouseEventReturnValue = {
8959 |     }
8960 |     /**
8961 |      * Dispatches a touch event to the page.
8962 |      */
8963 |     export type dispatchTouchEventParameters = {
8964 |       /**
8965 |        * Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while
8966 | TouchStart and TouchMove must contains at least one.
8967 |        */
8968 |       type: "touchStart"|"touchEnd"|"touchMove"|"touchCancel";
8969 |       /**
8970 |        * Active touch points on the touch device. One event per any changed point (compared to
8971 | previous touch event in a sequence) is generated, emulating pressing/moving/releasing points
8972 | one by one.
8973 |        */
8974 |       touchPoints: TouchPoint[];
8975 |       /**
8976 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
8977 | (default: 0).
8978 |        */
8979 |       modifiers?: number;
8980 |       /**
8981 |        * Time at which the event occurred.
8982 |        */
8983 |       timestamp?: TimeSinceEpoch;
8984 |     }
8985 |     export type dispatchTouchEventReturnValue = {
8986 |     }
8987 |     /**
8988 |      * Cancels any active dragging in the page.
8989 |      */
8990 |     export type cancelDraggingParameters = {
8991 |     }
8992 |     export type cancelDraggingReturnValue = {
8993 |     }
8994 |     /**
8995 |      * Emulates touch event from the mouse event parameters.
8996 |      */
8997 |     export type emulateTouchFromMouseEventParameters = {
8998 |       /**
8999 |        * Type of the mouse event.
9000 |        */
9001 |       type: "mousePressed"|"mouseReleased"|"mouseMoved"|"mouseWheel";
9002 |       /**
9003 |        * X coordinate of the mouse pointer in DIP.
9004 |        */
9005 |       x: number;
9006 |       /**
9007 |        * Y coordinate of the mouse pointer in DIP.
9008 |        */
9009 |       y: number;
9010 |       /**
9011 |        * Mouse button. Only "none", "left", "right" are supported.
9012 |        */
9013 |       button: MouseButton;
9014 |       /**
9015 |        * Time at which the event occurred (default: current time).
9016 |        */
9017 |       timestamp?: TimeSinceEpoch;
9018 |       /**
9019 |        * X delta in DIP for mouse wheel event (default: 0).
9020 |        */
9021 |       deltaX?: number;
9022 |       /**
9023 |        * Y delta in DIP for mouse wheel event (default: 0).
9024 |        */
9025 |       deltaY?: number;
9026 |       /**
9027 |        * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8
9028 | (default: 0).
9029 |        */
9030 |       modifiers?: number;
9031 |       /**
9032 |        * Number of times the mouse button was clicked (default: 0).
9033 |        */
9034 |       clickCount?: number;
9035 |     }
9036 |     export type emulateTouchFromMouseEventReturnValue = {
9037 |     }
9038 |     /**
9039 |      * Ignores input events (useful while auditing page).
9040 |      */
9041 |     export type setIgnoreInputEventsParameters = {
9042 |       /**
9043 |        * Ignores input events processing when set to true.
9044 |        */
9045 |       ignore: boolean;
9046 |     }
9047 |     export type setIgnoreInputEventsReturnValue = {
9048 |     }
9049 |     /**
9050 |      * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.
9051 | Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.
9052 |      */
9053 |     export type setInterceptDragsParameters = {
9054 |       enabled: boolean;
9055 |     }
9056 |     export type setInterceptDragsReturnValue = {
9057 |     }
9058 |     /**
9059 |      * Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
9060 |      */
9061 |     export type synthesizePinchGestureParameters = {
9062 |       /**
9063 |        * X coordinate of the start of the gesture in CSS pixels.
9064 |        */
9065 |       x: number;
9066 |       /**
9067 |        * Y coordinate of the start of the gesture in CSS pixels.
9068 |        */
9069 |       y: number;
9070 |       /**
9071 |        * Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
9072 |        */
9073 |       scaleFactor: number;
9074 |       /**
9075 |        * Relative pointer speed in pixels per second (default: 800).
9076 |        */
9077 |       relativeSpeed?: number;
9078 |       /**
9079 |        * Which type of input events to be generated (default: 'default', which queries the platform
9080 | for the preferred input type).
9081 |        */
9082 |       gestureSourceType?: GestureSourceType;
9083 |     }
9084 |     export type synthesizePinchGestureReturnValue = {
9085 |     }
9086 |     /**
9087 |      * Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
9088 |      */
9089 |     export type synthesizeScrollGestureParameters = {
9090 |       /**
9091 |        * X coordinate of the start of the gesture in CSS pixels.
9092 |        */
9093 |       x: number;
9094 |       /**
9095 |        * Y coordinate of the start of the gesture in CSS pixels.
9096 |        */
9097 |       y: number;
9098 |       /**
9099 |        * The distance to scroll along the X axis (positive to scroll left).
9100 |        */
9101 |       xDistance?: number;
9102 |       /**
9103 |        * The distance to scroll along the Y axis (positive to scroll up).
9104 |        */
9105 |       yDistance?: number;
9106 |       /**
9107 |        * The number of additional pixels to scroll back along the X axis, in addition to the given
9108 | distance.
9109 |        */
9110 |       xOverscroll?: number;
9111 |       /**
9112 |        * The number of additional pixels to scroll back along the Y axis, in addition to the given
9113 | distance.
9114 |        */
9115 |       yOverscroll?: number;
9116 |       /**
9117 |        * Prevent fling (default: true).
9118 |        */
9119 |       preventFling?: boolean;
9120 |       /**
9121 |        * Swipe speed in pixels per second (default: 800).
9122 |        */
9123 |       speed?: number;
9124 |       /**
9125 |        * Which type of input events to be generated (default: 'default', which queries the platform
9126 | for the preferred input type).
9127 |        */
9128 |       gestureSourceType?: GestureSourceType;
9129 |       /**
9130 |        * The number of times to repeat the gesture (default: 0).
9131 |        */
9132 |       repeatCount?: number;
9133 |       /**
9134 |        * The number of milliseconds delay between each repeat. (default: 250).
9135 |        */
9136 |       repeatDelayMs?: number;
9137 |       /**
9138 |        * The name of the interaction markers to generate, if not empty (default: "").
9139 |        */
9140 |       interactionMarkerName?: string;
9141 |     }
9142 |     export type synthesizeScrollGestureReturnValue = {
9143 |     }
9144 |     /**
9145 |      * Synthesizes a tap gesture over a time period by issuing appropriate touch events.
9146 |      */
9147 |     export type synthesizeTapGestureParameters = {
9148 |       /**
9149 |        * X coordinate of the start of the gesture in CSS pixels.
9150 |        */
9151 |       x: number;
9152 |       /**
9153 |        * Y coordinate of the start of the gesture in CSS pixels.
9154 |        */
9155 |       y: number;
9156 |       /**
9157 |        * Duration between touchdown and touchup events in ms (default: 50).
9158 |        */
9159 |       duration?: number;
9160 |       /**
9161 |        * Number of times to perform the tap (e.g. 2 for double tap, default: 1).
9162 |        */
9163 |       tapCount?: number;
9164 |       /**
9165 |        * Which type of input events to be generated (default: 'default', which queries the platform
9166 | for the preferred input type).
9167 |        */
9168 |       gestureSourceType?: GestureSourceType;
9169 |     }
9170 |     export type synthesizeTapGestureReturnValue = {
9171 |     }
9172 |   }
9173 | 
9174 |   export namespace Inspector {
9175 | 
9176 |     /**
9177 |      * Fired when remote debugging connection is about to be terminated. Contains detach reason.
9178 |      */
9179 |     export type detachedPayload = {
9180 |       /**
9181 |        * The reason why connection has been terminated.
9182 |        */
9183 |       reason: string;
9184 |     }
9185 |     /**
9186 |      * Fired when debugging target has crashed
9187 |      */
9188 |     export type targetCrashedPayload = void;
9189 |     /**
9190 |      * Fired when debugging target has reloaded after crash
9191 |      */
9192 |     export type targetReloadedAfterCrashPayload = void;
9193 |     /**
9194 |      * Fired on worker targets when main worker script and any imported scripts have been evaluated.
9195 |      */
9196 |     export type workerScriptLoadedPayload = void;
9197 | 
9198 |     /**
9199 |      * Disables inspector domain notifications.
9200 |      */
9201 |     export type disableParameters = {
9202 |     }
9203 |     export type disableReturnValue = {
9204 |     }
9205 |     /**
9206 |      * Enables inspector domain notifications.
9207 |      */
9208 |     export type enableParameters = {
9209 |     }
9210 |     export type enableReturnValue = {
9211 |     }
9212 |   }
9213 | 
9214 |   export namespace LayerTree {
9215 |     /**
9216 |      * Unique Layer identifier.
9217 |      */
9218 |     export type LayerId = string;
9219 |     /**
9220 |      * Unique snapshot identifier.
9221 |      */
9222 |     export type SnapshotId = string;
9223 |     /**
9224 |      * Rectangle where scrolling happens on the main thread.
9225 |      */
9226 |     export interface ScrollRect {
9227 |       /**
9228 |        * Rectangle itself.
9229 |        */
9230 |       rect: DOM.Rect;
9231 |       /**
9232 |        * Reason for rectangle to force scrolling on the main thread
9233 |        */
9234 |       type: "RepaintsOnScroll"|"TouchEventHandler"|"WheelEventHandler";
9235 |     }
9236 |     /**
9237 |      * Sticky position constraints.
9238 |      */
9239 |     export interface StickyPositionConstraint {
9240 |       /**
9241 |        * Layout rectangle of the sticky element before being shifted
9242 |        */
9243 |       stickyBoxRect: DOM.Rect;
9244 |       /**
9245 |        * Layout rectangle of the containing block of the sticky element
9246 |        */
9247 |       containingBlockRect: DOM.Rect;
9248 |       /**
9249 |        * The nearest sticky layer that shifts the sticky box
9250 |        */
9251 |       nearestLayerShiftingStickyBox?: LayerId;
9252 |       /**
9253 |        * The nearest sticky layer that shifts the containing block
9254 |        */
9255 |       nearestLayerShiftingContainingBlock?: LayerId;
9256 |     }
9257 |     /**
9258 |      * Serialized fragment of layer picture along with its offset within the layer.
9259 |      */
9260 |     export interface PictureTile {
9261 |       /**
9262 |        * Offset from owning layer left boundary
9263 |        */
9264 |       x: number;
9265 |       /**
9266 |        * Offset from owning layer top boundary
9267 |        */
9268 |       y: number;
9269 |       /**
9270 |        * Base64-encoded snapshot data.
9271 |        */
9272 |       picture: binary;
9273 |     }
9274 |     /**
9275 |      * Information about a compositing layer.
9276 |      */
9277 |     export interface Layer {
9278 |       /**
9279 |        * The unique id for this layer.
9280 |        */
9281 |       layerId: LayerId;
9282 |       /**
9283 |        * The id of parent (not present for root).
9284 |        */
9285 |       parentLayerId?: LayerId;
9286 |       /**
9287 |        * The backend id for the node associated with this layer.
9288 |        */
9289 |       backendNodeId?: DOM.BackendNodeId;
9290 |       /**
9291 |        * Offset from parent layer, X coordinate.
9292 |        */
9293 |       offsetX: number;
9294 |       /**
9295 |        * Offset from parent layer, Y coordinate.
9296 |        */
9297 |       offsetY: number;
9298 |       /**
9299 |        * Layer width.
9300 |        */
9301 |       width: number;
9302 |       /**
9303 |        * Layer height.
9304 |        */
9305 |       height: number;
9306 |       /**
9307 |        * Transformation matrix for layer, default is identity matrix
9308 |        */
9309 |       transform?: number[];
9310 |       /**
9311 |        * Transform anchor point X, absent if no transform specified
9312 |        */
9313 |       anchorX?: number;
9314 |       /**
9315 |        * Transform anchor point Y, absent if no transform specified
9316 |        */
9317 |       anchorY?: number;
9318 |       /**
9319 |        * Transform anchor point Z, absent if no transform specified
9320 |        */
9321 |       anchorZ?: number;
9322 |       /**
9323 |        * Indicates how many time this layer has painted.
9324 |        */
9325 |       paintCount: number;
9326 |       /**
9327 |        * Indicates whether this layer hosts any content, rather than being used for
9328 | transform/scrolling purposes only.
9329 |        */
9330 |       drawsContent: boolean;
9331 |       /**
9332 |        * Set if layer is not visible.
9333 |        */
9334 |       invisible?: boolean;
9335 |       /**
9336 |        * Rectangles scrolling on main thread only.
9337 |        */
9338 |       scrollRects?: ScrollRect[];
9339 |       /**
9340 |        * Sticky position constraint information
9341 |        */
9342 |       stickyPositionConstraint?: StickyPositionConstraint;
9343 |     }
9344 |     /**
9345 |      * Array of timings, one per paint step.
9346 |      */
9347 |     export type PaintProfile = number[];
9348 | 
9349 |     export type layerPaintedPayload = {
9350 |       /**
9351 |        * The id of the painted layer.
9352 |        */
9353 |       layerId: LayerId;
9354 |       /**
9355 |        * Clip rectangle.
9356 |        */
9357 |       clip: DOM.Rect;
9358 |     }
9359 |     export type layerTreeDidChangePayload = {
9360 |       /**
9361 |        * Layer tree, absent if not in the compositing mode.
9362 |        */
9363 |       layers?: Layer[];
9364 |     }
9365 | 
9366 |     /**
9367 |      * Provides the reasons why the given layer was composited.
9368 |      */
9369 |     export type compositingReasonsParameters = {
9370 |       /**
9371 |        * The id of the layer for which we want to get the reasons it was composited.
9372 |        */
9373 |       layerId: LayerId;
9374 |     }
9375 |     export type compositingReasonsReturnValue = {
9376 |       /**
9377 |        * A list of strings specifying reasons for the given layer to become composited.
9378 |        */
9379 |       compositingReasons: string[];
9380 |       /**
9381 |        * A list of strings specifying reason IDs for the given layer to become composited.
9382 |        */
9383 |       compositingReasonIds: string[];
9384 |     }
9385 |     /**
9386 |      * Disables compositing tree inspection.
9387 |      */
9388 |     export type disableParameters = {
9389 |     }
9390 |     export type disableReturnValue = {
9391 |     }
9392 |     /**
9393 |      * Enables compositing tree inspection.
9394 |      */
9395 |     export type enableParameters = {
9396 |     }
9397 |     export type enableReturnValue = {
9398 |     }
9399 |     /**
9400 |      * Returns the snapshot identifier.
9401 |      */
9402 |     export type loadSnapshotParameters = {
9403 |       /**
9404 |        * An array of tiles composing the snapshot.
9405 |        */
9406 |       tiles: PictureTile[];
9407 |     }
9408 |     export type loadSnapshotReturnValue = {
9409 |       /**
9410 |        * The id of the snapshot.
9411 |        */
9412 |       snapshotId: SnapshotId;
9413 |     }
9414 |     /**
9415 |      * Returns the layer snapshot identifier.
9416 |      */
9417 |     export type makeSnapshotParameters = {
9418 |       /**
9419 |        * The id of the layer.
9420 |        */
9421 |       layerId: LayerId;
9422 |     }
9423 |     export type makeSnapshotReturnValue = {
9424 |       /**
9425 |        * The id of the layer snapshot.
9426 |        */
9427 |       snapshotId: SnapshotId;
9428 |     }
9429 |     export type profileSnapshotParameters = {
9430 |       /**
9431 |        * The id of the layer snapshot.
9432 |        */
9433 |       snapshotId: SnapshotId;
9434 |       /**
9435 |        * The maximum number of times to replay the snapshot (1, if not specified).
9436 |        */
9437 |       minRepeatCount?: number;
9438 |       /**
9439 |        * The minimum duration (in seconds) to replay the snapshot.
9440 |        */
9441 |       minDuration?: number;
9442 |       /**
9443 |        * The clip rectangle to apply when replaying the snapshot.
9444 |        */
9445 |       clipRect?: DOM.Rect;
9446 |     }
9447 |     export type profileSnapshotReturnValue = {
9448 |       /**
9449 |        * The array of paint profiles, one per run.
9450 |        */
9451 |       timings: PaintProfile[];
9452 |     }
9453 |     /**
9454 |      * Releases layer snapshot captured by the back-end.
9455 |      */
9456 |     export type releaseSnapshotParameters = {
9457 |       /**
9458 |        * The id of the layer snapshot.
9459 |        */
9460 |       snapshotId: SnapshotId;
9461 |     }
9462 |     export type releaseSnapshotReturnValue = {
9463 |     }
9464 |     /**
9465 |      * Replays the layer snapshot and returns the resulting bitmap.
9466 |      */
9467 |     export type replaySnapshotParameters = {
9468 |       /**
9469 |        * The id of the layer snapshot.
9470 |        */
9471 |       snapshotId: SnapshotId;
9472 |       /**
9473 |        * The first step to replay from (replay from the very start if not specified).
9474 |        */
9475 |       fromStep?: number;
9476 |       /**
9477 |        * The last step to replay to (replay till the end if not specified).
9478 |        */
9479 |       toStep?: number;
9480 |       /**
9481 |        * The scale to apply while replaying (defaults to 1).
9482 |        */
9483 |       scale?: number;
9484 |     }
9485 |     export type replaySnapshotReturnValue = {
9486 |       /**
9487 |        * A data: URL for resulting image.
9488 |        */
9489 |       dataURL: string;
9490 |     }
9491 |     /**
9492 |      * Replays the layer snapshot and returns canvas log.
9493 |      */
9494 |     export type snapshotCommandLogParameters = {
9495 |       /**
9496 |        * The id of the layer snapshot.
9497 |        */
9498 |       snapshotId: SnapshotId;
9499 |     }
9500 |     export type snapshotCommandLogReturnValue = {
9501 |       /**
9502 |        * The array of canvas function calls.
9503 |        */
9504 |       commandLog: { [key: string]: string }[];
9505 |     }
9506 |   }
9507 | 
9508 |   /**
9509 |    * Provides access to log entries.
9510 |    */
9511 |   export namespace Log {
9512 |     /**
9513 |      * Log entry.
9514 |      */
9515 |     export interface LogEntry {
9516 |       /**
9517 |        * Log entry source.
9518 |        */
9519 |       source: "xml"|"javascript"|"network"|"storage"|"appcache"|"rendering"|"security"|"deprecation"|"worker"|"violation"|"intervention"|"recommendation"|"other";
9520 |       /**
9521 |        * Log entry severity.
9522 |        */
9523 |       level: "verbose"|"info"|"warning"|"error";
9524 |       /**
9525 |        * Logged text.
9526 |        */
9527 |       text: string;
9528 |       category?: "cors";
9529 |       /**
9530 |        * Timestamp when this entry was added.
9531 |        */
9532 |       timestamp: Runtime.Timestamp;
9533 |       /**
9534 |        * URL of the resource if known.
9535 |        */
9536 |       url?: string;
9537 |       /**
9538 |        * Line number in the resource.
9539 |        */
9540 |       lineNumber?: number;
9541 |       /**
9542 |        * JavaScript stack trace.
9543 |        */
9544 |       stackTrace?: Runtime.StackTrace;
9545 |       /**
9546 |        * Identifier of the network request associated with this entry.
9547 |        */
9548 |       networkRequestId?: Network.RequestId;
9549 |       /**
9550 |        * Identifier of the worker associated with this entry.
9551 |        */
9552 |       workerId?: string;
9553 |       /**
9554 |        * Call arguments.
9555 |        */
9556 |       args?: Runtime.RemoteObject[];
9557 |     }
9558 |     /**
9559 |      * Violation configuration setting.
9560 |      */
9561 |     export interface ViolationSetting {
9562 |       /**
9563 |        * Violation type.
9564 |        */
9565 |       name: "longTask"|"longLayout"|"blockedEvent"|"blockedParser"|"discouragedAPIUse"|"handler"|"recurringHandler";
9566 |       /**
9567 |        * Time threshold to trigger upon.
9568 |        */
9569 |       threshold: number;
9570 |     }
9571 | 
9572 |     /**
9573 |      * Issued when new message was logged.
9574 |      */
9575 |     export type entryAddedPayload = {
9576 |       /**
9577 |        * The entry.
9578 |        */
9579 |       entry: LogEntry;
9580 |     }
9581 | 
9582 |     /**
9583 |      * Clears the log.
9584 |      */
9585 |     export type clearParameters = {
9586 |     }
9587 |     export type clearReturnValue = {
9588 |     }
9589 |     /**
9590 |      * Disables log domain, prevents further log entries from being reported to the client.
9591 |      */
9592 |     export type disableParameters = {
9593 |     }
9594 |     export type disableReturnValue = {
9595 |     }
9596 |     /**
9597 |      * Enables log domain, sends the entries collected so far to the client by means of the
9598 | `entryAdded` notification.
9599 |      */
9600 |     export type enableParameters = {
9601 |     }
9602 |     export type enableReturnValue = {
9603 |     }
9604 |     /**
9605 |      * start violation reporting.
9606 |      */
9607 |     export type startViolationsReportParameters = {
9608 |       /**
9609 |        * Configuration for violations.
9610 |        */
9611 |       config: ViolationSetting[];
9612 |     }
9613 |     export type startViolationsReportReturnValue = {
9614 |     }
9615 |     /**
9616 |      * Stop violation reporting.
9617 |      */
9618 |     export type stopViolationsReportParameters = {
9619 |     }
9620 |     export type stopViolationsReportReturnValue = {
9621 |     }
9622 |   }
9623 | 
9624 |   /**
9625 |    * This domain allows detailed inspection of media elements.
9626 |    */
9627 |   export namespace Media {
9628 |     /**
9629 |      * Players will get an ID that is unique within the agent context.
9630 |      */
9631 |     export type PlayerId = string;
9632 |     export type Timestamp = number;
9633 |     /**
9634 |      * Have one type per entry in MediaLogRecord::Type
9635 | Corresponds to kMessage
9636 |      */
9637 |     export interface PlayerMessage {
9638 |       /**
9639 |        * Keep in sync with MediaLogMessageLevel
9640 | We are currently keeping the message level 'error' separate from the
9641 | PlayerError type because right now they represent different things,
9642 | this one being a DVLOG(ERROR) style log message that gets printed
9643 | based on what log level is selected in the UI, and the other is a
9644 | representation of a media::PipelineStatus object. Soon however we're
9645 | going to be moving away from using PipelineStatus for errors and
9646 | introducing a new error type which should hopefully let us integrate
9647 | the error log level into the PlayerError type.
9648 |        */
9649 |       level: "error"|"warning"|"info"|"debug";
9650 |       message: string;
9651 |     }
9652 |     /**
9653 |      * Corresponds to kMediaPropertyChange
9654 |      */
9655 |     export interface PlayerProperty {
9656 |       name: string;
9657 |       value: string;
9658 |     }
9659 |     /**
9660 |      * Corresponds to kMediaEventTriggered
9661 |      */
9662 |     export interface PlayerEvent {
9663 |       timestamp: Timestamp;
9664 |       value: string;
9665 |     }
9666 |     /**
9667 |      * Represents logged source line numbers reported in an error.
9668 | NOTE: file and line are from chromium c++ implementation code, not js.
9669 |      */
9670 |     export interface PlayerErrorSourceLocation {
9671 |       file: string;
9672 |       line: number;
9673 |     }
9674 |     /**
9675 |      * Corresponds to kMediaError
9676 |      */
9677 |     export interface PlayerError {
9678 |       errorType: string;
9679 |       /**
9680 |        * Code is the numeric enum entry for a specific set of error codes, such
9681 | as PipelineStatusCodes in media/base/pipeline_status.h
9682 |        */
9683 |       code: number;
9684 |       /**
9685 |        * A trace of where this error was caused / where it passed through.
9686 |        */
9687 |       stack: PlayerErrorSourceLocation[];
9688 |       /**
9689 |        * Errors potentially have a root cause error, ie, a DecoderError might be
9690 | caused by an WindowsError
9691 |        */
9692 |       cause: PlayerError[];
9693 |       /**
9694 |        * Extra data attached to an error, such as an HRESULT, Video Codec, etc.
9695 |        */
9696 |       data: { [key: string]: string };
9697 |     }
9698 |     export interface Player {
9699 |       playerId: PlayerId;
9700 |       domNodeId?: DOM.BackendNodeId;
9701 |     }
9702 | 
9703 |     /**
9704 |      * This can be called multiple times, and can be used to set / override /
9705 | remove player properties. A null propValue indicates removal.
9706 |      */
9707 |     export type playerPropertiesChangedPayload = {
9708 |       playerId: PlayerId;
9709 |       properties: PlayerProperty[];
9710 |     }
9711 |     /**
9712 |      * Send events as a list, allowing them to be batched on the browser for less
9713 | congestion. If batched, events must ALWAYS be in chronological order.
9714 |      */
9715 |     export type playerEventsAddedPayload = {
9716 |       playerId: PlayerId;
9717 |       events: PlayerEvent[];
9718 |     }
9719 |     /**
9720 |      * Send a list of any messages that need to be delivered.
9721 |      */
9722 |     export type playerMessagesLoggedPayload = {
9723 |       playerId: PlayerId;
9724 |       messages: PlayerMessage[];
9725 |     }
9726 |     /**
9727 |      * Send a list of any errors that need to be delivered.
9728 |      */
9729 |     export type playerErrorsRaisedPayload = {
9730 |       playerId: PlayerId;
9731 |       errors: PlayerError[];
9732 |     }
9733 |     /**
9734 |      * Called whenever a player is created, or when a new agent joins and receives
9735 | a list of active players. If an agent is restored, it will receive one
9736 | event for each active player.
9737 |      */
9738 |     export type playerCreatedPayload = {
9739 |       player: Player;
9740 |     }
9741 | 
9742 |     /**
9743 |      * Enables the Media domain
9744 |      */
9745 |     export type enableParameters = {
9746 |     }
9747 |     export type enableReturnValue = {
9748 |     }
9749 |     /**
9750 |      * Disables the Media domain.
9751 |      */
9752 |     export type disableParameters = {
9753 |     }
9754 |     export type disableReturnValue = {
9755 |     }
9756 |   }
9757 | 
9758 |   export namespace Memory {
9759 |     /**
9760 |      * Memory pressure level.
9761 |      */
9762 |     export type PressureLevel = "moderate"|"critical";
9763 |     /**
9764 |      * Heap profile sample.
9765 |      */
9766 |     export interface SamplingProfileNode {
9767 |       /**
9768 |        * Size of the sampled allocation.
9769 |        */
9770 |       size: number;
9771 |       /**
9772 |        * Total bytes attributed to this sample.
9773 |        */
9774 |       total: number;
9775 |       /**
9776 |        * Execution stack at the point of allocation.
9777 |        */
9778 |       stack: string[];
9779 |     }
9780 |     /**
9781 |      * Array of heap profile samples.
9782 |      */
9783 |     export interface SamplingProfile {
9784 |       samples: SamplingProfileNode[];
9785 |       modules: Module[];
9786 |     }
9787 |     /**
9788 |      * Executable module information
9789 |      */
9790 |     export interface Module {
9791 |       /**
9792 |        * Name of the module.
9793 |        */
9794 |       name: string;
9795 |       /**
9796 |        * UUID of the module.
9797 |        */
9798 |       uuid: string;
9799 |       /**
9800 |        * Base address where the module is loaded into memory. Encoded as a decimal
9801 | or hexadecimal (0x prefixed) string.
9802 |        */
9803 |       baseAddress: string;
9804 |       /**
9805 |        * Size of the module in bytes.
9806 |        */
9807 |       size: number;
9808 |     }
9809 |     /**
9810 |      * DOM object counter data.
9811 |      */
9812 |     export interface DOMCounter {
9813 |       /**
9814 |        * Object name. Note: object names should be presumed volatile and clients should not expect
9815 | the returned names to be consistent across runs.
9816 |        */
9817 |       name: string;
9818 |       /**
9819 |        * Object count.
9820 |        */
9821 |       count: number;
9822 |     }
9823 | 
9824 | 
9825 |     /**
9826 |      * Retruns current DOM object counters.
9827 |      */
9828 |     export type getDOMCountersParameters = {
9829 |     }
9830 |     export type getDOMCountersReturnValue = {
9831 |       documents: number;
9832 |       nodes: number;
9833 |       jsEventListeners: number;
9834 |     }
9835 |     /**
9836 |      * Retruns DOM object counters after preparing renderer for leak detection.
9837 |      */
9838 |     export type getDOMCountersForLeakDetectionParameters = {
9839 |     }
9840 |     export type getDOMCountersForLeakDetectionReturnValue = {
9841 |       /**
9842 |        * DOM object counters.
9843 |        */
9844 |       counters: DOMCounter[];
9845 |     }
9846 |     /**
9847 |      * Prepares for leak detection by terminating workers, stopping spellcheckers,
9848 | dropping non-essential internal caches, running garbage collections, etc.
9849 |      */
9850 |     export type prepareForLeakDetectionParameters = {
9851 |     }
9852 |     export type prepareForLeakDetectionReturnValue = {
9853 |     }
9854 |     /**
9855 |      * Simulate OomIntervention by purging V8 memory.
9856 |      */
9857 |     export type forciblyPurgeJavaScriptMemoryParameters = {
9858 |     }
9859 |     export type forciblyPurgeJavaScriptMemoryReturnValue = {
9860 |     }
9861 |     /**
9862 |      * Enable/disable suppressing memory pressure notifications in all processes.
9863 |      */
9864 |     export type setPressureNotificationsSuppressedParameters = {
9865 |       /**
9866 |        * If true, memory pressure notifications will be suppressed.
9867 |        */
9868 |       suppressed: boolean;
9869 |     }
9870 |     export type setPressureNotificationsSuppressedReturnValue = {
9871 |     }
9872 |     /**
9873 |      * Simulate a memory pressure notification in all processes.
9874 |      */
9875 |     export type simulatePressureNotificationParameters = {
9876 |       /**
9877 |        * Memory pressure level of the notification.
9878 |        */
9879 |       level: PressureLevel;
9880 |     }
9881 |     export type simulatePressureNotificationReturnValue = {
9882 |     }
9883 |     /**
9884 |      * Start collecting native memory profile.
9885 |      */
9886 |     export type startSamplingParameters = {
9887 |       /**
9888 |        * Average number of bytes between samples.
9889 |        */
9890 |       samplingInterval?: number;
9891 |       /**
9892 |        * Do not randomize intervals between samples.
9893 |        */
9894 |       suppressRandomness?: boolean;
9895 |     }
9896 |     export type startSamplingReturnValue = {
9897 |     }
9898 |     /**
9899 |      * Stop collecting native memory profile.
9900 |      */
9901 |     export type stopSamplingParameters = {
9902 |     }
9903 |     export type stopSamplingReturnValue = {
9904 |     }
9905 |     /**
9906 |      * Retrieve native memory allocations profile
9907 | collected since renderer process startup.
9908 |      */
9909 |     export type getAllTimeSamplingProfileParameters = {
9910 |     }
9911 |     export type getAllTimeSamplingProfileReturnValue = {
9912 |       profile: SamplingProfile;
9913 |     }
9914 |     /**
9915 |      * Retrieve native memory allocations profile
9916 | collected since browser process startup.
9917 |      */
9918 |     export type getBrowserSamplingProfileParameters = {
9919 |     }
9920 |     export type getBrowserSamplingProfileReturnValue = {
9921 |       profile: SamplingProfile;
9922 |     }
9923 |     /**
9924 |      * Retrieve native memory allocations profile collected since last
9925 | `startSampling` call.
9926 |      */
9927 |     export type getSamplingProfileParameters = {
9928 |     }
9929 |     export type getSamplingProfileReturnValue = {
9930 |       profile: SamplingProfile;
9931 |     }
9932 |   }
9933 | 
9934 |   /**
9935 |    * Network domain allows tracking network activities of the page. It exposes information about http,
9936 | file, data and other requests and responses, their headers, bodies, timing, etc.
9937 |    */
9938 |   export namespace Network {
9939 |     /**
9940 |      * Resource type as it was perceived by the rendering engine.
9941 |      */
9942 |     export type ResourceType = "Document"|"Stylesheet"|"Image"|"Media"|"Font"|"Script"|"TextTrack"|"XHR"|"Fetch"|"Prefetch"|"EventSource"|"WebSocket"|"Manifest"|"SignedExchange"|"Ping"|"CSPViolationReport"|"Preflight"|"FedCM"|"Other";
9943 |     /**
9944 |      * Unique loader identifier.
9945 |      */
9946 |     export type LoaderId = string;
9947 |     /**
9948 |      * Unique network request identifier.
9949 | Note that this does not identify individual HTTP requests that are part of
9950 | a network request.
9951 |      */
9952 |     export type RequestId = string;
9953 |     /**
9954 |      * Unique intercepted request identifier.
9955 |      */
9956 |     export type InterceptionId = string;
9957 |     /**
9958 |      * Network level fetch failure reason.
9959 |      */
9960 |     export type ErrorReason = "Failed"|"Aborted"|"TimedOut"|"AccessDenied"|"ConnectionClosed"|"ConnectionReset"|"ConnectionRefused"|"ConnectionAborted"|"ConnectionFailed"|"NameNotResolved"|"InternetDisconnected"|"AddressUnreachable"|"BlockedByClient"|"BlockedByResponse";
9961 |     /**
9962 |      * UTC time in seconds, counted from January 1, 1970.
9963 |      */
9964 |     export type TimeSinceEpoch = number;
9965 |     /**
9966 |      * Monotonically increasing time in seconds since an arbitrary point in the past.
9967 |      */
9968 |     export type MonotonicTime = number;
9969 |     /**
9970 |      * Request / response headers as keys / values of JSON object.
9971 |      */
9972 |     export type Headers = { [key: string]: string };
9973 |     /**
9974 |      * The underlying connection technology that the browser is supposedly using.
9975 |      */
9976 |     export type ConnectionType = "none"|"cellular2g"|"cellular3g"|"cellular4g"|"bluetooth"|"ethernet"|"wifi"|"wimax"|"other";
9977 |     /**
9978 |      * Represents the cookie's 'SameSite' status:
9979 | https://tools.ietf.org/html/draft-west-first-party-cookies
9980 |      */
9981 |     export type CookieSameSite = "Strict"|"Lax"|"None";
9982 |     /**
9983 |      * Represents the cookie's 'Priority' status:
9984 | https://tools.ietf.org/html/draft-west-cookie-priority-00
9985 |      */
9986 |     export type CookiePriority = "Low"|"Medium"|"High";
9987 |     /**
9988 |      * Represents the source scheme of the origin that originally set the cookie.
9989 | A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme.
9990 | This is a temporary ability and it will be removed in the future.
9991 |      */
9992 |     export type CookieSourceScheme = "Unset"|"NonSecure"|"Secure";
9993 |     /**
9994 |      * Timing information for the request.
9995 |      */
9996 |     export interface ResourceTiming {
9997 |       /**
9998 |        * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
9999 | milliseconds relatively to this requestTime.
10000 |        */
10001 |       requestTime: number;
10002 |       /**
10003 |        * Started resolving proxy.
10004 |        */
10005 |       proxyStart: number;
10006 |       /**
10007 |        * Finished resolving proxy.
10008 |        */
10009 |       proxyEnd: number;
10010 |       /**
10011 |        * Started DNS address resolve.
10012 |        */
10013 |       dnsStart: number;
10014 |       /**
10015 |        * Finished DNS address resolve.
10016 |        */
10017 |       dnsEnd: number;
10018 |       /**
10019 |        * Started connecting to the remote host.
10020 |        */
10021 |       connectStart: number;
10022 |       /**
10023 |        * Connected to the remote host.
10024 |        */
10025 |       connectEnd: number;
10026 |       /**
10027 |        * Started SSL handshake.
10028 |        */
10029 |       sslStart: number;
10030 |       /**
10031 |        * Finished SSL handshake.
10032 |        */
10033 |       sslEnd: number;
10034 |       /**
10035 |        * Started running ServiceWorker.
10036 |        */
10037 |       workerStart: number;
10038 |       /**
10039 |        * Finished Starting ServiceWorker.
10040 |        */
10041 |       workerReady: number;
10042 |       /**
10043 |        * Started fetch event.
10044 |        */
10045 |       workerFetchStart: number;
10046 |       /**
10047 |        * Settled fetch event respondWith promise.
10048 |        */
10049 |       workerRespondWithSettled: number;
10050 |       /**
10051 |        * Started ServiceWorker static routing source evaluation.
10052 |        */
10053 |       workerRouterEvaluationStart?: number;
10054 |       /**
10055 |        * Started cache lookup when the source was evaluated to `cache`.
10056 |        */
10057 |       workerCacheLookupStart?: number;
10058 |       /**
10059 |        * Started sending request.
10060 |        */
10061 |       sendStart: number;
10062 |       /**
10063 |        * Finished sending request.
10064 |        */
10065 |       sendEnd: number;
10066 |       /**
10067 |        * Time the server started pushing request.
10068 |        */
10069 |       pushStart: number;
10070 |       /**
10071 |        * Time the server finished pushing request.
10072 |        */
10073 |       pushEnd: number;
10074 |       /**
10075 |        * Started receiving response headers.
10076 |        */
10077 |       receiveHeadersStart: number;
10078 |       /**
10079 |        * Finished receiving response headers.
10080 |        */
10081 |       receiveHeadersEnd: number;
10082 |     }
10083 |     /**
10084 |      * Loading priority of a resource request.
10085 |      */
10086 |     export type ResourcePriority = "VeryLow"|"Low"|"Medium"|"High"|"VeryHigh";
10087 |     /**
10088 |      * The render blocking behavior of a resource request.
10089 |      */
10090 |     export type RenderBlockingBehavior = "Blocking"|"InBodyParserBlocking"|"NonBlocking"|"NonBlockingDynamic"|"PotentiallyBlocking";
10091 |     /**
10092 |      * Post data entry for HTTP request
10093 |      */
10094 |     export interface PostDataEntry {
10095 |       bytes?: binary;
10096 |     }
10097 |     /**
10098 |      * HTTP request data.
10099 |      */
10100 |     export interface Request {
10101 |       /**
10102 |        * Request URL (without fragment).
10103 |        */
10104 |       url: string;
10105 |       /**
10106 |        * Fragment of the requested URL starting with hash, if present.
10107 |        */
10108 |       urlFragment?: string;
10109 |       /**
10110 |        * HTTP request method.
10111 |        */
10112 |       method: string;
10113 |       /**
10114 |        * HTTP request headers.
10115 |        */
10116 |       headers: Headers;
10117 |       /**
10118 |        * HTTP POST request data.
10119 | Use postDataEntries instead.
10120 |        */
10121 |       postData?: string;
10122 |       /**
10123 |        * True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
10124 |        */
10125 |       hasPostData?: boolean;
10126 |       /**
10127 |        * Request body elements (post data broken into individual entries).
10128 |        */
10129 |       postDataEntries?: PostDataEntry[];
10130 |       /**
10131 |        * The mixed content type of the request.
10132 |        */
10133 |       mixedContentType?: Security.MixedContentType;
10134 |       /**
10135 |        * Priority of the resource request at the time request is sent.
10136 |        */
10137 |       initialPriority: ResourcePriority;
10138 |       /**
10139 |        * The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
10140 |        */
10141 |       referrerPolicy: "unsafe-url"|"no-referrer-when-downgrade"|"no-referrer"|"origin"|"origin-when-cross-origin"|"same-origin"|"strict-origin"|"strict-origin-when-cross-origin";
10142 |       /**
10143 |        * Whether is loaded via link preload.
10144 |        */
10145 |       isLinkPreload?: boolean;
10146 |       /**
10147 |        * Set for requests when the TrustToken API is used. Contains the parameters
10148 | passed by the developer (e.g. via "fetch") as understood by the backend.
10149 |        */
10150 |       trustTokenParams?: TrustTokenParams;
10151 |       /**
10152 |        * True if this resource request is considered to be the 'same site' as the
10153 | request corresponding to the main frame.
10154 |        */
10155 |       isSameSite?: boolean;
10156 |       /**
10157 |        * True when the resource request is ad-related.
10158 |        */
10159 |       isAdRelated?: boolean;
10160 |     }
10161 |     /**
10162 |      * Details of a signed certificate timestamp (SCT).
10163 |      */
10164 |     export interface SignedCertificateTimestamp {
10165 |       /**
10166 |        * Validation status.
10167 |        */
10168 |       status: string;
10169 |       /**
10170 |        * Origin.
10171 |        */
10172 |       origin: string;
10173 |       /**
10174 |        * Log name / description.
10175 |        */
10176 |       logDescription: string;
10177 |       /**
10178 |        * Log ID.
10179 |        */
10180 |       logId: string;
10181 |       /**
10182 |        * Issuance date. Unlike TimeSinceEpoch, this contains the number of
10183 | milliseconds since January 1, 1970, UTC, not the number of seconds.
10184 |        */
10185 |       timestamp: number;
10186 |       /**
10187 |        * Hash algorithm.
10188 |        */
10189 |       hashAlgorithm: string;
10190 |       /**
10191 |        * Signature algorithm.
10192 |        */
10193 |       signatureAlgorithm: string;
10194 |       /**
10195 |        * Signature data.
10196 |        */
10197 |       signatureData: string;
10198 |     }
10199 |     /**
10200 |      * Security details about a request.
10201 |      */
10202 |     export interface SecurityDetails {
10203 |       /**
10204 |        * Protocol name (e.g. "TLS 1.2" or "QUIC").
10205 |        */
10206 |       protocol: string;
10207 |       /**
10208 |        * Key Exchange used by the connection, or the empty string if not applicable.
10209 |        */
10210 |       keyExchange: string;
10211 |       /**
10212 |        * (EC)DH group used by the connection, if applicable.
10213 |        */
10214 |       keyExchangeGroup?: string;
10215 |       /**
10216 |        * Cipher name.
10217 |        */
10218 |       cipher: string;
10219 |       /**
10220 |        * TLS MAC. Note that AEAD ciphers do not have separate MACs.
10221 |        */
10222 |       mac?: string;
10223 |       /**
10224 |        * Certificate ID value.
10225 |        */
10226 |       certificateId: Security.CertificateId;
10227 |       /**
10228 |        * Certificate subject name.
10229 |        */
10230 |       subjectName: string;
10231 |       /**
10232 |        * Subject Alternative Name (SAN) DNS names and IP addresses.
10233 |        */
10234 |       sanList: string[];
10235 |       /**
10236 |        * Name of the issuing CA.
10237 |        */
10238 |       issuer: string;
10239 |       /**
10240 |        * Certificate valid from date.
10241 |        */
10242 |       validFrom: TimeSinceEpoch;
10243 |       /**
10244 |        * Certificate valid to (expiration) date
10245 |        */
10246 |       validTo: TimeSinceEpoch;
10247 |       /**
10248 |        * List of signed certificate timestamps (SCTs).
10249 |        */
10250 |       signedCertificateTimestampList: SignedCertificateTimestamp[];
10251 |       /**
10252 |        * Whether the request complied with Certificate Transparency policy
10253 |        */
10254 |       certificateTransparencyCompliance: CertificateTransparencyCompliance;
10255 |       /**
10256 |        * The signature algorithm used by the server in the TLS server signature,
10257 | represented as a TLS SignatureScheme code point. Omitted if not
10258 | applicable or not known.
10259 |        */
10260 |       serverSignatureAlgorithm?: number;
10261 |       /**
10262 |        * Whether the connection used Encrypted ClientHello
10263 |        */
10264 |       encryptedClientHello: boolean;
10265 |     }
10266 |     /**
10267 |      * Whether the request complied with Certificate Transparency policy.
10268 |      */
10269 |     export type CertificateTransparencyCompliance = "unknown"|"not-compliant"|"compliant";
10270 |     /**
10271 |      * The reason why request was blocked.
10272 |      */
10273 |     export type BlockedReason = "other"|"csp"|"mixed-content"|"origin"|"inspector"|"integrity"|"subresource-filter"|"content-type"|"coep-frame-resource-needs-coep-header"|"coop-sandboxed-iframe-cannot-navigate-to-coop-page"|"corp-not-same-origin"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep"|"corp-not-same-origin-after-defaulted-to-same-origin-by-dip"|"corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip"|"corp-not-same-site"|"sri-message-signature-mismatch";
10274 |     /**
10275 |      * The reason why request was blocked.
10276 |      */
10277 |     export type CorsError = "DisallowedByMode"|"InvalidResponse"|"WildcardOriginNotAllowed"|"MissingAllowOriginHeader"|"MultipleAllowOriginValues"|"InvalidAllowOriginValue"|"AllowOriginMismatch"|"InvalidAllowCredentials"|"CorsDisabledScheme"|"PreflightInvalidStatus"|"PreflightDisallowedRedirect"|"PreflightWildcardOriginNotAllowed"|"PreflightMissingAllowOriginHeader"|"PreflightMultipleAllowOriginValues"|"PreflightInvalidAllowOriginValue"|"PreflightAllowOriginMismatch"|"PreflightInvalidAllowCredentials"|"PreflightMissingAllowExternal"|"PreflightInvalidAllowExternal"|"PreflightMissingAllowPrivateNetwork"|"PreflightInvalidAllowPrivateNetwork"|"InvalidAllowMethodsPreflightResponse"|"InvalidAllowHeadersPreflightResponse"|"MethodDisallowedByPreflightResponse"|"HeaderDisallowedByPreflightResponse"|"RedirectContainsCredentials"|"InsecurePrivateNetwork"|"InvalidPrivateNetworkAccess"|"UnexpectedPrivateNetworkAccess"|"NoCorsRedirectModeNotFollow"|"PreflightMissingPrivateNetworkAccessId"|"PreflightMissingPrivateNetworkAccessName"|"PrivateNetworkAccessPermissionUnavailable"|"PrivateNetworkAccessPermissionDenied"|"LocalNetworkAccessPermissionDenied";
10278 |     export interface CorsErrorStatus {
10279 |       corsError: CorsError;
10280 |       failedParameter: string;
10281 |     }
10282 |     /**
10283 |      * Source of serviceworker response.
10284 |      */
10285 |     export type ServiceWorkerResponseSource = "cache-storage"|"http-cache"|"fallback-code"|"network";
10286 |     /**
10287 |      * Determines what type of Trust Token operation is executed and
10288 | depending on the type, some additional parameters. The values
10289 | are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
10290 |      */
10291 |     export interface TrustTokenParams {
10292 |       operation: TrustTokenOperationType;
10293 |       /**
10294 |        * Only set for "token-redemption" operation and determine whether
10295 | to request a fresh SRR or use a still valid cached SRR.
10296 |        */
10297 |       refreshPolicy: "UseCached"|"Refresh";
10298 |       /**
10299 |        * Origins of issuers from whom to request tokens or redemption
10300 | records.
10301 |        */
10302 |       issuers?: string[];
10303 |     }
10304 |     export type TrustTokenOperationType = "Issuance"|"Redemption"|"Signing";
10305 |     /**
10306 |      * The reason why Chrome uses a specific transport protocol for HTTP semantics.
10307 |      */
10308 |     export type AlternateProtocolUsage = "alternativeJobWonWithoutRace"|"alternativeJobWonRace"|"mainJobWonRace"|"mappingMissing"|"broken"|"dnsAlpnH3JobWonWithoutRace"|"dnsAlpnH3JobWonRace"|"unspecifiedReason";
10309 |     /**
10310 |      * Source of service worker router.
10311 |      */
10312 |     export type ServiceWorkerRouterSource = "network"|"cache"|"fetch-event"|"race-network-and-fetch-handler"|"race-network-and-cache";
10313 |     export interface ServiceWorkerRouterInfo {
10314 |       /**
10315 |        * ID of the rule matched. If there is a matched rule, this field will
10316 | be set, otherwiser no value will be set.
10317 |        */
10318 |       ruleIdMatched?: number;
10319 |       /**
10320 |        * The router source of the matched rule. If there is a matched rule, this
10321 | field will be set, otherwise no value will be set.
10322 |        */
10323 |       matchedSourceType?: ServiceWorkerRouterSource;
10324 |       /**
10325 |        * The actual router source used.
10326 |        */
10327 |       actualSourceType?: ServiceWorkerRouterSource;
10328 |     }
10329 |     /**
10330 |      * HTTP response data.
10331 |      */
10332 |     export interface Response {
10333 |       /**
10334 |        * Response URL. This URL can be different from CachedResource.url in case of redirect.
10335 |        */
10336 |       url: string;
10337 |       /**
10338 |        * HTTP response status code.
10339 |        */
10340 |       status: number;
10341 |       /**
10342 |        * HTTP response status text.
10343 |        */
10344 |       statusText: string;
10345 |       /**
10346 |        * HTTP response headers.
10347 |        */
10348 |       headers: Headers;
10349 |       /**
10350 |        * HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
10351 |        */
10352 |       headersText?: string;
10353 |       /**
10354 |        * Resource mimeType as determined by the browser.
10355 |        */
10356 |       mimeType: string;
10357 |       /**
10358 |        * Resource charset as determined by the browser (if applicable).
10359 |        */
10360 |       charset: string;
10361 |       /**
10362 |        * Refined HTTP request headers that were actually transmitted over the network.
10363 |        */
10364 |       requestHeaders?: Headers;
10365 |       /**
10366 |        * HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
10367 |        */
10368 |       requestHeadersText?: string;
10369 |       /**
10370 |        * Specifies whether physical connection was actually reused for this request.
10371 |        */
10372 |       connectionReused: boolean;
10373 |       /**
10374 |        * Physical connection id that was actually used for this request.
10375 |        */
10376 |       connectionId: number;
10377 |       /**
10378 |        * Remote IP address.
10379 |        */
10380 |       remoteIPAddress?: string;
10381 |       /**
10382 |        * Remote port.
10383 |        */
10384 |       remotePort?: number;
10385 |       /**
10386 |        * Specifies that the request was served from the disk cache.
10387 |        */
10388 |       fromDiskCache?: boolean;
10389 |       /**
10390 |        * Specifies that the request was served from the ServiceWorker.
10391 |        */
10392 |       fromServiceWorker?: boolean;
10393 |       /**
10394 |        * Specifies that the request was served from the prefetch cache.
10395 |        */
10396 |       fromPrefetchCache?: boolean;
10397 |       /**
10398 |        * Specifies that the request was served from the prefetch cache.
10399 |        */
10400 |       fromEarlyHints?: boolean;
10401 |       /**
10402 |        * Information about how ServiceWorker Static Router API was used. If this
10403 | field is set with `matchedSourceType` field, a matching rule is found.
10404 | If this field is set without `matchedSource`, no matching rule is found.
10405 | Otherwise, the API is not used.
10406 |        */
10407 |       serviceWorkerRouterInfo?: ServiceWorkerRouterInfo;
10408 |       /**
10409 |        * Total number of bytes received for this request so far.
10410 |        */
10411 |       encodedDataLength: number;
10412 |       /**
10413 |        * Timing information for the given request.
10414 |        */
10415 |       timing?: ResourceTiming;
10416 |       /**
10417 |        * Response source of response from ServiceWorker.
10418 |        */
10419 |       serviceWorkerResponseSource?: ServiceWorkerResponseSource;
10420 |       /**
10421 |        * The time at which the returned response was generated.
10422 |        */
10423 |       responseTime?: TimeSinceEpoch;
10424 |       /**
10425 |        * Cache Storage Cache Name.
10426 |        */
10427 |       cacheStorageCacheName?: string;
10428 |       /**
10429 |        * Protocol used to fetch this request.
10430 |        */
10431 |       protocol?: string;
10432 |       /**
10433 |        * The reason why Chrome uses a specific transport protocol for HTTP semantics.
10434 |        */
10435 |       alternateProtocolUsage?: AlternateProtocolUsage;
10436 |       /**
10437 |        * Security state of the request resource.
10438 |        */
10439 |       securityState: Security.SecurityState;
10440 |       /**
10441 |        * Security details for the request.
10442 |        */
10443 |       securityDetails?: SecurityDetails;
10444 |     }
10445 |     /**
10446 |      * WebSocket request data.
10447 |      */
10448 |     export interface WebSocketRequest {
10449 |       /**
10450 |        * HTTP request headers.
10451 |        */
10452 |       headers: Headers;
10453 |     }
10454 |     /**
10455 |      * WebSocket response data.
10456 |      */
10457 |     export interface WebSocketResponse {
10458 |       /**
10459 |        * HTTP response status code.
10460 |        */
10461 |       status: number;
10462 |       /**
10463 |        * HTTP response status text.
10464 |        */
10465 |       statusText: string;
10466 |       /**
10467 |        * HTTP response headers.
10468 |        */
10469 |       headers: Headers;
10470 |       /**
10471 |        * HTTP response headers text.
10472 |        */
10473 |       headersText?: string;
10474 |       /**
10475 |        * HTTP request headers.
10476 |        */
10477 |       requestHeaders?: Headers;
10478 |       /**
10479 |        * HTTP request headers text.
10480 |        */
10481 |       requestHeadersText?: string;
10482 |     }
10483 |     /**
10484 |      * WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
10485 |      */
10486 |     export interface WebSocketFrame {
10487 |       /**
10488 |        * WebSocket message opcode.
10489 |        */
10490 |       opcode: number;
10491 |       /**
10492 |        * WebSocket message mask.
10493 |        */
10494 |       mask: boolean;
10495 |       /**
10496 |        * WebSocket message payload data.
10497 | If the opcode is 1, this is a text message and payloadData is a UTF-8 string.
10498 | If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
10499 |        */
10500 |       payloadData: string;
10501 |     }
10502 |     /**
10503 |      * Information about the cached resource.
10504 |      */
10505 |     export interface CachedResource {
10506 |       /**
10507 |        * Resource URL. This is the url of the original network request.
10508 |        */
10509 |       url: string;
10510 |       /**
10511 |        * Type of this resource.
10512 |        */
10513 |       type: ResourceType;
10514 |       /**
10515 |        * Cached response data.
10516 |        */
10517 |       response?: Response;
10518 |       /**
10519 |        * Cached response body size.
10520 |        */
10521 |       bodySize: number;
10522 |     }
10523 |     /**
10524 |      * Information about the request initiator.
10525 |      */
10526 |     export interface Initiator {
10527 |       /**
10528 |        * Type of this initiator.
10529 |        */
10530 |       type: "parser"|"script"|"preload"|"SignedExchange"|"preflight"|"FedCM"|"other";
10531 |       /**
10532 |        * Initiator JavaScript stack trace, set for Script only.
10533 | Requires the Debugger domain to be enabled.
10534 |        */
10535 |       stack?: Runtime.StackTrace;
10536 |       /**
10537 |        * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
10538 |        */
10539 |       url?: string;
10540 |       /**
10541 |        * Initiator line number, set for Parser type or for Script type (when script is importing
10542 | module) (0-based).
10543 |        */
10544 |       lineNumber?: number;
10545 |       /**
10546 |        * Initiator column number, set for Parser type or for Script type (when script is importing
10547 | module) (0-based).
10548 |        */
10549 |       columnNumber?: number;
10550 |       /**
10551 |        * Set if another request triggered this request (e.g. preflight).
10552 |        */
10553 |       requestId?: RequestId;
10554 |     }
10555 |     /**
10556 |      * cookiePartitionKey object
10557 | The representation of the components of the key that are created by the cookiePartitionKey class contained in net/cookies/cookie_partition_key.h.
10558 |      */
10559 |     export interface CookiePartitionKey {
10560 |       /**
10561 |        * The site of the top-level URL the browser was visiting at the start
10562 | of the request to the endpoint that set the cookie.
10563 |        */
10564 |       topLevelSite: string;
10565 |       /**
10566 |        * Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.
10567 |        */
10568 |       hasCrossSiteAncestor: boolean;
10569 |     }
10570 |     /**
10571 |      * Cookie object
10572 |      */
10573 |     export interface Cookie {
10574 |       /**
10575 |        * Cookie name.
10576 |        */
10577 |       name: string;
10578 |       /**
10579 |        * Cookie value.
10580 |        */
10581 |       value: string;
10582 |       /**
10583 |        * Cookie domain.
10584 |        */
10585 |       domain: string;
10586 |       /**
10587 |        * Cookie path.
10588 |        */
10589 |       path: string;
10590 |       /**
10591 |        * Cookie expiration date as the number of seconds since the UNIX epoch.
10592 | The value is set to -1 if the expiry date is not set.
10593 | The value can be null for values that cannot be represented in
10594 | JSON (±Inf).
10595 |        */
10596 |       expires: number;
10597 |       /**
10598 |        * Cookie size.
10599 |        */
10600 |       size: number;
10601 |       /**
10602 |        * True if cookie is http-only.
10603 |        */
10604 |       httpOnly: boolean;
10605 |       /**
10606 |        * True if cookie is secure.
10607 |        */
10608 |       secure: boolean;
10609 |       /**
10610 |        * True in case of session cookie.
10611 |        */
10612 |       session: boolean;
10613 |       /**
10614 |        * Cookie SameSite type.
10615 |        */
10616 |       sameSite?: CookieSameSite;
10617 |       /**
10618 |        * Cookie Priority
10619 |        */
10620 |       priority: CookiePriority;
10621 |       /**
10622 |        * True if cookie is SameParty.
10623 |        */
10624 |       sameParty: boolean;
10625 |       /**
10626 |        * Cookie source scheme type.
10627 |        */
10628 |       sourceScheme: CookieSourceScheme;
10629 |       /**
10630 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
10631 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
10632 | This is a temporary ability and it will be removed in the future.
10633 |        */
10634 |       sourcePort: number;
10635 |       /**
10636 |        * Cookie partition key.
10637 |        */
10638 |       partitionKey?: CookiePartitionKey;
10639 |       /**
10640 |        * True if cookie partition key is opaque.
10641 |        */
10642 |       partitionKeyOpaque?: boolean;
10643 |     }
10644 |     /**
10645 |      * Types of reasons why a cookie may not be stored from a response.
10646 |      */
10647 |     export type SetCookieBlockedReason = "SecureOnly"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"ThirdPartyPhaseout"|"ThirdPartyBlockedInFirstPartySet"|"SyntaxError"|"SchemeNotSupported"|"OverwriteSecure"|"InvalidDomain"|"InvalidPrefix"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"|"SamePartyConflictsWithOtherAttributes"|"NameValuePairExceedsMaxSize"|"DisallowedCharacter"|"NoCookieContent";
10648 |     /**
10649 |      * Types of reasons why a cookie may not be sent with a request.
10650 |      */
10651 |     export type CookieBlockedReason = "SecureOnly"|"NotOnPath"|"DomainMismatch"|"SameSiteStrict"|"SameSiteLax"|"SameSiteUnspecifiedTreatedAsLax"|"SameSiteNoneInsecure"|"UserPreferences"|"ThirdPartyPhaseout"|"ThirdPartyBlockedInFirstPartySet"|"UnknownError"|"SchemefulSameSiteStrict"|"SchemefulSameSiteLax"|"SchemefulSameSiteUnspecifiedTreatedAsLax"|"SamePartyFromCrossPartyContext"|"NameValuePairExceedsMaxSize"|"PortMismatch"|"SchemeMismatch"|"AnonymousContext";
10652 |     /**
10653 |      * Types of reasons why a cookie should have been blocked by 3PCD but is exempted for the request.
10654 |      */
10655 |     export type CookieExemptionReason = "None"|"UserSetting"|"TPCDMetadata"|"TPCDDeprecationTrial"|"TopLevelTPCDDeprecationTrial"|"TPCDHeuristics"|"EnterprisePolicy"|"StorageAccess"|"TopLevelStorageAccess"|"Scheme"|"SameSiteNoneCookiesInSandbox";
10656 |     /**
10657 |      * A cookie which was not stored from a response with the corresponding reason.
10658 |      */
10659 |     export interface BlockedSetCookieWithReason {
10660 |       /**
10661 |        * The reason(s) this cookie was blocked.
10662 |        */
10663 |       blockedReasons: SetCookieBlockedReason[];
10664 |       /**
10665 |        * The string representing this individual cookie as it would appear in the header.
10666 | This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
10667 |        */
10668 |       cookieLine: string;
10669 |       /**
10670 |        * The cookie object which represents the cookie which was not stored. It is optional because
10671 | sometimes complete cookie information is not available, such as in the case of parsing
10672 | errors.
10673 |        */
10674 |       cookie?: Cookie;
10675 |     }
10676 |     /**
10677 |      * A cookie should have been blocked by 3PCD but is exempted and stored from a response with the
10678 | corresponding reason. A cookie could only have at most one exemption reason.
10679 |      */
10680 |     export interface ExemptedSetCookieWithReason {
10681 |       /**
10682 |        * The reason the cookie was exempted.
10683 |        */
10684 |       exemptionReason: CookieExemptionReason;
10685 |       /**
10686 |        * The string representing this individual cookie as it would appear in the header.
10687 |        */
10688 |       cookieLine: string;
10689 |       /**
10690 |        * The cookie object representing the cookie.
10691 |        */
10692 |       cookie: Cookie;
10693 |     }
10694 |     /**
10695 |      * A cookie associated with the request which may or may not be sent with it.
10696 | Includes the cookies itself and reasons for blocking or exemption.
10697 |      */
10698 |     export interface AssociatedCookie {
10699 |       /**
10700 |        * The cookie object representing the cookie which was not sent.
10701 |        */
10702 |       cookie: Cookie;
10703 |       /**
10704 |        * The reason(s) the cookie was blocked. If empty means the cookie is included.
10705 |        */
10706 |       blockedReasons: CookieBlockedReason[];
10707 |       /**
10708 |        * The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could
10709 | only have at most one exemption reason.
10710 |        */
10711 |       exemptionReason?: CookieExemptionReason;
10712 |     }
10713 |     /**
10714 |      * Cookie parameter object
10715 |      */
10716 |     export interface CookieParam {
10717 |       /**
10718 |        * Cookie name.
10719 |        */
10720 |       name: string;
10721 |       /**
10722 |        * Cookie value.
10723 |        */
10724 |       value: string;
10725 |       /**
10726 |        * The request-URI to associate with the setting of the cookie. This value can affect the
10727 | default domain, path, source port, and source scheme values of the created cookie.
10728 |        */
10729 |       url?: string;
10730 |       /**
10731 |        * Cookie domain.
10732 |        */
10733 |       domain?: string;
10734 |       /**
10735 |        * Cookie path.
10736 |        */
10737 |       path?: string;
10738 |       /**
10739 |        * True if cookie is secure.
10740 |        */
10741 |       secure?: boolean;
10742 |       /**
10743 |        * True if cookie is http-only.
10744 |        */
10745 |       httpOnly?: boolean;
10746 |       /**
10747 |        * Cookie SameSite type.
10748 |        */
10749 |       sameSite?: CookieSameSite;
10750 |       /**
10751 |        * Cookie expiration date, session cookie if not set
10752 |        */
10753 |       expires?: TimeSinceEpoch;
10754 |       /**
10755 |        * Cookie Priority.
10756 |        */
10757 |       priority?: CookiePriority;
10758 |       /**
10759 |        * True if cookie is SameParty.
10760 |        */
10761 |       sameParty?: boolean;
10762 |       /**
10763 |        * Cookie source scheme type.
10764 |        */
10765 |       sourceScheme?: CookieSourceScheme;
10766 |       /**
10767 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
10768 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
10769 | This is a temporary ability and it will be removed in the future.
10770 |        */
10771 |       sourcePort?: number;
10772 |       /**
10773 |        * Cookie partition key. If not set, the cookie will be set as not partitioned.
10774 |        */
10775 |       partitionKey?: CookiePartitionKey;
10776 |     }
10777 |     /**
10778 |      * Authorization challenge for HTTP status code 401 or 407.
10779 |      */
10780 |     export interface AuthChallenge {
10781 |       /**
10782 |        * Source of the authentication challenge.
10783 |        */
10784 |       source?: "Server"|"Proxy";
10785 |       /**
10786 |        * Origin of the challenger.
10787 |        */
10788 |       origin: string;
10789 |       /**
10790 |        * The authentication scheme used, such as basic or digest
10791 |        */
10792 |       scheme: string;
10793 |       /**
10794 |        * The realm of the challenge. May be empty.
10795 |        */
10796 |       realm: string;
10797 |     }
10798 |     /**
10799 |      * Response to an AuthChallenge.
10800 |      */
10801 |     export interface AuthChallengeResponse {
10802 |       /**
10803 |        * The decision on what to do in response to the authorization challenge.  Default means
10804 | deferring to the default behavior of the net stack, which will likely either the Cancel
10805 | authentication or display a popup dialog box.
10806 |        */
10807 |       response: "Default"|"CancelAuth"|"ProvideCredentials";
10808 |       /**
10809 |        * The username to provide, possibly empty. Should only be set if response is
10810 | ProvideCredentials.
10811 |        */
10812 |       username?: string;
10813 |       /**
10814 |        * The password to provide, possibly empty. Should only be set if response is
10815 | ProvideCredentials.
10816 |        */
10817 |       password?: string;
10818 |     }
10819 |     /**
10820 |      * Stages of the interception to begin intercepting. Request will intercept before the request is
10821 | sent. Response will intercept after the response is received.
10822 |      */
10823 |     export type InterceptionStage = "Request"|"HeadersReceived";
10824 |     /**
10825 |      * Request pattern for interception.
10826 |      */
10827 |     export interface RequestPattern {
10828 |       /**
10829 |        * Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is
10830 | backslash. Omitting is equivalent to `"*"`.
10831 |        */
10832 |       urlPattern?: string;
10833 |       /**
10834 |        * If set, only requests for matching resource types will be intercepted.
10835 |        */
10836 |       resourceType?: ResourceType;
10837 |       /**
10838 |        * Stage at which to begin intercepting requests. Default is Request.
10839 |        */
10840 |       interceptionStage?: InterceptionStage;
10841 |     }
10842 |     /**
10843 |      * Information about a signed exchange signature.
10844 | https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
10845 |      */
10846 |     export interface SignedExchangeSignature {
10847 |       /**
10848 |        * Signed exchange signature label.
10849 |        */
10850 |       label: string;
10851 |       /**
10852 |        * The hex string of signed exchange signature.
10853 |        */
10854 |       signature: string;
10855 |       /**
10856 |        * Signed exchange signature integrity.
10857 |        */
10858 |       integrity: string;
10859 |       /**
10860 |        * Signed exchange signature cert Url.
10861 |        */
10862 |       certUrl?: string;
10863 |       /**
10864 |        * The hex string of signed exchange signature cert sha256.
10865 |        */
10866 |       certSha256?: string;
10867 |       /**
10868 |        * Signed exchange signature validity Url.
10869 |        */
10870 |       validityUrl: string;
10871 |       /**
10872 |        * Signed exchange signature date.
10873 |        */
10874 |       date: number;
10875 |       /**
10876 |        * Signed exchange signature expires.
10877 |        */
10878 |       expires: number;
10879 |       /**
10880 |        * The encoded certificates.
10881 |        */
10882 |       certificates?: string[];
10883 |     }
10884 |     /**
10885 |      * Information about a signed exchange header.
10886 | https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
10887 |      */
10888 |     export interface SignedExchangeHeader {
10889 |       /**
10890 |        * Signed exchange request URL.
10891 |        */
10892 |       requestUrl: string;
10893 |       /**
10894 |        * Signed exchange response code.
10895 |        */
10896 |       responseCode: number;
10897 |       /**
10898 |        * Signed exchange response headers.
10899 |        */
10900 |       responseHeaders: Headers;
10901 |       /**
10902 |        * Signed exchange response signature.
10903 |        */
10904 |       signatures: SignedExchangeSignature[];
10905 |       /**
10906 |        * Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.
10907 |        */
10908 |       headerIntegrity: string;
10909 |     }
10910 |     /**
10911 |      * Field type for a signed exchange related error.
10912 |      */
10913 |     export type SignedExchangeErrorField = "signatureSig"|"signatureIntegrity"|"signatureCertUrl"|"signatureCertSha256"|"signatureValidityUrl"|"signatureTimestamps";
10914 |     /**
10915 |      * Information about a signed exchange response.
10916 |      */
10917 |     export interface SignedExchangeError {
10918 |       /**
10919 |        * Error message.
10920 |        */
10921 |       message: string;
10922 |       /**
10923 |        * The index of the signature which caused the error.
10924 |        */
10925 |       signatureIndex?: number;
10926 |       /**
10927 |        * The field which caused the error.
10928 |        */
10929 |       errorField?: SignedExchangeErrorField;
10930 |     }
10931 |     /**
10932 |      * Information about a signed exchange response.
10933 |      */
10934 |     export interface SignedExchangeInfo {
10935 |       /**
10936 |        * The outer response of signed HTTP exchange which was received from network.
10937 |        */
10938 |       outerResponse: Response;
10939 |       /**
10940 |        * Whether network response for the signed exchange was accompanied by
10941 | extra headers.
10942 |        */
10943 |       hasExtraInfo: boolean;
10944 |       /**
10945 |        * Information about the signed exchange header.
10946 |        */
10947 |       header?: SignedExchangeHeader;
10948 |       /**
10949 |        * Security details for the signed exchange header.
10950 |        */
10951 |       securityDetails?: SecurityDetails;
10952 |       /**
10953 |        * Errors occurred while handling the signed exchange.
10954 |        */
10955 |       errors?: SignedExchangeError[];
10956 |     }
10957 |     /**
10958 |      * List of content encodings supported by the backend.
10959 |      */
10960 |     export type ContentEncoding = "deflate"|"gzip"|"br"|"zstd";
10961 |     export interface NetworkConditions {
10962 |       /**
10963 |        * Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string
10964 | syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are
10965 | matched (including p2p connections).
10966 |        */
10967 |       urlPattern: string;
10968 |       /**
10969 |        * Minimum latency from request sent to response headers received (ms).
10970 |        */
10971 |       latency: number;
10972 |       /**
10973 |        * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
10974 |        */
10975 |       downloadThroughput: number;
10976 |       /**
10977 |        * Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
10978 |        */
10979 |       uploadThroughput: number;
10980 |       /**
10981 |        * Connection type if known.
10982 |        */
10983 |       connectionType?: ConnectionType;
10984 |       /**
10985 |        * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
10986 |        */
10987 |       packetLoss?: number;
10988 |       /**
10989 |        * WebRTC packet queue length (packet). 0 removes any queue length limitations.
10990 |        */
10991 |       packetQueueLength?: number;
10992 |       /**
10993 |        * WebRTC packetReordering feature.
10994 |        */
10995 |       packetReordering?: boolean;
10996 |     }
10997 |     export interface BlockPattern {
10998 |       /**
10999 |        * URL pattern to match. Patterns use the URLPattern constructor string syntax
11000 | (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `<example>`.
11001 |        */
11002 |       urlPattern: string;
11003 |       /**
11004 |        * Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later
11005 | `BlockPattern`.
11006 |        */
11007 |       block: boolean;
11008 |     }
11009 |     export type DirectSocketDnsQueryType = "ipv4"|"ipv6";
11010 |     export interface DirectTCPSocketOptions {
11011 |       /**
11012 |        * TCP_NODELAY option
11013 |        */
11014 |       noDelay: boolean;
11015 |       /**
11016 |        * Expected to be unsigned integer.
11017 |        */
11018 |       keepAliveDelay?: number;
11019 |       /**
11020 |        * Expected to be unsigned integer.
11021 |        */
11022 |       sendBufferSize?: number;
11023 |       /**
11024 |        * Expected to be unsigned integer.
11025 |        */
11026 |       receiveBufferSize?: number;
11027 |       dnsQueryType?: DirectSocketDnsQueryType;
11028 |     }
11029 |     export interface DirectUDPSocketOptions {
11030 |       remoteAddr?: string;
11031 |       /**
11032 |        * Unsigned int 16.
11033 |        */
11034 |       remotePort?: number;
11035 |       localAddr?: string;
11036 |       /**
11037 |        * Unsigned int 16.
11038 |        */
11039 |       localPort?: number;
11040 |       dnsQueryType?: DirectSocketDnsQueryType;
11041 |       /**
11042 |        * Expected to be unsigned integer.
11043 |        */
11044 |       sendBufferSize?: number;
11045 |       /**
11046 |        * Expected to be unsigned integer.
11047 |        */
11048 |       receiveBufferSize?: number;
11049 |       multicastLoopback?: boolean;
11050 |       /**
11051 |        * Unsigned int 8.
11052 |        */
11053 |       multicastTimeToLive?: number;
11054 |       multicastAllowAddressSharing?: boolean;
11055 |     }
11056 |     export interface DirectUDPMessage {
11057 |       data: binary;
11058 |       /**
11059 |        * Null for connected mode.
11060 |        */
11061 |       remoteAddr?: string;
11062 |       /**
11063 |        * Null for connected mode.
11064 | Expected to be unsigned integer.
11065 |        */
11066 |       remotePort?: number;
11067 |     }
11068 |     export type PrivateNetworkRequestPolicy = "Allow"|"BlockFromInsecureToMorePrivate"|"WarnFromInsecureToMorePrivate"|"PermissionBlock"|"PermissionWarn";
11069 |     export type IPAddressSpace = "Loopback"|"Local"|"Public"|"Unknown";
11070 |     export interface ConnectTiming {
11071 |       /**
11072 |        * Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
11073 | milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for
11074 | the same request (but not for redirected requests).
11075 |        */
11076 |       requestTime: number;
11077 |     }
11078 |     export interface ClientSecurityState {
11079 |       initiatorIsSecureContext: boolean;
11080 |       initiatorIPAddressSpace: IPAddressSpace;
11081 |       privateNetworkRequestPolicy: PrivateNetworkRequestPolicy;
11082 |     }
11083 |     export type CrossOriginOpenerPolicyValue = "SameOrigin"|"SameOriginAllowPopups"|"RestrictProperties"|"UnsafeNone"|"SameOriginPlusCoep"|"RestrictPropertiesPlusCoep"|"NoopenerAllowPopups";
11084 |     export interface CrossOriginOpenerPolicyStatus {
11085 |       value: CrossOriginOpenerPolicyValue;
11086 |       reportOnlyValue: CrossOriginOpenerPolicyValue;
11087 |       reportingEndpoint?: string;
11088 |       reportOnlyReportingEndpoint?: string;
11089 |     }
11090 |     export type CrossOriginEmbedderPolicyValue = "None"|"Credentialless"|"RequireCorp";
11091 |     export interface CrossOriginEmbedderPolicyStatus {
11092 |       value: CrossOriginEmbedderPolicyValue;
11093 |       reportOnlyValue: CrossOriginEmbedderPolicyValue;
11094 |       reportingEndpoint?: string;
11095 |       reportOnlyReportingEndpoint?: string;
11096 |     }
11097 |     export type ContentSecurityPolicySource = "HTTP"|"Meta";
11098 |     export interface ContentSecurityPolicyStatus {
11099 |       effectiveDirectives: string;
11100 |       isEnforced: boolean;
11101 |       source: ContentSecurityPolicySource;
11102 |     }
11103 |     export interface SecurityIsolationStatus {
11104 |       coop?: CrossOriginOpenerPolicyStatus;
11105 |       coep?: CrossOriginEmbedderPolicyStatus;
11106 |       csp?: ContentSecurityPolicyStatus[];
11107 |     }
11108 |     /**
11109 |      * The status of a Reporting API report.
11110 |      */
11111 |     export type ReportStatus = "Queued"|"Pending"|"MarkedForRemoval"|"Success";
11112 |     export type ReportId = string;
11113 |     /**
11114 |      * An object representing a report generated by the Reporting API.
11115 |      */
11116 |     export interface ReportingApiReport {
11117 |       id: ReportId;
11118 |       /**
11119 |        * The URL of the document that triggered the report.
11120 |        */
11121 |       initiatorUrl: string;
11122 |       /**
11123 |        * The name of the endpoint group that should be used to deliver the report.
11124 |        */
11125 |       destination: string;
11126 |       /**
11127 |        * The type of the report (specifies the set of data that is contained in the report body).
11128 |        */
11129 |       type: string;
11130 |       /**
11131 |        * When the report was generated.
11132 |        */
11133 |       timestamp: Network.TimeSinceEpoch;
11134 |       /**
11135 |        * How many uploads deep the related request was.
11136 |        */
11137 |       depth: number;
11138 |       /**
11139 |        * The number of delivery attempts made so far, not including an active attempt.
11140 |        */
11141 |       completedAttempts: number;
11142 |       body: { [key: string]: string };
11143 |       status: ReportStatus;
11144 |     }
11145 |     export interface ReportingApiEndpoint {
11146 |       /**
11147 |        * The URL of the endpoint to which reports may be delivered.
11148 |        */
11149 |       url: string;
11150 |       /**
11151 |        * Name of the endpoint group.
11152 |        */
11153 |       groupName: string;
11154 |     }
11155 |     /**
11156 |      * Unique identifier for a device bound session.
11157 |      */
11158 |     export interface DeviceBoundSessionKey {
11159 |       /**
11160 |        * The site the session is set up for.
11161 |        */
11162 |       site: string;
11163 |       /**
11164 |        * The id of the session.
11165 |        */
11166 |       id: string;
11167 |     }
11168 |     /**
11169 |      * A device bound session's cookie craving.
11170 |      */
11171 |     export interface DeviceBoundSessionCookieCraving {
11172 |       /**
11173 |        * The name of the craving.
11174 |        */
11175 |       name: string;
11176 |       /**
11177 |        * The domain of the craving.
11178 |        */
11179 |       domain: string;
11180 |       /**
11181 |        * The path of the craving.
11182 |        */
11183 |       path: string;
11184 |       /**
11185 |        * The `Secure` attribute of the craving attributes.
11186 |        */
11187 |       secure: boolean;
11188 |       /**
11189 |        * The `HttpOnly` attribute of the craving attributes.
11190 |        */
11191 |       httpOnly: boolean;
11192 |       /**
11193 |        * The `SameSite` attribute of the craving attributes.
11194 |        */
11195 |       sameSite?: CookieSameSite;
11196 |     }
11197 |     /**
11198 |      * A device bound session's inclusion URL rule.
11199 |      */
11200 |     export interface DeviceBoundSessionUrlRule {
11201 |       /**
11202 |        * See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.
11203 |        */
11204 |       ruleType: "Exclude"|"Include";
11205 |       /**
11206 |        * See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.
11207 |        */
11208 |       hostPattern: string;
11209 |       /**
11210 |        * See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.
11211 |        */
11212 |       pathPrefix: string;
11213 |     }
11214 |     /**
11215 |      * A device bound session's inclusion rules.
11216 |      */
11217 |     export interface DeviceBoundSessionInclusionRules {
11218 |       /**
11219 |        * See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.
11220 |        */
11221 |       origin: string;
11222 |       /**
11223 |        * Whether the whole site is included. See comments on
11224 | `net::device_bound_sessions::SessionInclusionRules::include_site_` for more
11225 | details; this boolean is true if that value is populated.
11226 |        */
11227 |       includeSite: boolean;
11228 |       /**
11229 |        * See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.
11230 |        */
11231 |       urlRules: DeviceBoundSessionUrlRule[];
11232 |     }
11233 |     /**
11234 |      * A device bound session.
11235 |      */
11236 |     export interface DeviceBoundSession {
11237 |       /**
11238 |        * The site and session ID of the session.
11239 |        */
11240 |       key: DeviceBoundSessionKey;
11241 |       /**
11242 |        * See comments on `net::device_bound_sessions::Session::refresh_url_`.
11243 |        */
11244 |       refreshUrl: string;
11245 |       /**
11246 |        * See comments on `net::device_bound_sessions::Session::inclusion_rules_`.
11247 |        */
11248 |       inclusionRules: DeviceBoundSessionInclusionRules;
11249 |       /**
11250 |        * See comments on `net::device_bound_sessions::Session::cookie_cravings_`.
11251 |        */
11252 |       cookieCravings: DeviceBoundSessionCookieCraving[];
11253 |       /**
11254 |        * See comments on `net::device_bound_sessions::Session::expiry_date_`.
11255 |        */
11256 |       expiryDate: Network.TimeSinceEpoch;
11257 |       /**
11258 |        * See comments on `net::device_bound_sessions::Session::cached_challenge__`.
11259 |        */
11260 |       cachedChallenge?: string;
11261 |       /**
11262 |        * See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.
11263 |        */
11264 |       allowedRefreshInitiators: string[];
11265 |     }
11266 |     /**
11267 |      * A unique identifier for a device bound session event.
11268 |      */
11269 |     export type DeviceBoundSessionEventId = string;
11270 |     /**
11271 |      * A fetch result for a device bound session creation or refresh.
11272 |      */
11273 |     export type DeviceBoundSessionFetchResult = "Success"|"KeyError"|"SigningError"|"ServerRequestedTermination"|"InvalidSessionId"|"InvalidChallenge"|"TooManyChallenges"|"InvalidFetcherUrl"|"InvalidRefreshUrl"|"TransientHttpError"|"ScopeOriginSameSiteMismatch"|"RefreshUrlSameSiteMismatch"|"MismatchedSessionId"|"MissingScope"|"NoCredentials"|"SubdomainRegistrationWellKnownUnavailable"|"SubdomainRegistrationUnauthorized"|"SubdomainRegistrationWellKnownMalformed"|"SessionProviderWellKnownUnavailable"|"RelyingPartyWellKnownUnavailable"|"FederatedKeyThumbprintMismatch"|"InvalidFederatedSessionUrl"|"InvalidFederatedKey"|"TooManyRelyingOriginLabels"|"BoundCookieSetForbidden"|"NetError"|"ProxyError"|"EmptySessionConfig"|"InvalidCredentialsConfig"|"InvalidCredentialsType"|"InvalidCredentialsEmptyName"|"InvalidCredentialsCookie"|"PersistentHttpError"|"RegistrationAttemptedChallenge"|"InvalidScopeOrigin"|"ScopeOriginContainsPath"|"RefreshInitiatorNotString"|"RefreshInitiatorInvalidHostPattern"|"InvalidScopeSpecification"|"MissingScopeSpecificationType"|"EmptyScopeSpecificationDomain"|"EmptyScopeSpecificationPath"|"InvalidScopeSpecificationType"|"InvalidScopeIncludeSite"|"MissingScopeIncludeSite"|"FederatedNotAuthorizedByProvider"|"FederatedNotAuthorizedByRelyingParty"|"SessionProviderWellKnownMalformed"|"SessionProviderWellKnownHasProviderOrigin"|"RelyingPartyWellKnownMalformed"|"RelyingPartyWellKnownHasRelyingOrigins"|"InvalidFederatedSessionProviderSessionMissing"|"InvalidFederatedSessionWrongProviderOrigin"|"InvalidCredentialsCookieCreationTime"|"InvalidCredentialsCookieName"|"InvalidCredentialsCookieParsing"|"InvalidCredentialsCookieUnpermittedAttribute"|"InvalidCredentialsCookieInvalidDomain"|"InvalidCredentialsCookiePrefix"|"InvalidScopeRulePath"|"InvalidScopeRuleHostPattern"|"ScopeRuleOriginScopedHostPatternMismatch"|"ScopeRuleSiteScopedHostPatternMismatch"|"SigningQuotaExceeded"|"InvalidConfigJson"|"InvalidFederatedSessionProviderFailedToRestoreKey"|"FailedToUnwrapKey"|"SessionDeletedDuringRefresh";
11274 |     /**
11275 |      * Session event details specific to creation.
11276 |      */
11277 |     export interface CreationEventDetails {
11278 |       /**
11279 |        * The result of the fetch attempt.
11280 |        */
11281 |       fetchResult: DeviceBoundSessionFetchResult;
11282 |       /**
11283 |        * The session if there was a newly created session. This is populated for
11284 | all successful creation events.
11285 |        */
11286 |       newSession?: DeviceBoundSession;
11287 |     }
11288 |     /**
11289 |      * Session event details specific to refresh.
11290 |      */
11291 |     export interface RefreshEventDetails {
11292 |       /**
11293 |        * The result of a refresh.
11294 |        */
11295 |       refreshResult: "Refreshed"|"InitializedService"|"Unreachable"|"ServerError"|"RefreshQuotaExceeded"|"FatalError"|"SigningQuotaExceeded";
11296 |       /**
11297 |        * If there was a fetch attempt, the result of that.
11298 |        */
11299 |       fetchResult?: DeviceBoundSessionFetchResult;
11300 |       /**
11301 |        * The session display if there was a newly created session. This is populated
11302 | for any refresh event that modifies the session config.
11303 |        */
11304 |       newSession?: DeviceBoundSession;
11305 |       /**
11306 |        * See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.
11307 |        */
11308 |       wasFullyProactiveRefresh: boolean;
11309 |     }
11310 |     /**
11311 |      * Session event details specific to termination.
11312 |      */
11313 |     export interface TerminationEventDetails {
11314 |       /**
11315 |        * The reason for a session being deleted.
11316 |        */
11317 |       deletionReason: "Expired"|"FailedToRestoreKey"|"FailedToUnwrapKey"|"StoragePartitionCleared"|"ClearBrowsingData"|"ServerRequested"|"InvalidSessionParams"|"RefreshFatalError";
11318 |     }
11319 |     /**
11320 |      * Session event details specific to challenges.
11321 |      */
11322 |     export interface ChallengeEventDetails {
11323 |       /**
11324 |        * The result of a challenge.
11325 |        */
11326 |       challengeResult: "Success"|"NoSessionId"|"NoSessionMatch"|"CantSetBoundCookie";
11327 |       /**
11328 |        * The challenge set.
11329 |        */
11330 |       challenge: string;
11331 |     }
11332 |     /**
11333 |      * An object providing the result of a network resource load.
11334 |      */
11335 |     export interface LoadNetworkResourcePageResult {
11336 |       success: boolean;
11337 |       /**
11338 |        * Optional values used for error reporting.
11339 |        */
11340 |       netError?: number;
11341 |       netErrorName?: string;
11342 |       httpStatusCode?: number;
11343 |       /**
11344 |        * If successful, one of the following two fields holds the result.
11345 |        */
11346 |       stream?: IO.StreamHandle;
11347 |       /**
11348 |        * Response headers.
11349 |        */
11350 |       headers?: Network.Headers;
11351 |     }
11352 |     /**
11353 |      * An options object that may be extended later to better support CORS,
11354 | CORB and streaming.
11355 |      */
11356 |     export interface LoadNetworkResourceOptions {
11357 |       disableCache: boolean;
11358 |       includeCredentials: boolean;
11359 |     }
11360 | 
11361 |     /**
11362 |      * Fired when data chunk was received over the network.
11363 |      */
11364 |     export type dataReceivedPayload = {
11365 |       /**
11366 |        * Request identifier.
11367 |        */
11368 |       requestId: RequestId;
11369 |       /**
11370 |        * Timestamp.
11371 |        */
11372 |       timestamp: MonotonicTime;
11373 |       /**
11374 |        * Data chunk length.
11375 |        */
11376 |       dataLength: number;
11377 |       /**
11378 |        * Actual bytes received (might be less than dataLength for compressed encodings).
11379 |        */
11380 |       encodedDataLength: number;
11381 |       /**
11382 |        * Data that was received.
11383 |        */
11384 |       data?: binary;
11385 |     }
11386 |     /**
11387 |      * Fired when EventSource message is received.
11388 |      */
11389 |     export type eventSourceMessageReceivedPayload = {
11390 |       /**
11391 |        * Request identifier.
11392 |        */
11393 |       requestId: RequestId;
11394 |       /**
11395 |        * Timestamp.
11396 |        */
11397 |       timestamp: MonotonicTime;
11398 |       /**
11399 |        * Message type.
11400 |        */
11401 |       eventName: string;
11402 |       /**
11403 |        * Message identifier.
11404 |        */
11405 |       eventId: string;
11406 |       /**
11407 |        * Message content.
11408 |        */
11409 |       data: string;
11410 |     }
11411 |     /**
11412 |      * Fired when HTTP request has failed to load.
11413 |      */
11414 |     export type loadingFailedPayload = {
11415 |       /**
11416 |        * Request identifier.
11417 |        */
11418 |       requestId: RequestId;
11419 |       /**
11420 |        * Timestamp.
11421 |        */
11422 |       timestamp: MonotonicTime;
11423 |       /**
11424 |        * Resource type.
11425 |        */
11426 |       type: ResourceType;
11427 |       /**
11428 |        * Error message. List of network errors: https://cs.chromium.org/chromium/src/net/base/net_error_list.h
11429 |        */
11430 |       errorText: string;
11431 |       /**
11432 |        * True if loading was canceled.
11433 |        */
11434 |       canceled?: boolean;
11435 |       /**
11436 |        * The reason why loading was blocked, if any.
11437 |        */
11438 |       blockedReason?: BlockedReason;
11439 |       /**
11440 |        * The reason why loading was blocked by CORS, if any.
11441 |        */
11442 |       corsErrorStatus?: CorsErrorStatus;
11443 |     }
11444 |     /**
11445 |      * Fired when HTTP request has finished loading.
11446 |      */
11447 |     export type loadingFinishedPayload = {
11448 |       /**
11449 |        * Request identifier.
11450 |        */
11451 |       requestId: RequestId;
11452 |       /**
11453 |        * Timestamp.
11454 |        */
11455 |       timestamp: MonotonicTime;
11456 |       /**
11457 |        * Total number of bytes received for this request.
11458 |        */
11459 |       encodedDataLength: number;
11460 |     }
11461 |     /**
11462 |      * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
11463 | mocked.
11464 | Deprecated, use Fetch.requestPaused instead.
11465 |      */
11466 |     export type requestInterceptedPayload = {
11467 |       /**
11468 |        * Each request the page makes will have a unique id, however if any redirects are encountered
11469 | while processing that fetch, they will be reported with the same id as the original fetch.
11470 | Likewise if HTTP authentication is needed then the same fetch id will be used.
11471 |        */
11472 |       interceptionId: InterceptionId;
11473 |       request: Request;
11474 |       /**
11475 |        * The id of the frame that initiated the request.
11476 |        */
11477 |       frameId: Page.FrameId;
11478 |       /**
11479 |        * How the requested resource will be used.
11480 |        */
11481 |       resourceType: ResourceType;
11482 |       /**
11483 |        * Whether this is a navigation request, which can abort the navigation completely.
11484 |        */
11485 |       isNavigationRequest: boolean;
11486 |       /**
11487 |        * Set if the request is a navigation that will result in a download.
11488 | Only present after response is received from the server (i.e. HeadersReceived stage).
11489 |        */
11490 |       isDownload?: boolean;
11491 |       /**
11492 |        * Redirect location, only sent if a redirect was intercepted.
11493 |        */
11494 |       redirectUrl?: string;
11495 |       /**
11496 |        * Details of the Authorization Challenge encountered. If this is set then
11497 | continueInterceptedRequest must contain an authChallengeResponse.
11498 |        */
11499 |       authChallenge?: AuthChallenge;
11500 |       /**
11501 |        * Response error if intercepted at response stage or if redirect occurred while intercepting
11502 | request.
11503 |        */
11504 |       responseErrorReason?: ErrorReason;
11505 |       /**
11506 |        * Response code if intercepted at response stage or if redirect occurred while intercepting
11507 | request or auth retry occurred.
11508 |        */
11509 |       responseStatusCode?: number;
11510 |       /**
11511 |        * Response headers if intercepted at the response stage or if redirect occurred while
11512 | intercepting request or auth retry occurred.
11513 |        */
11514 |       responseHeaders?: Headers;
11515 |       /**
11516 |        * If the intercepted request had a corresponding requestWillBeSent event fired for it, then
11517 | this requestId will be the same as the requestId present in the requestWillBeSent event.
11518 |        */
11519 |       requestId?: RequestId;
11520 |     }
11521 |     /**
11522 |      * Fired if request ended up loading from cache.
11523 |      */
11524 |     export type requestServedFromCachePayload = {
11525 |       /**
11526 |        * Request identifier.
11527 |        */
11528 |       requestId: RequestId;
11529 |     }
11530 |     /**
11531 |      * Fired when page is about to send HTTP request.
11532 |      */
11533 |     export type requestWillBeSentPayload = {
11534 |       /**
11535 |        * Request identifier.
11536 |        */
11537 |       requestId: RequestId;
11538 |       /**
11539 |        * Loader identifier. Empty string if the request is fetched from worker.
11540 |        */
11541 |       loaderId: LoaderId;
11542 |       /**
11543 |        * URL of the document this request is loaded for.
11544 |        */
11545 |       documentURL: string;
11546 |       /**
11547 |        * Request data.
11548 |        */
11549 |       request: Request;
11550 |       /**
11551 |        * Timestamp.
11552 |        */
11553 |       timestamp: MonotonicTime;
11554 |       /**
11555 |        * Timestamp.
11556 |        */
11557 |       wallTime: TimeSinceEpoch;
11558 |       /**
11559 |        * Request initiator.
11560 |        */
11561 |       initiator: Initiator;
11562 |       /**
11563 |        * In the case that redirectResponse is populated, this flag indicates whether
11564 | requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted
11565 | for the request which was just redirected.
11566 |        */
11567 |       redirectHasExtraInfo: boolean;
11568 |       /**
11569 |        * Redirect response data.
11570 |        */
11571 |       redirectResponse?: Response;
11572 |       /**
11573 |        * Type of this resource.
11574 |        */
11575 |       type?: ResourceType;
11576 |       /**
11577 |        * Frame identifier.
11578 |        */
11579 |       frameId?: Page.FrameId;
11580 |       /**
11581 |        * Whether the request is initiated by a user gesture. Defaults to false.
11582 |        */
11583 |       hasUserGesture?: boolean;
11584 |       /**
11585 |        * The render blocking behavior of the request.
11586 |        */
11587 |       renderBlockingBehavior?: RenderBlockingBehavior;
11588 |     }
11589 |     /**
11590 |      * Fired when resource loading priority is changed
11591 |      */
11592 |     export type resourceChangedPriorityPayload = {
11593 |       /**
11594 |        * Request identifier.
11595 |        */
11596 |       requestId: RequestId;
11597 |       /**
11598 |        * New priority
11599 |        */
11600 |       newPriority: ResourcePriority;
11601 |       /**
11602 |        * Timestamp.
11603 |        */
11604 |       timestamp: MonotonicTime;
11605 |     }
11606 |     /**
11607 |      * Fired when a signed exchange was received over the network
11608 |      */
11609 |     export type signedExchangeReceivedPayload = {
11610 |       /**
11611 |        * Request identifier.
11612 |        */
11613 |       requestId: RequestId;
11614 |       /**
11615 |        * Information about the signed exchange response.
11616 |        */
11617 |       info: SignedExchangeInfo;
11618 |     }
11619 |     /**
11620 |      * Fired when HTTP response is available.
11621 |      */
11622 |     export type responseReceivedPayload = {
11623 |       /**
11624 |        * Request identifier.
11625 |        */
11626 |       requestId: RequestId;
11627 |       /**
11628 |        * Loader identifier. Empty string if the request is fetched from worker.
11629 |        */
11630 |       loaderId: LoaderId;
11631 |       /**
11632 |        * Timestamp.
11633 |        */
11634 |       timestamp: MonotonicTime;
11635 |       /**
11636 |        * Resource type.
11637 |        */
11638 |       type: ResourceType;
11639 |       /**
11640 |        * Response data.
11641 |        */
11642 |       response: Response;
11643 |       /**
11644 |        * Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be
11645 | or were emitted for this request.
11646 |        */
11647 |       hasExtraInfo: boolean;
11648 |       /**
11649 |        * Frame identifier.
11650 |        */
11651 |       frameId?: Page.FrameId;
11652 |     }
11653 |     /**
11654 |      * Fired when WebSocket is closed.
11655 |      */
11656 |     export type webSocketClosedPayload = {
11657 |       /**
11658 |        * Request identifier.
11659 |        */
11660 |       requestId: RequestId;
11661 |       /**
11662 |        * Timestamp.
11663 |        */
11664 |       timestamp: MonotonicTime;
11665 |     }
11666 |     /**
11667 |      * Fired upon WebSocket creation.
11668 |      */
11669 |     export type webSocketCreatedPayload = {
11670 |       /**
11671 |        * Request identifier.
11672 |        */
11673 |       requestId: RequestId;
11674 |       /**
11675 |        * WebSocket request URL.
11676 |        */
11677 |       url: string;
11678 |       /**
11679 |        * Request initiator.
11680 |        */
11681 |       initiator?: Initiator;
11682 |     }
11683 |     /**
11684 |      * Fired when WebSocket message error occurs.
11685 |      */
11686 |     export type webSocketFrameErrorPayload = {
11687 |       /**
11688 |        * Request identifier.
11689 |        */
11690 |       requestId: RequestId;
11691 |       /**
11692 |        * Timestamp.
11693 |        */
11694 |       timestamp: MonotonicTime;
11695 |       /**
11696 |        * WebSocket error message.
11697 |        */
11698 |       errorMessage: string;
11699 |     }
11700 |     /**
11701 |      * Fired when WebSocket message is received.
11702 |      */
11703 |     export type webSocketFrameReceivedPayload = {
11704 |       /**
11705 |        * Request identifier.
11706 |        */
11707 |       requestId: RequestId;
11708 |       /**
11709 |        * Timestamp.
11710 |        */
11711 |       timestamp: MonotonicTime;
11712 |       /**
11713 |        * WebSocket response data.
11714 |        */
11715 |       response: WebSocketFrame;
11716 |     }
11717 |     /**
11718 |      * Fired when WebSocket message is sent.
11719 |      */
11720 |     export type webSocketFrameSentPayload = {
11721 |       /**
11722 |        * Request identifier.
11723 |        */
11724 |       requestId: RequestId;
11725 |       /**
11726 |        * Timestamp.
11727 |        */
11728 |       timestamp: MonotonicTime;
11729 |       /**
11730 |        * WebSocket response data.
11731 |        */
11732 |       response: WebSocketFrame;
11733 |     }
11734 |     /**
11735 |      * Fired when WebSocket handshake response becomes available.
11736 |      */
11737 |     export type webSocketHandshakeResponseReceivedPayload = {
11738 |       /**
11739 |        * Request identifier.
11740 |        */
11741 |       requestId: RequestId;
11742 |       /**
11743 |        * Timestamp.
11744 |        */
11745 |       timestamp: MonotonicTime;
11746 |       /**
11747 |        * WebSocket response data.
11748 |        */
11749 |       response: WebSocketResponse;
11750 |     }
11751 |     /**
11752 |      * Fired when WebSocket is about to initiate handshake.
11753 |      */
11754 |     export type webSocketWillSendHandshakeRequestPayload = {
11755 |       /**
11756 |        * Request identifier.
11757 |        */
11758 |       requestId: RequestId;
11759 |       /**
11760 |        * Timestamp.
11761 |        */
11762 |       timestamp: MonotonicTime;
11763 |       /**
11764 |        * UTC Timestamp.
11765 |        */
11766 |       wallTime: TimeSinceEpoch;
11767 |       /**
11768 |        * WebSocket request data.
11769 |        */
11770 |       request: WebSocketRequest;
11771 |     }
11772 |     /**
11773 |      * Fired upon WebTransport creation.
11774 |      */
11775 |     export type webTransportCreatedPayload = {
11776 |       /**
11777 |        * WebTransport identifier.
11778 |        */
11779 |       transportId: RequestId;
11780 |       /**
11781 |        * WebTransport request URL.
11782 |        */
11783 |       url: string;
11784 |       /**
11785 |        * Timestamp.
11786 |        */
11787 |       timestamp: MonotonicTime;
11788 |       /**
11789 |        * Request initiator.
11790 |        */
11791 |       initiator?: Initiator;
11792 |     }
11793 |     /**
11794 |      * Fired when WebTransport handshake is finished.
11795 |      */
11796 |     export type webTransportConnectionEstablishedPayload = {
11797 |       /**
11798 |        * WebTransport identifier.
11799 |        */
11800 |       transportId: RequestId;
11801 |       /**
11802 |        * Timestamp.
11803 |        */
11804 |       timestamp: MonotonicTime;
11805 |     }
11806 |     /**
11807 |      * Fired when WebTransport is disposed.
11808 |      */
11809 |     export type webTransportClosedPayload = {
11810 |       /**
11811 |        * WebTransport identifier.
11812 |        */
11813 |       transportId: RequestId;
11814 |       /**
11815 |        * Timestamp.
11816 |        */
11817 |       timestamp: MonotonicTime;
11818 |     }
11819 |     /**
11820 |      * Fired upon direct_socket.TCPSocket creation.
11821 |      */
11822 |     export type directTCPSocketCreatedPayload = {
11823 |       identifier: RequestId;
11824 |       remoteAddr: string;
11825 |       /**
11826 |        * Unsigned int 16.
11827 |        */
11828 |       remotePort: number;
11829 |       options: DirectTCPSocketOptions;
11830 |       timestamp: MonotonicTime;
11831 |       initiator?: Initiator;
11832 |     }
11833 |     /**
11834 |      * Fired when direct_socket.TCPSocket connection is opened.
11835 |      */
11836 |     export type directTCPSocketOpenedPayload = {
11837 |       identifier: RequestId;
11838 |       remoteAddr: string;
11839 |       /**
11840 |        * Expected to be unsigned integer.
11841 |        */
11842 |       remotePort: number;
11843 |       timestamp: MonotonicTime;
11844 |       localAddr?: string;
11845 |       /**
11846 |        * Expected to be unsigned integer.
11847 |        */
11848 |       localPort?: number;
11849 |     }
11850 |     /**
11851 |      * Fired when direct_socket.TCPSocket is aborted.
11852 |      */
11853 |     export type directTCPSocketAbortedPayload = {
11854 |       identifier: RequestId;
11855 |       errorMessage: string;
11856 |       timestamp: MonotonicTime;
11857 |     }
11858 |     /**
11859 |      * Fired when direct_socket.TCPSocket is closed.
11860 |      */
11861 |     export type directTCPSocketClosedPayload = {
11862 |       identifier: RequestId;
11863 |       timestamp: MonotonicTime;
11864 |     }
11865 |     /**
11866 |      * Fired when data is sent to tcp direct socket stream.
11867 |      */
11868 |     export type directTCPSocketChunkSentPayload = {
11869 |       identifier: RequestId;
11870 |       data: binary;
11871 |       timestamp: MonotonicTime;
11872 |     }
11873 |     /**
11874 |      * Fired when data is received from tcp direct socket stream.
11875 |      */
11876 |     export type directTCPSocketChunkReceivedPayload = {
11877 |       identifier: RequestId;
11878 |       data: binary;
11879 |       timestamp: MonotonicTime;
11880 |     }
11881 |     export type directUDPSocketJoinedMulticastGroupPayload = {
11882 |       identifier: RequestId;
11883 |       IPAddress: string;
11884 |     }
11885 |     export type directUDPSocketLeftMulticastGroupPayload = {
11886 |       identifier: RequestId;
11887 |       IPAddress: string;
11888 |     }
11889 |     /**
11890 |      * Fired upon direct_socket.UDPSocket creation.
11891 |      */
11892 |     export type directUDPSocketCreatedPayload = {
11893 |       identifier: RequestId;
11894 |       options: DirectUDPSocketOptions;
11895 |       timestamp: MonotonicTime;
11896 |       initiator?: Initiator;
11897 |     }
11898 |     /**
11899 |      * Fired when direct_socket.UDPSocket connection is opened.
11900 |      */
11901 |     export type directUDPSocketOpenedPayload = {
11902 |       identifier: RequestId;
11903 |       localAddr: string;
11904 |       /**
11905 |        * Expected to be unsigned integer.
11906 |        */
11907 |       localPort: number;
11908 |       timestamp: MonotonicTime;
11909 |       remoteAddr?: string;
11910 |       /**
11911 |        * Expected to be unsigned integer.
11912 |        */
11913 |       remotePort?: number;
11914 |     }
11915 |     /**
11916 |      * Fired when direct_socket.UDPSocket is aborted.
11917 |      */
11918 |     export type directUDPSocketAbortedPayload = {
11919 |       identifier: RequestId;
11920 |       errorMessage: string;
11921 |       timestamp: MonotonicTime;
11922 |     }
11923 |     /**
11924 |      * Fired when direct_socket.UDPSocket is closed.
11925 |      */
11926 |     export type directUDPSocketClosedPayload = {
11927 |       identifier: RequestId;
11928 |       timestamp: MonotonicTime;
11929 |     }
11930 |     /**
11931 |      * Fired when message is sent to udp direct socket stream.
11932 |      */
11933 |     export type directUDPSocketChunkSentPayload = {
11934 |       identifier: RequestId;
11935 |       message: DirectUDPMessage;
11936 |       timestamp: MonotonicTime;
11937 |     }
11938 |     /**
11939 |      * Fired when message is received from udp direct socket stream.
11940 |      */
11941 |     export type directUDPSocketChunkReceivedPayload = {
11942 |       identifier: RequestId;
11943 |       message: DirectUDPMessage;
11944 |       timestamp: MonotonicTime;
11945 |     }
11946 |     /**
11947 |      * Fired when additional information about a requestWillBeSent event is available from the
11948 | network stack. Not every requestWillBeSent event will have an additional
11949 | requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent
11950 | or requestWillBeSentExtraInfo will be fired first for the same request.
11951 |      */
11952 |     export type requestWillBeSentExtraInfoPayload = {
11953 |       /**
11954 |        * Request identifier. Used to match this information to an existing requestWillBeSent event.
11955 |        */
11956 |       requestId: RequestId;
11957 |       /**
11958 |        * A list of cookies potentially associated to the requested URL. This includes both cookies sent with
11959 | the request and the ones not sent; the latter are distinguished by having blockedReasons field set.
11960 |        */
11961 |       associatedCookies: AssociatedCookie[];
11962 |       /**
11963 |        * Raw request headers as they will be sent over the wire.
11964 |        */
11965 |       headers: Headers;
11966 |       /**
11967 |        * Connection timing information for the request.
11968 |        */
11969 |       connectTiming: ConnectTiming;
11970 |       /**
11971 |        * The client security state set for the request.
11972 |        */
11973 |       clientSecurityState?: ClientSecurityState;
11974 |       /**
11975 |        * Whether the site has partitioned cookies stored in a partition different than the current one.
11976 |        */
11977 |       siteHasCookieInOtherPartition?: boolean;
11978 |       /**
11979 |        * The network conditions id if this request was affected by network conditions configured via
11980 | emulateNetworkConditionsByRule.
11981 |        */
11982 |       appliedNetworkConditionsId?: string;
11983 |     }
11984 |     /**
11985 |      * Fired when additional information about a responseReceived event is available from the network
11986 | stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for
11987 | it, and responseReceivedExtraInfo may be fired before or after responseReceived.
11988 |      */
11989 |     export type responseReceivedExtraInfoPayload = {
11990 |       /**
11991 |        * Request identifier. Used to match this information to another responseReceived event.
11992 |        */
11993 |       requestId: RequestId;
11994 |       /**
11995 |        * A list of cookies which were not stored from the response along with the corresponding
11996 | reasons for blocking. The cookies here may not be valid due to syntax errors, which
11997 | are represented by the invalid cookie line string instead of a proper cookie.
11998 |        */
11999 |       blockedCookies: BlockedSetCookieWithReason[];
12000 |       /**
12001 |        * Raw response headers as they were received over the wire.
12002 | Duplicate headers in the response are represented as a single key with their values
12003 | concatentated using `\n` as the separator.
12004 | See also `headersText` that contains verbatim text for HTTP/1.*.
12005 |        */
12006 |       headers: Headers;
12007 |       /**
12008 |        * The IP address space of the resource. The address space can only be determined once the transport
12009 | established the connection, so we can't send it in `requestWillBeSentExtraInfo`.
12010 |        */
12011 |       resourceIPAddressSpace: IPAddressSpace;
12012 |       /**
12013 |        * The status code of the response. This is useful in cases the request failed and no responseReceived
12014 | event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code
12015 | for cached requests, where the status in responseReceived is a 200 and this will be 304.
12016 |        */
12017 |       statusCode: number;
12018 |       /**
12019 |        * Raw response header text as it was received over the wire. The raw text may not always be
12020 | available, such as in the case of HTTP/2 or QUIC.
12021 |        */
12022 |       headersText?: string;
12023 |       /**
12024 |        * The cookie partition key that will be used to store partitioned cookies set in this response.
12025 | Only sent when partitioned cookies are enabled.
12026 |        */
12027 |       cookiePartitionKey?: CookiePartitionKey;
12028 |       /**
12029 |        * True if partitioned cookies are enabled, but the partition key is not serializable to string.
12030 |        */
12031 |       cookiePartitionKeyOpaque?: boolean;
12032 |       /**
12033 |        * A list of cookies which should have been blocked by 3PCD but are exempted and stored from
12034 | the response with the corresponding reason.
12035 |        */
12036 |       exemptedCookies?: ExemptedSetCookieWithReason[];
12037 |     }
12038 |     /**
12039 |      * Fired when 103 Early Hints headers is received in addition to the common response.
12040 | Not every responseReceived event will have an responseReceivedEarlyHints fired.
12041 | Only one responseReceivedEarlyHints may be fired for eached responseReceived event.
12042 |      */
12043 |     export type responseReceivedEarlyHintsPayload = {
12044 |       /**
12045 |        * Request identifier. Used to match this information to another responseReceived event.
12046 |        */
12047 |       requestId: RequestId;
12048 |       /**
12049 |        * Raw response headers as they were received over the wire.
12050 | Duplicate headers in the response are represented as a single key with their values
12051 | concatentated using `\n` as the separator.
12052 | See also `headersText` that contains verbatim text for HTTP/1.*.
12053 |        */
12054 |       headers: Headers;
12055 |     }
12056 |     /**
12057 |      * Fired exactly once for each Trust Token operation. Depending on
12058 | the type of the operation and whether the operation succeeded or
12059 | failed, the event is fired before the corresponding request was sent
12060 | or after the response was received.
12061 |      */
12062 |     export type trustTokenOperationDonePayload = {
12063 |       /**
12064 |        * Detailed success or error status of the operation.
12065 | 'AlreadyExists' also signifies a successful operation, as the result
12066 | of the operation already exists und thus, the operation was abort
12067 | preemptively (e.g. a cache hit).
12068 |        */
12069 |       status: "Ok"|"InvalidArgument"|"MissingIssuerKeys"|"FailedPrecondition"|"ResourceExhausted"|"AlreadyExists"|"ResourceLimited"|"Unauthorized"|"BadResponse"|"InternalError"|"UnknownError"|"FulfilledLocally"|"SiteIssuerLimit";
12070 |       type: TrustTokenOperationType;
12071 |       requestId: RequestId;
12072 |       /**
12073 |        * Top level origin. The context in which the operation was attempted.
12074 |        */
12075 |       topLevelOrigin?: string;
12076 |       /**
12077 |        * Origin of the issuer in case of a "Issuance" or "Redemption" operation.
12078 |        */
12079 |       issuerOrigin?: string;
12080 |       /**
12081 |        * The number of obtained Trust Tokens on a successful "Issuance" operation.
12082 |        */
12083 |       issuedTokenCount?: number;
12084 |     }
12085 |     /**
12086 |      * Fired once security policy has been updated.
12087 |      */
12088 |     export type policyUpdatedPayload = void;
12089 |     /**
12090 |      * Is sent whenever a new report is added.
12091 | And after 'enableReportingApi' for all existing reports.
12092 |      */
12093 |     export type reportingApiReportAddedPayload = {
12094 |       report: ReportingApiReport;
12095 |     }
12096 |     export type reportingApiReportUpdatedPayload = {
12097 |       report: ReportingApiReport;
12098 |     }
12099 |     export type reportingApiEndpointsChangedForOriginPayload = {
12100 |       /**
12101 |        * Origin of the document(s) which configured the endpoints.
12102 |        */
12103 |       origin: string;
12104 |       endpoints: ReportingApiEndpoint[];
12105 |     }
12106 |     /**
12107 |      * Triggered when the initial set of device bound sessions is added.
12108 |      */
12109 |     export type deviceBoundSessionsAddedPayload = {
12110 |       /**
12111 |        * The device bound sessions.
12112 |        */
12113 |       sessions: DeviceBoundSession[];
12114 |     }
12115 |     /**
12116 |      * Triggered when a device bound session event occurs.
12117 |      */
12118 |     export type deviceBoundSessionEventOccurredPayload = {
12119 |       /**
12120 |        * A unique identifier for this session event.
12121 |        */
12122 |       eventId: DeviceBoundSessionEventId;
12123 |       /**
12124 |        * The site this session event is associated with.
12125 |        */
12126 |       site: string;
12127 |       /**
12128 |        * Whether this event was considered successful.
12129 |        */
12130 |       succeeded: boolean;
12131 |       /**
12132 |        * The session ID this event is associated with. May not be populated for
12133 | failed events.
12134 |        */
12135 |       sessionId?: string;
12136 |       /**
12137 |        * The below are the different session event type details. Exactly one is populated.
12138 |        */
12139 |       creationEventDetails?: CreationEventDetails;
12140 |       refreshEventDetails?: RefreshEventDetails;
12141 |       terminationEventDetails?: TerminationEventDetails;
12142 |       challengeEventDetails?: ChallengeEventDetails;
12143 |     }
12144 | 
12145 |     /**
12146 |      * Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
12147 |      */
12148 |     export type setAcceptedEncodingsParameters = {
12149 |       /**
12150 |        * List of accepted content encodings.
12151 |        */
12152 |       encodings: ContentEncoding[];
12153 |     }
12154 |     export type setAcceptedEncodingsReturnValue = {
12155 |     }
12156 |     /**
12157 |      * Clears accepted encodings set by setAcceptedEncodings
12158 |      */
12159 |     export type clearAcceptedEncodingsOverrideParameters = {
12160 |     }
12161 |     export type clearAcceptedEncodingsOverrideReturnValue = {
12162 |     }
12163 |     /**
12164 |      * Tells whether clearing browser cache is supported.
12165 |      */
12166 |     export type canClearBrowserCacheParameters = {
12167 |     }
12168 |     export type canClearBrowserCacheReturnValue = {
12169 |       /**
12170 |        * True if browser cache can be cleared.
12171 |        */
12172 |       result: boolean;
12173 |     }
12174 |     /**
12175 |      * Tells whether clearing browser cookies is supported.
12176 |      */
12177 |     export type canClearBrowserCookiesParameters = {
12178 |     }
12179 |     export type canClearBrowserCookiesReturnValue = {
12180 |       /**
12181 |        * True if browser cookies can be cleared.
12182 |        */
12183 |       result: boolean;
12184 |     }
12185 |     /**
12186 |      * Tells whether emulation of network conditions is supported.
12187 |      */
12188 |     export type canEmulateNetworkConditionsParameters = {
12189 |     }
12190 |     export type canEmulateNetworkConditionsReturnValue = {
12191 |       /**
12192 |        * True if emulation of network conditions is supported.
12193 |        */
12194 |       result: boolean;
12195 |     }
12196 |     /**
12197 |      * Clears browser cache.
12198 |      */
12199 |     export type clearBrowserCacheParameters = {
12200 |     }
12201 |     export type clearBrowserCacheReturnValue = {
12202 |     }
12203 |     /**
12204 |      * Clears browser cookies.
12205 |      */
12206 |     export type clearBrowserCookiesParameters = {
12207 |     }
12208 |     export type clearBrowserCookiesReturnValue = {
12209 |     }
12210 |     /**
12211 |      * Response to Network.requestIntercepted which either modifies the request to continue with any
12212 | modifications, or blocks it, or completes it with the provided response bytes. If a network
12213 | fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted
12214 | event will be sent with the same InterceptionId.
12215 | Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.
12216 |      */
12217 |     export type continueInterceptedRequestParameters = {
12218 |       interceptionId: InterceptionId;
12219 |       /**
12220 |        * If set this causes the request to fail with the given reason. Passing `Aborted` for requests
12221 | marked with `isNavigationRequest` also cancels the navigation. Must not be set in response
12222 | to an authChallenge.
12223 |        */
12224 |       errorReason?: ErrorReason;
12225 |       /**
12226 |        * If set the requests completes using with the provided base64 encoded raw response, including
12227 | HTTP status line and headers etc... Must not be set in response to an authChallenge.
12228 |        */
12229 |       rawResponse?: binary;
12230 |       /**
12231 |        * If set the request url will be modified in a way that's not observable by page. Must not be
12232 | set in response to an authChallenge.
12233 |        */
12234 |       url?: string;
12235 |       /**
12236 |        * If set this allows the request method to be overridden. Must not be set in response to an
12237 | authChallenge.
12238 |        */
12239 |       method?: string;
12240 |       /**
12241 |        * If set this allows postData to be set. Must not be set in response to an authChallenge.
12242 |        */
12243 |       postData?: string;
12244 |       /**
12245 |        * If set this allows the request headers to be changed. Must not be set in response to an
12246 | authChallenge.
12247 |        */
12248 |       headers?: Headers;
12249 |       /**
12250 |        * Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
12251 |        */
12252 |       authChallengeResponse?: AuthChallengeResponse;
12253 |     }
12254 |     export type continueInterceptedRequestReturnValue = {
12255 |     }
12256 |     /**
12257 |      * Deletes browser cookies with matching name and url or domain/path/partitionKey pair.
12258 |      */
12259 |     export type deleteCookiesParameters = {
12260 |       /**
12261 |        * Name of the cookies to remove.
12262 |        */
12263 |       name: string;
12264 |       /**
12265 |        * If specified, deletes all the cookies with the given name where domain and path match
12266 | provided URL.
12267 |        */
12268 |       url?: string;
12269 |       /**
12270 |        * If specified, deletes only cookies with the exact domain.
12271 |        */
12272 |       domain?: string;
12273 |       /**
12274 |        * If specified, deletes only cookies with the exact path.
12275 |        */
12276 |       path?: string;
12277 |       /**
12278 |        * If specified, deletes only cookies with the the given name and partitionKey where
12279 | all partition key attributes match the cookie partition key attribute.
12280 |        */
12281 |       partitionKey?: CookiePartitionKey;
12282 |     }
12283 |     export type deleteCookiesReturnValue = {
12284 |     }
12285 |     /**
12286 |      * Disables network tracking, prevents network events from being sent to the client.
12287 |      */
12288 |     export type disableParameters = {
12289 |     }
12290 |     export type disableReturnValue = {
12291 |     }
12292 |     /**
12293 |      * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
12294 | and overrideNetworkState commands, which can be used together to the same effect.
12295 |      */
12296 |     export type emulateNetworkConditionsParameters = {
12297 |       /**
12298 |        * True to emulate internet disconnection.
12299 |        */
12300 |       offline: boolean;
12301 |       /**
12302 |        * Minimum latency from request sent to response headers received (ms).
12303 |        */
12304 |       latency: number;
12305 |       /**
12306 |        * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
12307 |        */
12308 |       downloadThroughput: number;
12309 |       /**
12310 |        * Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
12311 |        */
12312 |       uploadThroughput: number;
12313 |       /**
12314 |        * Connection type if known.
12315 |        */
12316 |       connectionType?: ConnectionType;
12317 |       /**
12318 |        * WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
12319 |        */
12320 |       packetLoss?: number;
12321 |       /**
12322 |        * WebRTC packet queue length (packet). 0 removes any queue length limitations.
12323 |        */
12324 |       packetQueueLength?: number;
12325 |       /**
12326 |        * WebRTC packetReordering feature.
12327 |        */
12328 |       packetReordering?: boolean;
12329 |     }
12330 |     export type emulateNetworkConditionsReturnValue = {
12331 |     }
12332 |     /**
12333 |      * Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated
12334 | Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to
12335 | explicitly modify `navigator` behavior.
12336 |      */
12337 |     export type emulateNetworkConditionsByRuleParameters = {
12338 |       /**
12339 |        * True to emulate internet disconnection.
12340 |        */
12341 |       offline: boolean;
12342 |       /**
12343 |        * Configure conditions for matching requests. If multiple entries match a request, the first entry wins.  Global
12344 | conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are
12345 | also applied for throttling of p2p connections.
12346 |        */
12347 |       matchedNetworkConditions: NetworkConditions[];
12348 |     }
12349 |     export type emulateNetworkConditionsByRuleReturnValue = {
12350 |       /**
12351 |        * An id for each entry in matchedNetworkConditions. The id will be included in the requestWillBeSentExtraInfo for
12352 | requests affected by a rule.
12353 |        */
12354 |       ruleIds: string[];
12355 |     }
12356 |     /**
12357 |      * Override the state of navigator.onLine and navigator.connection.
12358 |      */
12359 |     export type overrideNetworkStateParameters = {
12360 |       /**
12361 |        * True to emulate internet disconnection.
12362 |        */
12363 |       offline: boolean;
12364 |       /**
12365 |        * Minimum latency from request sent to response headers received (ms).
12366 |        */
12367 |       latency: number;
12368 |       /**
12369 |        * Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
12370 |        */
12371 |       downloadThroughput: number;
12372 |       /**
12373 |        * Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
12374 |        */
12375 |       uploadThroughput: number;
12376 |       /**
12377 |        * Connection type if known.
12378 |        */
12379 |       connectionType?: ConnectionType;
12380 |     }
12381 |     export type overrideNetworkStateReturnValue = {
12382 |     }
12383 |     /**
12384 |      * Enables network tracking, network events will now be delivered to the client.
12385 |      */
12386 |     export type enableParameters = {
12387 |       /**
12388 |        * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
12389 |        */
12390 |       maxTotalBufferSize?: number;
12391 |       /**
12392 |        * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
12393 |        */
12394 |       maxResourceBufferSize?: number;
12395 |       /**
12396 |        * Longest post body size (in bytes) that would be included in requestWillBeSent notification
12397 |        */
12398 |       maxPostDataSize?: number;
12399 |       /**
12400 |        * Whether DirectSocket chunk send/receive events should be reported.
12401 |        */
12402 |       reportDirectSocketTraffic?: boolean;
12403 |       /**
12404 |        * Enable storing response bodies outside of renderer, so that these survive
12405 | a cross-process navigation. Requires maxTotalBufferSize to be set.
12406 | Currently defaults to false. This field is being deprecated in favor of the dedicated
12407 | configureDurableMessages command, due to the possibility of deadlocks when awaiting
12408 | Network.enable before issuing Runtime.runIfWaitingForDebugger.
12409 |        */
12410 |       enableDurableMessages?: boolean;
12411 |     }
12412 |     export type enableReturnValue = {
12413 |     }
12414 |     /**
12415 |      * Configures storing response bodies outside of renderer, so that these survive
12416 | a cross-process navigation.
12417 | If maxTotalBufferSize is not set, durable messages are disabled.
12418 |      */
12419 |     export type configureDurableMessagesParameters = {
12420 |       /**
12421 |        * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
12422 |        */
12423 |       maxTotalBufferSize?: number;
12424 |       /**
12425 |        * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
12426 |        */
12427 |       maxResourceBufferSize?: number;
12428 |     }
12429 |     export type configureDurableMessagesReturnValue = {
12430 |     }
12431 |     /**
12432 |      * Returns all browser cookies. Depending on the backend support, will return detailed cookie
12433 | information in the `cookies` field.
12434 | Deprecated. Use Storage.getCookies instead.
12435 |      */
12436 |     export type getAllCookiesParameters = {
12437 |     }
12438 |     export type getAllCookiesReturnValue = {
12439 |       /**
12440 |        * Array of cookie objects.
12441 |        */
12442 |       cookies: Cookie[];
12443 |     }
12444 |     /**
12445 |      * Returns the DER-encoded certificate.
12446 |      */
12447 |     export type getCertificateParameters = {
12448 |       /**
12449 |        * Origin to get certificate for.
12450 |        */
12451 |       origin: string;
12452 |     }
12453 |     export type getCertificateReturnValue = {
12454 |       tableNames: string[];
12455 |     }
12456 |     /**
12457 |      * Returns all browser cookies for the current URL. Depending on the backend support, will return
12458 | detailed cookie information in the `cookies` field.
12459 |      */
12460 |     export type getCookiesParameters = {
12461 |       /**
12462 |        * The list of URLs for which applicable cookies will be fetched.
12463 | If not specified, it's assumed to be set to the list containing
12464 | the URLs of the page and all of its subframes.
12465 |        */
12466 |       urls?: string[];
12467 |     }
12468 |     export type getCookiesReturnValue = {
12469 |       /**
12470 |        * Array of cookie objects.
12471 |        */
12472 |       cookies: Cookie[];
12473 |     }
12474 |     /**
12475 |      * Returns content served for the given request.
12476 |      */
12477 |     export type getResponseBodyParameters = {
12478 |       /**
12479 |        * Identifier of the network request to get content for.
12480 |        */
12481 |       requestId: RequestId;
12482 |     }
12483 |     export type getResponseBodyReturnValue = {
12484 |       /**
12485 |        * Response body.
12486 |        */
12487 |       body: string;
12488 |       /**
12489 |        * True, if content was sent as base64.
12490 |        */
12491 |       base64Encoded: boolean;
12492 |     }
12493 |     /**
12494 |      * Returns post data sent with the request. Returns an error when no data was sent with the request.
12495 |      */
12496 |     export type getRequestPostDataParameters = {
12497 |       /**
12498 |        * Identifier of the network request to get content for.
12499 |        */
12500 |       requestId: RequestId;
12501 |     }
12502 |     export type getRequestPostDataReturnValue = {
12503 |       /**
12504 |        * Request body string, omitting files from multipart requests
12505 |        */
12506 |       postData: string;
12507 |       /**
12508 |        * True, if content was sent as base64.
12509 |        */
12510 |       base64Encoded: boolean;
12511 |     }
12512 |     /**
12513 |      * Returns content served for the given currently intercepted request.
12514 |      */
12515 |     export type getResponseBodyForInterceptionParameters = {
12516 |       /**
12517 |        * Identifier for the intercepted request to get body for.
12518 |        */
12519 |       interceptionId: InterceptionId;
12520 |     }
12521 |     export type getResponseBodyForInterceptionReturnValue = {
12522 |       /**
12523 |        * Response body.
12524 |        */
12525 |       body: string;
12526 |       /**
12527 |        * True, if content was sent as base64.
12528 |        */
12529 |       base64Encoded: boolean;
12530 |     }
12531 |     /**
12532 |      * Returns a handle to the stream representing the response body. Note that after this command,
12533 | the intercepted request can't be continued as is -- you either need to cancel it or to provide
12534 | the response body. The stream only supports sequential read, IO.read will fail if the position
12535 | is specified.
12536 |      */
12537 |     export type takeResponseBodyForInterceptionAsStreamParameters = {
12538 |       interceptionId: InterceptionId;
12539 |     }
12540 |     export type takeResponseBodyForInterceptionAsStreamReturnValue = {
12541 |       stream: IO.StreamHandle;
12542 |     }
12543 |     /**
12544 |      * This method sends a new XMLHttpRequest which is identical to the original one. The following
12545 | parameters should be identical: method, url, async, request body, extra headers, withCredentials
12546 | attribute, user, password.
12547 |      */
12548 |     export type replayXHRParameters = {
12549 |       /**
12550 |        * Identifier of XHR to replay.
12551 |        */
12552 |       requestId: RequestId;
12553 |     }
12554 |     export type replayXHRReturnValue = {
12555 |     }
12556 |     /**
12557 |      * Searches for given string in response content.
12558 |      */
12559 |     export type searchInResponseBodyParameters = {
12560 |       /**
12561 |        * Identifier of the network response to search.
12562 |        */
12563 |       requestId: RequestId;
12564 |       /**
12565 |        * String to search for.
12566 |        */
12567 |       query: string;
12568 |       /**
12569 |        * If true, search is case sensitive.
12570 |        */
12571 |       caseSensitive?: boolean;
12572 |       /**
12573 |        * If true, treats string parameter as regex.
12574 |        */
12575 |       isRegex?: boolean;
12576 |     }
12577 |     export type searchInResponseBodyReturnValue = {
12578 |       /**
12579 |        * List of search matches.
12580 |        */
12581 |       result: Debugger.SearchMatch[];
12582 |     }
12583 |     /**
12584 |      * Blocks URLs from loading.
12585 |      */
12586 |     export type setBlockedURLsParameters = {
12587 |       /**
12588 |        * Patterns to match in the order in which they are given. These patterns
12589 | also take precedence over any wildcard patterns defined in `urls`.
12590 |        */
12591 |       urlPatterns?: BlockPattern[];
12592 |       /**
12593 |        * URL patterns to block. Wildcards ('*') are allowed.
12594 |        */
12595 |       urls?: string[];
12596 |     }
12597 |     export type setBlockedURLsReturnValue = {
12598 |     }
12599 |     /**
12600 |      * Toggles ignoring of service worker for each request.
12601 |      */
12602 |     export type setBypassServiceWorkerParameters = {
12603 |       /**
12604 |        * Bypass service worker and load from network.
12605 |        */
12606 |       bypass: boolean;
12607 |     }
12608 |     export type setBypassServiceWorkerReturnValue = {
12609 |     }
12610 |     /**
12611 |      * Toggles ignoring cache for each request. If `true`, cache will not be used.
12612 |      */
12613 |     export type setCacheDisabledParameters = {
12614 |       /**
12615 |        * Cache disabled state.
12616 |        */
12617 |       cacheDisabled: boolean;
12618 |     }
12619 |     export type setCacheDisabledReturnValue = {
12620 |     }
12621 |     /**
12622 |      * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
12623 |      */
12624 |     export type setCookieParameters = {
12625 |       /**
12626 |        * Cookie name.
12627 |        */
12628 |       name: string;
12629 |       /**
12630 |        * Cookie value.
12631 |        */
12632 |       value: string;
12633 |       /**
12634 |        * The request-URI to associate with the setting of the cookie. This value can affect the
12635 | default domain, path, source port, and source scheme values of the created cookie.
12636 |        */
12637 |       url?: string;
12638 |       /**
12639 |        * Cookie domain.
12640 |        */
12641 |       domain?: string;
12642 |       /**
12643 |        * Cookie path.
12644 |        */
12645 |       path?: string;
12646 |       /**
12647 |        * True if cookie is secure.
12648 |        */
12649 |       secure?: boolean;
12650 |       /**
12651 |        * True if cookie is http-only.
12652 |        */
12653 |       httpOnly?: boolean;
12654 |       /**
12655 |        * Cookie SameSite type.
12656 |        */
12657 |       sameSite?: CookieSameSite;
12658 |       /**
12659 |        * Cookie expiration date, session cookie if not set
12660 |        */
12661 |       expires?: TimeSinceEpoch;
12662 |       /**
12663 |        * Cookie Priority type.
12664 |        */
12665 |       priority?: CookiePriority;
12666 |       /**
12667 |        * True if cookie is SameParty.
12668 |        */
12669 |       sameParty?: boolean;
12670 |       /**
12671 |        * Cookie source scheme type.
12672 |        */
12673 |       sourceScheme?: CookieSourceScheme;
12674 |       /**
12675 |        * Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port.
12676 | An unspecified port value allows protocol clients to emulate legacy cookie scope for the port.
12677 | This is a temporary ability and it will be removed in the future.
12678 |        */
12679 |       sourcePort?: number;
12680 |       /**
12681 |        * Cookie partition key. If not set, the cookie will be set as not partitioned.
12682 |        */
12683 |       partitionKey?: CookiePartitionKey;
12684 |     }
12685 |     export type setCookieReturnValue = {
12686 |       /**
12687 |        * Always set to true. If an error occurs, the response indicates protocol error.
12688 |        */
12689 |       success: boolean;
12690 |     }
12691 |     /**
12692 |      * Sets given cookies.
12693 |      */
12694 |     export type setCookiesParameters = {
12695 |       /**
12696 |        * Cookies to be set.
12697 |        */
12698 |       cookies: CookieParam[];
12699 |     }
12700 |     export type setCookiesReturnValue = {
12701 |     }
12702 |     /**
12703 |      * Specifies whether to always send extra HTTP headers with the requests from this page.
12704 |      */
12705 |     export type setExtraHTTPHeadersParameters = {
12706 |       /**
12707 |        * Map with extra HTTP headers.
12708 |        */
12709 |       headers: Headers;
12710 |     }
12711 |     export type setExtraHTTPHeadersReturnValue = {
12712 |     }
12713 |     /**
12714 |      * Specifies whether to attach a page script stack id in requests
12715 |      */
12716 |     export type setAttachDebugStackParameters = {
12717 |       /**
12718 |        * Whether to attach a page script stack for debugging purpose.
12719 |        */
12720 |       enabled: boolean;
12721 |     }
12722 |     export type setAttachDebugStackReturnValue = {
12723 |     }
12724 |     /**
12725 |      * Sets the requests to intercept that match the provided patterns and optionally resource types.
12726 | Deprecated, please use Fetch.enable instead.
12727 |      */
12728 |     export type setRequestInterceptionParameters = {
12729 |       /**
12730 |        * Requests matching any of these patterns will be forwarded and wait for the corresponding
12731 | continueInterceptedRequest call.
12732 |        */
12733 |       patterns: RequestPattern[];
12734 |     }
12735 |     export type setRequestInterceptionReturnValue = {
12736 |     }
12737 |     /**
12738 |      * Allows overriding user agent with the given string.
12739 |      */
12740 |     export type setUserAgentOverrideParameters = {
12741 |       /**
12742 |        * User agent to use.
12743 |        */
12744 |       userAgent: string;
12745 |       /**
12746 |        * Browser language to emulate.
12747 |        */
12748 |       acceptLanguage?: string;
12749 |       /**
12750 |        * The platform navigator.platform should return.
12751 |        */
12752 |       platform?: string;
12753 |       /**
12754 |        * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
12755 |        */
12756 |       userAgentMetadata?: Emulation.UserAgentMetadata;
12757 |     }
12758 |     export type setUserAgentOverrideReturnValue = {
12759 |     }
12760 |     /**
12761 |      * Enables streaming of the response for the given requestId.
12762 | If enabled, the dataReceived event contains the data that was received during streaming.
12763 |      */
12764 |     export type streamResourceContentParameters = {
12765 |       /**
12766 |        * Identifier of the request to stream.
12767 |        */
12768 |       requestId: RequestId;
12769 |     }
12770 |     export type streamResourceContentReturnValue = {
12771 |       /**
12772 |        * Data that has been buffered until streaming is enabled.
12773 |        */
12774 |       bufferedData: binary;
12775 |     }
12776 |     /**
12777 |      * Returns information about the COEP/COOP isolation status.
12778 |      */
12779 |     export type getSecurityIsolationStatusParameters = {
12780 |       /**
12781 |        * If no frameId is provided, the status of the target is provided.
12782 |        */
12783 |       frameId?: Page.FrameId;
12784 |     }
12785 |     export type getSecurityIsolationStatusReturnValue = {
12786 |       status: SecurityIsolationStatus;
12787 |     }
12788 |     /**
12789 |      * Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
12790 | Enabling triggers 'reportingApiReportAdded' for all existing reports.
12791 |      */
12792 |     export type enableReportingApiParameters = {
12793 |       /**
12794 |        * Whether to enable or disable events for the Reporting API
12795 |        */
12796 |       enable: boolean;
12797 |     }
12798 |     export type enableReportingApiReturnValue = {
12799 |     }
12800 |     /**
12801 |      * Sets up tracking device bound sessions and fetching of initial set of sessions.
12802 |      */
12803 |     export type enableDeviceBoundSessionsParameters = {
12804 |       /**
12805 |        * Whether to enable or disable events.
12806 |        */
12807 |       enable: boolean;
12808 |     }
12809 |     export type enableDeviceBoundSessionsReturnValue = {
12810 |     }
12811 |     /**
12812 |      * Fetches the schemeful site for a specific origin.
12813 |      */
12814 |     export type fetchSchemefulSiteParameters = {
12815 |       /**
12816 |        * The URL origin.
12817 |        */
12818 |       origin: string;
12819 |     }
12820 |     export type fetchSchemefulSiteReturnValue = {
12821 |       /**
12822 |        * The corresponding schemeful site.
12823 |        */
12824 |       schemefulSite: string;
12825 |     }
12826 |     /**
12827 |      * Fetches the resource and returns the content.
12828 |      */
12829 |     export type loadNetworkResourceParameters = {
12830 |       /**
12831 |        * Frame id to get the resource for. Mandatory for frame targets, and
12832 | should be omitted for worker targets.
12833 |        */
12834 |       frameId?: Page.FrameId;
12835 |       /**
12836 |        * URL of the resource to get content for.
12837 |        */
12838 |       url: string;
12839 |       /**
12840 |        * Options for the request.
12841 |        */
12842 |       options: LoadNetworkResourceOptions;
12843 |     }
12844 |     export type loadNetworkResourceReturnValue = {
12845 |       resource: LoadNetworkResourcePageResult;
12846 |     }
12847 |     /**
12848 |      * Sets Controls for third-party cookie access
12849 | Page reload is required before the new cookie behavior will be observed
12850 |      */
12851 |     export type setCookieControlsParameters = {
12852 |       /**
12853 |        * Whether 3pc restriction is enabled.
12854 |        */
12855 |       enableThirdPartyCookieRestriction: boolean;
12856 |       /**
12857 |        * Whether 3pc grace period exception should be enabled; false by default.
12858 |        */
12859 |       disableThirdPartyCookieMetadata: boolean;
12860 |       /**
12861 |        * Whether 3pc heuristics exceptions should be enabled; false by default.
12862 |        */
12863 |       disableThirdPartyCookieHeuristics: boolean;
12864 |     }
12865 |     export type setCookieControlsReturnValue = {
12866 |     }
12867 |   }
12868 | 
12869 |   /**
12870 |    * This domain provides various functionality related to drawing atop the inspected page.
12871 |    */
12872 |   export namespace Overlay {
12873 |     /**
12874 |      * Configuration data for drawing the source order of an elements children.
12875 |      */
12876 |     export interface SourceOrderConfig {
12877 |       /**
12878 |        * the color to outline the given element in.
12879 |        */
12880 |       parentOutlineColor: DOM.RGBA;
12881 |       /**
12882 |        * the color to outline the child elements in.
12883 |        */
12884 |       childOutlineColor: DOM.RGBA;
12885 |     }
12886 |     /**
12887 |      * Configuration data for the highlighting of Grid elements.
12888 |      */
12889 |     export interface GridHighlightConfig {
12890 |       /**
12891 |        * Whether the extension lines from grid cells to the rulers should be shown (default: false).
12892 |        */
12893 |       showGridExtensionLines?: boolean;
12894 |       /**
12895 |        * Show Positive line number labels (default: false).
12896 |        */
12897 |       showPositiveLineNumbers?: boolean;
12898 |       /**
12899 |        * Show Negative line number labels (default: false).
12900 |        */
12901 |       showNegativeLineNumbers?: boolean;
12902 |       /**
12903 |        * Show area name labels (default: false).
12904 |        */
12905 |       showAreaNames?: boolean;
12906 |       /**
12907 |        * Show line name labels (default: false).
12908 |        */
12909 |       showLineNames?: boolean;
12910 |       /**
12911 |        * Show track size labels (default: false).
12912 |        */
12913 |       showTrackSizes?: boolean;
12914 |       /**
12915 |        * The grid container border highlight color (default: transparent).
12916 |        */
12917 |       gridBorderColor?: DOM.RGBA;
12918 |       /**
12919 |        * The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
12920 |        */
12921 |       cellBorderColor?: DOM.RGBA;
12922 |       /**
12923 |        * The row line color (default: transparent).
12924 |        */
12925 |       rowLineColor?: DOM.RGBA;
12926 |       /**
12927 |        * The column line color (default: transparent).
12928 |        */
12929 |       columnLineColor?: DOM.RGBA;
12930 |       /**
12931 |        * Whether the grid border is dashed (default: false).
12932 |        */
12933 |       gridBorderDash?: boolean;
12934 |       /**
12935 |        * Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
12936 |        */
12937 |       cellBorderDash?: boolean;
12938 |       /**
12939 |        * Whether row lines are dashed (default: false).
12940 |        */
12941 |       rowLineDash?: boolean;
12942 |       /**
12943 |        * Whether column lines are dashed (default: false).
12944 |        */
12945 |       columnLineDash?: boolean;
12946 |       /**
12947 |        * The row gap highlight fill color (default: transparent).
12948 |        */
12949 |       rowGapColor?: DOM.RGBA;
12950 |       /**
12951 |        * The row gap hatching fill color (default: transparent).
12952 |        */
12953 |       rowHatchColor?: DOM.RGBA;
12954 |       /**
12955 |        * The column gap highlight fill color (default: transparent).
12956 |        */
12957 |       columnGapColor?: DOM.RGBA;
12958 |       /**
12959 |        * The column gap hatching fill color (default: transparent).
12960 |        */
12961 |       columnHatchColor?: DOM.RGBA;
12962 |       /**
12963 |        * The named grid areas border color (Default: transparent).
12964 |        */
12965 |       areaBorderColor?: DOM.RGBA;
12966 |       /**
12967 |        * The grid container background color (Default: transparent).
12968 |        */
12969 |       gridBackgroundColor?: DOM.RGBA;
12970 |     }
12971 |     /**
12972 |      * Configuration data for the highlighting of Flex container elements.
12973 |      */
12974 |     export interface FlexContainerHighlightConfig {
12975 |       /**
12976 |        * The style of the container border
12977 |        */
12978 |       containerBorder?: LineStyle;
12979 |       /**
12980 |        * The style of the separator between lines
12981 |        */
12982 |       lineSeparator?: LineStyle;
12983 |       /**
12984 |        * The style of the separator between items
12985 |        */
12986 |       itemSeparator?: LineStyle;
12987 |       /**
12988 |        * Style of content-distribution space on the main axis (justify-content).
12989 |        */
12990 |       mainDistributedSpace?: BoxStyle;
12991 |       /**
12992 |        * Style of content-distribution space on the cross axis (align-content).
12993 |        */
12994 |       crossDistributedSpace?: BoxStyle;
12995 |       /**
12996 |        * Style of empty space caused by row gaps (gap/row-gap).
12997 |        */
12998 |       rowGapSpace?: BoxStyle;
12999 |       /**
13000 |        * Style of empty space caused by columns gaps (gap/column-gap).
13001 |        */
13002 |       columnGapSpace?: BoxStyle;
13003 |       /**
13004 |        * Style of the self-alignment line (align-items).
13005 |        */
13006 |       crossAlignment?: LineStyle;
13007 |     }
13008 |     /**
13009 |      * Configuration data for the highlighting of Flex item elements.
13010 |      */
13011 |     export interface FlexItemHighlightConfig {
13012 |       /**
13013 |        * Style of the box representing the item's base size
13014 |        */
13015 |       baseSizeBox?: BoxStyle;
13016 |       /**
13017 |        * Style of the border around the box representing the item's base size
13018 |        */
13019 |       baseSizeBorder?: LineStyle;
13020 |       /**
13021 |        * Style of the arrow representing if the item grew or shrank
13022 |        */
13023 |       flexibilityArrow?: LineStyle;
13024 |     }
13025 |     /**
13026 |      * Style information for drawing a line.
13027 |      */
13028 |     export interface LineStyle {
13029 |       /**
13030 |        * The color of the line (default: transparent)
13031 |        */
13032 |       color?: DOM.RGBA;
13033 |       /**
13034 |        * The line pattern (default: solid)
13035 |        */
13036 |       pattern?: "dashed"|"dotted";
13037 |     }
13038 |     /**
13039 |      * Style information for drawing a box.
13040 |      */
13041 |     export interface BoxStyle {
13042 |       /**
13043 |        * The background color for the box (default: transparent)
13044 |        */
13045 |       fillColor?: DOM.RGBA;
13046 |       /**
13047 |        * The hatching color for the box (default: transparent)
13048 |        */
13049 |       hatchColor?: DOM.RGBA;
13050 |     }
13051 |     export type ContrastAlgorithm = "aa"|"aaa"|"apca";
13052 |     /**
13053 |      * Configuration data for the highlighting of page elements.
13054 |      */
13055 |     export interface HighlightConfig {
13056 |       /**
13057 |        * Whether the node info tooltip should be shown (default: false).
13058 |        */
13059 |       showInfo?: boolean;
13060 |       /**
13061 |        * Whether the node styles in the tooltip (default: false).
13062 |        */
13063 |       showStyles?: boolean;
13064 |       /**
13065 |        * Whether the rulers should be shown (default: false).
13066 |        */
13067 |       showRulers?: boolean;
13068 |       /**
13069 |        * Whether the a11y info should be shown (default: true).
13070 |        */
13071 |       showAccessibilityInfo?: boolean;
13072 |       /**
13073 |        * Whether the extension lines from node to the rulers should be shown (default: false).
13074 |        */
13075 |       showExtensionLines?: boolean;
13076 |       /**
13077 |        * The content box highlight fill color (default: transparent).
13078 |        */
13079 |       contentColor?: DOM.RGBA;
13080 |       /**
13081 |        * The padding highlight fill color (default: transparent).
13082 |        */
13083 |       paddingColor?: DOM.RGBA;
13084 |       /**
13085 |        * The border highlight fill color (default: transparent).
13086 |        */
13087 |       borderColor?: DOM.RGBA;
13088 |       /**
13089 |        * The margin highlight fill color (default: transparent).
13090 |        */
13091 |       marginColor?: DOM.RGBA;
13092 |       /**
13093 |        * The event target element highlight fill color (default: transparent).
13094 |        */
13095 |       eventTargetColor?: DOM.RGBA;
13096 |       /**
13097 |        * The shape outside fill color (default: transparent).
13098 |        */
13099 |       shapeColor?: DOM.RGBA;
13100 |       /**
13101 |        * The shape margin fill color (default: transparent).
13102 |        */
13103 |       shapeMarginColor?: DOM.RGBA;
13104 |       /**
13105 |        * The grid layout color (default: transparent).
13106 |        */
13107 |       cssGridColor?: DOM.RGBA;
13108 |       /**
13109 |        * The color format used to format color styles (default: hex).
13110 |        */
13111 |       colorFormat?: ColorFormat;
13112 |       /**
13113 |        * The grid layout highlight configuration (default: all transparent).
13114 |        */
13115 |       gridHighlightConfig?: GridHighlightConfig;
13116 |       /**
13117 |        * The flex container highlight configuration (default: all transparent).
13118 |        */
13119 |       flexContainerHighlightConfig?: FlexContainerHighlightConfig;
13120 |       /**
13121 |        * The flex item highlight configuration (default: all transparent).
13122 |        */
13123 |       flexItemHighlightConfig?: FlexItemHighlightConfig;
13124 |       /**
13125 |        * The contrast algorithm to use for the contrast ratio (default: aa).
13126 |        */
13127 |       contrastAlgorithm?: ContrastAlgorithm;
13128 |       /**
13129 |        * The container query container highlight configuration (default: all transparent).
13130 |        */
13131 |       containerQueryContainerHighlightConfig?: ContainerQueryContainerHighlightConfig;
13132 |     }
13133 |     export type ColorFormat = "rgb"|"hsl"|"hwb"|"hex";
13134 |     /**
13135 |      * Configurations for Persistent Grid Highlight
13136 |      */
13137 |     export interface GridNodeHighlightConfig {
13138 |       /**
13139 |        * A descriptor for the highlight appearance.
13140 |        */
13141 |       gridHighlightConfig: GridHighlightConfig;
13142 |       /**
13143 |        * Identifier of the node to highlight.
13144 |        */
13145 |       nodeId: DOM.NodeId;
13146 |     }
13147 |     export interface FlexNodeHighlightConfig {
13148 |       /**
13149 |        * A descriptor for the highlight appearance of flex containers.
13150 |        */
13151 |       flexContainerHighlightConfig: FlexContainerHighlightConfig;
13152 |       /**
13153 |        * Identifier of the node to highlight.
13154 |        */
13155 |       nodeId: DOM.NodeId;
13156 |     }
13157 |     export interface ScrollSnapContainerHighlightConfig {
13158 |       /**
13159 |        * The style of the snapport border (default: transparent)
13160 |        */
13161 |       snapportBorder?: LineStyle;
13162 |       /**
13163 |        * The style of the snap area border (default: transparent)
13164 |        */
13165 |       snapAreaBorder?: LineStyle;
13166 |       /**
13167 |        * The margin highlight fill color (default: transparent).
13168 |        */
13169 |       scrollMarginColor?: DOM.RGBA;
13170 |       /**
13171 |        * The padding highlight fill color (default: transparent).
13172 |        */
13173 |       scrollPaddingColor?: DOM.RGBA;
13174 |     }
13175 |     export interface ScrollSnapHighlightConfig {
13176 |       /**
13177 |        * A descriptor for the highlight appearance of scroll snap containers.
13178 |        */
13179 |       scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig;
13180 |       /**
13181 |        * Identifier of the node to highlight.
13182 |        */
13183 |       nodeId: DOM.NodeId;
13184 |     }
13185 |     /**
13186 |      * Configuration for dual screen hinge
13187 |      */
13188 |     export interface HingeConfig {
13189 |       /**
13190 |        * A rectangle represent hinge
13191 |        */
13192 |       rect: DOM.Rect;
13193 |       /**
13194 |        * The content box highlight fill color (default: a dark color).
13195 |        */
13196 |       contentColor?: DOM.RGBA;
13197 |       /**
13198 |        * The content box highlight outline color (default: transparent).
13199 |        */
13200 |       outlineColor?: DOM.RGBA;
13201 |     }
13202 |     /**
13203 |      * Configuration for Window Controls Overlay
13204 |      */
13205 |     export interface WindowControlsOverlayConfig {
13206 |       /**
13207 |        * Whether the title bar CSS should be shown when emulating the Window Controls Overlay.
13208 |        */
13209 |       showCSS: boolean;
13210 |       /**
13211 |        * Selected platforms to show the overlay.
13212 |        */
13213 |       selectedPlatform: string;
13214 |       /**
13215 |        * The theme color defined in app manifest.
13216 |        */
13217 |       themeColor: string;
13218 |     }
13219 |     export interface ContainerQueryHighlightConfig {
13220 |       /**
13221 |        * A descriptor for the highlight appearance of container query containers.
13222 |        */
13223 |       containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig;
13224 |       /**
13225 |        * Identifier of the container node to highlight.
13226 |        */
13227 |       nodeId: DOM.NodeId;
13228 |     }
13229 |     export interface ContainerQueryContainerHighlightConfig {
13230 |       /**
13231 |        * The style of the container border.
13232 |        */
13233 |       containerBorder?: LineStyle;
13234 |       /**
13235 |        * The style of the descendants' borders.
13236 |        */
13237 |       descendantBorder?: LineStyle;
13238 |     }
13239 |     export interface IsolatedElementHighlightConfig {
13240 |       /**
13241 |        * A descriptor for the highlight appearance of an element in isolation mode.
13242 |        */
13243 |       isolationModeHighlightConfig: IsolationModeHighlightConfig;
13244 |       /**
13245 |        * Identifier of the isolated element to highlight.
13246 |        */
13247 |       nodeId: DOM.NodeId;
13248 |     }
13249 |     export interface IsolationModeHighlightConfig {
13250 |       /**
13251 |        * The fill color of the resizers (default: transparent).
13252 |        */
13253 |       resizerColor?: DOM.RGBA;
13254 |       /**
13255 |        * The fill color for resizer handles (default: transparent).
13256 |        */
13257 |       resizerHandleColor?: DOM.RGBA;
13258 |       /**
13259 |        * The fill color for the mask covering non-isolated elements (default: transparent).
13260 |        */
13261 |       maskColor?: DOM.RGBA;
13262 |     }
13263 |     export type InspectMode = "searchForNode"|"searchForUAShadowDOM"|"captureAreaScreenshot"|"none";
13264 | 
13265 |     /**
13266 |      * Fired when the node should be inspected. This happens after call to `setInspectMode` or when
13267 | user manually inspects an element.
13268 |      */
13269 |     export type inspectNodeRequestedPayload = {
13270 |       /**
13271 |        * Id of the node to inspect.
13272 |        */
13273 |       backendNodeId: DOM.BackendNodeId;
13274 |     }
13275 |     /**
13276 |      * Fired when the node should be highlighted. This happens after call to `setInspectMode`.
13277 |      */
13278 |     export type nodeHighlightRequestedPayload = {
13279 |       nodeId: DOM.NodeId;
13280 |     }
13281 |     /**
13282 |      * Fired when user asks to capture screenshot of some area on the page.
13283 |      */
13284 |     export type screenshotRequestedPayload = {
13285 |       /**
13286 |        * Viewport to capture, in device independent pixels (dip).
13287 |        */
13288 |       viewport: Page.Viewport;
13289 |     }
13290 |     /**
13291 |      * Fired when user cancels the inspect mode.
13292 |      */
13293 |     export type inspectModeCanceledPayload = void;
13294 | 
13295 |     /**
13296 |      * Disables domain notifications.
13297 |      */
13298 |     export type disableParameters = {
13299 |     }
13300 |     export type disableReturnValue = {
13301 |     }
13302 |     /**
13303 |      * Enables domain notifications.
13304 |      */
13305 |     export type enableParameters = {
13306 |     }
13307 |     export type enableReturnValue = {
13308 |     }
13309 |     /**
13310 |      * For testing.
13311 |      */
13312 |     export type getHighlightObjectForTestParameters = {
13313 |       /**
13314 |        * Id of the node to get highlight object for.
13315 |        */
13316 |       nodeId: DOM.NodeId;
13317 |       /**
13318 |        * Whether to include distance info.
13319 |        */
13320 |       includeDistance?: boolean;
13321 |       /**
13322 |        * Whether to include style info.
13323 |        */
13324 |       includeStyle?: boolean;
13325 |       /**
13326 |        * The color format to get config with (default: hex).
13327 |        */
13328 |       colorFormat?: ColorFormat;
13329 |       /**
13330 |        * Whether to show accessibility info (default: true).
13331 |        */
13332 |       showAccessibilityInfo?: boolean;
13333 |     }
13334 |     export type getHighlightObjectForTestReturnValue = {
13335 |       /**
13336 |        * Highlight data for the node.
13337 |        */
13338 |       highlight: { [key: string]: string };
13339 |     }
13340 |     /**
13341 |      * For Persistent Grid testing.
13342 |      */
13343 |     export type getGridHighlightObjectsForTestParameters = {
13344 |       /**
13345 |        * Ids of the node to get highlight object for.
13346 |        */
13347 |       nodeIds: DOM.NodeId[];
13348 |     }
13349 |     export type getGridHighlightObjectsForTestReturnValue = {
13350 |       /**
13351 |        * Grid Highlight data for the node ids provided.
13352 |        */
13353 |       highlights: { [key: string]: string };
13354 |     }
13355 |     /**
13356 |      * For Source Order Viewer testing.
13357 |      */
13358 |     export type getSourceOrderHighlightObjectForTestParameters = {
13359 |       /**
13360 |        * Id of the node to highlight.
13361 |        */
13362 |       nodeId: DOM.NodeId;
13363 |     }
13364 |     export type getSourceOrderHighlightObjectForTestReturnValue = {
13365 |       /**
13366 |        * Source order highlight data for the node id provided.
13367 |        */
13368 |       highlight: { [key: string]: string };
13369 |     }
13370 |     /**
13371 |      * Hides any highlight.
13372 |      */
13373 |     export type hideHighlightParameters = {
13374 |     }
13375 |     export type hideHighlightReturnValue = {
13376 |     }
13377 |     /**
13378 |      * Highlights owner element of the frame with given id.
13379 | Deprecated: Doesn't work reliably and cannot be fixed due to process
13380 | separation (the owner node might be in a different process). Determine
13381 | the owner node in the client and use highlightNode.
13382 |      */
13383 |     export type highlightFrameParameters = {
13384 |       /**
13385 |        * Identifier of the frame to highlight.
13386 |        */
13387 |       frameId: Page.FrameId;
13388 |       /**
13389 |        * The content box highlight fill color (default: transparent).
13390 |        */
13391 |       contentColor?: DOM.RGBA;
13392 |       /**
13393 |        * The content box highlight outline color (default: transparent).
13394 |        */
13395 |       contentOutlineColor?: DOM.RGBA;
13396 |     }
13397 |     export type highlightFrameReturnValue = {
13398 |     }
13399 |     /**
13400 |      * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
13401 | objectId must be specified.
13402 |      */
13403 |     export type highlightNodeParameters = {
13404 |       /**
13405 |        * A descriptor for the highlight appearance.
13406 |        */
13407 |       highlightConfig: HighlightConfig;
13408 |       /**
13409 |        * Identifier of the node to highlight.
13410 |        */
13411 |       nodeId?: DOM.NodeId;
13412 |       /**
13413 |        * Identifier of the backend node to highlight.
13414 |        */
13415 |       backendNodeId?: DOM.BackendNodeId;
13416 |       /**
13417 |        * JavaScript object id of the node to be highlighted.
13418 |        */
13419 |       objectId?: Runtime.RemoteObjectId;
13420 |       /**
13421 |        * Selectors to highlight relevant nodes.
13422 |        */
13423 |       selector?: string;
13424 |     }
13425 |     export type highlightNodeReturnValue = {
13426 |     }
13427 |     /**
13428 |      * Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
13429 |      */
13430 |     export type highlightQuadParameters = {
13431 |       /**
13432 |        * Quad to highlight
13433 |        */
13434 |       quad: DOM.Quad;
13435 |       /**
13436 |        * The highlight fill color (default: transparent).
13437 |        */
13438 |       color?: DOM.RGBA;
13439 |       /**
13440 |        * The highlight outline color (default: transparent).
13441 |        */
13442 |       outlineColor?: DOM.RGBA;
13443 |     }
13444 |     export type highlightQuadReturnValue = {
13445 |     }
13446 |     /**
13447 |      * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
13448 | Issue: the method does not handle device pixel ratio (DPR) correctly.
13449 | The coordinates currently have to be adjusted by the client
13450 | if DPR is not 1 (see crbug.com/437807128).
13451 |      */
13452 |     export type highlightRectParameters = {
13453 |       /**
13454 |        * X coordinate
13455 |        */
13456 |       x: number;
13457 |       /**
13458 |        * Y coordinate
13459 |        */
13460 |       y: number;
13461 |       /**
13462 |        * Rectangle width
13463 |        */
13464 |       width: number;
13465 |       /**
13466 |        * Rectangle height
13467 |        */
13468 |       height: number;
13469 |       /**
13470 |        * The highlight fill color (default: transparent).
13471 |        */
13472 |       color?: DOM.RGBA;
13473 |       /**
13474 |        * The highlight outline color (default: transparent).
13475 |        */
13476 |       outlineColor?: DOM.RGBA;
13477 |     }
13478 |     export type highlightRectReturnValue = {
13479 |     }
13480 |     /**
13481 |      * Highlights the source order of the children of the DOM node with given id or with the given
13482 | JavaScript object wrapper. Either nodeId or objectId must be specified.
13483 |      */
13484 |     export type highlightSourceOrderParameters = {
13485 |       /**
13486 |        * A descriptor for the appearance of the overlay drawing.
13487 |        */
13488 |       sourceOrderConfig: SourceOrderConfig;
13489 |       /**
13490 |        * Identifier of the node to highlight.
13491 |        */
13492 |       nodeId?: DOM.NodeId;
13493 |       /**
13494 |        * Identifier of the backend node to highlight.
13495 |        */
13496 |       backendNodeId?: DOM.BackendNodeId;
13497 |       /**
13498 |        * JavaScript object id of the node to be highlighted.
13499 |        */
13500 |       objectId?: Runtime.RemoteObjectId;
13501 |     }
13502 |     export type highlightSourceOrderReturnValue = {
13503 |     }
13504 |     /**
13505 |      * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
13506 | Backend then generates 'inspectNodeRequested' event upon element selection.
13507 |      */
13508 |     export type setInspectModeParameters = {
13509 |       /**
13510 |        * Set an inspection mode.
13511 |        */
13512 |       mode: InspectMode;
13513 |       /**
13514 |        * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
13515 | == false`.
13516 |        */
13517 |       highlightConfig?: HighlightConfig;
13518 |     }
13519 |     export type setInspectModeReturnValue = {
13520 |     }
13521 |     /**
13522 |      * Highlights owner element of all frames detected to be ads.
13523 |      */
13524 |     export type setShowAdHighlightsParameters = {
13525 |       /**
13526 |        * True for showing ad highlights
13527 |        */
13528 |       show: boolean;
13529 |     }
13530 |     export type setShowAdHighlightsReturnValue = {
13531 |     }
13532 |     export type setPausedInDebuggerMessageParameters = {
13533 |       /**
13534 |        * The message to display, also triggers resume and step over controls.
13535 |        */
13536 |       message?: string;
13537 |     }
13538 |     export type setPausedInDebuggerMessageReturnValue = {
13539 |     }
13540 |     /**
13541 |      * Requests that backend shows debug borders on layers
13542 |      */
13543 |     export type setShowDebugBordersParameters = {
13544 |       /**
13545 |        * True for showing debug borders
13546 |        */
13547 |       show: boolean;
13548 |     }
13549 |     export type setShowDebugBordersReturnValue = {
13550 |     }
13551 |     /**
13552 |      * Requests that backend shows the FPS counter
13553 |      */
13554 |     export type setShowFPSCounterParameters = {
13555 |       /**
13556 |        * True for showing the FPS counter
13557 |        */
13558 |       show: boolean;
13559 |     }
13560 |     export type setShowFPSCounterReturnValue = {
13561 |     }
13562 |     /**
13563 |      * Highlight multiple elements with the CSS Grid overlay.
13564 |      */
13565 |     export type setShowGridOverlaysParameters = {
13566 |       /**
13567 |        * An array of node identifiers and descriptors for the highlight appearance.
13568 |        */
13569 |       gridNodeHighlightConfigs: GridNodeHighlightConfig[];
13570 |     }
13571 |     export type setShowGridOverlaysReturnValue = {
13572 |     }
13573 |     export type setShowFlexOverlaysParameters = {
13574 |       /**
13575 |        * An array of node identifiers and descriptors for the highlight appearance.
13576 |        */
13577 |       flexNodeHighlightConfigs: FlexNodeHighlightConfig[];
13578 |     }
13579 |     export type setShowFlexOverlaysReturnValue = {
13580 |     }
13581 |     export type setShowScrollSnapOverlaysParameters = {
13582 |       /**
13583 |        * An array of node identifiers and descriptors for the highlight appearance.
13584 |        */
13585 |       scrollSnapHighlightConfigs: ScrollSnapHighlightConfig[];
13586 |     }
13587 |     export type setShowScrollSnapOverlaysReturnValue = {
13588 |     }
13589 |     export type setShowContainerQueryOverlaysParameters = {
13590 |       /**
13591 |        * An array of node identifiers and descriptors for the highlight appearance.
13592 |        */
13593 |       containerQueryHighlightConfigs: ContainerQueryHighlightConfig[];
13594 |     }
13595 |     export type setShowContainerQueryOverlaysReturnValue = {
13596 |     }
13597 |     /**
13598 |      * Requests that backend shows paint rectangles
13599 |      */
13600 |     export type setShowPaintRectsParameters = {
13601 |       /**
13602 |        * True for showing paint rectangles
13603 |        */
13604 |       result: boolean;
13605 |     }
13606 |     export type setShowPaintRectsReturnValue = {
13607 |     }
13608 |     /**
13609 |      * Requests that backend shows layout shift regions
13610 |      */
13611 |     export type setShowLayoutShiftRegionsParameters = {
13612 |       /**
13613 |        * True for showing layout shift regions
13614 |        */
13615 |       result: boolean;
13616 |     }
13617 |     export type setShowLayoutShiftRegionsReturnValue = {
13618 |     }
13619 |     /**
13620 |      * Requests that backend shows scroll bottleneck rects
13621 |      */
13622 |     export type setShowScrollBottleneckRectsParameters = {
13623 |       /**
13624 |        * True for showing scroll bottleneck rects
13625 |        */
13626 |       show: boolean;
13627 |     }
13628 |     export type setShowScrollBottleneckRectsReturnValue = {
13629 |     }
13630 |     /**
13631 |      * Deprecated, no longer has any effect.
13632 |      */
13633 |     export type setShowHitTestBordersParameters = {
13634 |       /**
13635 |        * True for showing hit-test borders
13636 |        */
13637 |       show: boolean;
13638 |     }
13639 |     export type setShowHitTestBordersReturnValue = {
13640 |     }
13641 |     /**
13642 |      * Deprecated, no longer has any effect.
13643 |      */
13644 |     export type setShowWebVitalsParameters = {
13645 |       show: boolean;
13646 |     }
13647 |     export type setShowWebVitalsReturnValue = {
13648 |     }
13649 |     /**
13650 |      * Paints viewport size upon main frame resize.
13651 |      */
13652 |     export type setShowViewportSizeOnResizeParameters = {
13653 |       /**
13654 |        * Whether to paint size or not.
13655 |        */
13656 |       show: boolean;
13657 |     }
13658 |     export type setShowViewportSizeOnResizeReturnValue = {
13659 |     }
13660 |     /**
13661 |      * Add a dual screen device hinge
13662 |      */
13663 |     export type setShowHingeParameters = {
13664 |       /**
13665 |        * hinge data, null means hideHinge
13666 |        */
13667 |       hingeConfig?: HingeConfig;
13668 |     }
13669 |     export type setShowHingeReturnValue = {
13670 |     }
13671 |     /**
13672 |      * Show elements in isolation mode with overlays.
13673 |      */
13674 |     export type setShowIsolatedElementsParameters = {
13675 |       /**
13676 |        * An array of node identifiers and descriptors for the highlight appearance.
13677 |        */
13678 |       isolatedElementHighlightConfigs: IsolatedElementHighlightConfig[];
13679 |     }
13680 |     export type setShowIsolatedElementsReturnValue = {
13681 |     }
13682 |     /**
13683 |      * Show Window Controls Overlay for PWA
13684 |      */
13685 |     export type setShowWindowControlsOverlayParameters = {
13686 |       /**
13687 |        * Window Controls Overlay data, null means hide Window Controls Overlay
13688 |        */
13689 |       windowControlsOverlayConfig?: WindowControlsOverlayConfig;
13690 |     }
13691 |     export type setShowWindowControlsOverlayReturnValue = {
13692 |     }
13693 |   }
13694 | 
13695 |   /**
13696 |    * This domain allows interacting with the browser to control PWAs.
13697 |    */
13698 |   export namespace PWA {
13699 |     /**
13700 |      * The following types are the replica of
13701 | https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67
13702 |      */
13703 |     export interface FileHandlerAccept {
13704 |       /**
13705 |        * New name of the mimetype according to
13706 | https://www.iana.org/assignments/media-types/media-types.xhtml
13707 |        */
13708 |       mediaType: string;
13709 |       fileExtensions: string[];
13710 |     }
13711 |     export interface FileHandler {
13712 |       action: string;
13713 |       accepts: FileHandlerAccept[];
13714 |       displayName: string;
13715 |     }
13716 |     /**
13717 |      * If user prefers opening the app in browser or an app window.
13718 |      */
13719 |     export type DisplayMode = "standalone"|"browser";
13720 | 
13721 | 
13722 |     /**
13723 |      * Returns the following OS state for the given manifest id.
13724 |      */
13725 |     export type getOsAppStateParameters = {
13726 |       /**
13727 |        * The id from the webapp's manifest file, commonly it's the url of the
13728 | site installing the webapp. See
13729 | https://web.dev/learn/pwa/web-app-manifest.
13730 |        */
13731 |       manifestId: string;
13732 |     }
13733 |     export type getOsAppStateReturnValue = {
13734 |       badgeCount: number;
13735 |       fileHandlers: FileHandler[];
13736 |     }
13737 |     /**
13738 |      * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl
13739 | 
13740 | IWA-specific install description:
13741 | manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId
13742 | 
13743 | File installation mode:
13744 | The installUrlOrBundleUrl can be either file:// or http(s):// pointing
13745 | to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to
13746 | The .swbn file's signing key.
13747 | 
13748 | Dev proxy installation mode:
13749 | installUrlOrBundleUrl must be http(s):// that serves dev mode IWA.
13750 | web_package::SignedWebBundleId must be of type dev proxy.
13751 | 
13752 | The advantage of dev proxy mode is that all changes to IWA
13753 | automatically will be reflected in the running app without
13754 | reinstallation.
13755 | 
13756 | To generate bundle id for proxy mode:
13757 | 1. Generate 32 random bytes.
13758 | 2. Add a specific suffix at the end following the documentation
13759 |    https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix
13760 | 3. Encode the entire sequence using Base32 without padding.
13761 | 
13762 | If Chrome is not in IWA dev
13763 | mode, the installation will fail, regardless of the state of the allowlist.
13764 |      */
13765 |     export type installParameters = {
13766 |       manifestId: string;
13767 |       /**
13768 |        * The location of the app or bundle overriding the one derived from the
13769 | manifestId.
13770 |        */
13771 |       installUrlOrBundleUrl?: string;
13772 |     }
13773 |     export type installReturnValue = {
13774 |     }
13775 |     /**
13776 |      * Uninstalls the given manifest_id and closes any opened app windows.
13777 |      */
13778 |     export type uninstallParameters = {
13779 |       manifestId: string;
13780 |     }
13781 |     export type uninstallReturnValue = {
13782 |     }
13783 |     /**
13784 |      * Launches the installed web app, or an url in the same web app instead of the
13785 | default start url if it is provided. Returns a page Target.TargetID which
13786 | can be used to attach to via Target.attachToTarget or similar APIs.
13787 |      */
13788 |     export type launchParameters = {
13789 |       manifestId: string;
13790 |       url?: string;
13791 |     }
13792 |     export type launchReturnValue = {
13793 |       /**
13794 |        * ID of the tab target created as a result.
13795 |        */
13796 |       targetId: Target.TargetID;
13797 |     }
13798 |     /**
13799 |      * Opens one or more local files from an installed web app identified by its
13800 | manifestId. The web app needs to have file handlers registered to process
13801 | the files. The API returns one or more page Target.TargetIDs which can be
13802 | used to attach to via Target.attachToTarget or similar APIs.
13803 | If some files in the parameters cannot be handled by the web app, they will
13804 | be ignored. If none of the files can be handled, this API returns an error.
13805 | If no files are provided as the parameter, this API also returns an error.
13806 | 
13807 | According to the definition of the file handlers in the manifest file, one
13808 | Target.TargetID may represent a page handling one or more files. The order
13809 | of the returned Target.TargetIDs is not guaranteed.
13810 | 
13811 | TODO(crbug.com/339454034): Check the existences of the input files.
13812 |      */
13813 |     export type launchFilesInAppParameters = {
13814 |       manifestId: string;
13815 |       files: string[];
13816 |     }
13817 |     export type launchFilesInAppReturnValue = {
13818 |       /**
13819 |        * IDs of the tab targets created as the result.
13820 |        */
13821 |       targetIds: Target.TargetID[];
13822 |     }
13823 |     /**
13824 |      * Opens the current page in its web app identified by the manifest id, needs
13825 | to be called on a page target. This function returns immediately without
13826 | waiting for the app to finish loading.
13827 |      */
13828 |     export type openCurrentPageInAppParameters = {
13829 |       manifestId: string;
13830 |     }
13831 |     export type openCurrentPageInAppReturnValue = {
13832 |     }
13833 |     /**
13834 |      * Changes user settings of the web app identified by its manifestId. If the
13835 | app was not installed, this command returns an error. Unset parameters will
13836 | be ignored; unrecognized values will cause an error.
13837 | 
13838 | Unlike the ones defined in the manifest files of the web apps, these
13839 | settings are provided by the browser and controlled by the users, they
13840 | impact the way the browser handling the web apps.
13841 | 
13842 | See the comment of each parameter.
13843 |      */
13844 |     export type changeAppUserSettingsParameters = {
13845 |       manifestId: string;
13846 |       /**
13847 |        * If user allows the links clicked on by the user in the app's scope, or
13848 | extended scope if the manifest has scope extensions and the flags
13849 | `DesktopPWAsLinkCapturingWithScopeExtensions` and
13850 | `WebAppEnableScopeExtensions` are enabled.
13851 | 
13852 | Note, the API does not support resetting the linkCapturing to the
13853 | initial value, uninstalling and installing the web app again will reset
13854 | it.
13855 | 
13856 | TODO(crbug.com/339453269): Setting this value on ChromeOS is not
13857 | supported yet.
13858 |        */
13859 |       linkCapturing?: boolean;
13860 |       displayMode?: DisplayMode;
13861 |     }
13862 |     export type changeAppUserSettingsReturnValue = {
13863 |     }
13864 |   }
13865 | 
13866 |   /**
13867 |    * Actions and events related to the inspected page belong to the page domain.
13868 |    */
13869 |   export namespace Page {
13870 |     /**
13871 |      * Unique frame identifier.
13872 |      */
13873 |     export type FrameId = string;
13874 |     /**
13875 |      * Indicates whether a frame has been identified as an ad.
13876 |      */
13877 |     export type AdFrameType = "none"|"child"|"root";
13878 |     export type AdFrameExplanation = "ParentIsAd"|"CreatedByAdScript"|"MatchedBlockingRule";
13879 |     /**
13880 |      * Indicates whether a frame has been identified as an ad and why.
13881 |      */
13882 |     export interface AdFrameStatus {
13883 |       adFrameType: AdFrameType;
13884 |       explanations?: AdFrameExplanation[];
13885 |     }
13886 |     /**
13887 |      * Identifies the script which caused a script or frame to be labelled as an
13888 | ad.
13889 |      */
13890 |     export interface AdScriptId {
13891 |       /**
13892 |        * Script Id of the script which caused a script or frame to be labelled as
13893 | an ad.
13894 |        */
13895 |       scriptId: Runtime.ScriptId;
13896 |       /**
13897 |        * Id of scriptId's debugger.
13898 |        */
13899 |       debuggerId: Runtime.UniqueDebuggerId;
13900 |     }
13901 |     /**
13902 |      * Encapsulates the script ancestry and the root script filterlist rule that
13903 | caused the frame to be labelled as an ad. Only created when `ancestryChain`
13904 | is not empty.
13905 |      */
13906 |     export interface AdScriptAncestry {
13907 |       /**
13908 |        * A chain of `AdScriptId`s representing the ancestry of an ad script that
13909 | led to the creation of a frame. The chain is ordered from the script
13910 | itself (lower level) up to its root ancestor that was flagged by
13911 | filterlist.
13912 |        */
13913 |       ancestryChain: AdScriptId[];
13914 |       /**
13915 |        * The filterlist rule that caused the root (last) script in
13916 | `ancestryChain` to be ad-tagged. Only populated if the rule is
13917 | available.
13918 |        */
13919 |       rootScriptFilterlistRule?: string;
13920 |     }
13921 |     /**
13922 |      * Indicates whether the frame is a secure context and why it is the case.
13923 |      */
13924 |     export type SecureContextType = "Secure"|"SecureLocalhost"|"InsecureScheme"|"InsecureAncestor";
13925 |     /**
13926 |      * Indicates whether the frame is cross-origin isolated and why it is the case.
13927 |      */
13928 |     export type CrossOriginIsolatedContextType = "Isolated"|"NotIsolated"|"NotIsolatedFeatureDisabled";
13929 |     export type GatedAPIFeatures = "SharedArrayBuffers"|"SharedArrayBuffersTransferAllowed"|"PerformanceMeasureMemory"|"PerformanceProfile";
13930 |     /**
13931 |      * All Permissions Policy features. This enum should match the one defined
13932 | in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
13933 | LINT.IfChange(PermissionsPolicyFeature)
13934 |      */
13935 |     export type PermissionsPolicyFeature = "accelerometer"|"all-screens-capture"|"ambient-light-sensor"|"aria-notify"|"attribution-reporting"|"autofill"|"autoplay"|"bluetooth"|"browsing-topics"|"camera"|"captured-surface-control"|"ch-dpr"|"ch-device-memory"|"ch-downlink"|"ch-ect"|"ch-prefers-color-scheme"|"ch-prefers-reduced-motion"|"ch-prefers-reduced-transparency"|"ch-rtt"|"ch-save-data"|"ch-ua"|"ch-ua-arch"|"ch-ua-bitness"|"ch-ua-high-entropy-values"|"ch-ua-platform"|"ch-ua-model"|"ch-ua-mobile"|"ch-ua-form-factors"|"ch-ua-full-version"|"ch-ua-full-version-list"|"ch-ua-platform-version"|"ch-ua-wow64"|"ch-viewport-height"|"ch-viewport-width"|"ch-width"|"clipboard-read"|"clipboard-write"|"compute-pressure"|"controlled-frame"|"cross-origin-isolated"|"deferred-fetch"|"deferred-fetch-minimal"|"device-attributes"|"digital-credentials-create"|"digital-credentials-get"|"direct-sockets"|"direct-sockets-multicast"|"direct-sockets-private"|"display-capture"|"document-domain"|"encrypted-media"|"execution-while-out-of-viewport"|"execution-while-not-rendered"|"fenced-unpartitioned-storage-read"|"focus-without-user-activation"|"fullscreen"|"frobulate"|"gamepad"|"geolocation"|"gyroscope"|"hid"|"identity-credentials-get"|"idle-detection"|"interest-cohort"|"join-ad-interest-group"|"keyboard-map"|"language-detector"|"language-model"|"local-fonts"|"local-network"|"local-network-access"|"loopback-network"|"magnetometer"|"manual-text"|"media-playback-while-not-visible"|"microphone"|"midi"|"on-device-speech-recognition"|"otp-credentials"|"payment"|"picture-in-picture"|"private-aggregation"|"private-state-token-issuance"|"private-state-token-redemption"|"publickey-credentials-create"|"publickey-credentials-get"|"record-ad-auction-events"|"rewriter"|"run-ad-auction"|"screen-wake-lock"|"serial"|"shared-storage"|"shared-storage-select-url"|"smart-card"|"speaker-selection"|"storage-access"|"sub-apps"|"summarizer"|"sync-xhr"|"translator"|"unload"|"usb"|"usb-unrestricted"|"vertical-scroll"|"web-app-installation"|"web-printing"|"web-share"|"window-management"|"writer"|"xr-spatial-tracking";
13936 |     /**
13937 |      * Reason for a permissions policy feature to be disabled.
13938 |      */
13939 |     export type PermissionsPolicyBlockReason = "Header"|"IframeAttribute"|"InFencedFrameTree"|"InIsolatedApp";
13940 |     export interface PermissionsPolicyBlockLocator {
13941 |       frameId: FrameId;
13942 |       blockReason: PermissionsPolicyBlockReason;
13943 |     }
13944 |     export interface PermissionsPolicyFeatureState {
13945 |       feature: PermissionsPolicyFeature;
13946 |       allowed: boolean;
13947 |       locator?: PermissionsPolicyBlockLocator;
13948 |     }
13949 |     /**
13950 |      * Origin Trial(https://www.chromium.org/blink/origin-trials) support.
13951 | Status for an Origin Trial token.
13952 |      */
13953 |     export type OriginTrialTokenStatus = "Success"|"NotSupported"|"Insecure"|"Expired"|"WrongOrigin"|"InvalidSignature"|"Malformed"|"WrongVersion"|"FeatureDisabled"|"TokenDisabled"|"FeatureDisabledForUser"|"UnknownTrial";
13954 |     /**
13955 |      * Status for an Origin Trial.
13956 |      */
13957 |     export type OriginTrialStatus = "Enabled"|"ValidTokenNotProvided"|"OSNotSupported"|"TrialNotAllowed";
13958 |     export type OriginTrialUsageRestriction = "None"|"Subset";
13959 |     export interface OriginTrialToken {
13960 |       origin: string;
13961 |       matchSubDomains: boolean;
13962 |       trialName: string;
13963 |       expiryTime: Network.TimeSinceEpoch;
13964 |       isThirdParty: boolean;
13965 |       usageRestriction: OriginTrialUsageRestriction;
13966 |     }
13967 |     export interface OriginTrialTokenWithStatus {
13968 |       rawTokenText: string;
13969 |       /**
13970 |        * `parsedToken` is present only when the token is extractable and
13971 | parsable.
13972 |        */
13973 |       parsedToken?: OriginTrialToken;
13974 |       status: OriginTrialTokenStatus;
13975 |     }
13976 |     export interface OriginTrial {
13977 |       trialName: string;
13978 |       status: OriginTrialStatus;
13979 |       tokensWithStatus: OriginTrialTokenWithStatus[];
13980 |     }
13981 |     /**
13982 |      * Additional information about the frame document's security origin.
13983 |      */
13984 |     export interface SecurityOriginDetails {
13985 |       /**
13986 |        * Indicates whether the frame document's security origin is one
13987 | of the local hostnames (e.g. "localhost") or IP addresses (IPv4
13988 | 127.0.0.0/8 or IPv6 ::1).
13989 |        */
13990 |       isLocalhost: boolean;
13991 |     }
13992 |     /**
13993 |      * Information about the Frame on the page.
13994 |      */
13995 |     export interface Frame {
13996 |       /**
13997 |        * Frame unique identifier.
13998 |        */
13999 |       id: FrameId;
14000 |       /**
14001 |        * Parent frame identifier.
14002 |        */
14003 |       parentId?: FrameId;
14004 |       /**
14005 |        * Identifier of the loader associated with this frame.
14006 |        */
14007 |       loaderId: Network.LoaderId;
14008 |       /**
14009 |        * Frame's name as specified in the tag.
14010 |        */
14011 |       name?: string;
14012 |       /**
14013 |        * Frame document's URL without fragment.
14014 |        */
14015 |       url: string;
14016 |       /**
14017 |        * Frame document's URL fragment including the '#'.
14018 |        */
14019 |       urlFragment?: string;
14020 |       /**
14021 |        * Frame document's registered domain, taking the public suffixes list into account.
14022 | Extracted from the Frame's url.
14023 | Example URLs: http://www.google.com/file.html -> "google.com"
14024 |               http://a.b.co.uk/file.html      -> "b.co.uk"
14025 |        */
14026 |       domainAndRegistry: string;
14027 |       /**
14028 |        * Frame document's security origin.
14029 |        */
14030 |       securityOrigin: string;
14031 |       /**
14032 |        * Additional details about the frame document's security origin.
14033 |        */
14034 |       securityOriginDetails?: SecurityOriginDetails;
14035 |       /**
14036 |        * Frame document's mimeType as determined by the browser.
14037 |        */
14038 |       mimeType: string;
14039 |       /**
14040 |        * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
14041 |        */
14042 |       unreachableUrl?: string;
14043 |       /**
14044 |        * Indicates whether this frame was tagged as an ad and why.
14045 |        */
14046 |       adFrameStatus?: AdFrameStatus;
14047 |       /**
14048 |        * Indicates whether the main document is a secure context and explains why that is the case.
14049 |        */
14050 |       secureContextType: SecureContextType;
14051 |       /**
14052 |        * Indicates whether this is a cross origin isolated context.
14053 |        */
14054 |       crossOriginIsolatedContextType: CrossOriginIsolatedContextType;
14055 |       /**
14056 |        * Indicated which gated APIs / features are available.
14057 |        */
14058 |       gatedAPIFeatures: GatedAPIFeatures[];
14059 |     }
14060 |     /**
14061 |      * Information about the Resource on the page.
14062 |      */
14063 |     export interface FrameResource {
14064 |       /**
14065 |        * Resource URL.
14066 |        */
14067 |       url: string;
14068 |       /**
14069 |        * Type of this resource.
14070 |        */
14071 |       type: Network.ResourceType;
14072 |       /**
14073 |        * Resource mimeType as determined by the browser.
14074 |        */
14075 |       mimeType: string;
14076 |       /**
14077 |        * last-modified timestamp as reported by server.
14078 |        */
14079 |       lastModified?: Network.TimeSinceEpoch;
14080 |       /**
14081 |        * Resource content size.
14082 |        */
14083 |       contentSize?: number;
14084 |       /**
14085 |        * True if the resource failed to load.
14086 |        */
14087 |       failed?: boolean;
14088 |       /**
14089 |        * True if the resource was canceled during loading.
14090 |        */
14091 |       canceled?: boolean;
14092 |     }
14093 |     /**
14094 |      * Information about the Frame hierarchy along with their cached resources.
14095 |      */
14096 |     export interface FrameResourceTree {
14097 |       /**
14098 |        * Frame information for this tree item.
14099 |        */
14100 |       frame: Frame;
14101 |       /**
14102 |        * Child frames.
14103 |        */
14104 |       childFrames?: FrameResourceTree[];
14105 |       /**
14106 |        * Information about frame resources.
14107 |        */
14108 |       resources: FrameResource[];
14109 |     }
14110 |     /**
14111 |      * Information about the Frame hierarchy.
14112 |      */
14113 |     export interface FrameTree {
14114 |       /**
14115 |        * Frame information for this tree item.
14116 |        */
14117 |       frame: Frame;
14118 |       /**
14119 |        * Child frames.
14120 |        */
14121 |       childFrames?: FrameTree[];
14122 |     }
14123 |     /**
14124 |      * Unique script identifier.
14125 |      */
14126 |     export type ScriptIdentifier = string;
14127 |     /**
14128 |      * Transition type.
14129 |      */
14130 |     export type TransitionType = "link"|"typed"|"address_bar"|"auto_bookmark"|"auto_subframe"|"manual_subframe"|"generated"|"auto_toplevel"|"form_submit"|"reload"|"keyword"|"keyword_generated"|"other";
14131 |     /**
14132 |      * Navigation history entry.
14133 |      */
14134 |     export interface NavigationEntry {
14135 |       /**
14136 |        * Unique id of the navigation history entry.
14137 |        */
14138 |       id: number;
14139 |       /**
14140 |        * URL of the navigation history entry.
14141 |        */
14142 |       url: string;
14143 |       /**
14144 |        * URL that the user typed in the url bar.
14145 |        */
14146 |       userTypedURL: string;
14147 |       /**
14148 |        * Title of the navigation history entry.
14149 |        */
14150 |       title: string;
14151 |       /**
14152 |        * Transition type.
14153 |        */
14154 |       transitionType: TransitionType;
14155 |     }
14156 |     /**
14157 |      * Screencast frame metadata.
14158 |      */
14159 |     export interface ScreencastFrameMetadata {
14160 |       /**
14161 |        * Top offset in DIP.
14162 |        */
14163 |       offsetTop: number;
14164 |       /**
14165 |        * Page scale factor.
14166 |        */
14167 |       pageScaleFactor: number;
14168 |       /**
14169 |        * Device screen width in DIP.
14170 |        */
14171 |       deviceWidth: number;
14172 |       /**
14173 |        * Device screen height in DIP.
14174 |        */
14175 |       deviceHeight: number;
14176 |       /**
14177 |        * Position of horizontal scroll in CSS pixels.
14178 |        */
14179 |       scrollOffsetX: number;
14180 |       /**
14181 |        * Position of vertical scroll in CSS pixels.
14182 |        */
14183 |       scrollOffsetY: number;
14184 |       /**
14185 |        * Frame swap timestamp.
14186 |        */
14187 |       timestamp?: Network.TimeSinceEpoch;
14188 |     }
14189 |     /**
14190 |      * Javascript dialog type.
14191 |      */
14192 |     export type DialogType = "alert"|"confirm"|"prompt"|"beforeunload";
14193 |     /**
14194 |      * Error while paring app manifest.
14195 |      */
14196 |     export interface AppManifestError {
14197 |       /**
14198 |        * Error message.
14199 |        */
14200 |       message: string;
14201 |       /**
14202 |        * If critical, this is a non-recoverable parse error.
14203 |        */
14204 |       critical: number;
14205 |       /**
14206 |        * Error line.
14207 |        */
14208 |       line: number;
14209 |       /**
14210 |        * Error column.
14211 |        */
14212 |       column: number;
14213 |     }
14214 |     /**
14215 |      * Parsed app manifest properties.
14216 |      */
14217 |     export interface AppManifestParsedProperties {
14218 |       /**
14219 |        * Computed scope value
14220 |        */
14221 |       scope: string;
14222 |     }
14223 |     /**
14224 |      * Layout viewport position and dimensions.
14225 |      */
14226 |     export interface LayoutViewport {
14227 |       /**
14228 |        * Horizontal offset relative to the document (CSS pixels).
14229 |        */
14230 |       pageX: number;
14231 |       /**
14232 |        * Vertical offset relative to the document (CSS pixels).
14233 |        */
14234 |       pageY: number;
14235 |       /**
14236 |        * Width (CSS pixels), excludes scrollbar if present.
14237 |        */
14238 |       clientWidth: number;
14239 |       /**
14240 |        * Height (CSS pixels), excludes scrollbar if present.
14241 |        */
14242 |       clientHeight: number;
14243 |     }
14244 |     /**
14245 |      * Visual viewport position, dimensions, and scale.
14246 |      */
14247 |     export interface VisualViewport {
14248 |       /**
14249 |        * Horizontal offset relative to the layout viewport (CSS pixels).
14250 |        */
14251 |       offsetX: number;
14252 |       /**
14253 |        * Vertical offset relative to the layout viewport (CSS pixels).
14254 |        */
14255 |       offsetY: number;
14256 |       /**
14257 |        * Horizontal offset relative to the document (CSS pixels).
14258 |        */
14259 |       pageX: number;
14260 |       /**
14261 |        * Vertical offset relative to the document (CSS pixels).
14262 |        */
14263 |       pageY: number;
14264 |       /**
14265 |        * Width (CSS pixels), excludes scrollbar if present.
14266 |        */
14267 |       clientWidth: number;
14268 |       /**
14269 |        * Height (CSS pixels), excludes scrollbar if present.
14270 |        */
14271 |       clientHeight: number;
14272 |       /**
14273 |        * Scale relative to the ideal viewport (size at width=device-width).
14274 |        */
14275 |       scale: number;
14276 |       /**
14277 |        * Page zoom factor (CSS to device independent pixels ratio).
14278 |        */
14279 |       zoom?: number;
14280 |     }
14281 |     /**
14282 |      * Viewport for capturing screenshot.
14283 |      */
14284 |     export interface Viewport {
14285 |       /**
14286 |        * X offset in device independent pixels (dip).
14287 |        */
14288 |       x: number;
14289 |       /**
14290 |        * Y offset in device independent pixels (dip).
14291 |        */
14292 |       y: number;
14293 |       /**
14294 |        * Rectangle width in device independent pixels (dip).
14295 |        */
14296 |       width: number;
14297 |       /**
14298 |        * Rectangle height in device independent pixels (dip).
14299 |        */
14300 |       height: number;
14301 |       /**
14302 |        * Page scale factor.
14303 |        */
14304 |       scale: number;
14305 |     }
14306 |     /**
14307 |      * Generic font families collection.
14308 |      */
14309 |     export interface FontFamilies {
14310 |       /**
14311 |        * The standard font-family.
14312 |        */
14313 |       standard?: string;
14314 |       /**
14315 |        * The fixed font-family.
14316 |        */
14317 |       fixed?: string;
14318 |       /**
14319 |        * The serif font-family.
14320 |        */
14321 |       serif?: string;
14322 |       /**
14323 |        * The sansSerif font-family.
14324 |        */
14325 |       sansSerif?: string;
14326 |       /**
14327 |        * The cursive font-family.
14328 |        */
14329 |       cursive?: string;
14330 |       /**
14331 |        * The fantasy font-family.
14332 |        */
14333 |       fantasy?: string;
14334 |       /**
14335 |        * The math font-family.
14336 |        */
14337 |       math?: string;
14338 |     }
14339 |     /**
14340 |      * Font families collection for a script.
14341 |      */
14342 |     export interface ScriptFontFamilies {
14343 |       /**
14344 |        * Name of the script which these font families are defined for.
14345 |        */
14346 |       script: string;
14347 |       /**
14348 |        * Generic font families collection for the script.
14349 |        */
14350 |       fontFamilies: FontFamilies;
14351 |     }
14352 |     /**
14353 |      * Default font sizes.
14354 |      */
14355 |     export interface FontSizes {
14356 |       /**
14357 |        * Default standard font size.
14358 |        */
14359 |       standard?: number;
14360 |       /**
14361 |        * Default fixed font size.
14362 |        */
14363 |       fixed?: number;
14364 |     }
14365 |     export type ClientNavigationReason = "anchorClick"|"formSubmissionGet"|"formSubmissionPost"|"httpHeaderRefresh"|"initialFrameNavigation"|"metaTagRefresh"|"other"|"pageBlockInterstitial"|"reload"|"scriptInitiated";
14366 |     export type ClientNavigationDisposition = "currentTab"|"newTab"|"newWindow"|"download";
14367 |     export interface InstallabilityErrorArgument {
14368 |       /**
14369 |        * Argument name (e.g. name:'minimum-icon-size-in-pixels').
14370 |        */
14371 |       name: string;
14372 |       /**
14373 |        * Argument value (e.g. value:'64').
14374 |        */
14375 |       value: string;
14376 |     }
14377 |     /**
14378 |      * The installability error
14379 |      */
14380 |     export interface InstallabilityError {
14381 |       /**
14382 |        * The error id (e.g. 'manifest-missing-suitable-icon').
14383 |        */
14384 |       errorId: string;
14385 |       /**
14386 |        * The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
14387 |        */
14388 |       errorArguments: InstallabilityErrorArgument[];
14389 |     }
14390 |     /**
14391 |      * The referring-policy used for the navigation.
14392 |      */
14393 |     export type ReferrerPolicy = "noReferrer"|"noReferrerWhenDowngrade"|"origin"|"originWhenCrossOrigin"|"sameOrigin"|"strictOrigin"|"strictOriginWhenCrossOrigin"|"unsafeUrl";
14394 |     /**
14395 |      * Per-script compilation cache parameters for `Page.produceCompilationCache`
14396 |      */
14397 |     export interface CompilationCacheParams {
14398 |       /**
14399 |        * The URL of the script to produce a compilation cache entry for.
14400 |        */
14401 |       url: string;
14402 |       /**
14403 |        * A hint to the backend whether eager compilation is recommended.
14404 | (the actual compilation mode used is upon backend discretion).
14405 |        */
14406 |       eager?: boolean;
14407 |     }
14408 |     export interface FileFilter {
14409 |       name?: string;
14410 |       accepts?: string[];
14411 |     }
14412 |     export interface FileHandler {
14413 |       action: string;
14414 |       name: string;
14415 |       icons?: ImageResource[];
14416 |       /**
14417 |        * Mimic a map, name is the key, accepts is the value.
14418 |        */
14419 |       accepts?: FileFilter[];
14420 |       /**
14421 |        * Won't repeat the enums, using string for easy comparison. Same as the
14422 | other enums below.
14423 |        */
14424 |       launchType: string;
14425 |     }
14426 |     /**
14427 |      * The image definition used in both icon and screenshot.
14428 |      */
14429 |     export interface ImageResource {
14430 |       /**
14431 |        * The src field in the definition, but changing to url in favor of
14432 | consistency.
14433 |        */
14434 |       url: string;
14435 |       sizes?: string;
14436 |       type?: string;
14437 |     }
14438 |     export interface LaunchHandler {
14439 |       clientMode: string;
14440 |     }
14441 |     export interface ProtocolHandler {
14442 |       protocol: string;
14443 |       url: string;
14444 |     }
14445 |     export interface RelatedApplication {
14446 |       id?: string;
14447 |       url: string;
14448 |     }
14449 |     export interface ScopeExtension {
14450 |       /**
14451 |        * Instead of using tuple, this field always returns the serialized string
14452 | for easy understanding and comparison.
14453 |        */
14454 |       origin: string;
14455 |       hasOriginWildcard: boolean;
14456 |     }
14457 |     export interface Screenshot {
14458 |       image: ImageResource;
14459 |       formFactor: string;
14460 |       label?: string;
14461 |     }
14462 |     export interface ShareTarget {
14463 |       action: string;
14464 |       method: string;
14465 |       enctype: string;
14466 |       /**
14467 |        * Embed the ShareTargetParams
14468 |        */
14469 |       title?: string;
14470 |       text?: string;
14471 |       url?: string;
14472 |       files?: FileFilter[];
14473 |     }
14474 |     export interface Shortcut {
14475 |       name: string;
14476 |       url: string;
14477 |     }
14478 |     export interface WebAppManifest {
14479 |       backgroundColor?: string;
14480 |       /**
14481 |        * The extra description provided by the manifest.
14482 |        */
14483 |       description?: string;
14484 |       dir?: string;
14485 |       display?: string;
14486 |       /**
14487 |        * The overrided display mode controlled by the user.
14488 |        */
14489 |       displayOverrides?: string[];
14490 |       /**
14491 |        * The handlers to open files.
14492 |        */
14493 |       fileHandlers?: FileHandler[];
14494 |       icons?: ImageResource[];
14495 |       id?: string;
14496 |       lang?: string;
14497 |       /**
14498 |        * TODO(crbug.com/1231886): This field is non-standard and part of a Chrome
14499 | experiment. See:
14500 | https://github.com/WICG/web-app-launch/blob/main/launch_handler.md
14501 |        */
14502 |       launchHandler?: LaunchHandler;
14503 |       name?: string;
14504 |       orientation?: string;
14505 |       preferRelatedApplications?: boolean;
14506 |       /**
14507 |        * The handlers to open protocols.
14508 |        */
14509 |       protocolHandlers?: ProtocolHandler[];
14510 |       relatedApplications?: RelatedApplication[];
14511 |       scope?: string;
14512 |       /**
14513 |        * Non-standard, see
14514 | https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md
14515 |        */
14516 |       scopeExtensions?: ScopeExtension[];
14517 |       /**
14518 |        * The screenshots used by chromium.
14519 |        */
14520 |       screenshots?: Screenshot[];
14521 |       shareTarget?: ShareTarget;
14522 |       shortName?: string;
14523 |       shortcuts?: Shortcut[];
14524 |       startUrl?: string;
14525 |       themeColor?: string;
14526 |     }
14527 |     /**
14528 |      * The type of a frameNavigated event.
14529 |      */
14530 |     export type NavigationType = "Navigation"|"BackForwardCacheRestore";
14531 |     /**
14532 |      * List of not restored reasons for back-forward cache.
14533 |      */
14534 |     export type BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame"|"BackForwardCacheDisabled"|"RelatedActiveContentsExist"|"HTTPStatusNotOK"|"SchemeNotHTTPOrHTTPS"|"Loading"|"WasGrantedMediaAccess"|"DisableForRenderFrameHostCalled"|"DomainNotAllowed"|"HTTPMethodNotGET"|"SubframeIsNavigating"|"Timeout"|"CacheLimit"|"JavaScriptExecution"|"RendererProcessKilled"|"RendererProcessCrashed"|"SchedulerTrackedFeatureUsed"|"ConflictingBrowsingInstance"|"CacheFlushed"|"ServiceWorkerVersionActivation"|"SessionRestored"|"ServiceWorkerPostMessage"|"EnteredBackForwardCacheBeforeServiceWorkerHostAdded"|"RenderFrameHostReused_SameSite"|"RenderFrameHostReused_CrossSite"|"ServiceWorkerClaim"|"IgnoreEventAndEvict"|"HaveInnerContents"|"TimeoutPuttingInCache"|"BackForwardCacheDisabledByLowMemory"|"BackForwardCacheDisabledByCommandLine"|"NetworkRequestDatapipeDrainedAsBytesConsumer"|"NetworkRequestRedirected"|"NetworkRequestTimeout"|"NetworkExceedsBufferLimit"|"NavigationCancelledWhileRestoring"|"NotMostRecentNavigationEntry"|"BackForwardCacheDisabledForPrerender"|"UserAgentOverrideDiffers"|"ForegroundCacheLimit"|"BrowsingInstanceNotSwapped"|"BackForwardCacheDisabledForDelegate"|"UnloadHandlerExistsInMainFrame"|"UnloadHandlerExistsInSubFrame"|"ServiceWorkerUnregistration"|"CacheControlNoStore"|"CacheControlNoStoreCookieModified"|"CacheControlNoStoreHTTPOnlyCookieModified"|"NoResponseHead"|"Unknown"|"ActivationNavigationsDisallowedForBug1234857"|"ErrorDocument"|"FencedFramesEmbedder"|"CookieDisabled"|"HTTPAuthRequired"|"CookieFlushed"|"BroadcastChannelOnMessage"|"WebViewSettingsChanged"|"WebViewJavaScriptObjectChanged"|"WebViewMessageListenerInjected"|"WebViewSafeBrowsingAllowlistChanged"|"WebViewDocumentStartJavascriptChanged"|"WebSocket"|"WebTransport"|"WebRTC"|"MainResourceHasCacheControlNoStore"|"MainResourceHasCacheControlNoCache"|"SubresourceHasCacheControlNoStore"|"SubresourceHasCacheControlNoCache"|"ContainsPlugins"|"DocumentLoaded"|"OutstandingNetworkRequestOthers"|"RequestedMIDIPermission"|"RequestedAudioCapturePermission"|"RequestedVideoCapturePermission"|"RequestedBackForwardCacheBlockedSensors"|"RequestedBackgroundWorkPermission"|"BroadcastChannel"|"WebXR"|"SharedWorker"|"SharedWorkerMessage"|"SharedWorkerWithNoActiveClient"|"WebLocks"|"WebHID"|"WebBluetooth"|"WebShare"|"RequestedStorageAccessGrant"|"WebNfc"|"OutstandingNetworkRequestFetch"|"OutstandingNetworkRequestXHR"|"AppBanner"|"Printing"|"WebDatabase"|"PictureInPicture"|"SpeechRecognizer"|"IdleManager"|"PaymentManager"|"SpeechSynthesis"|"KeyboardLock"|"WebOTPService"|"OutstandingNetworkRequestDirectSocket"|"InjectedJavascript"|"InjectedStyleSheet"|"KeepaliveRequest"|"IndexedDBEvent"|"Dummy"|"JsNetworkRequestReceivedCacheControlNoStoreResource"|"WebRTCUsedWithCCNS"|"WebTransportUsedWithCCNS"|"WebSocketUsedWithCCNS"|"SmartCard"|"LiveMediaStreamTrack"|"UnloadHandler"|"ParserAborted"|"ContentSecurityHandler"|"ContentWebAuthenticationAPI"|"ContentFileChooser"|"ContentSerial"|"ContentFileSystemAccess"|"ContentMediaDevicesDispatcherHost"|"ContentWebBluetooth"|"ContentWebUSB"|"ContentMediaSessionService"|"ContentScreenReader"|"ContentDiscarded"|"EmbedderPopupBlockerTabHelper"|"EmbedderSafeBrowsingTriggeredPopupBlocker"|"EmbedderSafeBrowsingThreatDetails"|"EmbedderAppBannerManager"|"EmbedderDomDistillerViewerSource"|"EmbedderDomDistillerSelfDeletingRequestDelegate"|"EmbedderOomInterventionTabHelper"|"EmbedderOfflinePage"|"EmbedderChromePasswordManagerClientBindCredentialManager"|"EmbedderPermissionRequestManager"|"EmbedderModalDialog"|"EmbedderExtensions"|"EmbedderExtensionMessaging"|"EmbedderExtensionMessagingForOpenPort"|"EmbedderExtensionSentMessageToCachedFrame"|"RequestedByWebViewClient"|"PostMessageByWebViewClient"|"CacheControlNoStoreDeviceBoundSessionTerminated"|"CacheLimitPrunedOnModerateMemoryPressure"|"CacheLimitPrunedOnCriticalMemoryPressure";
14535 |     /**
14536 |      * Types of not restored reasons for back-forward cache.
14537 |      */
14538 |     export type BackForwardCacheNotRestoredReasonType = "SupportPending"|"PageSupportNeeded"|"Circumstantial";
14539 |     export interface BackForwardCacheBlockingDetails {
14540 |       /**
14541 |        * Url of the file where blockage happened. Optional because of tests.
14542 |        */
14543 |       url?: string;
14544 |       /**
14545 |        * Function name where blockage happened. Optional because of anonymous functions and tests.
14546 |        */
14547 |       function?: string;
14548 |       /**
14549 |        * Line number in the script (0-based).
14550 |        */
14551 |       lineNumber: number;
14552 |       /**
14553 |        * Column number in the script (0-based).
14554 |        */
14555 |       columnNumber: number;
14556 |     }
14557 |     export interface BackForwardCacheNotRestoredExplanation {
14558 |       /**
14559 |        * Type of the reason
14560 |        */
14561 |       type: BackForwardCacheNotRestoredReasonType;
14562 |       /**
14563 |        * Not restored reason
14564 |        */
14565 |       reason: BackForwardCacheNotRestoredReason;
14566 |       /**
14567 |        * Context associated with the reason. The meaning of this context is
14568 | dependent on the reason:
14569 | - EmbedderExtensionSentMessageToCachedFrame: the extension ID.
14570 |        */
14571 |       context?: string;
14572 |       details?: BackForwardCacheBlockingDetails[];
14573 |     }
14574 |     export interface BackForwardCacheNotRestoredExplanationTree {
14575 |       /**
14576 |        * URL of each frame
14577 |        */
14578 |       url: string;
14579 |       /**
14580 |        * Not restored reasons of each frame
14581 |        */
14582 |       explanations: BackForwardCacheNotRestoredExplanation[];
14583 |       /**
14584 |        * Array of children frame
14585 |        */
14586 |       children: BackForwardCacheNotRestoredExplanationTree[];
14587 |     }
14588 | 
14589 |     export type domContentEventFiredPayload = {
14590 |       timestamp: Network.MonotonicTime;
14591 |     }
14592 |     /**
14593 |      * Emitted only when `page.interceptFileChooser` is enabled.
14594 |      */
14595 |     export type fileChooserOpenedPayload = {
14596 |       /**
14597 |        * Id of the frame containing input node.
14598 |        */
14599 |       frameId: FrameId;
14600 |       /**
14601 |        * Input mode.
14602 |        */
14603 |       mode: "selectSingle"|"selectMultiple";
14604 |       /**
14605 |        * Input node id. Only present for file choosers opened via an `<input type="file">` element.
14606 |        */
14607 |       backendNodeId?: DOM.BackendNodeId;
14608 |     }
14609 |     /**
14610 |      * Fired when frame has been attached to its parent.
14611 |      */
14612 |     export type frameAttachedPayload = {
14613 |       /**
14614 |        * Id of the frame that has been attached.
14615 |        */
14616 |       frameId: FrameId;
14617 |       /**
14618 |        * Parent frame identifier.
14619 |        */
14620 |       parentFrameId: FrameId;
14621 |       /**
14622 |        * JavaScript stack trace of when frame was attached, only set if frame initiated from script.
14623 |        */
14624 |       stack?: Runtime.StackTrace;
14625 |     }
14626 |     /**
14627 |      * Fired when frame no longer has a scheduled navigation.
14628 |      */
14629 |     export type frameClearedScheduledNavigationPayload = {
14630 |       /**
14631 |        * Id of the frame that has cleared its scheduled navigation.
14632 |        */
14633 |       frameId: FrameId;
14634 |     }
14635 |     /**
14636 |      * Fired when frame has been detached from its parent.
14637 |      */
14638 |     export type frameDetachedPayload = {
14639 |       /**
14640 |        * Id of the frame that has been detached.
14641 |        */
14642 |       frameId: FrameId;
14643 |       reason: "remove"|"swap";
14644 |     }
14645 |     /**
14646 |      * Fired before frame subtree is detached. Emitted before any frame of the
14647 | subtree is actually detached.
14648 |      */
14649 |     export type frameSubtreeWillBeDetachedPayload = {
14650 |       /**
14651 |        * Id of the frame that is the root of the subtree that will be detached.
14652 |        */
14653 |       frameId: FrameId;
14654 |     }
14655 |     /**
14656 |      * Fired once navigation of the frame has completed. Frame is now associated with the new loader.
14657 |      */
14658 |     export type frameNavigatedPayload = {
14659 |       /**
14660 |        * Frame object.
14661 |        */
14662 |       frame: Frame;
14663 |       type: NavigationType;
14664 |     }
14665 |     /**
14666 |      * Fired when opening document to write to.
14667 |      */
14668 |     export type documentOpenedPayload = {
14669 |       /**
14670 |        * Frame object.
14671 |        */
14672 |       frame: Frame;
14673 |     }
14674 |     export type frameResizedPayload = void;
14675 |     /**
14676 |      * Fired when a navigation starts. This event is fired for both
14677 | renderer-initiated and browser-initiated navigations. For renderer-initiated
14678 | navigations, the event is fired after `frameRequestedNavigation`.
14679 | Navigation may still be cancelled after the event is issued. Multiple events
14680 | can be fired for a single navigation, for example, when a same-document
14681 | navigation becomes a cross-document navigation (such as in the case of a
14682 | frameset).
14683 |      */
14684 |     export type frameStartedNavigatingPayload = {
14685 |       /**
14686 |        * ID of the frame that is being navigated.
14687 |        */
14688 |       frameId: FrameId;
14689 |       /**
14690 |        * The URL the navigation started with. The final URL can be different.
14691 |        */
14692 |       url: string;
14693 |       /**
14694 |        * Loader identifier. Even though it is present in case of same-document
14695 | navigation, the previously committed loaderId would not change unless
14696 | the navigation changes from a same-document to a cross-document
14697 | navigation.
14698 |        */
14699 |       loaderId: Network.LoaderId;
14700 |       navigationType: "reload"|"reloadBypassingCache"|"restore"|"restoreWithPost"|"historySameDocument"|"historyDifferentDocument"|"sameDocument"|"differentDocument";
14701 |     }
14702 |     /**
14703 |      * Fired when a renderer-initiated navigation is requested.
14704 | Navigation may still be cancelled after the event is issued.
14705 |      */
14706 |     export type frameRequestedNavigationPayload = {
14707 |       /**
14708 |        * Id of the frame that is being navigated.
14709 |        */
14710 |       frameId: FrameId;
14711 |       /**
14712 |        * The reason for the navigation.
14713 |        */
14714 |       reason: ClientNavigationReason;
14715 |       /**
14716 |        * The destination URL for the requested navigation.
14717 |        */
14718 |       url: string;
14719 |       /**
14720 |        * The disposition for the navigation.
14721 |        */
14722 |       disposition: ClientNavigationDisposition;
14723 |     }
14724 |     /**
14725 |      * Fired when frame schedules a potential navigation.
14726 |      */
14727 |     export type frameScheduledNavigationPayload = {
14728 |       /**
14729 |        * Id of the frame that has scheduled a navigation.
14730 |        */
14731 |       frameId: FrameId;
14732 |       /**
14733 |        * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not
14734 | guaranteed to start.
14735 |        */
14736 |       delay: number;
14737 |       /**
14738 |        * The reason for the navigation.
14739 |        */
14740 |       reason: ClientNavigationReason;
14741 |       /**
14742 |        * The destination URL for the scheduled navigation.
14743 |        */
14744 |       url: string;
14745 |     }
14746 |     /**
14747 |      * Fired when frame has started loading.
14748 |      */
14749 |     export type frameStartedLoadingPayload = {
14750 |       /**
14751 |        * Id of the frame that has started loading.
14752 |        */
14753 |       frameId: FrameId;
14754 |     }
14755 |     /**
14756 |      * Fired when frame has stopped loading.
14757 |      */
14758 |     export type frameStoppedLoadingPayload = {
14759 |       /**
14760 |        * Id of the frame that has stopped loading.
14761 |        */
14762 |       frameId: FrameId;
14763 |     }
14764 |     /**
14765 |      * Fired when page is about to start a download.
14766 | Deprecated. Use Browser.downloadWillBegin instead.
14767 |      */
14768 |     export type downloadWillBeginPayload = {
14769 |       /**
14770 |        * Id of the frame that caused download to begin.
14771 |        */
14772 |       frameId: FrameId;
14773 |       /**
14774 |        * Global unique identifier of the download.
14775 |        */
14776 |       guid: string;
14777 |       /**
14778 |        * URL of the resource being downloaded.
14779 |        */
14780 |       url: string;
14781 |       /**
14782 |        * Suggested file name of the resource (the actual name of the file saved on disk may differ).
14783 |        */
14784 |       suggestedFilename: string;
14785 |     }
14786 |     /**
14787 |      * Fired when download makes progress. Last call has |done| == true.
14788 | Deprecated. Use Browser.downloadProgress instead.
14789 |      */
14790 |     export type downloadProgressPayload = {
14791 |       /**
14792 |        * Global unique identifier of the download.
14793 |        */
14794 |       guid: string;
14795 |       /**
14796 |        * Total expected bytes to download.
14797 |        */
14798 |       totalBytes: number;
14799 |       /**
14800 |        * Total bytes received.
14801 |        */
14802 |       receivedBytes: number;
14803 |       /**
14804 |        * Download status.
14805 |        */
14806 |       state: "inProgress"|"completed"|"canceled";
14807 |     }
14808 |     /**
14809 |      * Fired when interstitial page was hidden
14810 |      */
14811 |     export type interstitialHiddenPayload = void;
14812 |     /**
14813 |      * Fired when interstitial page was shown
14814 |      */
14815 |     export type interstitialShownPayload = void;
14816 |     /**
14817 |      * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been
14818 | closed.
14819 |      */
14820 |     export type javascriptDialogClosedPayload = {
14821 |       /**
14822 |        * Frame id.
14823 |        */
14824 |       frameId: FrameId;
14825 |       /**
14826 |        * Whether dialog was confirmed.
14827 |        */
14828 |       result: boolean;
14829 |       /**
14830 |        * User input in case of prompt.
14831 |        */
14832 |       userInput: string;
14833 |     }
14834 |     /**
14835 |      * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to
14836 | open.
14837 |      */
14838 |     export type javascriptDialogOpeningPayload = {
14839 |       /**
14840 |        * Frame url.
14841 |        */
14842 |       url: string;
14843 |       /**
14844 |        * Frame id.
14845 |        */
14846 |       frameId: FrameId;
14847 |       /**
14848 |        * Message that will be displayed by the dialog.
14849 |        */
14850 |       message: string;
14851 |       /**
14852 |        * Dialog type.
14853 |        */
14854 |       type: DialogType;
14855 |       /**
14856 |        * True iff browser is capable showing or acting on the given dialog. When browser has no
14857 | dialog handler for given target, calling alert while Page domain is engaged will stall
14858 | the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
14859 |        */
14860 |       hasBrowserHandler: boolean;
14861 |       /**
14862 |        * Default dialog prompt.
14863 |        */
14864 |       defaultPrompt?: string;
14865 |     }
14866 |     /**
14867 |      * Fired for lifecycle events (navigation, load, paint, etc) in the current
14868 | target (including local frames).
14869 |      */
14870 |     export type lifecycleEventPayload = {
14871 |       /**
14872 |        * Id of the frame.
14873 |        */
14874 |       frameId: FrameId;
14875 |       /**
14876 |        * Loader identifier. Empty string if the request is fetched from worker.
14877 |        */
14878 |       loaderId: Network.LoaderId;
14879 |       name: string;
14880 |       timestamp: Network.MonotonicTime;
14881 |     }
14882 |     /**
14883 |      * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do
14884 | not assume any ordering with the Page.frameNavigated event. This event is fired only for
14885 | main-frame history navigation where the document changes (non-same-document navigations),
14886 | when bfcache navigation fails.
14887 |      */
14888 |     export type backForwardCacheNotUsedPayload = {
14889 |       /**
14890 |        * The loader id for the associated navigation.
14891 |        */
14892 |       loaderId: Network.LoaderId;
14893 |       /**
14894 |        * The frame id of the associated frame.
14895 |        */
14896 |       frameId: FrameId;
14897 |       /**
14898 |        * Array of reasons why the page could not be cached. This must not be empty.
14899 |        */
14900 |       notRestoredExplanations: BackForwardCacheNotRestoredExplanation[];
14901 |       /**
14902 |        * Tree structure of reasons why the page could not be cached for each frame.
14903 |        */
14904 |       notRestoredExplanationsTree?: BackForwardCacheNotRestoredExplanationTree;
14905 |     }
14906 |     export type loadEventFiredPayload = {
14907 |       timestamp: Network.MonotonicTime;
14908 |     }
14909 |     /**
14910 |      * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
14911 |      */
14912 |     export type navigatedWithinDocumentPayload = {
14913 |       /**
14914 |        * Id of the frame.
14915 |        */
14916 |       frameId: FrameId;
14917 |       /**
14918 |        * Frame's new url.
14919 |        */
14920 |       url: string;
14921 |       /**
14922 |        * Navigation type
14923 |        */
14924 |       navigationType: "fragment"|"historyApi"|"other";
14925 |     }
14926 |     /**
14927 |      * Compressed image data requested by the `startScreencast`.
14928 |      */
14929 |     export type screencastFramePayload = {
14930 |       /**
14931 |        * Base64-encoded compressed image.
14932 |        */
14933 |       data: binary;
14934 |       /**
14935 |        * Screencast frame metadata.
14936 |        */
14937 |       metadata: ScreencastFrameMetadata;
14938 |       /**
14939 |        * Frame number.
14940 |        */
14941 |       sessionId: number;
14942 |     }
14943 |     /**
14944 |      * Fired when the page with currently enabled screencast was shown or hidden `.
14945 |      */
14946 |     export type screencastVisibilityChangedPayload = {
14947 |       /**
14948 |        * True if the page is visible.
14949 |        */
14950 |       visible: boolean;
14951 |     }
14952 |     /**
14953 |      * Fired when a new window is going to be opened, via window.open(), link click, form submission,
14954 | etc.
14955 |      */
14956 |     export type windowOpenPayload = {
14957 |       /**
14958 |        * The URL for the new window.
14959 |        */
14960 |       url: string;
14961 |       /**
14962 |        * Window name.
14963 |        */
14964 |       windowName: string;
14965 |       /**
14966 |        * An array of enabled window features.
14967 |        */
14968 |       windowFeatures: string[];
14969 |       /**
14970 |        * Whether or not it was triggered by user gesture.
14971 |        */
14972 |       userGesture: boolean;
14973 |     }
14974 |     /**
14975 |      * Issued for every compilation cache generated.
14976 |      */
14977 |     export type compilationCacheProducedPayload = {
14978 |       url: string;
14979 |       /**
14980 |        * Base64-encoded data
14981 |        */
14982 |       data: binary;
14983 |     }
14984 | 
14985 |     /**
14986 |      * Deprecated, please use addScriptToEvaluateOnNewDocument instead.
14987 |      */
14988 |     export type addScriptToEvaluateOnLoadParameters = {
14989 |       scriptSource: string;
14990 |     }
14991 |     export type addScriptToEvaluateOnLoadReturnValue = {
14992 |       /**
14993 |        * Identifier of the added script.
14994 |        */
14995 |       identifier: ScriptIdentifier;
14996 |     }
14997 |     /**
14998 |      * Evaluates given script in every frame upon creation (before loading frame's scripts).
14999 |      */
15000 |     export type addScriptToEvaluateOnNewDocumentParameters = {
15001 |       source: string;
15002 |       /**
15003 |        * If specified, creates an isolated world with the given name and evaluates given script in it.
15004 | This world name will be used as the ExecutionContextDescription::name when the corresponding
15005 | event is emitted.
15006 |        */
15007 |       worldName?: string;
15008 |       /**
15009 |        * Specifies whether command line API should be available to the script, defaults
15010 | to false.
15011 |        */
15012 |       includeCommandLineAPI?: boolean;
15013 |       /**
15014 |        * If true, runs the script immediately on existing execution contexts or worlds.
15015 | Default: false.
15016 |        */
15017 |       runImmediately?: boolean;
15018 |     }
15019 |     export type addScriptToEvaluateOnNewDocumentReturnValue = {
15020 |       /**
15021 |        * Identifier of the added script.
15022 |        */
15023 |       identifier: ScriptIdentifier;
15024 |     }
15025 |     /**
15026 |      * Brings page to front (activates tab).
15027 |      */
15028 |     export type bringToFrontParameters = {
15029 |     }
15030 |     export type bringToFrontReturnValue = {
15031 |     }
15032 |     /**
15033 |      * Capture page screenshot.
15034 |      */
15035 |     export type captureScreenshotParameters = {
15036 |       /**
15037 |        * Image compression format (defaults to png).
15038 |        */
15039 |       format?: "jpeg"|"png"|"webp";
15040 |       /**
15041 |        * Compression quality from range [0..100] (jpeg only).
15042 |        */
15043 |       quality?: number;
15044 |       /**
15045 |        * Capture the screenshot of a given region only.
15046 |        */
15047 |       clip?: Viewport;
15048 |       /**
15049 |        * Capture the screenshot from the surface, rather than the view. Defaults to true.
15050 |        */
15051 |       fromSurface?: boolean;
15052 |       /**
15053 |        * Capture the screenshot beyond the viewport. Defaults to false.
15054 |        */
15055 |       captureBeyondViewport?: boolean;
15056 |       /**
15057 |        * Optimize image encoding for speed, not for resulting size (defaults to false)
15058 |        */
15059 |       optimizeForSpeed?: boolean;
15060 |     }
15061 |     export type captureScreenshotReturnValue = {
15062 |       /**
15063 |        * Base64-encoded image data.
15064 |        */
15065 |       data: binary;
15066 |     }
15067 |     /**
15068 |      * Returns a snapshot of the page as a string. For MHTML format, the serialization includes
15069 | iframes, shadow DOM, external resources, and element-inline styles.
15070 |      */
15071 |     export type captureSnapshotParameters = {
15072 |       /**
15073 |        * Format (defaults to mhtml).
15074 |        */
15075 |       format?: "mhtml";
15076 |     }
15077 |     export type captureSnapshotReturnValue = {
15078 |       /**
15079 |        * Serialized page data.
15080 |        */
15081 |       data: string;
15082 |     }
15083 |     /**
15084 |      * Clears the overridden device metrics.
15085 |      */
15086 |     export type clearDeviceMetricsOverrideParameters = {
15087 |     }
15088 |     export type clearDeviceMetricsOverrideReturnValue = {
15089 |     }
15090 |     /**
15091 |      * Clears the overridden Device Orientation.
15092 |      */
15093 |     export type clearDeviceOrientationOverrideParameters = {
15094 |     }
15095 |     export type clearDeviceOrientationOverrideReturnValue = {
15096 |     }
15097 |     /**
15098 |      * Clears the overridden Geolocation Position and Error.
15099 |      */
15100 |     export type clearGeolocationOverrideParameters = {
15101 |     }
15102 |     export type clearGeolocationOverrideReturnValue = {
15103 |     }
15104 |     /**
15105 |      * Creates an isolated world for the given frame.
15106 |      */
15107 |     export type createIsolatedWorldParameters = {
15108 |       /**
15109 |        * Id of the frame in which the isolated world should be created.
15110 |        */
15111 |       frameId: FrameId;
15112 |       /**
15113 |        * An optional name which is reported in the Execution Context.
15114 |        */
15115 |       worldName?: string;
15116 |       /**
15117 |        * Whether or not universal access should be granted to the isolated world. This is a powerful
15118 | option, use with caution.
15119 |        */
15120 |       grantUniveralAccess?: boolean;
15121 |     }
15122 |     export type createIsolatedWorldReturnValue = {
15123 |       /**
15124 |        * Execution context of the isolated world.
15125 |        */
15126 |       executionContextId: Runtime.ExecutionContextId;
15127 |     }
15128 |     /**
15129 |      * Deletes browser cookie with given name, domain and path.
15130 |      */
15131 |     export type deleteCookieParameters = {
15132 |       /**
15133 |        * Name of the cookie to remove.
15134 |        */
15135 |       cookieName: string;
15136 |       /**
15137 |        * URL to match cooke domain and path.
15138 |        */
15139 |       url: string;
15140 |     }
15141 |     export type deleteCookieReturnValue = {
15142 |     }
15143 |     /**
15144 |      * Disables page domain notifications.
15145 |      */
15146 |     export type disableParameters = {
15147 |     }
15148 |     export type disableReturnValue = {
15149 |     }
15150 |     /**
15151 |      * Enables page domain notifications.
15152 |      */
15153 |     export type enableParameters = {
15154 |       /**
15155 |        * If true, the `Page.fileChooserOpened` event will be emitted regardless of the state set by
15156 | `Page.setInterceptFileChooserDialog` command (default: false).
15157 |        */
15158 |       enableFileChooserOpenedEvent?: boolean;
15159 |     }
15160 |     export type enableReturnValue = {
15161 |     }
15162 |     /**
15163 |      * Gets the processed manifest for this current document.
15164 |   This API always waits for the manifest to be loaded.
15165 |   If manifestId is provided, and it does not match the manifest of the
15166 |     current document, this API errors out.
15167 |   If there is not a loaded page, this API errors out immediately.
15168 |      */
15169 |     export type getAppManifestParameters = {
15170 |       manifestId?: string;
15171 |     }
15172 |     export type getAppManifestReturnValue = {
15173 |       /**
15174 |        * Manifest location.
15175 |        */
15176 |       url: string;
15177 |       errors: AppManifestError[];
15178 |       /**
15179 |        * Manifest content.
15180 |        */
15181 |       data?: string;
15182 |       /**
15183 |        * Parsed manifest properties. Deprecated, use manifest instead.
15184 |        */
15185 |       parsed?: AppManifestParsedProperties;
15186 |       manifest: WebAppManifest;
15187 |     }
15188 |     export type getInstallabilityErrorsParameters = {
15189 |     }
15190 |     export type getInstallabilityErrorsReturnValue = {
15191 |       installabilityErrors: InstallabilityError[];
15192 |     }
15193 |     /**
15194 |      * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
15195 |      */
15196 |     export type getManifestIconsParameters = {
15197 |     }
15198 |     export type getManifestIconsReturnValue = {
15199 |       primaryIcon?: binary;
15200 |     }
15201 |     /**
15202 |      * Returns the unique (PWA) app id.
15203 | Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
15204 |      */
15205 |     export type getAppIdParameters = {
15206 |     }
15207 |     export type getAppIdReturnValue = {
15208 |       /**
15209 |        * App id, either from manifest's id attribute or computed from start_url
15210 |        */
15211 |       appId?: string;
15212 |       /**
15213 |        * Recommendation for manifest's id attribute to match current id computed from start_url
15214 |        */
15215 |       recommendedId?: string;
15216 |     }
15217 |     export type getAdScriptAncestryParameters = {
15218 |       frameId: FrameId;
15219 |     }
15220 |     export type getAdScriptAncestryReturnValue = {
15221 |       /**
15222 |        * The ancestry chain of ad script identifiers leading to this frame's
15223 | creation, along with the root script's filterlist rule. The ancestry
15224 | chain is ordered from the most immediate script (in the frame creation
15225 | stack) to more distant ancestors (that created the immediately preceding
15226 | script). Only sent if frame is labelled as an ad and ids are available.
15227 |        */
15228 |       adScriptAncestry?: AdScriptAncestry;
15229 |     }
15230 |     /**
15231 |      * Returns present frame tree structure.
15232 |      */
15233 |     export type getFrameTreeParameters = {
15234 |     }
15235 |     export type getFrameTreeReturnValue = {
15236 |       /**
15237 |        * Present frame tree structure.
15238 |        */
15239 |       frameTree: FrameTree;
15240 |     }
15241 |     /**
15242 |      * Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
15243 |      */
15244 |     export type getLayoutMetricsParameters = {
15245 |     }
15246 |     export type getLayoutMetricsReturnValue = {
15247 |       /**
15248 |        * Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead.
15249 |        */
15250 |       layoutViewport: LayoutViewport;
15251 |       /**
15252 |        * Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead.
15253 |        */
15254 |       visualViewport: VisualViewport;
15255 |       /**
15256 |        * Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead.
15257 |        */
15258 |       contentSize: DOM.Rect;
15259 |       /**
15260 |        * Metrics relating to the layout viewport in CSS pixels.
15261 |        */
15262 |       cssLayoutViewport: LayoutViewport;
15263 |       /**
15264 |        * Metrics relating to the visual viewport in CSS pixels.
15265 |        */
15266 |       cssVisualViewport: VisualViewport;
15267 |       /**
15268 |        * Size of scrollable area in CSS pixels.
15269 |        */
15270 |       cssContentSize: DOM.Rect;
15271 |     }
15272 |     /**
15273 |      * Returns navigation history for the current page.
15274 |      */
15275 |     export type getNavigationHistoryParameters = {
15276 |     }
15277 |     export type getNavigationHistoryReturnValue = {
15278 |       /**
15279 |        * Index of the current navigation history entry.
15280 |        */
15281 |       currentIndex: number;
15282 |       /**
15283 |        * Array of navigation history entries.
15284 |        */
15285 |       entries: NavigationEntry[];
15286 |     }
15287 |     /**
15288 |      * Resets navigation history for the current page.
15289 |      */
15290 |     export type resetNavigationHistoryParameters = {
15291 |     }
15292 |     export type resetNavigationHistoryReturnValue = {
15293 |     }
15294 |     /**
15295 |      * Returns content of the given resource.
15296 |      */
15297 |     export type getResourceContentParameters = {
15298 |       /**
15299 |        * Frame id to get resource for.
15300 |        */
15301 |       frameId: FrameId;
15302 |       /**
15303 |        * URL of the resource to get content for.
15304 |        */
15305 |       url: string;
15306 |     }
15307 |     export type getResourceContentReturnValue = {
15308 |       /**
15309 |        * Resource content.
15310 |        */
15311 |       content: string;
15312 |       /**
15313 |        * True, if content was served as base64.
15314 |        */
15315 |       base64Encoded: boolean;
15316 |     }
15317 |     /**
15318 |      * Returns present frame / resource tree structure.
15319 |      */
15320 |     export type getResourceTreeParameters = {
15321 |     }
15322 |     export type getResourceTreeReturnValue = {
15323 |       /**
15324 |        * Present frame / resource tree structure.
15325 |        */
15326 |       frameTree: FrameResourceTree;
15327 |     }
15328 |     /**
15329 |      * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
15330 |      */
15331 |     export type handleJavaScriptDialogParameters = {
15332 |       /**
15333 |        * Whether to accept or dismiss the dialog.
15334 |        */
15335 |       accept: boolean;
15336 |       /**
15337 |        * The text to enter into the dialog prompt before accepting. Used only if this is a prompt
15338 | dialog.
15339 |        */
15340 |       promptText?: string;
15341 |     }
15342 |     export type handleJavaScriptDialogReturnValue = {
15343 |     }
15344 |     /**
15345 |      * Navigates current page to the given URL.
15346 |      */
15347 |     export type navigateParameters = {
15348 |       /**
15349 |        * URL to navigate the page to.
15350 |        */
15351 |       url: string;
15352 |       /**
15353 |        * Referrer URL.
15354 |        */
15355 |       referrer?: string;
15356 |       /**
15357 |        * Intended transition type.
15358 |        */
15359 |       transitionType?: TransitionType;
15360 |       /**
15361 |        * Frame id to navigate, if not specified navigates the top frame.
15362 |        */
15363 |       frameId?: FrameId;
15364 |       /**
15365 |        * Referrer-policy used for the navigation.
15366 |        */
15367 |       referrerPolicy?: ReferrerPolicy;
15368 |     }
15369 |     export type navigateReturnValue = {
15370 |       /**
15371 |        * Frame id that has navigated (or failed to navigate)
15372 |        */
15373 |       frameId: FrameId;
15374 |       /**
15375 |        * Loader identifier. This is omitted in case of same-document navigation,
15376 | as the previously committed loaderId would not change.
15377 |        */
15378 |       loaderId?: Network.LoaderId;
15379 |       /**
15380 |        * User friendly error message, present if and only if navigation has failed.
15381 |        */
15382 |       errorText?: string;
15383 |       /**
15384 |        * Whether the navigation resulted in a download.
15385 |        */
15386 |       isDownload?: boolean;
15387 |     }
15388 |     /**
15389 |      * Navigates current page to the given history entry.
15390 |      */
15391 |     export type navigateToHistoryEntryParameters = {
15392 |       /**
15393 |        * Unique id of the entry to navigate to.
15394 |        */
15395 |       entryId: number;
15396 |     }
15397 |     export type navigateToHistoryEntryReturnValue = {
15398 |     }
15399 |     /**
15400 |      * Print page as PDF.
15401 |      */
15402 |     export type printToPDFParameters = {
15403 |       /**
15404 |        * Paper orientation. Defaults to false.
15405 |        */
15406 |       landscape?: boolean;
15407 |       /**
15408 |        * Display header and footer. Defaults to false.
15409 |        */
15410 |       displayHeaderFooter?: boolean;
15411 |       /**
15412 |        * Print background graphics. Defaults to false.
15413 |        */
15414 |       printBackground?: boolean;
15415 |       /**
15416 |        * Scale of the webpage rendering. Defaults to 1.
15417 |        */
15418 |       scale?: number;
15419 |       /**
15420 |        * Paper width in inches. Defaults to 8.5 inches.
15421 |        */
15422 |       paperWidth?: number;
15423 |       /**
15424 |        * Paper height in inches. Defaults to 11 inches.
15425 |        */
15426 |       paperHeight?: number;
15427 |       /**
15428 |        * Top margin in inches. Defaults to 1cm (~0.4 inches).
15429 |        */
15430 |       marginTop?: number;
15431 |       /**
15432 |        * Bottom margin in inches. Defaults to 1cm (~0.4 inches).
15433 |        */
15434 |       marginBottom?: number;
15435 |       /**
15436 |        * Left margin in inches. Defaults to 1cm (~0.4 inches).
15437 |        */
15438 |       marginLeft?: number;
15439 |       /**
15440 |        * Right margin in inches. Defaults to 1cm (~0.4 inches).
15441 |        */
15442 |       marginRight?: number;
15443 |       /**
15444 |        * Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are
15445 | printed in the document order, not in the order specified, and no
15446 | more than once.
15447 | Defaults to empty string, which implies the entire document is printed.
15448 | The page numbers are quietly capped to actual page count of the
15449 | document, and ranges beyond the end of the document are ignored.
15450 | If this results in no pages to print, an error is reported.
15451 | It is an error to specify a range with start greater than end.
15452 |        */
15453 |       pageRanges?: string;
15454 |       /**
15455 |        * HTML template for the print header. Should be valid HTML markup with following
15456 | classes used to inject printing values into them:
15457 | - `date`: formatted print date
15458 | - `title`: document title
15459 | - `url`: document location
15460 | - `pageNumber`: current page number
15461 | - `totalPages`: total pages in the document
15462 | 
15463 | For example, `<span class=title></span>` would generate span containing the title.
15464 |        */
15465 |       headerTemplate?: string;
15466 |       /**
15467 |        * HTML template for the print footer. Should use the same format as the `headerTemplate`.
15468 |        */
15469 |       footerTemplate?: string;
15470 |       /**
15471 |        * Whether or not to prefer page size as defined by css. Defaults to false,
15472 | in which case the content will be scaled to fit the paper size.
15473 |        */
15474 |       preferCSSPageSize?: boolean;
15475 |       /**
15476 |        * return as stream
15477 |        */
15478 |       transferMode?: "ReturnAsBase64"|"ReturnAsStream";
15479 |       /**
15480 |        * Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
15481 |        */
15482 |       generateTaggedPDF?: boolean;
15483 |       /**
15484 |        * Whether or not to embed the document outline into the PDF.
15485 |        */
15486 |       generateDocumentOutline?: boolean;
15487 |     }
15488 |     export type printToPDFReturnValue = {
15489 |       /**
15490 |        * Base64-encoded pdf data. Empty if |returnAsStream| is specified.
15491 |        */
15492 |       data: binary;
15493 |       /**
15494 |        * A handle of the stream that holds resulting PDF data.
15495 |        */
15496 |       stream?: IO.StreamHandle;
15497 |     }
15498 |     /**
15499 |      * Reloads given page optionally ignoring the cache.
15500 |      */
15501 |     export type reloadParameters = {
15502 |       /**
15503 |        * If true, browser cache is ignored (as if the user pressed Shift+refresh).
15504 |        */
15505 |       ignoreCache?: boolean;
15506 |       /**
15507 |        * If set, the script will be injected into all frames of the inspected page after reload.
15508 | Argument will be ignored if reloading dataURL origin.
15509 |        */
15510 |       scriptToEvaluateOnLoad?: string;
15511 |       /**
15512 |        * If set, an error will be thrown if the target page's main frame's
15513 | loader id does not match the provided id. This prevents accidentally
15514 | reloading an unintended target in case there's a racing navigation.
15515 |        */
15516 |       loaderId?: Network.LoaderId;
15517 |     }
15518 |     export type reloadReturnValue = {
15519 |     }
15520 |     /**
15521 |      * Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
15522 |      */
15523 |     export type removeScriptToEvaluateOnLoadParameters = {
15524 |       identifier: ScriptIdentifier;
15525 |     }
15526 |     export type removeScriptToEvaluateOnLoadReturnValue = {
15527 |     }
15528 |     /**
15529 |      * Removes given script from the list.
15530 |      */
15531 |     export type removeScriptToEvaluateOnNewDocumentParameters = {
15532 |       identifier: ScriptIdentifier;
15533 |     }
15534 |     export type removeScriptToEvaluateOnNewDocumentReturnValue = {
15535 |     }
15536 |     /**
15537 |      * Acknowledges that a screencast frame has been received by the frontend.
15538 |      */
15539 |     export type screencastFrameAckParameters = {
15540 |       /**
15541 |        * Frame number.
15542 |        */
15543 |       sessionId: number;
15544 |     }
15545 |     export type screencastFrameAckReturnValue = {
15546 |     }
15547 |     /**
15548 |      * Searches for given string in resource content.
15549 |      */
15550 |     export type searchInResourceParameters = {
15551 |       /**
15552 |        * Frame id for resource to search in.
15553 |        */
15554 |       frameId: FrameId;
15555 |       /**
15556 |        * URL of the resource to search in.
15557 |        */
15558 |       url: string;
15559 |       /**
15560 |        * String to search for.
15561 |        */
15562 |       query: string;
15563 |       /**
15564 |        * If true, search is case sensitive.
15565 |        */
15566 |       caseSensitive?: boolean;
15567 |       /**
15568 |        * If true, treats string parameter as regex.
15569 |        */
15570 |       isRegex?: boolean;
15571 |     }
15572 |     export type searchInResourceReturnValue = {
15573 |       /**
15574 |        * List of search matches.
15575 |        */
15576 |       result: Debugger.SearchMatch[];
15577 |     }
15578 |     /**
15579 |      * Enable Chrome's experimental ad filter on all sites.
15580 |      */
15581 |     export type setAdBlockingEnabledParameters = {
15582 |       /**
15583 |        * Whether to block ads.
15584 |        */
15585 |       enabled: boolean;
15586 |     }
15587 |     export type setAdBlockingEnabledReturnValue = {
15588 |     }
15589 |     /**
15590 |      * Enable page Content Security Policy by-passing.
15591 |      */
15592 |     export type setBypassCSPParameters = {
15593 |       /**
15594 |        * Whether to bypass page CSP.
15595 |        */
15596 |       enabled: boolean;
15597 |     }
15598 |     export type setBypassCSPReturnValue = {
15599 |     }
15600 |     /**
15601 |      * Get Permissions Policy state on given frame.
15602 |      */
15603 |     export type getPermissionsPolicyStateParameters = {
15604 |       frameId: FrameId;
15605 |     }
15606 |     export type getPermissionsPolicyStateReturnValue = {
15607 |       states: PermissionsPolicyFeatureState[];
15608 |     }
15609 |     /**
15610 |      * Get Origin Trials on given frame.
15611 |      */
15612 |     export type getOriginTrialsParameters = {
15613 |       frameId: FrameId;
15614 |     }
15615 |     export type getOriginTrialsReturnValue = {
15616 |       originTrials: OriginTrial[];
15617 |     }
15618 |     /**
15619 |      * Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
15620 | window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
15621 | query results).
15622 |      */
15623 |     export type setDeviceMetricsOverrideParameters = {
15624 |       /**
15625 |        * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
15626 |        */
15627 |       width: number;
15628 |       /**
15629 |        * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
15630 |        */
15631 |       height: number;
15632 |       /**
15633 |        * Overriding device scale factor value. 0 disables the override.
15634 |        */
15635 |       deviceScaleFactor: number;
15636 |       /**
15637 |        * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text
15638 | autosizing and more.
15639 |        */
15640 |       mobile: boolean;
15641 |       /**
15642 |        * Scale to apply to resulting view image.
15643 |        */
15644 |       scale?: number;
15645 |       /**
15646 |        * Overriding screen width value in pixels (minimum 0, maximum 10000000).
15647 |        */
15648 |       screenWidth?: number;
15649 |       /**
15650 |        * Overriding screen height value in pixels (minimum 0, maximum 10000000).
15651 |        */
15652 |       screenHeight?: number;
15653 |       /**
15654 |        * Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
15655 |        */
15656 |       positionX?: number;
15657 |       /**
15658 |        * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
15659 |        */
15660 |       positionY?: number;
15661 |       /**
15662 |        * Do not set visible view size, rely upon explicit setVisibleSize call.
15663 |        */
15664 |       dontSetVisibleSize?: boolean;
15665 |       /**
15666 |        * Screen orientation override.
15667 |        */
15668 |       screenOrientation?: Emulation.ScreenOrientation;
15669 |       /**
15670 |        * The viewport dimensions and scale. If not set, the override is cleared.
15671 |        */
15672 |       viewport?: Viewport;
15673 |     }
15674 |     export type setDeviceMetricsOverrideReturnValue = {
15675 |     }
15676 |     /**
15677 |      * Overrides the Device Orientation.
15678 |      */
15679 |     export type setDeviceOrientationOverrideParameters = {
15680 |       /**
15681 |        * Mock alpha
15682 |        */
15683 |       alpha: number;
15684 |       /**
15685 |        * Mock beta
15686 |        */
15687 |       beta: number;
15688 |       /**
15689 |        * Mock gamma
15690 |        */
15691 |       gamma: number;
15692 |     }
15693 |     export type setDeviceOrientationOverrideReturnValue = {
15694 |     }
15695 |     /**
15696 |      * Set generic font families.
15697 |      */
15698 |     export type setFontFamiliesParameters = {
15699 |       /**
15700 |        * Specifies font families to set. If a font family is not specified, it won't be changed.
15701 |        */
15702 |       fontFamilies: FontFamilies;
15703 |       /**
15704 |        * Specifies font families to set for individual scripts.
15705 |        */
15706 |       forScripts?: ScriptFontFamilies[];
15707 |     }
15708 |     export type setFontFamiliesReturnValue = {
15709 |     }
15710 |     /**
15711 |      * Set default font sizes.
15712 |      */
15713 |     export type setFontSizesParameters = {
15714 |       /**
15715 |        * Specifies font sizes to set. If a font size is not specified, it won't be changed.
15716 |        */
15717 |       fontSizes: FontSizes;
15718 |     }
15719 |     export type setFontSizesReturnValue = {
15720 |     }
15721 |     /**
15722 |      * Sets given markup as the document's HTML.
15723 |      */
15724 |     export type setDocumentContentParameters = {
15725 |       /**
15726 |        * Frame id to set HTML for.
15727 |        */
15728 |       frameId: FrameId;
15729 |       /**
15730 |        * HTML content to set.
15731 |        */
15732 |       html: string;
15733 |     }
15734 |     export type setDocumentContentReturnValue = {
15735 |     }
15736 |     /**
15737 |      * Set the behavior when downloading a file.
15738 |      */
15739 |     export type setDownloadBehaviorParameters = {
15740 |       /**
15741 |        * Whether to allow all or deny all download requests, or use default Chrome behavior if
15742 | available (otherwise deny).
15743 |        */
15744 |       behavior: "deny"|"allow"|"default";
15745 |       /**
15746 |        * The default path to save downloaded files to. This is required if behavior is set to 'allow'
15747 |        */
15748 |       downloadPath?: string;
15749 |     }
15750 |     export type setDownloadBehaviorReturnValue = {
15751 |     }
15752 |     /**
15753 |      * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
15754 | unavailable.
15755 |      */
15756 |     export type setGeolocationOverrideParameters = {
15757 |       /**
15758 |        * Mock latitude
15759 |        */
15760 |       latitude?: number;
15761 |       /**
15762 |        * Mock longitude
15763 |        */
15764 |       longitude?: number;
15765 |       /**
15766 |        * Mock accuracy
15767 |        */
15768 |       accuracy?: number;
15769 |     }
15770 |     export type setGeolocationOverrideReturnValue = {
15771 |     }
15772 |     /**
15773 |      * Controls whether page will emit lifecycle events.
15774 |      */
15775 |     export type setLifecycleEventsEnabledParameters = {
15776 |       /**
15777 |        * If true, starts emitting lifecycle events.
15778 |        */
15779 |       enabled: boolean;
15780 |     }
15781 |     export type setLifecycleEventsEnabledReturnValue = {
15782 |     }
15783 |     /**
15784 |      * Toggles mouse event-based touch event emulation.
15785 |      */
15786 |     export type setTouchEmulationEnabledParameters = {
15787 |       /**
15788 |        * Whether the touch event emulation should be enabled.
15789 |        */
15790 |       enabled: boolean;
15791 |       /**
15792 |        * Touch/gesture events configuration. Default: current platform.
15793 |        */
15794 |       configuration?: "mobile"|"desktop";
15795 |     }
15796 |     export type setTouchEmulationEnabledReturnValue = {
15797 |     }
15798 |     /**
15799 |      * Starts sending each frame using the `screencastFrame` event.
15800 |      */
15801 |     export type startScreencastParameters = {
15802 |       /**
15803 |        * Image compression format.
15804 |        */
15805 |       format?: "jpeg"|"png";
15806 |       /**
15807 |        * Compression quality from range [0..100].
15808 |        */
15809 |       quality?: number;
15810 |       /**
15811 |        * Maximum screenshot width.
15812 |        */
15813 |       maxWidth?: number;
15814 |       /**
15815 |        * Maximum screenshot height.
15816 |        */
15817 |       maxHeight?: number;
15818 |       /**
15819 |        * Send every n-th frame.
15820 |        */
15821 |       everyNthFrame?: number;
15822 |     }
15823 |     export type startScreencastReturnValue = {
15824 |     }
15825 |     /**
15826 |      * Force the page stop all navigations and pending resource fetches.
15827 |      */
15828 |     export type stopLoadingParameters = {
15829 |     }
15830 |     export type stopLoadingReturnValue = {
15831 |     }
15832 |     /**
15833 |      * Crashes renderer on the IO thread, generates minidumps.
15834 |      */
15835 |     export type crashParameters = {
15836 |     }
15837 |     export type crashReturnValue = {
15838 |     }
15839 |     /**
15840 |      * Tries to close page, running its beforeunload hooks, if any.
15841 |      */
15842 |     export type closeParameters = {
15843 |     }
15844 |     export type closeReturnValue = {
15845 |     }
15846 |     /**
15847 |      * Tries to update the web lifecycle state of the page.
15848 | It will transition the page to the given state according to:
15849 | https://github.com/WICG/web-lifecycle/
15850 |      */
15851 |     export type setWebLifecycleStateParameters = {
15852 |       /**
15853 |        * Target lifecycle state
15854 |        */
15855 |       state: "frozen"|"active";
15856 |     }
15857 |     export type setWebLifecycleStateReturnValue = {
15858 |     }
15859 |     /**
15860 |      * Stops sending each frame in the `screencastFrame`.
15861 |      */
15862 |     export type stopScreencastParameters = {
15863 |     }
15864 |     export type stopScreencastReturnValue = {
15865 |     }
15866 |     /**
15867 |      * Requests backend to produce compilation cache for the specified scripts.
15868 | `scripts` are appended to the list of scripts for which the cache
15869 | would be produced. The list may be reset during page navigation.
15870 | When script with a matching URL is encountered, the cache is optionally
15871 | produced upon backend discretion, based on internal heuristics.
15872 | See also: `Page.compilationCacheProduced`.
15873 |      */
15874 |     export type produceCompilationCacheParameters = {
15875 |       scripts: CompilationCacheParams[];
15876 |     }
15877 |     export type produceCompilationCacheReturnValue = {
15878 |     }
15879 |     /**
15880 |      * Seeds compilation cache for given url. Compilation cache does not survive
15881 | cross-process navigation.
15882 |      */
15883 |     export type addCompilationCacheParameters = {
15884 |       url: string;
15885 |       /**
15886 |        * Base64-encoded data
15887 |        */
15888 |       data: binary;
15889 |     }
15890 |     export type addCompilationCacheReturnValue = {
15891 |     }
15892 |     /**
15893 |      * Clears seeded compilation cache.
15894 |      */
15895 |     export type clearCompilationCacheParameters = {
15896 |     }
15897 |     export type clearCompilationCacheReturnValue = {
15898 |     }
15899 |     /**
15900 |      * Sets the Secure Payment Confirmation transaction mode.
15901 | https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
15902 |      */
15903 |     export type setSPCTransactionModeParameters = {
15904 |       mode: "none"|"autoAccept"|"autoChooseToAuthAnotherWay"|"autoReject"|"autoOptOut";
15905 |     }
15906 |     export type setSPCTransactionModeReturnValue = {
15907 |     }
15908 |     /**
15909 |      * Extensions for Custom Handlers API:
15910 | https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
15911 |      */
15912 |     export type setRPHRegistrationModeParameters = {
15913 |       mode: "none"|"autoAccept"|"autoReject";
15914 |     }
15915 |     export type setRPHRegistrationModeReturnValue = {
15916 |     }
15917 |     /**
15918 |      * Generates a report for testing.
15919 |      */
15920 |     export type generateTestReportParameters = {
15921 |       /**
15922 |        * Message to be displayed in the report.
15923 |        */
15924 |       message: string;
15925 |       /**
15926 |        * Specifies the endpoint group to deliver the report to.
15927 |        */
15928 |       group?: string;
15929 |     }
15930 |     export type generateTestReportReturnValue = {
15931 |     }
15932 |     /**
15933 |      * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
15934 |      */
15935 |     export type waitForDebuggerParameters = {
15936 |     }
15937 |     export type waitForDebuggerReturnValue = {
15938 |     }
15939 |     /**
15940 |      * Intercept file chooser requests and transfer control to protocol clients.
15941 | When file chooser interception is enabled, native file chooser dialog is not shown.
15942 | Instead, a protocol event `Page.fileChooserOpened` is emitted.
15943 |      */
15944 |     export type setInterceptFileChooserDialogParameters = {
15945 |       enabled: boolean;
15946 |       /**
15947 |        * If true, cancels the dialog by emitting relevant events (if any)
15948 | in addition to not showing it if the interception is enabled
15949 | (default: false).
15950 |        */
15951 |       cancel?: boolean;
15952 |     }
15953 |     export type setInterceptFileChooserDialogReturnValue = {
15954 |     }
15955 |     /**
15956 |      * Enable/disable prerendering manually.
15957 | 
15958 | This command is a short-term solution for https://crbug.com/1440085.
15959 | See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA
15960 | for more details.
15961 | 
15962 | TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
15963 |      */
15964 |     export type setPrerenderingAllowedParameters = {
15965 |       isAllowed: boolean;
15966 |     }
15967 |     export type setPrerenderingAllowedReturnValue = {
15968 |     }
15969 |     /**
15970 |      * Get the annotated page content for the main frame.
15971 | This is an experimental command that is subject to change.
15972 |      */
15973 |     export type getAnnotatedPageContentParameters = {
15974 |       /**
15975 |        * Whether to include actionable information. Defaults to true.
15976 |        */
15977 |       includeActionableInformation?: boolean;
15978 |     }
15979 |     export type getAnnotatedPageContentReturnValue = {
15980 |       /**
15981 |        * The annotated page content as a base64 encoded protobuf.
15982 | The format is defined by the `AnnotatedPageContent` message in
15983 | components/optimization_guide/proto/features/common_quality_data.proto
15984 |        */
15985 |       content: binary;
15986 |     }
15987 |   }
15988 | 
15989 |   export namespace Performance {
15990 |     /**
15991 |      * Run-time execution metric.
15992 |      */
15993 |     export interface Metric {
15994 |       /**
15995 |        * Metric name.
15996 |        */
15997 |       name: string;
15998 |       /**
15999 |        * Metric value.
16000 |        */
16001 |       value: number;
16002 |     }
16003 | 
16004 |     /**
16005 |      * Current values of the metrics.
16006 |      */
16007 |     export type metricsPayload = {
16008 |       /**
16009 |        * Current values of the metrics.
16010 |        */
16011 |       metrics: Metric[];
16012 |       /**
16013 |        * Timestamp title.
16014 |        */
16015 |       title: string;
16016 |     }
16017 | 
16018 |     /**
16019 |      * Disable collecting and reporting metrics.
16020 |      */
16021 |     export type disableParameters = {
16022 |     }
16023 |     export type disableReturnValue = {
16024 |     }
16025 |     /**
16026 |      * Enable collecting and reporting metrics.
16027 |      */
16028 |     export type enableParameters = {
16029 |       /**
16030 |        * Time domain to use for collecting and reporting duration metrics.
16031 |        */
16032 |       timeDomain?: "timeTicks"|"threadTicks";
16033 |     }
16034 |     export type enableReturnValue = {
16035 |     }
16036 |     /**
16037 |      * Sets time domain to use for collecting and reporting duration metrics.
16038 | Note that this must be called before enabling metrics collection. Calling
16039 | this method while metrics collection is enabled returns an error.
16040 |      */
16041 |     export type setTimeDomainParameters = {
16042 |       /**
16043 |        * Time domain
16044 |        */
16045 |       timeDomain: "timeTicks"|"threadTicks";
16046 |     }
16047 |     export type setTimeDomainReturnValue = {
16048 |     }
16049 |     /**
16050 |      * Retrieve current values of run-time metrics.
16051 |      */
16052 |     export type getMetricsParameters = {
16053 |     }
16054 |     export type getMetricsReturnValue = {
16055 |       /**
16056 |        * Current values for run-time metrics.
16057 |        */
16058 |       metrics: Metric[];
16059 |     }
16060 |   }
16061 | 
16062 |   /**
16063 |    * Reporting of performance timeline events, as specified in
16064 | https://w3c.github.io/performance-timeline/#dom-performanceobserver.
16065 |    */
16066 |   export namespace PerformanceTimeline {
16067 |     /**
16068 |      * See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
16069 |      */
16070 |     export interface LargestContentfulPaint {
16071 |       renderTime: Network.TimeSinceEpoch;
16072 |       loadTime: Network.TimeSinceEpoch;
16073 |       /**
16074 |        * The number of pixels being painted.
16075 |        */
16076 |       size: number;
16077 |       /**
16078 |        * The id attribute of the element, if available.
16079 |        */
16080 |       elementId?: string;
16081 |       /**
16082 |        * The URL of the image (may be trimmed).
16083 |        */
16084 |       url?: string;
16085 |       nodeId?: DOM.BackendNodeId;
16086 |     }
16087 |     export interface LayoutShiftAttribution {
16088 |       previousRect: DOM.Rect;
16089 |       currentRect: DOM.Rect;
16090 |       nodeId?: DOM.BackendNodeId;
16091 |     }
16092 |     /**
16093 |      * See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
16094 |      */
16095 |     export interface LayoutShift {
16096 |       /**
16097 |        * Score increment produced by this event.
16098 |        */
16099 |       value: number;
16100 |       hadRecentInput: boolean;
16101 |       lastInputTime: Network.TimeSinceEpoch;
16102 |       sources: LayoutShiftAttribution[];
16103 |     }
16104 |     export interface TimelineEvent {
16105 |       /**
16106 |        * Identifies the frame that this event is related to. Empty for non-frame targets.
16107 |        */
16108 |       frameId: Page.FrameId;
16109 |       /**
16110 |        * The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
16111 | This determines which of the optional "details" fields is present.
16112 |        */
16113 |       type: string;
16114 |       /**
16115 |        * Name may be empty depending on the type.
16116 |        */
16117 |       name: string;
16118 |       /**
16119 |        * Time in seconds since Epoch, monotonically increasing within document lifetime.
16120 |        */
16121 |       time: Network.TimeSinceEpoch;
16122 |       /**
16123 |        * Event duration, if applicable.
16124 |        */
16125 |       duration?: number;
16126 |       lcpDetails?: LargestContentfulPaint;
16127 |       layoutShiftDetails?: LayoutShift;
16128 |     }
16129 | 
16130 |     /**
16131 |      * Sent when a performance timeline event is added. See reportPerformanceTimeline method.
16132 |      */
16133 |     export type timelineEventAddedPayload = {
16134 |       event: TimelineEvent;
16135 |     }
16136 | 
16137 |     /**
16138 |      * Previously buffered events would be reported before method returns.
16139 | See also: timelineEventAdded
16140 |      */
16141 |     export type enableParameters = {
16142 |       /**
16143 |        * The types of event to report, as specified in
16144 | https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype
16145 | The specified filter overrides any previous filters, passing empty
16146 | filter disables recording.
16147 | Note that not all types exposed to the web platform are currently supported.
16148 |        */
16149 |       eventTypes: string[];
16150 |     }
16151 |     export type enableReturnValue = {
16152 |     }
16153 |   }
16154 | 
16155 |   export namespace Preload {
16156 |     /**
16157 |      * Unique id
16158 |      */
16159 |     export type RuleSetId = string;
16160 |     /**
16161 |      * Corresponds to SpeculationRuleSet
16162 |      */
16163 |     export interface RuleSet {
16164 |       id: RuleSetId;
16165 |       /**
16166 |        * Identifies a document which the rule set is associated with.
16167 |        */
16168 |       loaderId: Network.LoaderId;
16169 |       /**
16170 |        * Source text of JSON representing the rule set. If it comes from
16171 | `<script>` tag, it is the textContent of the node. Note that it is
16172 | a JSON for valid case.
16173 | 
16174 | See also:
16175 | - https://wicg.github.io/nav-speculation/speculation-rules.html
16176 | - https://github.com/WICG/nav-speculation/blob/main/triggers.md
16177 |        */
16178 |       sourceText: string;
16179 |       /**
16180 |        * A speculation rule set is either added through an inline
16181 | `<script>` tag or through an external resource via the
16182 | 'Speculation-Rules' HTTP header. For the first case, we include
16183 | the BackendNodeId of the relevant `<script>` tag. For the second
16184 | case, we include the external URL where the rule set was loaded
16185 | from, and also RequestId if Network domain is enabled.
16186 | 
16187 | See also:
16188 | - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script
16189 | - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
16190 |        */
16191 |       backendNodeId?: DOM.BackendNodeId;
16192 |       url?: string;
16193 |       requestId?: Network.RequestId;
16194 |       /**
16195 |        * Error information
16196 | `errorMessage` is null iff `errorType` is null.
16197 |        */
16198 |       errorType?: RuleSetErrorType;
16199 |       /**
16200 |        * TODO(https://crbug.com/1425354): Replace this property with structured error.
16201 |        */
16202 |       errorMessage?: string;
16203 |       /**
16204 |        * For more details, see:
16205 | https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
16206 |        */
16207 |       tag?: string;
16208 |     }
16209 |     export type RuleSetErrorType = "SourceIsNotJsonObject"|"InvalidRulesSkipped"|"InvalidRulesetLevelTag";
16210 |     /**
16211 |      * The type of preloading attempted. It corresponds to
16212 | mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
16213 | isn't being used by clients).
16214 |      */
16215 |     export type SpeculationAction = "Prefetch"|"Prerender"|"PrerenderUntilScript";
16216 |     /**
16217 |      * Corresponds to mojom::SpeculationTargetHint.
16218 | See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
16219 |      */
16220 |     export type SpeculationTargetHint = "Blank"|"Self";
16221 |     /**
16222 |      * A key that identifies a preloading attempt.
16223 | 
16224 | The url used is the url specified by the trigger (i.e. the initial URL), and
16225 | not the final url that is navigated to. For example, prerendering allows
16226 | same-origin main frame navigations during the attempt, but the attempt is
16227 | still keyed with the initial URL.
16228 |      */
16229 |     export interface PreloadingAttemptKey {
16230 |       loaderId: Network.LoaderId;
16231 |       action: SpeculationAction;
16232 |       url: string;
16233 |       targetHint?: SpeculationTargetHint;
16234 |     }
16235 |     /**
16236 |      * Lists sources for a preloading attempt, specifically the ids of rule sets
16237 | that had a speculation rule that triggered the attempt, and the
16238 | BackendNodeIds of <a href> or <area href> elements that triggered the
16239 | attempt (in the case of attempts triggered by a document rule). It is
16240 | possible for multiple rule sets and links to trigger a single attempt.
16241 |      */
16242 |     export interface PreloadingAttemptSource {
16243 |       key: PreloadingAttemptKey;
16244 |       ruleSetIds: RuleSetId[];
16245 |       nodeIds: DOM.BackendNodeId[];
16246 |     }
16247 |     /**
16248 |      * Chrome manages different types of preloads together using a
16249 | concept of preloading pipeline. For example, if a site uses a
16250 | SpeculationRules for prerender, Chrome first starts a prefetch and
16251 | then upgrades it to prerender.
16252 | 
16253 | CDP events for them are emitted separately but they share
16254 | `PreloadPipelineId`.
16255 |      */
16256 |     export type PreloadPipelineId = string;
16257 |     /**
16258 |      * List of FinalStatus reasons for Prerender2.
16259 |      */
16260 |     export type PrerenderFinalStatus = "Activated"|"Destroyed"|"LowEndDevice"|"InvalidSchemeRedirect"|"InvalidSchemeNavigation"|"NavigationRequestBlockedByCsp"|"MojoBinderPolicy"|"RendererProcessCrashed"|"RendererProcessKilled"|"Download"|"TriggerDestroyed"|"NavigationNotCommitted"|"NavigationBadHttpStatus"|"ClientCertRequested"|"NavigationRequestNetworkError"|"CancelAllHostsForTesting"|"DidFailLoad"|"Stop"|"SslCertificateError"|"LoginAuthRequested"|"UaChangeRequiresReload"|"BlockedByClient"|"AudioOutputDeviceRequested"|"MixedContent"|"TriggerBackgrounded"|"MemoryLimitExceeded"|"DataSaverEnabled"|"TriggerUrlHasEffectiveUrl"|"ActivatedBeforeStarted"|"InactivePageRestriction"|"StartFailed"|"TimeoutBackgrounded"|"CrossSiteRedirectInInitialNavigation"|"CrossSiteNavigationInInitialNavigation"|"SameSiteCrossOriginRedirectNotOptInInInitialNavigation"|"SameSiteCrossOriginNavigationNotOptInInInitialNavigation"|"ActivationNavigationParameterMismatch"|"ActivatedInBackground"|"EmbedderHostDisallowed"|"ActivationNavigationDestroyedBeforeSuccess"|"TabClosedByUserGesture"|"TabClosedWithoutUserGesture"|"PrimaryMainFrameRendererProcessCrashed"|"PrimaryMainFrameRendererProcessKilled"|"ActivationFramePolicyNotCompatible"|"PreloadingDisabled"|"BatterySaverEnabled"|"ActivatedDuringMainFrameNavigation"|"PreloadingUnsupportedByWebContents"|"CrossSiteRedirectInMainFrameNavigation"|"CrossSiteNavigationInMainFrameNavigation"|"SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation"|"SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation"|"MemoryPressureOnTrigger"|"MemoryPressureAfterTriggered"|"PrerenderingDisabledByDevTools"|"SpeculationRuleRemoved"|"ActivatedWithAuxiliaryBrowsingContexts"|"MaxNumOfRunningEagerPrerendersExceeded"|"MaxNumOfRunningNonEagerPrerendersExceeded"|"MaxNumOfRunningEmbedderPrerendersExceeded"|"PrerenderingUrlHasEffectiveUrl"|"RedirectedPrerenderingUrlHasEffectiveUrl"|"ActivationUrlHasEffectiveUrl"|"JavaScriptInterfaceAdded"|"JavaScriptInterfaceRemoved"|"AllPrerenderingCanceled"|"WindowClosed"|"SlowNetwork"|"OtherPrerenderedPageActivated"|"V8OptimizerDisabled"|"PrerenderFailedDuringPrefetch"|"BrowsingDataRemoved"|"PrerenderHostReused";
16261 |     /**
16262 |      * Preloading status values, see also PreloadingTriggeringOutcome. This
16263 | status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
16264 |      */
16265 |     export type PreloadingStatus = "Pending"|"Running"|"Ready"|"Success"|"Failure"|"NotSupported";
16266 |     /**
16267 |      * TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and
16268 | filter out the ones that aren't necessary to the developers.
16269 |      */
16270 |     export type PrefetchStatus = "PrefetchAllowed"|"PrefetchFailedIneligibleRedirect"|"PrefetchFailedInvalidRedirect"|"PrefetchFailedMIMENotSupported"|"PrefetchFailedNetError"|"PrefetchFailedNon2XX"|"PrefetchEvictedAfterBrowsingDataRemoved"|"PrefetchEvictedAfterCandidateRemoved"|"PrefetchEvictedForNewerPrefetch"|"PrefetchHeldback"|"PrefetchIneligibleRetryAfter"|"PrefetchIsPrivacyDecoy"|"PrefetchIsStale"|"PrefetchNotEligibleBrowserContextOffTheRecord"|"PrefetchNotEligibleDataSaverEnabled"|"PrefetchNotEligibleExistingProxy"|"PrefetchNotEligibleHostIsNonUnique"|"PrefetchNotEligibleNonDefaultStoragePartition"|"PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy"|"PrefetchNotEligibleSchemeIsNotHttps"|"PrefetchNotEligibleUserHasCookies"|"PrefetchNotEligibleUserHasServiceWorker"|"PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler"|"PrefetchNotEligibleRedirectFromServiceWorker"|"PrefetchNotEligibleRedirectToServiceWorker"|"PrefetchNotEligibleBatterySaverEnabled"|"PrefetchNotEligiblePreloadingDisabled"|"PrefetchNotFinishedInTime"|"PrefetchNotStarted"|"PrefetchNotUsedCookiesChanged"|"PrefetchProxyNotAvailable"|"PrefetchResponseUsed"|"PrefetchSuccessfulButNotUsed"|"PrefetchNotUsedProbeFailed";
16271 |     /**
16272 |      * Information of headers to be displayed when the header mismatch occurred.
16273 |      */
16274 |     export interface PrerenderMismatchedHeaders {
16275 |       headerName: string;
16276 |       initialValue?: string;
16277 |       activationValue?: string;
16278 |     }
16279 | 
16280 |     /**
16281 |      * Upsert. Currently, it is only emitted when a rule set added.
16282 |      */
16283 |     export type ruleSetUpdatedPayload = {
16284 |       ruleSet: RuleSet;
16285 |     }
16286 |     export type ruleSetRemovedPayload = {
16287 |       id: RuleSetId;
16288 |     }
16289 |     /**
16290 |      * Fired when a preload enabled state is updated.
16291 |      */
16292 |     export type preloadEnabledStateUpdatedPayload = {
16293 |       disabledByPreference: boolean;
16294 |       disabledByDataSaver: boolean;
16295 |       disabledByBatterySaver: boolean;
16296 |       disabledByHoldbackPrefetchSpeculationRules: boolean;
16297 |       disabledByHoldbackPrerenderSpeculationRules: boolean;
16298 |     }
16299 |     /**
16300 |      * Fired when a prefetch attempt is updated.
16301 |      */
16302 |     export type prefetchStatusUpdatedPayload = {
16303 |       key: PreloadingAttemptKey;
16304 |       pipelineId: PreloadPipelineId;
16305 |       /**
16306 |        * The frame id of the frame initiating prefetch.
16307 |        */
16308 |       initiatingFrameId: Page.FrameId;
16309 |       prefetchUrl: string;
16310 |       status: PreloadingStatus;
16311 |       prefetchStatus: PrefetchStatus;
16312 |       requestId: Network.RequestId;
16313 |     }
16314 |     /**
16315 |      * Fired when a prerender attempt is updated.
16316 |      */
16317 |     export type prerenderStatusUpdatedPayload = {
16318 |       key: PreloadingAttemptKey;
16319 |       pipelineId: PreloadPipelineId;
16320 |       status: PreloadingStatus;
16321 |       prerenderStatus?: PrerenderFinalStatus;
16322 |       /**
16323 |        * This is used to give users more information about the name of Mojo interface
16324 | that is incompatible with prerender and has caused the cancellation of the attempt.
16325 |        */
16326 |       disallowedMojoInterface?: string;
16327 |       mismatchedHeaders?: PrerenderMismatchedHeaders[];
16328 |     }
16329 |     /**
16330 |      * Send a list of sources for all preloading attempts in a document.
16331 |      */
16332 |     export type preloadingAttemptSourcesUpdatedPayload = {
16333 |       loaderId: Network.LoaderId;
16334 |       preloadingAttemptSources: PreloadingAttemptSource[];
16335 |     }
16336 | 
16337 |     export type enableParameters = {
16338 |     }
16339 |     export type enableReturnValue = {
16340 |     }
16341 |     export type disableParameters = {
16342 |     }
16343 |     export type disableReturnValue = {
16344 |     }
16345 |   }
16346 | 
16347 |   export namespace Security {
16348 |     /**
16349 |      * An internal certificate ID value.
16350 |      */
16351 |     export type CertificateId = number;
16352 |     /**
16353 |      * A description of mixed content (HTTP resources on HTTPS pages), as defined by
16354 | https://www.w3.org/TR/mixed-content/#categories
16355 |      */
16356 |     export type MixedContentType = "blockable"|"optionally-blockable"|"none";
16357 |     /**
16358 |      * The security level of a page or resource.
16359 |      */
16360 |     export type SecurityState = "unknown"|"neutral"|"insecure"|"secure"|"info"|"insecure-broken";
16361 |     /**
16362 |      * Details about the security state of the page certificate.
16363 |      */
16364 |     export interface CertificateSecurityState {
16365 |       /**
16366 |        * Protocol name (e.g. "TLS 1.2" or "QUIC").
16367 |        */
16368 |       protocol: string;
16369 |       /**
16370 |        * Key Exchange used by the connection, or the empty string if not applicable.
16371 |        */
16372 |       keyExchange: string;
16373 |       /**
16374 |        * (EC)DH group used by the connection, if applicable.
16375 |        */
16376 |       keyExchangeGroup?: string;
16377 |       /**
16378 |        * Cipher name.
16379 |        */
16380 |       cipher: string;
16381 |       /**
16382 |        * TLS MAC. Note that AEAD ciphers do not have separate MACs.
16383 |        */
16384 |       mac?: string;
16385 |       /**
16386 |        * Page certificate.
16387 |        */
16388 |       certificate: string[];
16389 |       /**
16390 |        * Certificate subject name.
16391 |        */
16392 |       subjectName: string;
16393 |       /**
16394 |        * Name of the issuing CA.
16395 |        */
16396 |       issuer: string;
16397 |       /**
16398 |        * Certificate valid from date.
16399 |        */
16400 |       validFrom: Network.TimeSinceEpoch;
16401 |       /**
16402 |        * Certificate valid to (expiration) date
16403 |        */
16404 |       validTo: Network.TimeSinceEpoch;
16405 |       /**
16406 |        * The highest priority network error code, if the certificate has an error.
16407 |        */
16408 |       certificateNetworkError?: string;
16409 |       /**
16410 |        * True if the certificate uses a weak signature algorithm.
16411 |        */
16412 |       certificateHasWeakSignature: boolean;
16413 |       /**
16414 |        * True if the certificate has a SHA1 signature in the chain.
16415 |        */
16416 |       certificateHasSha1Signature: boolean;
16417 |       /**
16418 |        * True if modern SSL
16419 |        */
16420 |       modernSSL: boolean;
16421 |       /**
16422 |        * True if the connection is using an obsolete SSL protocol.
16423 |        */
16424 |       obsoleteSslProtocol: boolean;
16425 |       /**
16426 |        * True if the connection is using an obsolete SSL key exchange.
16427 |        */
16428 |       obsoleteSslKeyExchange: boolean;
16429 |       /**
16430 |        * True if the connection is using an obsolete SSL cipher.
16431 |        */
16432 |       obsoleteSslCipher: boolean;
16433 |       /**
16434 |        * True if the connection is using an obsolete SSL signature.
16435 |        */
16436 |       obsoleteSslSignature: boolean;
16437 |     }
16438 |     export type SafetyTipStatus = "badReputation"|"lookalike";
16439 |     export interface SafetyTipInfo {
16440 |       /**
16441 |        * Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.
16442 |        */
16443 |       safetyTipStatus: SafetyTipStatus;
16444 |       /**
16445 |        * The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
16446 |        */
16447 |       safeUrl?: string;
16448 |     }
16449 |     /**
16450 |      * Security state information about the page.
16451 |      */
16452 |     export interface VisibleSecurityState {
16453 |       /**
16454 |        * The security level of the page.
16455 |        */
16456 |       securityState: SecurityState;
16457 |       /**
16458 |        * Security state details about the page certificate.
16459 |        */
16460 |       certificateSecurityState?: CertificateSecurityState;
16461 |       /**
16462 |        * The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
16463 |        */
16464 |       safetyTipInfo?: SafetyTipInfo;
16465 |       /**
16466 |        * Array of security state issues ids.
16467 |        */
16468 |       securityStateIssueIds: string[];
16469 |     }
16470 |     /**
16471 |      * An explanation of an factor contributing to the security state.
16472 |      */
16473 |     export interface SecurityStateExplanation {
16474 |       /**
16475 |        * Security state representing the severity of the factor being explained.
16476 |        */
16477 |       securityState: SecurityState;
16478 |       /**
16479 |        * Title describing the type of factor.
16480 |        */
16481 |       title: string;
16482 |       /**
16483 |        * Short phrase describing the type of factor.
16484 |        */
16485 |       summary: string;
16486 |       /**
16487 |        * Full text explanation of the factor.
16488 |        */
16489 |       description: string;
16490 |       /**
16491 |        * The type of mixed content described by the explanation.
16492 |        */
16493 |       mixedContentType: MixedContentType;
16494 |       /**
16495 |        * Page certificate.
16496 |        */
16497 |       certificate: string[];
16498 |       /**
16499 |        * Recommendations to fix any issues.
16500 |        */
16501 |       recommendations?: string[];
16502 |     }
16503 |     /**
16504 |      * Information about insecure content on the page.
16505 |      */
16506 |     export interface InsecureContentStatus {
16507 |       /**
16508 |        * Always false.
16509 |        */
16510 |       ranMixedContent: boolean;
16511 |       /**
16512 |        * Always false.
16513 |        */
16514 |       displayedMixedContent: boolean;
16515 |       /**
16516 |        * Always false.
16517 |        */
16518 |       containedMixedForm: boolean;
16519 |       /**
16520 |        * Always false.
16521 |        */
16522 |       ranContentWithCertErrors: boolean;
16523 |       /**
16524 |        * Always false.
16525 |        */
16526 |       displayedContentWithCertErrors: boolean;
16527 |       /**
16528 |        * Always set to unknown.
16529 |        */
16530 |       ranInsecureContentStyle: SecurityState;
16531 |       /**
16532 |        * Always set to unknown.
16533 |        */
16534 |       displayedInsecureContentStyle: SecurityState;
16535 |     }
16536 |     /**
16537 |      * The action to take when a certificate error occurs. continue will continue processing the
16538 | request and cancel will cancel the request.
16539 |      */
16540 |     export type CertificateErrorAction = "continue"|"cancel";
16541 | 
16542 |     /**
16543 |      * There is a certificate error. If overriding certificate errors is enabled, then it should be
16544 | handled with the `handleCertificateError` command. Note: this event does not fire if the
16545 | certificate error has been allowed internally. Only one client per target should override
16546 | certificate errors at the same time.
16547 |      */
16548 |     export type certificateErrorPayload = {
16549 |       /**
16550 |        * The ID of the event.
16551 |        */
16552 |       eventId: number;
16553 |       /**
16554 |        * The type of the error.
16555 |        */
16556 |       errorType: string;
16557 |       /**
16558 |        * The url that was requested.
16559 |        */
16560 |       requestURL: string;
16561 |     }
16562 |     /**
16563 |      * The security state of the page changed.
16564 |      */
16565 |     export type visibleSecurityStateChangedPayload = {
16566 |       /**
16567 |        * Security state information about the page.
16568 |        */
16569 |       visibleSecurityState: VisibleSecurityState;
16570 |     }
16571 |     /**
16572 |      * The security state of the page changed. No longer being sent.
16573 |      */
16574 |     export type securityStateChangedPayload = {
16575 |       /**
16576 |        * Security state.
16577 |        */
16578 |       securityState: SecurityState;
16579 |       /**
16580 |        * True if the page was loaded over cryptographic transport such as HTTPS.
16581 |        */
16582 |       schemeIsCryptographic: boolean;
16583 |       /**
16584 |        * Previously a list of explanations for the security state. Now always
16585 | empty.
16586 |        */
16587 |       explanations: SecurityStateExplanation[];
16588 |       /**
16589 |        * Information about insecure content on the page.
16590 |        */
16591 |       insecureContentStatus: InsecureContentStatus;
16592 |       /**
16593 |        * Overrides user-visible description of the state. Always omitted.
16594 |        */
16595 |       summary?: string;
16596 |     }
16597 | 
16598 |     /**
16599 |      * Disables tracking security state changes.
16600 |      */
16601 |     export type disableParameters = {
16602 |     }
16603 |     export type disableReturnValue = {
16604 |     }
16605 |     /**
16606 |      * Enables tracking security state changes.
16607 |      */
16608 |     export type enableParameters = {
16609 |     }
16610 |     export type enableReturnValue = {
16611 |     }
16612 |     /**
16613 |      * Enable/disable whether all certificate errors should be ignored.
16614 |      */
16615 |     export type setIgnoreCertificateErrorsParameters = {
16616 |       /**
16617 |        * If true, all certificate errors will be ignored.
16618 |        */
16619 |       ignore: boolean;
16620 |     }
16621 |     export type setIgnoreCertificateErrorsReturnValue = {
16622 |     }
16623 |     /**
16624 |      * Handles a certificate error that fired a certificateError event.
16625 |      */
16626 |     export type handleCertificateErrorParameters = {
16627 |       /**
16628 |        * The ID of the event.
16629 |        */
16630 |       eventId: number;
16631 |       /**
16632 |        * The action to take on the certificate error.
16633 |        */
16634 |       action: CertificateErrorAction;
16635 |     }
16636 |     export type handleCertificateErrorReturnValue = {
16637 |     }
16638 |     /**
16639 |      * Enable/disable overriding certificate errors. If enabled, all certificate error events need to
16640 | be handled by the DevTools client and should be answered with `handleCertificateError` commands.
16641 |      */
16642 |     export type setOverrideCertificateErrorsParameters = {
16643 |       /**
16644 |        * If true, certificate errors will be overridden.
16645 |        */
16646 |       override: boolean;
16647 |     }
16648 |     export type setOverrideCertificateErrorsReturnValue = {
16649 |     }
16650 |   }
16651 | 
16652 |   export namespace ServiceWorker {
16653 |     export type RegistrationID = string;
16654 |     /**
16655 |      * ServiceWorker registration.
16656 |      */
16657 |     export interface ServiceWorkerRegistration {
16658 |       registrationId: RegistrationID;
16659 |       scopeURL: string;
16660 |       isDeleted: boolean;
16661 |     }
16662 |     export type ServiceWorkerVersionRunningStatus = "stopped"|"starting"|"running"|"stopping";
16663 |     export type ServiceWorkerVersionStatus = "new"|"installing"|"installed"|"activating"|"activated"|"redundant";
16664 |     /**
16665 |      * ServiceWorker version.
16666 |      */
16667 |     export interface ServiceWorkerVersion {
16668 |       versionId: string;
16669 |       registrationId: RegistrationID;
16670 |       scriptURL: string;
16671 |       runningStatus: ServiceWorkerVersionRunningStatus;
16672 |       status: ServiceWorkerVersionStatus;
16673 |       /**
16674 |        * The Last-Modified header value of the main script.
16675 |        */
16676 |       scriptLastModified?: number;
16677 |       /**
16678 |        * The time at which the response headers of the main script were received from the server.
16679 | For cached script it is the last time the cache entry was validated.
16680 |        */
16681 |       scriptResponseTime?: number;
16682 |       controlledClients?: Target.TargetID[];
16683 |       targetId?: Target.TargetID;
16684 |       routerRules?: string;
16685 |     }
16686 |     /**
16687 |      * ServiceWorker error message.
16688 |      */
16689 |     export interface ServiceWorkerErrorMessage {
16690 |       errorMessage: string;
16691 |       registrationId: RegistrationID;
16692 |       versionId: string;
16693 |       sourceURL: string;
16694 |       lineNumber: number;
16695 |       columnNumber: number;
16696 |     }
16697 | 
16698 |     export type workerErrorReportedPayload = {
16699 |       errorMessage: ServiceWorkerErrorMessage;
16700 |     }
16701 |     export type workerRegistrationUpdatedPayload = {
16702 |       registrations: ServiceWorkerRegistration[];
16703 |     }
16704 |     export type workerVersionUpdatedPayload = {
16705 |       versions: ServiceWorkerVersion[];
16706 |     }
16707 | 
16708 |     export type deliverPushMessageParameters = {
16709 |       origin: string;
16710 |       registrationId: RegistrationID;
16711 |       data: string;
16712 |     }
16713 |     export type deliverPushMessageReturnValue = {
16714 |     }
16715 |     export type disableParameters = {
16716 |     }
16717 |     export type disableReturnValue = {
16718 |     }
16719 |     export type dispatchSyncEventParameters = {
16720 |       origin: string;
16721 |       registrationId: RegistrationID;
16722 |       tag: string;
16723 |       lastChance: boolean;
16724 |     }
16725 |     export type dispatchSyncEventReturnValue = {
16726 |     }
16727 |     export type dispatchPeriodicSyncEventParameters = {
16728 |       origin: string;
16729 |       registrationId: RegistrationID;
16730 |       tag: string;
16731 |     }
16732 |     export type dispatchPeriodicSyncEventReturnValue = {
16733 |     }
16734 |     export type enableParameters = {
16735 |     }
16736 |     export type enableReturnValue = {
16737 |     }
16738 |     export type setForceUpdateOnPageLoadParameters = {
16739 |       forceUpdateOnPageLoad: boolean;
16740 |     }
16741 |     export type setForceUpdateOnPageLoadReturnValue = {
16742 |     }
16743 |     export type skipWaitingParameters = {
16744 |       scopeURL: string;
16745 |     }
16746 |     export type skipWaitingReturnValue = {
16747 |     }
16748 |     export type startWorkerParameters = {
16749 |       scopeURL: string;
16750 |     }
16751 |     export type startWorkerReturnValue = {
16752 |     }
16753 |     export type stopAllWorkersParameters = {
16754 |     }
16755 |     export type stopAllWorkersReturnValue = {
16756 |     }
16757 |     export type stopWorkerParameters = {
16758 |       versionId: string;
16759 |     }
16760 |     export type stopWorkerReturnValue = {
16761 |     }
16762 |     export type unregisterParameters = {
16763 |       scopeURL: string;
16764 |     }
16765 |     export type unregisterReturnValue = {
16766 |     }
16767 |     export type updateRegistrationParameters = {
16768 |       scopeURL: string;
16769 |     }
16770 |     export type updateRegistrationReturnValue = {
16771 |     }
16772 |   }
16773 | 
16774 |   export namespace Storage {
16775 |     export type SerializedStorageKey = string;
16776 |     /**
16777 |      * Enum of possible storage types.
16778 |      */
16779 |     export type StorageType = "cookies"|"file_systems"|"indexeddb"|"local_storage"|"shader_cache"|"websql"|"service_workers"|"cache_storage"|"interest_groups"|"shared_storage"|"storage_buckets"|"all"|"other";
16780 |     /**
16781 |      * Usage for a storage type.
16782 |      */
16783 |     export interface UsageForType {
16784 |       /**
16785 |        * Name of storage type.
16786 |        */
16787 |       storageType: StorageType;
16788 |       /**
16789 |        * Storage usage (bytes).
16790 |        */
16791 |       usage: number;
16792 |     }
16793 |     /**
16794 |      * Pair of issuer origin and number of available (signed, but not used) Trust
16795 | Tokens from that issuer.
16796 |      */
16797 |     export interface TrustTokens {
16798 |       issuerOrigin: string;
16799 |       count: number;
16800 |     }
16801 |     /**
16802 |      * Protected audience interest group auction identifier.
16803 |      */
16804 |     export type InterestGroupAuctionId = string;
16805 |     /**
16806 |      * Enum of interest group access types.
16807 |      */
16808 |     export type InterestGroupAccessType = "join"|"leave"|"update"|"loaded"|"bid"|"win"|"additionalBid"|"additionalBidWin"|"topLevelBid"|"topLevelAdditionalBid"|"clear";
16809 |     /**
16810 |      * Enum of auction events.
16811 |      */
16812 |     export type InterestGroupAuctionEventType = "started"|"configResolved";
16813 |     /**
16814 |      * Enum of network fetches auctions can do.
16815 |      */
16816 |     export type InterestGroupAuctionFetchType = "bidderJs"|"bidderWasm"|"sellerJs"|"bidderTrustedSignals"|"sellerTrustedSignals";
16817 |     /**
16818 |      * Enum of shared storage access scopes.
16819 |      */
16820 |     export type SharedStorageAccessScope = "window"|"sharedStorageWorklet"|"protectedAudienceWorklet"|"header";
16821 |     /**
16822 |      * Enum of shared storage access methods.
16823 |      */
16824 |     export type SharedStorageAccessMethod = "addModule"|"createWorklet"|"selectURL"|"run"|"batchUpdate"|"set"|"append"|"delete"|"clear"|"get"|"keys"|"values"|"entries"|"length"|"remainingBudget";
16825 |     /**
16826 |      * Struct for a single key-value pair in an origin's shared storage.
16827 |      */
16828 |     export interface SharedStorageEntry {
16829 |       key: string;
16830 |       value: string;
16831 |     }
16832 |     /**
16833 |      * Details for an origin's shared storage.
16834 |      */
16835 |     export interface SharedStorageMetadata {
16836 |       /**
16837 |        * Time when the origin's shared storage was last created.
16838 |        */
16839 |       creationTime: Network.TimeSinceEpoch;
16840 |       /**
16841 |        * Number of key-value pairs stored in origin's shared storage.
16842 |        */
16843 |       length: number;
16844 |       /**
16845 |        * Current amount of bits of entropy remaining in the navigation budget.
16846 |        */
16847 |       remainingBudget: number;
16848 |       /**
16849 |        * Total number of bytes stored as key-value pairs in origin's shared
16850 | storage.
16851 |        */
16852 |       bytesUsed: number;
16853 |     }
16854 |     /**
16855 |      * Represents a dictionary object passed in as privateAggregationConfig to
16856 | run or selectURL.
16857 |      */
16858 |     export interface SharedStoragePrivateAggregationConfig {
16859 |       /**
16860 |        * The chosen aggregation service deployment.
16861 |        */
16862 |       aggregationCoordinatorOrigin?: string;
16863 |       /**
16864 |        * The context ID provided.
16865 |        */
16866 |       contextId?: string;
16867 |       /**
16868 |        * Configures the maximum size allowed for filtering IDs.
16869 |        */
16870 |       filteringIdMaxBytes: number;
16871 |       /**
16872 |        * The limit on the number of contributions in the final report.
16873 |        */
16874 |       maxContributions?: number;
16875 |     }
16876 |     /**
16877 |      * Pair of reporting metadata details for a candidate URL for `selectURL()`.
16878 |      */
16879 |     export interface SharedStorageReportingMetadata {
16880 |       eventType: string;
16881 |       reportingUrl: string;
16882 |     }
16883 |     /**
16884 |      * Bundles a candidate URL with its reporting metadata.
16885 |      */
16886 |     export interface SharedStorageUrlWithMetadata {
16887 |       /**
16888 |        * Spec of candidate URL.
16889 |        */
16890 |       url: string;
16891 |       /**
16892 |        * Any associated reporting metadata.
16893 |        */
16894 |       reportingMetadata: SharedStorageReportingMetadata[];
16895 |     }
16896 |     /**
16897 |      * Bundles the parameters for shared storage access events whose
16898 | presence/absence can vary according to SharedStorageAccessType.
16899 |      */
16900 |     export interface SharedStorageAccessParams {
16901 |       /**
16902 |        * Spec of the module script URL.
16903 | Present only for SharedStorageAccessMethods: addModule and
16904 | createWorklet.
16905 |        */
16906 |       scriptSourceUrl?: string;
16907 |       /**
16908 |        * String denoting "context-origin", "script-origin", or a custom
16909 | origin to be used as the worklet's data origin.
16910 | Present only for SharedStorageAccessMethod: createWorklet.
16911 |        */
16912 |       dataOrigin?: string;
16913 |       /**
16914 |        * Name of the registered operation to be run.
16915 | Present only for SharedStorageAccessMethods: run and selectURL.
16916 |        */
16917 |       operationName?: string;
16918 |       /**
16919 |        * ID of the operation call.
16920 | Present only for SharedStorageAccessMethods: run and selectURL.
16921 |        */
16922 |       operationId?: string;
16923 |       /**
16924 |        * Whether or not to keep the worket alive for future run or selectURL
16925 | calls.
16926 | Present only for SharedStorageAccessMethods: run and selectURL.
16927 |        */
16928 |       keepAlive?: boolean;
16929 |       /**
16930 |        * Configures the private aggregation options.
16931 | Present only for SharedStorageAccessMethods: run and selectURL.
16932 |        */
16933 |       privateAggregationConfig?: SharedStoragePrivateAggregationConfig;
16934 |       /**
16935 |        * The operation's serialized data in bytes (converted to a string).
16936 | Present only for SharedStorageAccessMethods: run and selectURL.
16937 | TODO(crbug.com/401011862): Consider updating this parameter to binary.
16938 |        */
16939 |       serializedData?: string;
16940 |       /**
16941 |        * Array of candidate URLs' specs, along with any associated metadata.
16942 | Present only for SharedStorageAccessMethod: selectURL.
16943 |        */
16944 |       urlsWithMetadata?: SharedStorageUrlWithMetadata[];
16945 |       /**
16946 |        * Spec of the URN:UUID generated for a selectURL call.
16947 | Present only for SharedStorageAccessMethod: selectURL.
16948 |        */
16949 |       urnUuid?: string;
16950 |       /**
16951 |        * Key for a specific entry in an origin's shared storage.
16952 | Present only for SharedStorageAccessMethods: set, append, delete, and
16953 | get.
16954 |        */
16955 |       key?: string;
16956 |       /**
16957 |        * Value for a specific entry in an origin's shared storage.
16958 | Present only for SharedStorageAccessMethods: set and append.
16959 |        */
16960 |       value?: string;
16961 |       /**
16962 |        * Whether or not to set an entry for a key if that key is already present.
16963 | Present only for SharedStorageAccessMethod: set.
16964 |        */
16965 |       ignoreIfPresent?: boolean;
16966 |       /**
16967 |        * A number denoting the (0-based) order of the worklet's
16968 | creation relative to all other shared storage worklets created by
16969 | documents using the current storage partition.
16970 | Present only for SharedStorageAccessMethods: addModule, createWorklet.
16971 |        */
16972 |       workletOrdinal?: number;
16973 |       /**
16974 |        * Hex representation of the DevTools token used as the TargetID for the
16975 | associated shared storage worklet.
16976 | Present only for SharedStorageAccessMethods: addModule, createWorklet,
16977 | run, selectURL, and any other SharedStorageAccessMethod when the
16978 | SharedStorageAccessScope is sharedStorageWorklet.
16979 |        */
16980 |       workletTargetId?: Target.TargetID;
16981 |       /**
16982 |        * Name of the lock to be acquired, if present.
16983 | Optionally present only for SharedStorageAccessMethods: batchUpdate,
16984 | set, append, delete, and clear.
16985 |        */
16986 |       withLock?: string;
16987 |       /**
16988 |        * If the method has been called as part of a batchUpdate, then this
16989 | number identifies the batch to which it belongs.
16990 | Optionally present only for SharedStorageAccessMethods:
16991 | batchUpdate (required), set, append, delete, and clear.
16992 |        */
16993 |       batchUpdateId?: string;
16994 |       /**
16995 |        * Number of modifier methods sent in batch.
16996 | Present only for SharedStorageAccessMethod: batchUpdate.
16997 |        */
16998 |       batchSize?: number;
16999 |     }
17000 |     export type StorageBucketsDurability = "relaxed"|"strict";
17001 |     export interface StorageBucket {
17002 |       storageKey: SerializedStorageKey;
17003 |       /**
17004 |        * If not specified, it is the default bucket of the storageKey.
17005 |        */
17006 |       name?: string;
17007 |     }
17008 |     export interface StorageBucketInfo {
17009 |       bucket: StorageBucket;
17010 |       id: string;
17011 |       expiration: Network.TimeSinceEpoch;
17012 |       /**
17013 |        * Storage quota (bytes).
17014 |        */
17015 |       quota: number;
17016 |       persistent: boolean;
17017 |       durability: StorageBucketsDurability;
17018 |     }
17019 |     export type AttributionReportingSourceType = "navigation"|"event";
17020 |     export type UnsignedInt64AsBase10 = string;
17021 |     export type UnsignedInt128AsBase16 = string;
17022 |     export type SignedInt64AsBase10 = string;
17023 |     export interface AttributionReportingFilterDataEntry {
17024 |       key: string;
17025 |       values: string[];
17026 |     }
17027 |     export interface AttributionReportingFilterConfig {
17028 |       filterValues: AttributionReportingFilterDataEntry[];
17029 |       /**
17030 |        * duration in seconds
17031 |        */
17032 |       lookbackWindow?: number;
17033 |     }
17034 |     export interface AttributionReportingFilterPair {
17035 |       filters: AttributionReportingFilterConfig[];
17036 |       notFilters: AttributionReportingFilterConfig[];
17037 |     }
17038 |     export interface AttributionReportingAggregationKeysEntry {
17039 |       key: string;
17040 |       value: UnsignedInt128AsBase16;
17041 |     }
17042 |     export interface AttributionReportingEventReportWindows {
17043 |       /**
17044 |        * duration in seconds
17045 |        */
17046 |       start: number;
17047 |       /**
17048 |        * duration in seconds
17049 |        */
17050 |       ends: number[];
17051 |     }
17052 |     export type AttributionReportingTriggerDataMatching = "exact"|"modulus";
17053 |     export interface AttributionReportingAggregatableDebugReportingData {
17054 |       keyPiece: UnsignedInt128AsBase16;
17055 |       /**
17056 |        * number instead of integer because not all uint32 can be represented by
17057 | int
17058 |        */
17059 |       value: number;
17060 |       types: string[];
17061 |     }
17062 |     export interface AttributionReportingAggregatableDebugReportingConfig {
17063 |       /**
17064 |        * number instead of integer because not all uint32 can be represented by
17065 | int, only present for source registrations
17066 |        */
17067 |       budget?: number;
17068 |       keyPiece: UnsignedInt128AsBase16;
17069 |       debugData: AttributionReportingAggregatableDebugReportingData[];
17070 |       aggregationCoordinatorOrigin?: string;
17071 |     }
17072 |     export interface AttributionScopesData {
17073 |       values: string[];
17074 |       /**
17075 |        * number instead of integer because not all uint32 can be represented by
17076 | int
17077 |        */
17078 |       limit: number;
17079 |       maxEventStates: number;
17080 |     }
17081 |     export interface AttributionReportingNamedBudgetDef {
17082 |       name: string;
17083 |       budget: number;
17084 |     }
17085 |     export interface AttributionReportingSourceRegistration {
17086 |       time: Network.TimeSinceEpoch;
17087 |       /**
17088 |        * duration in seconds
17089 |        */
17090 |       expiry: number;
17091 |       /**
17092 |        * number instead of integer because not all uint32 can be represented by
17093 | int
17094 |        */
17095 |       triggerData: number[];
17096 |       eventReportWindows: AttributionReportingEventReportWindows;
17097 |       /**
17098 |        * duration in seconds
17099 |        */
17100 |       aggregatableReportWindow: number;
17101 |       type: AttributionReportingSourceType;
17102 |       sourceOrigin: string;
17103 |       reportingOrigin: string;
17104 |       destinationSites: string[];
17105 |       eventId: UnsignedInt64AsBase10;
17106 |       priority: SignedInt64AsBase10;
17107 |       filterData: AttributionReportingFilterDataEntry[];
17108 |       aggregationKeys: AttributionReportingAggregationKeysEntry[];
17109 |       debugKey?: UnsignedInt64AsBase10;
17110 |       triggerDataMatching: AttributionReportingTriggerDataMatching;
17111 |       destinationLimitPriority: SignedInt64AsBase10;
17112 |       aggregatableDebugReportingConfig: AttributionReportingAggregatableDebugReportingConfig;
17113 |       scopesData?: AttributionScopesData;
17114 |       maxEventLevelReports: number;
17115 |       namedBudgets: AttributionReportingNamedBudgetDef[];
17116 |       debugReporting: boolean;
17117 |       eventLevelEpsilon: number;
17118 |     }
17119 |     export type AttributionReportingSourceRegistrationResult = "success"|"internalError"|"insufficientSourceCapacity"|"insufficientUniqueDestinationCapacity"|"excessiveReportingOrigins"|"prohibitedByBrowserPolicy"|"successNoised"|"destinationReportingLimitReached"|"destinationGlobalLimitReached"|"destinationBothLimitsReached"|"reportingOriginsPerSiteLimitReached"|"exceedsMaxChannelCapacity"|"exceedsMaxScopesChannelCapacity"|"exceedsMaxTriggerStateCardinality"|"exceedsMaxEventStatesLimit"|"destinationPerDayReportingLimitReached";
17120 |     export type AttributionReportingSourceRegistrationTimeConfig = "include"|"exclude";
17121 |     export interface AttributionReportingAggregatableValueDictEntry {
17122 |       key: string;
17123 |       /**
17124 |        * number instead of integer because not all uint32 can be represented by
17125 | int
17126 |        */
17127 |       value: number;
17128 |       filteringId: UnsignedInt64AsBase10;
17129 |     }
17130 |     export interface AttributionReportingAggregatableValueEntry {
17131 |       values: AttributionReportingAggregatableValueDictEntry[];
17132 |       filters: AttributionReportingFilterPair;
17133 |     }
17134 |     export interface AttributionReportingEventTriggerData {
17135 |       data: UnsignedInt64AsBase10;
17136 |       priority: SignedInt64AsBase10;
17137 |       dedupKey?: UnsignedInt64AsBase10;
17138 |       filters: AttributionReportingFilterPair;
17139 |     }
17140 |     export interface AttributionReportingAggregatableTriggerData {
17141 |       keyPiece: UnsignedInt128AsBase16;
17142 |       sourceKeys: string[];
17143 |       filters: AttributionReportingFilterPair;
17144 |     }
17145 |     export interface AttributionReportingAggregatableDedupKey {
17146 |       dedupKey?: UnsignedInt64AsBase10;
17147 |       filters: AttributionReportingFilterPair;
17148 |     }
17149 |     export interface AttributionReportingNamedBudgetCandidate {
17150 |       name?: string;
17151 |       filters: AttributionReportingFilterPair;
17152 |     }
17153 |     export interface AttributionReportingTriggerRegistration {
17154 |       filters: AttributionReportingFilterPair;
17155 |       debugKey?: UnsignedInt64AsBase10;
17156 |       aggregatableDedupKeys: AttributionReportingAggregatableDedupKey[];
17157 |       eventTriggerData: AttributionReportingEventTriggerData[];
17158 |       aggregatableTriggerData: AttributionReportingAggregatableTriggerData[];
17159 |       aggregatableValues: AttributionReportingAggregatableValueEntry[];
17160 |       aggregatableFilteringIdMaxBytes: number;
17161 |       debugReporting: boolean;
17162 |       aggregationCoordinatorOrigin?: string;
17163 |       sourceRegistrationTimeConfig: AttributionReportingSourceRegistrationTimeConfig;
17164 |       triggerContextId?: string;
17165 |       aggregatableDebugReportingConfig: AttributionReportingAggregatableDebugReportingConfig;
17166 |       scopes: string[];
17167 |       namedBudgets: AttributionReportingNamedBudgetCandidate[];
17168 |     }
17169 |     export type AttributionReportingEventLevelResult = "success"|"successDroppedLowerPriority"|"internalError"|"noCapacityForAttributionDestination"|"noMatchingSources"|"deduplicated"|"excessiveAttributions"|"priorityTooLow"|"neverAttributedSource"|"excessiveReportingOrigins"|"noMatchingSourceFilterData"|"prohibitedByBrowserPolicy"|"noMatchingConfigurations"|"excessiveReports"|"falselyAttributedSource"|"reportWindowPassed"|"notRegistered"|"reportWindowNotStarted"|"noMatchingTriggerData";
17170 |     export type AttributionReportingAggregatableResult = "success"|"internalError"|"noCapacityForAttributionDestination"|"noMatchingSources"|"excessiveAttributions"|"excessiveReportingOrigins"|"noHistograms"|"insufficientBudget"|"insufficientNamedBudget"|"noMatchingSourceFilterData"|"notRegistered"|"prohibitedByBrowserPolicy"|"deduplicated"|"reportWindowPassed"|"excessiveReports";
17171 |     export type AttributionReportingReportResult = "sent"|"prohibited"|"failedToAssemble"|"expired";
17172 |     /**
17173 |      * A single Related Website Set object.
17174 |      */
17175 |     export interface RelatedWebsiteSet {
17176 |       /**
17177 |        * The primary site of this set, along with the ccTLDs if there is any.
17178 |        */
17179 |       primarySites: string[];
17180 |       /**
17181 |        * The associated sites of this set, along with the ccTLDs if there is any.
17182 |        */
17183 |       associatedSites: string[];
17184 |       /**
17185 |        * The service sites of this set, along with the ccTLDs if there is any.
17186 |        */
17187 |       serviceSites: string[];
17188 |     }
17189 | 
17190 |     /**
17191 |      * A cache's contents have been modified.
17192 |      */
17193 |     export type cacheStorageContentUpdatedPayload = {
17194 |       /**
17195 |        * Origin to update.
17196 |        */
17197 |       origin: string;
17198 |       /**
17199 |        * Storage key to update.
17200 |        */
17201 |       storageKey: string;
17202 |       /**
17203 |        * Storage bucket to update.
17204 |        */
17205 |       bucketId: string;
17206 |       /**
17207 |        * Name of cache in origin.
17208 |        */
17209 |       cacheName: string;
17210 |     }
17211 |     /**
17212 |      * A cache has been added/deleted.
17213 |      */
17214 |     export type cacheStorageListUpdatedPayload = {
17215 |       /**
17216 |        * Origin to update.
17217 |        */
17218 |       origin: string;
17219 |       /**
17220 |        * Storage key to update.
17221 |        */
17222 |       storageKey: string;
17223 |       /**
17224 |        * Storage bucket to update.
17225 |        */
17226 |       bucketId: string;
17227 |     }
17228 |     /**
17229 |      * The origin's IndexedDB object store has been modified.
17230 |      */
17231 |     export type indexedDBContentUpdatedPayload = {
17232 |       /**
17233 |        * Origin to update.
17234 |        */
17235 |       origin: string;
17236 |       /**
17237 |        * Storage key to update.
17238 |        */
17239 |       storageKey: string;
17240 |       /**
17241 |        * Storage bucket to update.
17242 |        */
17243 |       bucketId: string;
17244 |       /**
17245 |        * Database to update.
17246 |        */
17247 |       databaseName: string;
17248 |       /**
17249 |        * ObjectStore to update.
17250 |        */
17251 |       objectStoreName: string;
17252 |     }
17253 |     /**
17254 |      * The origin's IndexedDB database list has been modified.
17255 |      */
17256 |     export type indexedDBListUpdatedPayload = {
17257 |       /**
17258 |        * Origin to update.
17259 |        */
17260 |       origin: string;
17261 |       /**
17262 |        * Storage key to update.
17263 |        */
17264 |       storageKey: string;
17265 |       /**
17266 |        * Storage bucket to update.
17267 |        */
17268 |       bucketId: string;
17269 |     }
17270 |     /**
17271 |      * One of the interest groups was accessed. Note that these events are global
17272 | to all targets sharing an interest group store.
17273 |      */
17274 |     export type interestGroupAccessedPayload = {
17275 |       accessTime: Network.TimeSinceEpoch;
17276 |       type: InterestGroupAccessType;
17277 |       ownerOrigin: string;
17278 |       name: string;
17279 |       /**
17280 |        * For topLevelBid/topLevelAdditionalBid, and when appropriate,
17281 | win and additionalBidWin
17282 |        */
17283 |       componentSellerOrigin?: string;
17284 |       /**
17285 |        * For bid or somethingBid event, if done locally and not on a server.
17286 |        */
17287 |       bid?: number;
17288 |       bidCurrency?: string;
17289 |       /**
17290 |        * For non-global events --- links to interestGroupAuctionEvent
17291 |        */
17292 |       uniqueAuctionId?: InterestGroupAuctionId;
17293 |     }
17294 |     /**
17295 |      * An auction involving interest groups is taking place. These events are
17296 | target-specific.
17297 |      */
17298 |     export type interestGroupAuctionEventOccurredPayload = {
17299 |       eventTime: Network.TimeSinceEpoch;
17300 |       type: InterestGroupAuctionEventType;
17301 |       uniqueAuctionId: InterestGroupAuctionId;
17302 |       /**
17303 |        * Set for child auctions.
17304 |        */
17305 |       parentAuctionId?: InterestGroupAuctionId;
17306 |       /**
17307 |        * Set for started and configResolved
17308 |        */
17309 |       auctionConfig?: { [key: string]: string };
17310 |     }
17311 |     /**
17312 |      * Specifies which auctions a particular network fetch may be related to, and
17313 | in what role. Note that it is not ordered with respect to
17314 | Network.requestWillBeSent (but will happen before loadingFinished
17315 | loadingFailed).
17316 |      */
17317 |     export type interestGroupAuctionNetworkRequestCreatedPayload = {
17318 |       type: InterestGroupAuctionFetchType;
17319 |       requestId: Network.RequestId;
17320 |       /**
17321 |        * This is the set of the auctions using the worklet that issued this
17322 | request.  In the case of trusted signals, it's possible that only some of
17323 | them actually care about the keys being queried.
17324 |        */
17325 |       auctions: InterestGroupAuctionId[];
17326 |     }
17327 |     /**
17328 |      * Shared storage was accessed by the associated page.
17329 | The following parameters are included in all events.
17330 |      */
17331 |     export type sharedStorageAccessedPayload = {
17332 |       /**
17333 |        * Time of the access.
17334 |        */
17335 |       accessTime: Network.TimeSinceEpoch;
17336 |       /**
17337 |        * Enum value indicating the access scope.
17338 |        */
17339 |       scope: SharedStorageAccessScope;
17340 |       /**
17341 |        * Enum value indicating the Shared Storage API method invoked.
17342 |        */
17343 |       method: SharedStorageAccessMethod;
17344 |       /**
17345 |        * DevTools Frame Token for the primary frame tree's root.
17346 |        */
17347 |       mainFrameId: Page.FrameId;
17348 |       /**
17349 |        * Serialization of the origin owning the Shared Storage data.
17350 |        */
17351 |       ownerOrigin: string;
17352 |       /**
17353 |        * Serialization of the site owning the Shared Storage data.
17354 |        */
17355 |       ownerSite: string;
17356 |       /**
17357 |        * The sub-parameters wrapped by `params` are all optional and their
17358 | presence/absence depends on `type`.
17359 |        */
17360 |       params: SharedStorageAccessParams;
17361 |     }
17362 |     /**
17363 |      * A shared storage run or selectURL operation finished its execution.
17364 | The following parameters are included in all events.
17365 |      */
17366 |     export type sharedStorageWorkletOperationExecutionFinishedPayload = {
17367 |       /**
17368 |        * Time that the operation finished.
17369 |        */
17370 |       finishedTime: Network.TimeSinceEpoch;
17371 |       /**
17372 |        * Time, in microseconds, from start of shared storage JS API call until
17373 | end of operation execution in the worklet.
17374 |        */
17375 |       executionTime: number;
17376 |       /**
17377 |        * Enum value indicating the Shared Storage API method invoked.
17378 |        */
17379 |       method: SharedStorageAccessMethod;
17380 |       /**
17381 |        * ID of the operation call.
17382 |        */
17383 |       operationId: string;
17384 |       /**
17385 |        * Hex representation of the DevTools token used as the TargetID for the
17386 | associated shared storage worklet.
17387 |        */
17388 |       workletTargetId: Target.TargetID;
17389 |       /**
17390 |        * DevTools Frame Token for the primary frame tree's root.
17391 |        */
17392 |       mainFrameId: Page.FrameId;
17393 |       /**
17394 |        * Serialization of the origin owning the Shared Storage data.
17395 |        */
17396 |       ownerOrigin: string;
17397 |     }
17398 |     export type storageBucketCreatedOrUpdatedPayload = {
17399 |       bucketInfo: StorageBucketInfo;
17400 |     }
17401 |     export type storageBucketDeletedPayload = {
17402 |       bucketId: string;
17403 |     }
17404 |     export type attributionReportingSourceRegisteredPayload = {
17405 |       registration: AttributionReportingSourceRegistration;
17406 |       result: AttributionReportingSourceRegistrationResult;
17407 |     }
17408 |     export type attributionReportingTriggerRegisteredPayload = {
17409 |       registration: AttributionReportingTriggerRegistration;
17410 |       eventLevel: AttributionReportingEventLevelResult;
17411 |       aggregatable: AttributionReportingAggregatableResult;
17412 |     }
17413 |     export type attributionReportingReportSentPayload = {
17414 |       url: string;
17415 |       body: { [key: string]: string };
17416 |       result: AttributionReportingReportResult;
17417 |       /**
17418 |        * If result is `sent`, populated with net/HTTP status.
17419 |        */
17420 |       netError?: number;
17421 |       netErrorName?: string;
17422 |       httpStatusCode?: number;
17423 |     }
17424 |     export type attributionReportingVerboseDebugReportSentPayload = {
17425 |       url: string;
17426 |       body?: { [key: string]: string }[];
17427 |       netError?: number;
17428 |       netErrorName?: string;
17429 |       httpStatusCode?: number;
17430 |     }
17431 | 
17432 |     /**
17433 |      * Returns a storage key given a frame id.
17434 | Deprecated. Please use Storage.getStorageKey instead.
17435 |      */
17436 |     export type getStorageKeyForFrameParameters = {
17437 |       frameId: Page.FrameId;
17438 |     }
17439 |     export type getStorageKeyForFrameReturnValue = {
17440 |       storageKey: SerializedStorageKey;
17441 |     }
17442 |     /**
17443 |      * Returns storage key for the given frame. If no frame ID is provided,
17444 | the storage key of the target executing this command is returned.
17445 |      */
17446 |     export type getStorageKeyParameters = {
17447 |       frameId?: Page.FrameId;
17448 |     }
17449 |     export type getStorageKeyReturnValue = {
17450 |       storageKey: SerializedStorageKey;
17451 |     }
17452 |     /**
17453 |      * Clears storage for origin.
17454 |      */
17455 |     export type clearDataForOriginParameters = {
17456 |       /**
17457 |        * Security origin.
17458 |        */
17459 |       origin: string;
17460 |       /**
17461 |        * Comma separated list of StorageType to clear.
17462 |        */
17463 |       storageTypes: string;
17464 |     }
17465 |     export type clearDataForOriginReturnValue = {
17466 |     }
17467 |     /**
17468 |      * Clears storage for storage key.
17469 |      */
17470 |     export type clearDataForStorageKeyParameters = {
17471 |       /**
17472 |        * Storage key.
17473 |        */
17474 |       storageKey: string;
17475 |       /**
17476 |        * Comma separated list of StorageType to clear.
17477 |        */
17478 |       storageTypes: string;
17479 |     }
17480 |     export type clearDataForStorageKeyReturnValue = {
17481 |     }
17482 |     /**
17483 |      * Returns all browser cookies.
17484 |      */
17485 |     export type getCookiesParameters = {
17486 |       /**
17487 |        * Browser context to use when called on the browser endpoint.
17488 |        */
17489 |       browserContextId?: Browser.BrowserContextID;
17490 |     }
17491 |     export type getCookiesReturnValue = {
17492 |       /**
17493 |        * Array of cookie objects.
17494 |        */
17495 |       cookies: Network.Cookie[];
17496 |     }
17497 |     /**
17498 |      * Sets given cookies.
17499 |      */
17500 |     export type setCookiesParameters = {
17501 |       /**
17502 |        * Cookies to be set.
17503 |        */
17504 |       cookies: Network.CookieParam[];
17505 |       /**
17506 |        * Browser context to use when called on the browser endpoint.
17507 |        */
17508 |       browserContextId?: Browser.BrowserContextID;
17509 |     }
17510 |     export type setCookiesReturnValue = {
17511 |     }
17512 |     /**
17513 |      * Clears cookies.
17514 |      */
17515 |     export type clearCookiesParameters = {
17516 |       /**
17517 |        * Browser context to use when called on the browser endpoint.
17518 |        */
17519 |       browserContextId?: Browser.BrowserContextID;
17520 |     }
17521 |     export type clearCookiesReturnValue = {
17522 |     }
17523 |     /**
17524 |      * Returns usage and quota in bytes.
17525 |      */
17526 |     export type getUsageAndQuotaParameters = {
17527 |       /**
17528 |        * Security origin.
17529 |        */
17530 |       origin: string;
17531 |     }
17532 |     export type getUsageAndQuotaReturnValue = {
17533 |       /**
17534 |        * Storage usage (bytes).
17535 |        */
17536 |       usage: number;
17537 |       /**
17538 |        * Storage quota (bytes).
17539 |        */
17540 |       quota: number;
17541 |       /**
17542 |        * Whether or not the origin has an active storage quota override
17543 |        */
17544 |       overrideActive: boolean;
17545 |       /**
17546 |        * Storage usage per type (bytes).
17547 |        */
17548 |       usageBreakdown: UsageForType[];
17549 |     }
17550 |     /**
17551 |      * Override quota for the specified origin
17552 |      */
17553 |     export type overrideQuotaForOriginParameters = {
17554 |       /**
17555 |        * Security origin.
17556 |        */
17557 |       origin: string;
17558 |       /**
17559 |        * The quota size (in bytes) to override the original quota with.
17560 | If this is called multiple times, the overridden quota will be equal to
17561 | the quotaSize provided in the final call. If this is called without
17562 | specifying a quotaSize, the quota will be reset to the default value for
17563 | the specified origin. If this is called multiple times with different
17564 | origins, the override will be maintained for each origin until it is
17565 | disabled (called without a quotaSize).
17566 |        */
17567 |       quotaSize?: number;
17568 |     }
17569 |     export type overrideQuotaForOriginReturnValue = {
17570 |     }
17571 |     /**
17572 |      * Registers origin to be notified when an update occurs to its cache storage list.
17573 |      */
17574 |     export type trackCacheStorageForOriginParameters = {
17575 |       /**
17576 |        * Security origin.
17577 |        */
17578 |       origin: string;
17579 |     }
17580 |     export type trackCacheStorageForOriginReturnValue = {
17581 |     }
17582 |     /**
17583 |      * Registers storage key to be notified when an update occurs to its cache storage list.
17584 |      */
17585 |     export type trackCacheStorageForStorageKeyParameters = {
17586 |       /**
17587 |        * Storage key.
17588 |        */
17589 |       storageKey: string;
17590 |     }
17591 |     export type trackCacheStorageForStorageKeyReturnValue = {
17592 |     }
17593 |     /**
17594 |      * Registers origin to be notified when an update occurs to its IndexedDB.
17595 |      */
17596 |     export type trackIndexedDBForOriginParameters = {
17597 |       /**
17598 |        * Security origin.
17599 |        */
17600 |       origin: string;
17601 |     }
17602 |     export type trackIndexedDBForOriginReturnValue = {
17603 |     }
17604 |     /**
17605 |      * Registers storage key to be notified when an update occurs to its IndexedDB.
17606 |      */
17607 |     export type trackIndexedDBForStorageKeyParameters = {
17608 |       /**
17609 |        * Storage key.
17610 |        */
17611 |       storageKey: string;
17612 |     }
17613 |     export type trackIndexedDBForStorageKeyReturnValue = {
17614 |     }
17615 |     /**
17616 |      * Unregisters origin from receiving notifications for cache storage.
17617 |      */
17618 |     export type untrackCacheStorageForOriginParameters = {
17619 |       /**
17620 |        * Security origin.
17621 |        */
17622 |       origin: string;
17623 |     }
17624 |     export type untrackCacheStorageForOriginReturnValue = {
17625 |     }
17626 |     /**
17627 |      * Unregisters storage key from receiving notifications for cache storage.
17628 |      */
17629 |     export type untrackCacheStorageForStorageKeyParameters = {
17630 |       /**
17631 |        * Storage key.
17632 |        */
17633 |       storageKey: string;
17634 |     }
17635 |     export type untrackCacheStorageForStorageKeyReturnValue = {
17636 |     }
17637 |     /**
17638 |      * Unregisters origin from receiving notifications for IndexedDB.
17639 |      */
17640 |     export type untrackIndexedDBForOriginParameters = {
17641 |       /**
17642 |        * Security origin.
17643 |        */
17644 |       origin: string;
17645 |     }
17646 |     export type untrackIndexedDBForOriginReturnValue = {
17647 |     }
17648 |     /**
17649 |      * Unregisters storage key from receiving notifications for IndexedDB.
17650 |      */
17651 |     export type untrackIndexedDBForStorageKeyParameters = {
17652 |       /**
17653 |        * Storage key.
17654 |        */
17655 |       storageKey: string;
17656 |     }
17657 |     export type untrackIndexedDBForStorageKeyReturnValue = {
17658 |     }
17659 |     /**
17660 |      * Returns the number of stored Trust Tokens per issuer for the
17661 | current browsing context.
17662 |      */
17663 |     export type getTrustTokensParameters = {
17664 |     }
17665 |     export type getTrustTokensReturnValue = {
17666 |       tokens: TrustTokens[];
17667 |     }
17668 |     /**
17669 |      * Removes all Trust Tokens issued by the provided issuerOrigin.
17670 | Leaves other stored data, including the issuer's Redemption Records, intact.
17671 |      */
17672 |     export type clearTrustTokensParameters = {
17673 |       issuerOrigin: string;
17674 |     }
17675 |     export type clearTrustTokensReturnValue = {
17676 |       /**
17677 |        * True if any tokens were deleted, false otherwise.
17678 |        */
17679 |       didDeleteTokens: boolean;
17680 |     }
17681 |     /**
17682 |      * Gets details for a named interest group.
17683 |      */
17684 |     export type getInterestGroupDetailsParameters = {
17685 |       ownerOrigin: string;
17686 |       name: string;
17687 |     }
17688 |     export type getInterestGroupDetailsReturnValue = {
17689 |       /**
17690 |        * This largely corresponds to:
17691 | https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup
17692 | but has absolute expirationTime instead of relative lifetimeMs and
17693 | also adds joiningOrigin.
17694 |        */
17695 |       details: { [key: string]: string };
17696 |     }
17697 |     /**
17698 |      * Enables/Disables issuing of interestGroupAccessed events.
17699 |      */
17700 |     export type setInterestGroupTrackingParameters = {
17701 |       enable: boolean;
17702 |     }
17703 |     export type setInterestGroupTrackingReturnValue = {
17704 |     }
17705 |     /**
17706 |      * Enables/Disables issuing of interestGroupAuctionEventOccurred and
17707 | interestGroupAuctionNetworkRequestCreated.
17708 |      */
17709 |     export type setInterestGroupAuctionTrackingParameters = {
17710 |       enable: boolean;
17711 |     }
17712 |     export type setInterestGroupAuctionTrackingReturnValue = {
17713 |     }
17714 |     /**
17715 |      * Gets metadata for an origin's shared storage.
17716 |      */
17717 |     export type getSharedStorageMetadataParameters = {
17718 |       ownerOrigin: string;
17719 |     }
17720 |     export type getSharedStorageMetadataReturnValue = {
17721 |       metadata: SharedStorageMetadata;
17722 |     }
17723 |     /**
17724 |      * Gets the entries in an given origin's shared storage.
17725 |      */
17726 |     export type getSharedStorageEntriesParameters = {
17727 |       ownerOrigin: string;
17728 |     }
17729 |     export type getSharedStorageEntriesReturnValue = {
17730 |       entries: SharedStorageEntry[];
17731 |     }
17732 |     /**
17733 |      * Sets entry with `key` and `value` for a given origin's shared storage.
17734 |      */
17735 |     export type setSharedStorageEntryParameters = {
17736 |       ownerOrigin: string;
17737 |       key: string;
17738 |       value: string;
17739 |       /**
17740 |        * If `ignoreIfPresent` is included and true, then only sets the entry if
17741 | `key` doesn't already exist.
17742 |        */
17743 |       ignoreIfPresent?: boolean;
17744 |     }
17745 |     export type setSharedStorageEntryReturnValue = {
17746 |     }
17747 |     /**
17748 |      * Deletes entry for `key` (if it exists) for a given origin's shared storage.
17749 |      */
17750 |     export type deleteSharedStorageEntryParameters = {
17751 |       ownerOrigin: string;
17752 |       key: string;
17753 |     }
17754 |     export type deleteSharedStorageEntryReturnValue = {
17755 |     }
17756 |     /**
17757 |      * Clears all entries for a given origin's shared storage.
17758 |      */
17759 |     export type clearSharedStorageEntriesParameters = {
17760 |       ownerOrigin: string;
17761 |     }
17762 |     export type clearSharedStorageEntriesReturnValue = {
17763 |     }
17764 |     /**
17765 |      * Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
17766 |      */
17767 |     export type resetSharedStorageBudgetParameters = {
17768 |       ownerOrigin: string;
17769 |     }
17770 |     export type resetSharedStorageBudgetReturnValue = {
17771 |     }
17772 |     /**
17773 |      * Enables/disables issuing of sharedStorageAccessed events.
17774 |      */
17775 |     export type setSharedStorageTrackingParameters = {
17776 |       enable: boolean;
17777 |     }
17778 |     export type setSharedStorageTrackingReturnValue = {
17779 |     }
17780 |     /**
17781 |      * Set tracking for a storage key's buckets.
17782 |      */
17783 |     export type setStorageBucketTrackingParameters = {
17784 |       storageKey: string;
17785 |       enable: boolean;
17786 |     }
17787 |     export type setStorageBucketTrackingReturnValue = {
17788 |     }
17789 |     /**
17790 |      * Deletes the Storage Bucket with the given storage key and bucket name.
17791 |      */
17792 |     export type deleteStorageBucketParameters = {
17793 |       bucket: StorageBucket;
17794 |     }
17795 |     export type deleteStorageBucketReturnValue = {
17796 |     }
17797 |     /**
17798 |      * Deletes state for sites identified as potential bounce trackers, immediately.
17799 |      */
17800 |     export type runBounceTrackingMitigationsParameters = {
17801 |     }
17802 |     export type runBounceTrackingMitigationsReturnValue = {
17803 |       deletedSites: string[];
17804 |     }
17805 |     /**
17806 |      * https://wicg.github.io/attribution-reporting-api/
17807 |      */
17808 |     export type setAttributionReportingLocalTestingModeParameters = {
17809 |       /**
17810 |        * If enabled, noise is suppressed and reports are sent immediately.
17811 |        */
17812 |       enabled: boolean;
17813 |     }
17814 |     export type setAttributionReportingLocalTestingModeReturnValue = {
17815 |     }
17816 |     /**
17817 |      * Enables/disables issuing of Attribution Reporting events.
17818 |      */
17819 |     export type setAttributionReportingTrackingParameters = {
17820 |       enable: boolean;
17821 |     }
17822 |     export type setAttributionReportingTrackingReturnValue = {
17823 |     }
17824 |     /**
17825 |      * Sends all pending Attribution Reports immediately, regardless of their
17826 | scheduled report time.
17827 |      */
17828 |     export type sendPendingAttributionReportsParameters = {
17829 |     }
17830 |     export type sendPendingAttributionReportsReturnValue = {
17831 |       /**
17832 |        * The number of reports that were sent.
17833 |        */
17834 |       numSent: number;
17835 |     }
17836 |     /**
17837 |      * Returns the effective Related Website Sets in use by this profile for the browser
17838 | session. The effective Related Website Sets will not change during a browser session.
17839 |      */
17840 |     export type getRelatedWebsiteSetsParameters = {
17841 |     }
17842 |     export type getRelatedWebsiteSetsReturnValue = {
17843 |       sets: RelatedWebsiteSet[];
17844 |     }
17845 |     /**
17846 |      * Returns the list of URLs from a page and its embedded resources that match
17847 | existing grace period URL pattern rules.
17848 | https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period
17849 |      */
17850 |     export type getAffectedUrlsForThirdPartyCookieMetadataParameters = {
17851 |       /**
17852 |        * The URL of the page currently being visited.
17853 |        */
17854 |       firstPartyUrl: string;
17855 |       /**
17856 |        * The list of embedded resource URLs from the page.
17857 |        */
17858 |       thirdPartyUrls: string[];
17859 |     }
17860 |     export type getAffectedUrlsForThirdPartyCookieMetadataReturnValue = {
17861 |       /**
17862 |        * Array of matching URLs. If there is a primary pattern match for the first-
17863 | party URL, only the first-party URL is returned in the array.
17864 |        */
17865 |       matchedUrls: string[];
17866 |     }
17867 |     export type setProtectedAudienceKAnonymityParameters = {
17868 |       owner: string;
17869 |       name: string;
17870 |       hashes: binary[];
17871 |     }
17872 |     export type setProtectedAudienceKAnonymityReturnValue = {
17873 |     }
17874 |   }
17875 | 
17876 |   /**
17877 |    * The SystemInfo domain defines methods and events for querying low-level system information.
17878 |    */
17879 |   export namespace SystemInfo {
17880 |     /**
17881 |      * Describes a single graphics processor (GPU).
17882 |      */
17883 |     export interface GPUDevice {
17884 |       /**
17885 |        * PCI ID of the GPU vendor, if available; 0 otherwise.
17886 |        */
17887 |       vendorId: number;
17888 |       /**
17889 |        * PCI ID of the GPU device, if available; 0 otherwise.
17890 |        */
17891 |       deviceId: number;
17892 |       /**
17893 |        * Sub sys ID of the GPU, only available on Windows.
17894 |        */
17895 |       subSysId?: number;
17896 |       /**
17897 |        * Revision of the GPU, only available on Windows.
17898 |        */
17899 |       revision?: number;
17900 |       /**
17901 |        * String description of the GPU vendor, if the PCI ID is not available.
17902 |        */
17903 |       vendorString: string;
17904 |       /**
17905 |        * String description of the GPU device, if the PCI ID is not available.
17906 |        */
17907 |       deviceString: string;
17908 |       /**
17909 |        * String description of the GPU driver vendor.
17910 |        */
17911 |       driverVendor: string;
17912 |       /**
17913 |        * String description of the GPU driver version.
17914 |        */
17915 |       driverVersion: string;
17916 |     }
17917 |     /**
17918 |      * Describes the width and height dimensions of an entity.
17919 |      */
17920 |     export interface Size {
17921 |       /**
17922 |        * Width in pixels.
17923 |        */
17924 |       width: number;
17925 |       /**
17926 |        * Height in pixels.
17927 |        */
17928 |       height: number;
17929 |     }
17930 |     /**
17931 |      * Describes a supported video decoding profile with its associated minimum and
17932 | maximum resolutions.
17933 |      */
17934 |     export interface VideoDecodeAcceleratorCapability {
17935 |       /**
17936 |        * Video codec profile that is supported, e.g. VP9 Profile 2.
17937 |        */
17938 |       profile: string;
17939 |       /**
17940 |        * Maximum video dimensions in pixels supported for this |profile|.
17941 |        */
17942 |       maxResolution: Size;
17943 |       /**
17944 |        * Minimum video dimensions in pixels supported for this |profile|.
17945 |        */
17946 |       minResolution: Size;
17947 |     }
17948 |     /**
17949 |      * Describes a supported video encoding profile with its associated maximum
17950 | resolution and maximum framerate.
17951 |      */
17952 |     export interface VideoEncodeAcceleratorCapability {
17953 |       /**
17954 |        * Video codec profile that is supported, e.g H264 Main.
17955 |        */
17956 |       profile: string;
17957 |       /**
17958 |        * Maximum video dimensions in pixels supported for this |profile|.
17959 |        */
17960 |       maxResolution: Size;
17961 |       /**
17962 |        * Maximum encoding framerate in frames per second supported for this
17963 | |profile|, as fraction's numerator and denominator, e.g. 24/1 fps,
17964 | 24000/1001 fps, etc.
17965 |        */
17966 |       maxFramerateNumerator: number;
17967 |       maxFramerateDenominator: number;
17968 |     }
17969 |     /**
17970 |      * YUV subsampling type of the pixels of a given image.
17971 |      */
17972 |     export type SubsamplingFormat = "yuv420"|"yuv422"|"yuv444";
17973 |     /**
17974 |      * Image format of a given image.
17975 |      */
17976 |     export type ImageType = "jpeg"|"webp"|"unknown";
17977 |     /**
17978 |      * Provides information about the GPU(s) on the system.
17979 |      */
17980 |     export interface GPUInfo {
17981 |       /**
17982 |        * The graphics devices on the system. Element 0 is the primary GPU.
17983 |        */
17984 |       devices: GPUDevice[];
17985 |       /**
17986 |        * An optional dictionary of additional GPU related attributes.
17987 |        */
17988 |       auxAttributes?: { [key: string]: string };
17989 |       /**
17990 |        * An optional dictionary of graphics features and their status.
17991 |        */
17992 |       featureStatus?: { [key: string]: string };
17993 |       /**
17994 |        * An optional array of GPU driver bug workarounds.
17995 |        */
17996 |       driverBugWorkarounds: string[];
17997 |       /**
17998 |        * Supported accelerated video decoding capabilities.
17999 |        */
18000 |       videoDecoding: VideoDecodeAcceleratorCapability[];
18001 |       /**
18002 |        * Supported accelerated video encoding capabilities.
18003 |        */
18004 |       videoEncoding: VideoEncodeAcceleratorCapability[];
18005 |     }
18006 |     /**
18007 |      * Represents process info.
18008 |      */
18009 |     export interface ProcessInfo {
18010 |       /**
18011 |        * Specifies process type.
18012 |        */
18013 |       type: string;
18014 |       /**
18015 |        * Specifies process id.
18016 |        */
18017 |       id: number;
18018 |       /**
18019 |        * Specifies cumulative CPU usage in seconds across all threads of the
18020 | process since the process start.
18021 |        */
18022 |       cpuTime: number;
18023 |     }
18024 | 
18025 | 
18026 |     /**
18027 |      * Returns information about the system.
18028 |      */
18029 |     export type getInfoParameters = {
18030 |     }
18031 |     export type getInfoReturnValue = {
18032 |       /**
18033 |        * Information about the GPUs on the system.
18034 |        */
18035 |       gpu: GPUInfo;
18036 |       /**
18037 |        * A platform-dependent description of the model of the machine. On Mac OS, this is, for
18038 | example, 'MacBookPro'. Will be the empty string if not supported.
18039 |        */
18040 |       modelName: string;
18041 |       /**
18042 |        * A platform-dependent description of the version of the machine. On Mac OS, this is, for
18043 | example, '10.1'. Will be the empty string if not supported.
18044 |        */
18045 |       modelVersion: string;
18046 |       /**
18047 |        * The command line string used to launch the browser. Will be the empty string if not
18048 | supported.
18049 |        */
18050 |       commandLine: string;
18051 |     }
18052 |     /**
18053 |      * Returns information about the feature state.
18054 |      */
18055 |     export type getFeatureStateParameters = {
18056 |       featureState: string;
18057 |     }
18058 |     export type getFeatureStateReturnValue = {
18059 |       featureEnabled: boolean;
18060 |     }
18061 |     /**
18062 |      * Returns information about all running processes.
18063 |      */
18064 |     export type getProcessInfoParameters = {
18065 |     }
18066 |     export type getProcessInfoReturnValue = {
18067 |       /**
18068 |        * An array of process info blocks.
18069 |        */
18070 |       processInfo: ProcessInfo[];
18071 |     }
18072 |   }
18073 | 
18074 |   /**
18075 |    * Supports additional targets discovery and allows to attach to them.
18076 |    */
18077 |   export namespace Target {
18078 |     export type TargetID = string;
18079 |     /**
18080 |      * Unique identifier of attached debugging session.
18081 |      */
18082 |     export type SessionID = string;
18083 |     export interface TargetInfo {
18084 |       targetId: TargetID;
18085 |       /**
18086 |        * List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22
18087 |        */
18088 |       type: string;
18089 |       title: string;
18090 |       url: string;
18091 |       /**
18092 |        * Whether the target has an attached client.
18093 |        */
18094 |       attached: boolean;
18095 |       /**
18096 |        * Opener target Id
18097 |        */
18098 |       openerId?: TargetID;
18099 |       /**
18100 |        * Whether the target has access to the originating window.
18101 |        */
18102 |       canAccessOpener: boolean;
18103 |       /**
18104 |        * Frame id of originating window (is only set if target has an opener).
18105 |        */
18106 |       openerFrameId?: Page.FrameId;
18107 |       /**
18108 |        * Id of the parent frame, only present for the "iframe" targets.
18109 |        */
18110 |       parentFrameId?: Page.FrameId;
18111 |       browserContextId?: Browser.BrowserContextID;
18112 |       /**
18113 |        * Provides additional details for specific target types. For example, for
18114 | the type of "page", this may be set to "prerender".
18115 |        */
18116 |       subtype?: string;
18117 |     }
18118 |     /**
18119 |      * A filter used by target query/discovery/auto-attach operations.
18120 |      */
18121 |     export interface FilterEntry {
18122 |       /**
18123 |        * If set, causes exclusion of matching targets from the list.
18124 |        */
18125 |       exclude?: boolean;
18126 |       /**
18127 |        * If not present, matches any type.
18128 |        */
18129 |       type?: string;
18130 |     }
18131 |     /**
18132 |      * The entries in TargetFilter are matched sequentially against targets and
18133 | the first entry that matches determines if the target is included or not,
18134 | depending on the value of `exclude` field in the entry.
18135 | If filter is not specified, the one assumed is
18136 | [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}]
18137 | (i.e. include everything but `browser` and `tab`).
18138 |      */
18139 |     export type TargetFilter = FilterEntry[];
18140 |     export interface RemoteLocation {
18141 |       host: string;
18142 |       port: number;
18143 |     }
18144 |     /**
18145 |      * The state of the target window.
18146 |      */
18147 |     export type WindowState = "normal"|"minimized"|"maximized"|"fullscreen";
18148 | 
18149 |     /**
18150 |      * Issued when attached to target because of auto-attach or `attachToTarget` command.
18151 |      */
18152 |     export type attachedToTargetPayload = {
18153 |       /**
18154 |        * Identifier assigned to the session used to send/receive messages.
18155 |        */
18156 |       sessionId: SessionID;
18157 |       targetInfo: TargetInfo;
18158 |       waitingForDebugger: boolean;
18159 |     }
18160 |     /**
18161 |      * Issued when detached from target for any reason (including `detachFromTarget` command). Can be
18162 | issued multiple times per target if multiple sessions have been attached to it.
18163 |      */
18164 |     export type detachedFromTargetPayload = {
18165 |       /**
18166 |        * Detached session identifier.
18167 |        */
18168 |       sessionId: SessionID;
18169 |       /**
18170 |        * Deprecated.
18171 |        */
18172 |       targetId?: TargetID;
18173 |     }
18174 |     /**
18175 |      * Notifies about a new protocol message received from the session (as reported in
18176 | `attachedToTarget` event).
18177 |      */
18178 |     export type receivedMessageFromTargetPayload = {
18179 |       /**
18180 |        * Identifier of a session which sends a message.
18181 |        */
18182 |       sessionId: SessionID;
18183 |       message: string;
18184 |       /**
18185 |        * Deprecated.
18186 |        */
18187 |       targetId?: TargetID;
18188 |     }
18189 |     /**
18190 |      * Issued when a possible inspection target is created.
18191 |      */
18192 |     export type targetCreatedPayload = {
18193 |       targetInfo: TargetInfo;
18194 |     }
18195 |     /**
18196 |      * Issued when a target is destroyed.
18197 |      */
18198 |     export type targetDestroyedPayload = {
18199 |       targetId: TargetID;
18200 |     }
18201 |     /**
18202 |      * Issued when a target has crashed.
18203 |      */
18204 |     export type targetCrashedPayload = {
18205 |       targetId: TargetID;
18206 |       /**
18207 |        * Termination status type.
18208 |        */
18209 |       status: string;
18210 |       /**
18211 |        * Termination error code.
18212 |        */
18213 |       errorCode: number;
18214 |     }
18215 |     /**
18216 |      * Issued when some information about a target has changed. This only happens between
18217 | `targetCreated` and `targetDestroyed`.
18218 |      */
18219 |     export type targetInfoChangedPayload = {
18220 |       targetInfo: TargetInfo;
18221 |     }
18222 | 
18223 |     /**
18224 |      * Activates (focuses) the target.
18225 |      */
18226 |     export type activateTargetParameters = {
18227 |       targetId: TargetID;
18228 |     }
18229 |     export type activateTargetReturnValue = {
18230 |     }
18231 |     /**
18232 |      * Attaches to the target with given id.
18233 |      */
18234 |     export type attachToTargetParameters = {
18235 |       targetId: TargetID;
18236 |       /**
18237 |        * Enables "flat" access to the session via specifying sessionId attribute in the commands.
18238 | We plan to make this the default, deprecate non-flattened mode,
18239 | and eventually retire it. See crbug.com/991325.
18240 |        */
18241 |       flatten?: boolean;
18242 |     }
18243 |     export type attachToTargetReturnValue = {
18244 |       /**
18245 |        * Id assigned to the session.
18246 |        */
18247 |       sessionId: SessionID;
18248 |     }
18249 |     /**
18250 |      * Attaches to the browser target, only uses flat sessionId mode.
18251 |      */
18252 |     export type attachToBrowserTargetParameters = {
18253 |     }
18254 |     export type attachToBrowserTargetReturnValue = {
18255 |       /**
18256 |        * Id assigned to the session.
18257 |        */
18258 |       sessionId: SessionID;
18259 |     }
18260 |     /**
18261 |      * Closes the target. If the target is a page that gets closed too.
18262 |      */
18263 |     export type closeTargetParameters = {
18264 |       targetId: TargetID;
18265 |     }
18266 |     export type closeTargetReturnValue = {
18267 |       /**
18268 |        * Always set to true. If an error occurs, the response indicates protocol error.
18269 |        */
18270 |       success: boolean;
18271 |     }
18272 |     /**
18273 |      * Inject object to the target's main frame that provides a communication
18274 | channel with browser target.
18275 | 
18276 | Injected object will be available as `window[bindingName]`.
18277 | 
18278 | The object has the following API:
18279 | - `binding.send(json)` - a method to send messages over the remote debugging protocol
18280 | - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
18281 |      */
18282 |     export type exposeDevToolsProtocolParameters = {
18283 |       targetId: TargetID;
18284 |       /**
18285 |        * Binding name, 'cdp' if not specified.
18286 |        */
18287 |       bindingName?: string;
18288 |       /**
18289 |        * If true, inherits the current root session's permissions (default: false).
18290 |        */
18291 |       inheritPermissions?: boolean;
18292 |     }
18293 |     export type exposeDevToolsProtocolReturnValue = {
18294 |     }
18295 |     /**
18296 |      * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
18297 | one.
18298 |      */
18299 |     export type createBrowserContextParameters = {
18300 |       /**
18301 |        * If specified, disposes this context when debugging session disconnects.
18302 |        */
18303 |       disposeOnDetach?: boolean;
18304 |       /**
18305 |        * Proxy server, similar to the one passed to --proxy-server
18306 |        */
18307 |       proxyServer?: string;
18308 |       /**
18309 |        * Proxy bypass list, similar to the one passed to --proxy-bypass-list
18310 |        */
18311 |       proxyBypassList?: string;
18312 |       /**
18313 |        * An optional list of origins to grant unlimited cross-origin access to.
18314 | Parts of the URL other than those constituting origin are ignored.
18315 |        */
18316 |       originsWithUniversalNetworkAccess?: string[];
18317 |     }
18318 |     export type createBrowserContextReturnValue = {
18319 |       /**
18320 |        * The id of the context created.
18321 |        */
18322 |       browserContextId: Browser.BrowserContextID;
18323 |     }
18324 |     /**
18325 |      * Returns all browser contexts created with `Target.createBrowserContext` method.
18326 |      */
18327 |     export type getBrowserContextsParameters = {
18328 |     }
18329 |     export type getBrowserContextsReturnValue = {
18330 |       /**
18331 |        * An array of browser context ids.
18332 |        */
18333 |       browserContextIds: Browser.BrowserContextID[];
18334 |       /**
18335 |        * The id of the default browser context if available.
18336 |        */
18337 |       defaultBrowserContextId?: Browser.BrowserContextID;
18338 |     }
18339 |     /**
18340 |      * Creates a new page.
18341 |      */
18342 |     export type createTargetParameters = {
18343 |       /**
18344 |        * The initial URL the page will be navigated to. An empty string indicates about:blank.
18345 |        */
18346 |       url: string;
18347 |       /**
18348 |        * Frame left origin in DIP (requires newWindow to be true or headless shell).
18349 |        */
18350 |       left?: number;
18351 |       /**
18352 |        * Frame top origin in DIP (requires newWindow to be true or headless shell).
18353 |        */
18354 |       top?: number;
18355 |       /**
18356 |        * Frame width in DIP (requires newWindow to be true or headless shell).
18357 |        */
18358 |       width?: number;
18359 |       /**
18360 |        * Frame height in DIP (requires newWindow to be true or headless shell).
18361 |        */
18362 |       height?: number;
18363 |       /**
18364 |        * Frame window state (requires newWindow to be true or headless shell).
18365 | Default is normal.
18366 |        */
18367 |       windowState?: WindowState;
18368 |       /**
18369 |        * The browser context to create the page in.
18370 |        */
18371 |       browserContextId?: Browser.BrowserContextID;
18372 |       /**
18373 |        * Whether BeginFrames for this target will be controlled via DevTools (headless shell only,
18374 | not supported on MacOS yet, false by default).
18375 |        */
18376 |       enableBeginFrameControl?: boolean;
18377 |       /**
18378 |        * Whether to create a new Window or Tab (false by default, not supported by headless shell).
18379 |        */
18380 |       newWindow?: boolean;
18381 |       /**
18382 |        * Whether to create the target in background or foreground (false by default, not supported
18383 | by headless shell).
18384 |        */
18385 |       background?: boolean;
18386 |       /**
18387 |        * Whether to create the target of type "tab".
18388 |        */
18389 |       forTab?: boolean;
18390 |       /**
18391 |        * Whether to create a hidden target. The hidden target is observable via protocol, but not
18392 | present in the tab UI strip. Cannot be created with `forTab: true`, `newWindow: true` or
18393 | `background: false`. The life-time of the tab is limited to the life-time of the session.
18394 |        */
18395 |       hidden?: boolean;
18396 |     }
18397 |     export type createTargetReturnValue = {
18398 |       /**
18399 |        * The id of the page opened.
18400 |        */
18401 |       targetId: TargetID;
18402 |     }
18403 |     /**
18404 |      * Detaches session with given id.
18405 |      */
18406 |     export type detachFromTargetParameters = {
18407 |       /**
18408 |        * Session to detach.
18409 |        */
18410 |       sessionId?: SessionID;
18411 |       /**
18412 |        * Deprecated.
18413 |        */
18414 |       targetId?: TargetID;
18415 |     }
18416 |     export type detachFromTargetReturnValue = {
18417 |     }
18418 |     /**
18419 |      * Deletes a BrowserContext. All the belonging pages will be closed without calling their
18420 | beforeunload hooks.
18421 |      */
18422 |     export type disposeBrowserContextParameters = {
18423 |       browserContextId: Browser.BrowserContextID;
18424 |     }
18425 |     export type disposeBrowserContextReturnValue = {
18426 |     }
18427 |     /**
18428 |      * Returns information about a target.
18429 |      */
18430 |     export type getTargetInfoParameters = {
18431 |       targetId?: TargetID;
18432 |     }
18433 |     export type getTargetInfoReturnValue = {
18434 |       targetInfo: TargetInfo;
18435 |     }
18436 |     /**
18437 |      * Retrieves a list of available targets.
18438 |      */
18439 |     export type getTargetsParameters = {
18440 |       /**
18441 |        * Only targets matching filter will be reported. If filter is not specified
18442 | and target discovery is currently enabled, a filter used for target discovery
18443 | is used for consistency.
18444 |        */
18445 |       filter?: TargetFilter;
18446 |     }
18447 |     export type getTargetsReturnValue = {
18448 |       /**
18449 |        * The list of targets.
18450 |        */
18451 |       targetInfos: TargetInfo[];
18452 |     }
18453 |     /**
18454 |      * Sends protocol message over session with given id.
18455 | Consider using flat mode instead; see commands attachToTarget, setAutoAttach,
18456 | and crbug.com/991325.
18457 |      */
18458 |     export type sendMessageToTargetParameters = {
18459 |       message: string;
18460 |       /**
18461 |        * Identifier of the session.
18462 |        */
18463 |       sessionId?: SessionID;
18464 |       /**
18465 |        * Deprecated.
18466 |        */
18467 |       targetId?: TargetID;
18468 |     }
18469 |     export type sendMessageToTargetReturnValue = {
18470 |     }
18471 |     /**
18472 |      * Controls whether to automatically attach to new targets which are considered
18473 | to be directly related to this one (for example, iframes or workers).
18474 | When turned on, attaches to all existing related targets as well. When turned off,
18475 | automatically detaches from all currently attached targets.
18476 | This also clears all targets added by `autoAttachRelated` from the list of targets to watch
18477 | for creation of related targets.
18478 | You might want to call this recursively for auto-attached targets to attach
18479 | to all available targets.
18480 |      */
18481 |     export type setAutoAttachParameters = {
18482 |       /**
18483 |        * Whether to auto-attach to related targets.
18484 |        */
18485 |       autoAttach: boolean;
18486 |       /**
18487 |        * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
18488 | to run paused targets.
18489 |        */
18490 |       waitForDebuggerOnStart: boolean;
18491 |       /**
18492 |        * Enables "flat" access to the session via specifying sessionId attribute in the commands.
18493 | We plan to make this the default, deprecate non-flattened mode,
18494 | and eventually retire it. See crbug.com/991325.
18495 |        */
18496 |       flatten?: boolean;
18497 |       /**
18498 |        * Only targets matching filter will be attached.
18499 |        */
18500 |       filter?: TargetFilter;
18501 |     }
18502 |     export type setAutoAttachReturnValue = {
18503 |     }
18504 |     /**
18505 |      * Adds the specified target to the list of targets that will be monitored for any related target
18506 | creation (such as child frames, child workers and new versions of service worker) and reported
18507 | through `attachedToTarget`. The specified target is also auto-attached.
18508 | This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent
18509 | `setAutoAttach`. Only available at the Browser target.
18510 |      */
18511 |     export type autoAttachRelatedParameters = {
18512 |       targetId: TargetID;
18513 |       /**
18514 |        * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`
18515 | to run paused targets.
18516 |        */
18517 |       waitForDebuggerOnStart: boolean;
18518 |       /**
18519 |        * Only targets matching filter will be attached.
18520 |        */
18521 |       filter?: TargetFilter;
18522 |     }
18523 |     export type autoAttachRelatedReturnValue = {
18524 |     }
18525 |     /**
18526 |      * Controls whether to discover available targets and notify via
18527 | `targetCreated/targetInfoChanged/targetDestroyed` events.
18528 |      */
18529 |     export type setDiscoverTargetsParameters = {
18530 |       /**
18531 |        * Whether to discover available targets.
18532 |        */
18533 |       discover: boolean;
18534 |       /**
18535 |        * Only targets matching filter will be attached. If `discover` is false,
18536 | `filter` must be omitted or empty.
18537 |        */
18538 |       filter?: TargetFilter;
18539 |     }
18540 |     export type setDiscoverTargetsReturnValue = {
18541 |     }
18542 |     /**
18543 |      * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
18544 | `true`.
18545 |      */
18546 |     export type setRemoteLocationsParameters = {
18547 |       /**
18548 |        * List of remote locations.
18549 |        */
18550 |       locations: RemoteLocation[];
18551 |     }
18552 |     export type setRemoteLocationsReturnValue = {
18553 |     }
18554 |     /**
18555 |      * Gets the targetId of the DevTools page target opened for the given target
18556 | (if any).
18557 |      */
18558 |     export type getDevToolsTargetParameters = {
18559 |       /**
18560 |        * Page or tab target ID.
18561 |        */
18562 |       targetId: TargetID;
18563 |     }
18564 |     export type getDevToolsTargetReturnValue = {
18565 |       /**
18566 |        * The targetId of DevTools page target if exists.
18567 |        */
18568 |       targetId?: TargetID;
18569 |     }
18570 |     /**
18571 |      * Opens a DevTools window for the target.
18572 |      */
18573 |     export type openDevToolsParameters = {
18574 |       /**
18575 |        * This can be the page or tab target ID.
18576 |        */
18577 |       targetId: TargetID;
18578 |       /**
18579 |        * The id of the panel we want DevTools to open initially. Currently
18580 | supported panels are elements, console, network, sources, resources
18581 | and performance.
18582 |        */
18583 |       panelId?: string;
18584 |     }
18585 |     export type openDevToolsReturnValue = {
18586 |       /**
18587 |        * The targetId of DevTools page target.
18588 |        */
18589 |       targetId: TargetID;
18590 |     }
18591 |   }
18592 | 
18593 |   /**
18594 |    * The Tethering domain defines methods and events for browser port binding.
18595 |    */
18596 |   export namespace Tethering {
18597 | 
18598 |     /**
18599 |      * Informs that port was successfully bound and got a specified connection id.
18600 |      */
18601 |     export type acceptedPayload = {
18602 |       /**
18603 |        * Port number that was successfully bound.
18604 |        */
18605 |       port: number;
18606 |       /**
18607 |        * Connection id to be used.
18608 |        */
18609 |       connectionId: string;
18610 |     }
18611 | 
18612 |     /**
18613 |      * Request browser port binding.
18614 |      */
18615 |     export type bindParameters = {
18616 |       /**
18617 |        * Port number to bind.
18618 |        */
18619 |       port: number;
18620 |     }
18621 |     export type bindReturnValue = {
18622 |     }
18623 |     /**
18624 |      * Request browser port unbinding.
18625 |      */
18626 |     export type unbindParameters = {
18627 |       /**
18628 |        * Port number to unbind.
18629 |        */
18630 |       port: number;
18631 |     }
18632 |     export type unbindReturnValue = {
18633 |     }
18634 |   }
18635 | 
18636 |   export namespace Tracing {
18637 |     /**
18638 |      * Configuration for memory dump. Used only when "memory-infra" category is enabled.
18639 |      */
18640 |     export type MemoryDumpConfig = { [key: string]: string };
18641 |     export interface TraceConfig {
18642 |       /**
18643 |        * Controls how the trace buffer stores data. The default is `recordUntilFull`.
18644 |        */
18645 |       recordMode?: "recordUntilFull"|"recordContinuously"|"recordAsMuchAsPossible"|"echoToConsole";
18646 |       /**
18647 |        * Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value
18648 | of 200 MB would be used.
18649 |        */
18650 |       traceBufferSizeInKb?: number;
18651 |       /**
18652 |        * Turns on JavaScript stack sampling.
18653 |        */
18654 |       enableSampling?: boolean;
18655 |       /**
18656 |        * Turns on system tracing.
18657 |        */
18658 |       enableSystrace?: boolean;
18659 |       /**
18660 |        * Turns on argument filter.
18661 |        */
18662 |       enableArgumentFilter?: boolean;
18663 |       /**
18664 |        * Included category filters.
18665 |        */
18666 |       includedCategories?: string[];
18667 |       /**
18668 |        * Excluded category filters.
18669 |        */
18670 |       excludedCategories?: string[];
18671 |       /**
18672 |        * Configuration to synthesize the delays in tracing.
18673 |        */
18674 |       syntheticDelays?: string[];
18675 |       /**
18676 |        * Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
18677 |        */
18678 |       memoryDumpConfig?: MemoryDumpConfig;
18679 |     }
18680 |     /**
18681 |      * Data format of a trace. Can be either the legacy JSON format or the
18682 | protocol buffer format. Note that the JSON format will be deprecated soon.
18683 |      */
18684 |     export type StreamFormat = "json"|"proto";
18685 |     /**
18686 |      * Compression type to use for traces returned via streams.
18687 |      */
18688 |     export type StreamCompression = "none"|"gzip";
18689 |     /**
18690 |      * Details exposed when memory request explicitly declared.
18691 | Keep consistent with memory_dump_request_args.h and
18692 | memory_instrumentation.mojom
18693 |      */
18694 |     export type MemoryDumpLevelOfDetail = "background"|"light"|"detailed";
18695 |     /**
18696 |      * Backend type to use for tracing. `chrome` uses the Chrome-integrated
18697 | tracing service and is supported on all platforms. `system` is only
18698 | supported on Chrome OS and uses the Perfetto system tracing service.
18699 | `auto` chooses `system` when the perfettoConfig provided to Tracing.start
18700 | specifies at least one non-Chrome data source; otherwise uses `chrome`.
18701 |      */
18702 |     export type TracingBackend = "auto"|"chrome"|"system";
18703 | 
18704 |     export type bufferUsagePayload = {
18705 |       /**
18706 |        * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
18707 | total size.
18708 |        */
18709 |       percentFull?: number;
18710 |       /**
18711 |        * An approximate number of events in the trace log.
18712 |        */
18713 |       eventCount?: number;
18714 |       /**
18715 |        * A number in range [0..1] that indicates the used size of event buffer as a fraction of its
18716 | total size.
18717 |        */
18718 |       value?: number;
18719 |     }
18720 |     /**
18721 |      * Contains a bucket of collected trace events. When tracing is stopped collected events will be
18722 | sent as a sequence of dataCollected events followed by tracingComplete event.
18723 |      */
18724 |     export type dataCollectedPayload = {
18725 |       value: { [key: string]: string }[];
18726 |     }
18727 |     /**
18728 |      * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
18729 | delivered via dataCollected events.
18730 |      */
18731 |     export type tracingCompletePayload = {
18732 |       /**
18733 |        * Indicates whether some trace data is known to have been lost, e.g. because the trace ring
18734 | buffer wrapped around.
18735 |        */
18736 |       dataLossOccurred: boolean;
18737 |       /**
18738 |        * A handle of the stream that holds resulting trace data.
18739 |        */
18740 |       stream?: IO.StreamHandle;
18741 |       /**
18742 |        * Trace data format of returned stream.
18743 |        */
18744 |       traceFormat?: StreamFormat;
18745 |       /**
18746 |        * Compression format of returned stream.
18747 |        */
18748 |       streamCompression?: StreamCompression;
18749 |     }
18750 | 
18751 |     /**
18752 |      * Stop trace events collection.
18753 |      */
18754 |     export type endParameters = {
18755 |     }
18756 |     export type endReturnValue = {
18757 |     }
18758 |     /**
18759 |      * Gets supported tracing categories.
18760 |      */
18761 |     export type getCategoriesParameters = {
18762 |     }
18763 |     export type getCategoriesReturnValue = {
18764 |       /**
18765 |        * A list of supported tracing categories.
18766 |        */
18767 |       categories: string[];
18768 |     }
18769 |     /**
18770 |      * Return a descriptor for all available tracing categories.
18771 |      */
18772 |     export type getTrackEventDescriptorParameters = {
18773 |     }
18774 |     export type getTrackEventDescriptorReturnValue = {
18775 |       /**
18776 |        * Base64-encoded serialized perfetto.protos.TrackEventDescriptor protobuf message.
18777 |        */
18778 |       descriptor: binary;
18779 |     }
18780 |     /**
18781 |      * Record a clock sync marker in the trace.
18782 |      */
18783 |     export type recordClockSyncMarkerParameters = {
18784 |       /**
18785 |        * The ID of this clock sync marker
18786 |        */
18787 |       syncId: string;
18788 |     }
18789 |     export type recordClockSyncMarkerReturnValue = {
18790 |     }
18791 |     /**
18792 |      * Request a global memory dump.
18793 |      */
18794 |     export type requestMemoryDumpParameters = {
18795 |       /**
18796 |        * Enables more deterministic results by forcing garbage collection
18797 |        */
18798 |       deterministic?: boolean;
18799 |       /**
18800 |        * Specifies level of details in memory dump. Defaults to "detailed".
18801 |        */
18802 |       levelOfDetail?: MemoryDumpLevelOfDetail;
18803 |     }
18804 |     export type requestMemoryDumpReturnValue = {
18805 |       /**
18806 |        * GUID of the resulting global memory dump.
18807 |        */
18808 |       dumpGuid: string;
18809 |       /**
18810 |        * True iff the global memory dump succeeded.
18811 |        */
18812 |       success: boolean;
18813 |     }
18814 |     /**
18815 |      * Start trace events collection.
18816 |      */
18817 |     export type startParameters = {
18818 |       /**
18819 |        * Category/tag filter
18820 |        */
18821 |       categories?: string;
18822 |       /**
18823 |        * Tracing options
18824 |        */
18825 |       options?: string;
18826 |       /**
18827 |        * If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
18828 |        */
18829 |       bufferUsageReportingInterval?: number;
18830 |       /**
18831 |        * Whether to report trace events as series of dataCollected events or to save trace to a
18832 | stream (defaults to `ReportEvents`).
18833 |        */
18834 |       transferMode?: "ReportEvents"|"ReturnAsStream";
18835 |       /**
18836 |        * Trace data format to use. This only applies when using `ReturnAsStream`
18837 | transfer mode (defaults to `json`).
18838 |        */
18839 |       streamFormat?: StreamFormat;
18840 |       /**
18841 |        * Compression format to use. This only applies when using `ReturnAsStream`
18842 | transfer mode (defaults to `none`)
18843 |        */
18844 |       streamCompression?: StreamCompression;
18845 |       traceConfig?: TraceConfig;
18846 |       /**
18847 |        * Base64-encoded serialized perfetto.protos.TraceConfig protobuf message
18848 | When specified, the parameters `categories`, `options`, `traceConfig`
18849 | are ignored.
18850 |        */
18851 |       perfettoConfig?: binary;
18852 |       /**
18853 |        * Backend type (defaults to `auto`)
18854 |        */
18855 |       tracingBackend?: TracingBackend;
18856 |     }
18857 |     export type startReturnValue = {
18858 |     }
18859 |   }
18860 | 
18861 |   /**
18862 |    * This domain allows inspection of Web Audio API.
18863 | https://webaudio.github.io/web-audio-api/
18864 |    */
18865 |   export namespace WebAudio {
18866 |     /**
18867 |      * An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
18868 |      */
18869 |     export type GraphObjectId = string;
18870 |     /**
18871 |      * Enum of BaseAudioContext types
18872 |      */
18873 |     export type ContextType = "realtime"|"offline";
18874 |     /**
18875 |      * Enum of AudioContextState from the spec
18876 |      */
18877 |     export type ContextState = "suspended"|"running"|"closed"|"interrupted";
18878 |     /**
18879 |      * Enum of AudioNode types
18880 |      */
18881 |     export type NodeType = string;
18882 |     /**
18883 |      * Enum of AudioNode::ChannelCountMode from the spec
18884 |      */
18885 |     export type ChannelCountMode = "clamped-max"|"explicit"|"max";
18886 |     /**
18887 |      * Enum of AudioNode::ChannelInterpretation from the spec
18888 |      */
18889 |     export type ChannelInterpretation = "discrete"|"speakers";
18890 |     /**
18891 |      * Enum of AudioParam types
18892 |      */
18893 |     export type ParamType = string;
18894 |     /**
18895 |      * Enum of AudioParam::AutomationRate from the spec
18896 |      */
18897 |     export type AutomationRate = "a-rate"|"k-rate";
18898 |     /**
18899 |      * Fields in AudioContext that change in real-time.
18900 |      */
18901 |     export interface ContextRealtimeData {
18902 |       /**
18903 |        * The current context time in second in BaseAudioContext.
18904 |        */
18905 |       currentTime: number;
18906 |       /**
18907 |        * The time spent on rendering graph divided by render quantum duration,
18908 | and multiplied by 100. 100 means the audio renderer reached the full
18909 | capacity and glitch may occur.
18910 |        */
18911 |       renderCapacity: number;
18912 |       /**
18913 |        * A running mean of callback interval.
18914 |        */
18915 |       callbackIntervalMean: number;
18916 |       /**
18917 |        * A running variance of callback interval.
18918 |        */
18919 |       callbackIntervalVariance: number;
18920 |     }
18921 |     /**
18922 |      * Protocol object for BaseAudioContext
18923 |      */
18924 |     export interface BaseAudioContext {
18925 |       contextId: GraphObjectId;
18926 |       contextType: ContextType;
18927 |       contextState: ContextState;
18928 |       realtimeData?: ContextRealtimeData;
18929 |       /**
18930 |        * Platform-dependent callback buffer size.
18931 |        */
18932 |       callbackBufferSize: number;
18933 |       /**
18934 |        * Number of output channels supported by audio hardware in use.
18935 |        */
18936 |       maxOutputChannelCount: number;
18937 |       /**
18938 |        * Context sample rate.
18939 |        */
18940 |       sampleRate: number;
18941 |     }
18942 |     /**
18943 |      * Protocol object for AudioListener
18944 |      */
18945 |     export interface AudioListener {
18946 |       listenerId: GraphObjectId;
18947 |       contextId: GraphObjectId;
18948 |     }
18949 |     /**
18950 |      * Protocol object for AudioNode
18951 |      */
18952 |     export interface AudioNode {
18953 |       nodeId: GraphObjectId;
18954 |       contextId: GraphObjectId;
18955 |       nodeType: NodeType;
18956 |       numberOfInputs: number;
18957 |       numberOfOutputs: number;
18958 |       channelCount: number;
18959 |       channelCountMode: ChannelCountMode;
18960 |       channelInterpretation: ChannelInterpretation;
18961 |     }
18962 |     /**
18963 |      * Protocol object for AudioParam
18964 |      */
18965 |     export interface AudioParam {
18966 |       paramId: GraphObjectId;
18967 |       nodeId: GraphObjectId;
18968 |       contextId: GraphObjectId;
18969 |       paramType: ParamType;
18970 |       rate: AutomationRate;
18971 |       defaultValue: number;
18972 |       minValue: number;
18973 |       maxValue: number;
18974 |     }
18975 | 
18976 |     /**
18977 |      * Notifies that a new BaseAudioContext has been created.
18978 |      */
18979 |     export type contextCreatedPayload = {
18980 |       context: BaseAudioContext;
18981 |     }
18982 |     /**
18983 |      * Notifies that an existing BaseAudioContext will be destroyed.
18984 |      */
18985 |     export type contextWillBeDestroyedPayload = {
18986 |       contextId: GraphObjectId;
18987 |     }
18988 |     /**
18989 |      * Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
18990 |      */
18991 |     export type contextChangedPayload = {
18992 |       context: BaseAudioContext;
18993 |     }
18994 |     /**
18995 |      * Notifies that the construction of an AudioListener has finished.
18996 |      */
18997 |     export type audioListenerCreatedPayload = {
18998 |       listener: AudioListener;
18999 |     }
19000 |     /**
19001 |      * Notifies that a new AudioListener has been created.
19002 |      */
19003 |     export type audioListenerWillBeDestroyedPayload = {
19004 |       contextId: GraphObjectId;
19005 |       listenerId: GraphObjectId;
19006 |     }
19007 |     /**
19008 |      * Notifies that a new AudioNode has been created.
19009 |      */
19010 |     export type audioNodeCreatedPayload = {
19011 |       node: AudioNode;
19012 |     }
19013 |     /**
19014 |      * Notifies that an existing AudioNode has been destroyed.
19015 |      */
19016 |     export type audioNodeWillBeDestroyedPayload = {
19017 |       contextId: GraphObjectId;
19018 |       nodeId: GraphObjectId;
19019 |     }
19020 |     /**
19021 |      * Notifies that a new AudioParam has been created.
19022 |      */
19023 |     export type audioParamCreatedPayload = {
19024 |       param: AudioParam;
19025 |     }
19026 |     /**
19027 |      * Notifies that an existing AudioParam has been destroyed.
19028 |      */
19029 |     export type audioParamWillBeDestroyedPayload = {
19030 |       contextId: GraphObjectId;
19031 |       nodeId: GraphObjectId;
19032 |       paramId: GraphObjectId;
19033 |     }
19034 |     /**
19035 |      * Notifies that two AudioNodes are connected.
19036 |      */
19037 |     export type nodesConnectedPayload = {
19038 |       contextId: GraphObjectId;
19039 |       sourceId: GraphObjectId;
19040 |       destinationId: GraphObjectId;
19041 |       sourceOutputIndex?: number;
19042 |       destinationInputIndex?: number;
19043 |     }
19044 |     /**
19045 |      * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
19046 |      */
19047 |     export type nodesDisconnectedPayload = {
19048 |       contextId: GraphObjectId;
19049 |       sourceId: GraphObjectId;
19050 |       destinationId: GraphObjectId;
19051 |       sourceOutputIndex?: number;
19052 |       destinationInputIndex?: number;
19053 |     }
19054 |     /**
19055 |      * Notifies that an AudioNode is connected to an AudioParam.
19056 |      */
19057 |     export type nodeParamConnectedPayload = {
19058 |       contextId: GraphObjectId;
19059 |       sourceId: GraphObjectId;
19060 |       destinationId: GraphObjectId;
19061 |       sourceOutputIndex?: number;
19062 |     }
19063 |     /**
19064 |      * Notifies that an AudioNode is disconnected to an AudioParam.
19065 |      */
19066 |     export type nodeParamDisconnectedPayload = {
19067 |       contextId: GraphObjectId;
19068 |       sourceId: GraphObjectId;
19069 |       destinationId: GraphObjectId;
19070 |       sourceOutputIndex?: number;
19071 |     }
19072 | 
19073 |     /**
19074 |      * Enables the WebAudio domain and starts sending context lifetime events.
19075 |      */
19076 |     export type enableParameters = {
19077 |     }
19078 |     export type enableReturnValue = {
19079 |     }
19080 |     /**
19081 |      * Disables the WebAudio domain.
19082 |      */
19083 |     export type disableParameters = {
19084 |     }
19085 |     export type disableReturnValue = {
19086 |     }
19087 |     /**
19088 |      * Fetch the realtime data from the registered contexts.
19089 |      */
19090 |     export type getRealtimeDataParameters = {
19091 |       contextId: GraphObjectId;
19092 |     }
19093 |     export type getRealtimeDataReturnValue = {
19094 |       realtimeData: ContextRealtimeData;
19095 |     }
19096 |   }
19097 | 
19098 |   /**
19099 |    * This domain allows configuring virtual authenticators to test the WebAuthn
19100 | API.
19101 |    */
19102 |   export namespace WebAuthn {
19103 |     export type AuthenticatorId = string;
19104 |     export type AuthenticatorProtocol = "u2f"|"ctap2";
19105 |     export type Ctap2Version = "ctap2_0"|"ctap2_1";
19106 |     export type AuthenticatorTransport = "usb"|"nfc"|"ble"|"cable"|"internal";
19107 |     export interface VirtualAuthenticatorOptions {
19108 |       protocol: AuthenticatorProtocol;
19109 |       /**
19110 |        * Defaults to ctap2_0. Ignored if |protocol| == u2f.
19111 |        */
19112 |       ctap2Version?: Ctap2Version;
19113 |       transport: AuthenticatorTransport;
19114 |       /**
19115 |        * Defaults to false.
19116 |        */
19117 |       hasResidentKey?: boolean;
19118 |       /**
19119 |        * Defaults to false.
19120 |        */
19121 |       hasUserVerification?: boolean;
19122 |       /**
19123 |        * If set to true, the authenticator will support the largeBlob extension.
19124 | https://w3c.github.io/webauthn#largeBlob
19125 | Defaults to false.
19126 |        */
19127 |       hasLargeBlob?: boolean;
19128 |       /**
19129 |        * If set to true, the authenticator will support the credBlob extension.
19130 | https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension
19131 | Defaults to false.
19132 |        */
19133 |       hasCredBlob?: boolean;
19134 |       /**
19135 |        * If set to true, the authenticator will support the minPinLength extension.
19136 | https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension
19137 | Defaults to false.
19138 |        */
19139 |       hasMinPinLength?: boolean;
19140 |       /**
19141 |        * If set to true, the authenticator will support the prf extension.
19142 | https://w3c.github.io/webauthn/#prf-extension
19143 | Defaults to false.
19144 |        */
19145 |       hasPrf?: boolean;
19146 |       /**
19147 |        * If set to true, tests of user presence will succeed immediately.
19148 | Otherwise, they will not be resolved. Defaults to true.
19149 |        */
19150 |       automaticPresenceSimulation?: boolean;
19151 |       /**
19152 |        * Sets whether User Verification succeeds or fails for an authenticator.
19153 | Defaults to false.
19154 |        */
19155 |       isUserVerified?: boolean;
19156 |       /**
19157 |        * Credentials created by this authenticator will have the backup
19158 | eligibility (BE) flag set to this value. Defaults to false.
19159 | https://w3c.github.io/webauthn/#sctn-credential-backup
19160 |        */
19161 |       defaultBackupEligibility?: boolean;
19162 |       /**
19163 |        * Credentials created by this authenticator will have the backup state
19164 | (BS) flag set to this value. Defaults to false.
19165 | https://w3c.github.io/webauthn/#sctn-credential-backup
19166 |        */
19167 |       defaultBackupState?: boolean;
19168 |     }
19169 |     export interface Credential {
19170 |       credentialId: binary;
19171 |       isResidentCredential: boolean;
19172 |       /**
19173 |        * Relying Party ID the credential is scoped to. Must be set when adding a
19174 | credential.
19175 |        */
19176 |       rpId?: string;
19177 |       /**
19178 |        * The ECDSA P-256 private key in PKCS#8 format.
19179 |        */
19180 |       privateKey: binary;
19181 |       /**
19182 |        * An opaque byte sequence with a maximum size of 64 bytes mapping the
19183 | credential to a specific user.
19184 |        */
19185 |       userHandle?: binary;
19186 |       /**
19187 |        * Signature counter. This is incremented by one for each successful
19188 | assertion.
19189 | See https://w3c.github.io/webauthn/#signature-counter
19190 |        */
19191 |       signCount: number;
19192 |       /**
19193 |        * The large blob associated with the credential.
19194 | See https://w3c.github.io/webauthn/#sctn-large-blob-extension
19195 |        */
19196 |       largeBlob?: binary;
19197 |       /**
19198 |        * Assertions returned by this credential will have the backup eligibility
19199 | (BE) flag set to this value. Defaults to the authenticator's
19200 | defaultBackupEligibility value.
19201 |        */
19202 |       backupEligibility?: boolean;
19203 |       /**
19204 |        * Assertions returned by this credential will have the backup state (BS)
19205 | flag set to this value. Defaults to the authenticator's
19206 | defaultBackupState value.
19207 |        */
19208 |       backupState?: boolean;
19209 |       /**
19210 |        * The credential's user.name property. Equivalent to empty if not set.
19211 | https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
19212 |        */
19213 |       userName?: string;
19214 |       /**
19215 |        * The credential's user.displayName property. Equivalent to empty if
19216 | not set.
19217 | https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
19218 |        */
19219 |       userDisplayName?: string;
19220 |     }
19221 | 
19222 |     /**
19223 |      * Triggered when a credential is added to an authenticator.
19224 |      */
19225 |     export type credentialAddedPayload = {
19226 |       authenticatorId: AuthenticatorId;
19227 |       credential: Credential;
19228 |     }
19229 |     /**
19230 |      * Triggered when a credential is deleted, e.g. through
19231 | PublicKeyCredential.signalUnknownCredential().
19232 |      */
19233 |     export type credentialDeletedPayload = {
19234 |       authenticatorId: AuthenticatorId;
19235 |       credentialId: binary;
19236 |     }
19237 |     /**
19238 |      * Triggered when a credential is updated, e.g. through
19239 | PublicKeyCredential.signalCurrentUserDetails().
19240 |      */
19241 |     export type credentialUpdatedPayload = {
19242 |       authenticatorId: AuthenticatorId;
19243 |       credential: Credential;
19244 |     }
19245 |     /**
19246 |      * Triggered when a credential is used in a webauthn assertion.
19247 |      */
19248 |     export type credentialAssertedPayload = {
19249 |       authenticatorId: AuthenticatorId;
19250 |       credential: Credential;
19251 |     }
19252 | 
19253 |     /**
19254 |      * Enable the WebAuthn domain and start intercepting credential storage and
19255 | retrieval with a virtual authenticator.
19256 |      */
19257 |     export type enableParameters = {
19258 |       /**
19259 |        * Whether to enable the WebAuthn user interface. Enabling the UI is
19260 | recommended for debugging and demo purposes, as it is closer to the real
19261 | experience. Disabling the UI is recommended for automated testing.
19262 | Supported at the embedder's discretion if UI is available.
19263 | Defaults to false.
19264 |        */
19265 |       enableUI?: boolean;
19266 |     }
19267 |     export type enableReturnValue = {
19268 |     }
19269 |     /**
19270 |      * Disable the WebAuthn domain.
19271 |      */
19272 |     export type disableParameters = {
19273 |     }
19274 |     export type disableReturnValue = {
19275 |     }
19276 |     /**
19277 |      * Creates and adds a virtual authenticator.
19278 |      */
19279 |     export type addVirtualAuthenticatorParameters = {
19280 |       options: VirtualAuthenticatorOptions;
19281 |     }
19282 |     export type addVirtualAuthenticatorReturnValue = {
19283 |       authenticatorId: AuthenticatorId;
19284 |     }
19285 |     /**
19286 |      * Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
19287 |      */
19288 |     export type setResponseOverrideBitsParameters = {
19289 |       authenticatorId: AuthenticatorId;
19290 |       /**
19291 |        * If isBogusSignature is set, overrides the signature in the authenticator response to be zero.
19292 | Defaults to false.
19293 |        */
19294 |       isBogusSignature?: boolean;
19295 |       /**
19296 |        * If isBadUV is set, overrides the UV bit in the flags in the authenticator response to
19297 | be zero. Defaults to false.
19298 |        */
19299 |       isBadUV?: boolean;
19300 |       /**
19301 |        * If isBadUP is set, overrides the UP bit in the flags in the authenticator response to
19302 | be zero. Defaults to false.
19303 |        */
19304 |       isBadUP?: boolean;
19305 |     }
19306 |     export type setResponseOverrideBitsReturnValue = {
19307 |     }
19308 |     /**
19309 |      * Removes the given authenticator.
19310 |      */
19311 |     export type removeVirtualAuthenticatorParameters = {
19312 |       authenticatorId: AuthenticatorId;
19313 |     }
19314 |     export type removeVirtualAuthenticatorReturnValue = {
19315 |     }
19316 |     /**
19317 |      * Adds the credential to the specified authenticator.
19318 |      */
19319 |     export type addCredentialParameters = {
19320 |       authenticatorId: AuthenticatorId;
19321 |       credential: Credential;
19322 |     }
19323 |     export type addCredentialReturnValue = {
19324 |     }
19325 |     /**
19326 |      * Returns a single credential stored in the given virtual authenticator that
19327 | matches the credential ID.
19328 |      */
19329 |     export type getCredentialParameters = {
19330 |       authenticatorId: AuthenticatorId;
19331 |       credentialId: binary;
19332 |     }
19333 |     export type getCredentialReturnValue = {
19334 |       credential: Credential;
19335 |     }
19336 |     /**
19337 |      * Returns all the credentials stored in the given virtual authenticator.
19338 |      */
19339 |     export type getCredentialsParameters = {
19340 |       authenticatorId: AuthenticatorId;
19341 |     }
19342 |     export type getCredentialsReturnValue = {
19343 |       credentials: Credential[];
19344 |     }
19345 |     /**
19346 |      * Removes a credential from the authenticator.
19347 |      */
19348 |     export type removeCredentialParameters = {
19349 |       authenticatorId: AuthenticatorId;
19350 |       credentialId: binary;
19351 |     }
19352 |     export type removeCredentialReturnValue = {
19353 |     }
19354 |     /**
19355 |      * Clears all the credentials from the specified device.
19356 |      */
19357 |     export type clearCredentialsParameters = {
19358 |       authenticatorId: AuthenticatorId;
19359 |     }
19360 |     export type clearCredentialsReturnValue = {
19361 |     }
19362 |     /**
19363 |      * Sets whether User Verification succeeds or fails for an authenticator.
19364 | The default is true.
19365 |      */
19366 |     export type setUserVerifiedParameters = {
19367 |       authenticatorId: AuthenticatorId;
19368 |       isUserVerified: boolean;
19369 |     }
19370 |     export type setUserVerifiedReturnValue = {
19371 |     }
19372 |     /**
19373 |      * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
19374 | The default is true.
19375 |      */
19376 |     export type setAutomaticPresenceSimulationParameters = {
19377 |       authenticatorId: AuthenticatorId;
19378 |       enabled: boolean;
19379 |     }
19380 |     export type setAutomaticPresenceSimulationReturnValue = {
19381 |     }
19382 |     /**
19383 |      * Allows setting credential properties.
19384 | https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties
19385 |      */
19386 |     export type setCredentialPropertiesParameters = {
19387 |       authenticatorId: AuthenticatorId;
19388 |       credentialId: binary;
19389 |       backupEligibility?: boolean;
19390 |       backupState?: boolean;
19391 |     }
19392 |     export type setCredentialPropertiesReturnValue = {
19393 |     }
19394 |   }
19395 | 
19396 |   /**
19397 |    * This domain is deprecated - use Runtime or Log instead.
19398 |    */
19399 |   export namespace Console {
19400 |     /**
19401 |      * Console message.
19402 |      */
19403 |     export interface ConsoleMessage {
19404 |       /**
19405 |        * Message source.
19406 |        */
19407 |       source: "xml"|"javascript"|"network"|"console-api"|"storage"|"appcache"|"rendering"|"security"|"other"|"deprecation"|"worker";
19408 |       /**
19409 |        * Message severity.
19410 |        */
19411 |       level: "log"|"warning"|"error"|"debug"|"info";
19412 |       /**
19413 |        * Message text.
19414 |        */
19415 |       text: string;
19416 |       /**
19417 |        * URL of the message origin.
19418 |        */
19419 |       url?: string;
19420 |       /**
19421 |        * Line number in the resource that generated this message (1-based).
19422 |        */
19423 |       line?: number;
19424 |       /**
19425 |        * Column number in the resource that generated this message (1-based).
19426 |        */
19427 |       column?: number;
19428 |     }
19429 | 
19430 |     /**
19431 |      * Issued when new console message is added.
19432 |      */
19433 |     export type messageAddedPayload = {
19434 |       /**
19435 |        * Console message that has been added.
19436 |        */
19437 |       message: ConsoleMessage;
19438 |     }
19439 | 
19440 |     /**
19441 |      * Does nothing.
19442 |      */
19443 |     export type clearMessagesParameters = {
19444 |     }
19445 |     export type clearMessagesReturnValue = {
19446 |     }
19447 |     /**
19448 |      * Disables console domain, prevents further console messages from being reported to the client.
19449 |      */
19450 |     export type disableParameters = {
19451 |     }
19452 |     export type disableReturnValue = {
19453 |     }
19454 |     /**
19455 |      * Enables console domain, sends the messages collected so far to the client by means of the
19456 | `messageAdded` notification.
19457 |      */
19458 |     export type enableParameters = {
19459 |     }
19460 |     export type enableReturnValue = {
19461 |     }
19462 |   }
19463 | 
19464 |   /**
19465 |    * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
19466 | breakpoints, stepping through execution, exploring stack traces, etc.
19467 |    */
19468 |   export namespace Debugger {
19469 |     /**
19470 |      * Breakpoint identifier.
19471 |      */
19472 |     export type BreakpointId = string;
19473 |     /**
19474 |      * Call frame identifier.
19475 |      */
19476 |     export type CallFrameId = string;
19477 |     /**
19478 |      * Location in the source code.
19479 |      */
19480 |     export interface Location {
19481 |       /**
19482 |        * Script identifier as reported in the `Debugger.scriptParsed`.
19483 |        */
19484 |       scriptId: Runtime.ScriptId;
19485 |       /**
19486 |        * Line number in the script (0-based).
19487 |        */
19488 |       lineNumber: number;
19489 |       /**
19490 |        * Column number in the script (0-based).
19491 |        */
19492 |       columnNumber?: number;
19493 |     }
19494 |     /**
19495 |      * Location in the source code.
19496 |      */
19497 |     export interface ScriptPosition {
19498 |       lineNumber: number;
19499 |       columnNumber: number;
19500 |     }
19501 |     /**
19502 |      * Location range within one script.
19503 |      */
19504 |     export interface LocationRange {
19505 |       scriptId: Runtime.ScriptId;
19506 |       start: ScriptPosition;
19507 |       end: ScriptPosition;
19508 |     }
19509 |     /**
19510 |      * JavaScript call frame. Array of call frames form the call stack.
19511 |      */
19512 |     export interface CallFrame {
19513 |       /**
19514 |        * Call frame identifier. This identifier is only valid while the virtual machine is paused.
19515 |        */
19516 |       callFrameId: CallFrameId;
19517 |       /**
19518 |        * Name of the JavaScript function called on this call frame.
19519 |        */
19520 |       functionName: string;
19521 |       /**
19522 |        * Location in the source code.
19523 |        */
19524 |       functionLocation?: Location;
19525 |       /**
19526 |        * Location in the source code.
19527 |        */
19528 |       location: Location;
19529 |       /**
19530 |        * JavaScript script name or url.
19531 | Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
19532 | sent `Debugger.scriptParsed` event.
19533 |        */
19534 |       url: string;
19535 |       /**
19536 |        * Scope chain for this call frame.
19537 |        */
19538 |       scopeChain: Scope[];
19539 |       /**
19540 |        * `this` object for this call frame.
19541 |        */
19542 |       this: Runtime.RemoteObject;
19543 |       /**
19544 |        * The value being returned, if the function is at return point.
19545 |        */
19546 |       returnValue?: Runtime.RemoteObject;
19547 |       /**
19548 |        * Valid only while the VM is paused and indicates whether this frame
19549 | can be restarted or not. Note that a `true` value here does not
19550 | guarantee that Debugger#restartFrame with this CallFrameId will be
19551 | successful, but it is very likely.
19552 |        */
19553 |       canBeRestarted?: boolean;
19554 |     }
19555 |     /**
19556 |      * Scope description.
19557 |      */
19558 |     export interface Scope {
19559 |       /**
19560 |        * Scope type.
19561 |        */
19562 |       type: "global"|"local"|"with"|"closure"|"catch"|"block"|"script"|"eval"|"module"|"wasm-expression-stack";
19563 |       /**
19564 |        * Object representing the scope. For `global` and `with` scopes it represents the actual
19565 | object; for the rest of the scopes, it is artificial transient object enumerating scope
19566 | variables as its properties.
19567 |        */
19568 |       object: Runtime.RemoteObject;
19569 |       name?: string;
19570 |       /**
19571 |        * Location in the source code where scope starts
19572 |        */
19573 |       startLocation?: Location;
19574 |       /**
19575 |        * Location in the source code where scope ends
19576 |        */
19577 |       endLocation?: Location;
19578 |     }
19579 |     /**
19580 |      * Search match for resource.
19581 |      */
19582 |     export interface SearchMatch {
19583 |       /**
19584 |        * Line number in resource content.
19585 |        */
19586 |       lineNumber: number;
19587 |       /**
19588 |        * Line with match content.
19589 |        */
19590 |       lineContent: string;
19591 |     }
19592 |     export interface BreakLocation {
19593 |       /**
19594 |        * Script identifier as reported in the `Debugger.scriptParsed`.
19595 |        */
19596 |       scriptId: Runtime.ScriptId;
19597 |       /**
19598 |        * Line number in the script (0-based).
19599 |        */
19600 |       lineNumber: number;
19601 |       /**
19602 |        * Column number in the script (0-based).
19603 |        */
19604 |       columnNumber?: number;
19605 |       type?: "debuggerStatement"|"call"|"return";
19606 |     }
19607 |     export interface WasmDisassemblyChunk {
19608 |       /**
19609 |        * The next chunk of disassembled lines.
19610 |        */
19611 |       lines: string[];
19612 |       /**
19613 |        * The bytecode offsets describing the start of each line.
19614 |        */
19615 |       bytecodeOffsets: number[];
19616 |     }
19617 |     /**
19618 |      * Enum of possible script languages.
19619 |      */
19620 |     export type ScriptLanguage = "JavaScript"|"WebAssembly";
19621 |     /**
19622 |      * Debug symbols available for a wasm script.
19623 |      */
19624 |     export interface DebugSymbols {
19625 |       /**
19626 |        * Type of the debug symbols.
19627 |        */
19628 |       type: "SourceMap"|"EmbeddedDWARF"|"ExternalDWARF";
19629 |       /**
19630 |        * URL of the external symbol source.
19631 |        */
19632 |       externalURL?: string;
19633 |     }
19634 |     export interface ResolvedBreakpoint {
19635 |       /**
19636 |        * Breakpoint unique identifier.
19637 |        */
19638 |       breakpointId: BreakpointId;
19639 |       /**
19640 |        * Actual breakpoint location.
19641 |        */
19642 |       location: Location;
19643 |     }
19644 | 
19645 |     /**
19646 |      * Fired when breakpoint is resolved to an actual script and location.
19647 | Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event.
19648 |      */
19649 |     export type breakpointResolvedPayload = {
19650 |       /**
19651 |        * Breakpoint unique identifier.
19652 |        */
19653 |       breakpointId: BreakpointId;
19654 |       /**
19655 |        * Actual breakpoint location.
19656 |        */
19657 |       location: Location;
19658 |     }
19659 |     /**
19660 |      * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
19661 |      */
19662 |     export type pausedPayload = {
19663 |       /**
19664 |        * Call stack the virtual machine stopped on.
19665 |        */
19666 |       callFrames: CallFrame[];
19667 |       /**
19668 |        * Pause reason.
19669 |        */
19670 |       reason: "ambiguous"|"assert"|"CSPViolation"|"debugCommand"|"DOM"|"EventListener"|"exception"|"instrumentation"|"OOM"|"other"|"promiseRejection"|"XHR"|"step";
19671 |       /**
19672 |        * Object containing break-specific auxiliary properties.
19673 |        */
19674 |       data?: { [key: string]: string };
19675 |       /**
19676 |        * Hit breakpoints IDs
19677 |        */
19678 |       hitBreakpoints?: string[];
19679 |       /**
19680 |        * Async stack trace, if any.
19681 |        */
19682 |       asyncStackTrace?: Runtime.StackTrace;
19683 |       /**
19684 |        * Async stack trace, if any.
19685 |        */
19686 |       asyncStackTraceId?: Runtime.StackTraceId;
19687 |       /**
19688 |        * Never present, will be removed.
19689 |        */
19690 |       asyncCallStackTraceId?: Runtime.StackTraceId;
19691 |     }
19692 |     /**
19693 |      * Fired when the virtual machine resumed execution.
19694 |      */
19695 |     export type resumedPayload = void;
19696 |     /**
19697 |      * Fired when virtual machine fails to parse the script.
19698 |      */
19699 |     export type scriptFailedToParsePayload = {
19700 |       /**
19701 |        * Identifier of the script parsed.
19702 |        */
19703 |       scriptId: Runtime.ScriptId;
19704 |       /**
19705 |        * URL or name of the script parsed (if any).
19706 |        */
19707 |       url: string;
19708 |       /**
19709 |        * Line offset of the script within the resource with given URL (for script tags).
19710 |        */
19711 |       startLine: number;
19712 |       /**
19713 |        * Column offset of the script within the resource with given URL.
19714 |        */
19715 |       startColumn: number;
19716 |       /**
19717 |        * Last line of the script.
19718 |        */
19719 |       endLine: number;
19720 |       /**
19721 |        * Length of the last line of the script.
19722 |        */
19723 |       endColumn: number;
19724 |       /**
19725 |        * Specifies script creation context.
19726 |        */
19727 |       executionContextId: Runtime.ExecutionContextId;
19728 |       /**
19729 |        * Content hash of the script, SHA-256.
19730 |        */
19731 |       hash: string;
19732 |       /**
19733 |        * For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
19734 |        */
19735 |       buildId: string;
19736 |       /**
19737 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
19738 |        */
19739 |       executionContextAuxData?: { [key: string]: string };
19740 |       /**
19741 |        * URL of source map associated with script (if any).
19742 |        */
19743 |       sourceMapURL?: string;
19744 |       /**
19745 |        * True, if this script has sourceURL.
19746 |        */
19747 |       hasSourceURL?: boolean;
19748 |       /**
19749 |        * True, if this script is ES6 module.
19750 |        */
19751 |       isModule?: boolean;
19752 |       /**
19753 |        * This script length.
19754 |        */
19755 |       length?: number;
19756 |       /**
19757 |        * JavaScript top stack frame of where the script parsed event was triggered if available.
19758 |        */
19759 |       stackTrace?: Runtime.StackTrace;
19760 |       /**
19761 |        * If the scriptLanguage is WebAssembly, the code section offset in the module.
19762 |        */
19763 |       codeOffset?: number;
19764 |       /**
19765 |        * The language of the script.
19766 |        */
19767 |       scriptLanguage?: Debugger.ScriptLanguage;
19768 |       /**
19769 |        * The name the embedder supplied for this script.
19770 |        */
19771 |       embedderName?: string;
19772 |     }
19773 |     /**
19774 |      * Fired when virtual machine parses script. This event is also fired for all known and uncollected
19775 | scripts upon enabling debugger.
19776 |      */
19777 |     export type scriptParsedPayload = {
19778 |       /**
19779 |        * Identifier of the script parsed.
19780 |        */
19781 |       scriptId: Runtime.ScriptId;
19782 |       /**
19783 |        * URL or name of the script parsed (if any).
19784 |        */
19785 |       url: string;
19786 |       /**
19787 |        * Line offset of the script within the resource with given URL (for script tags).
19788 |        */
19789 |       startLine: number;
19790 |       /**
19791 |        * Column offset of the script within the resource with given URL.
19792 |        */
19793 |       startColumn: number;
19794 |       /**
19795 |        * Last line of the script.
19796 |        */
19797 |       endLine: number;
19798 |       /**
19799 |        * Length of the last line of the script.
19800 |        */
19801 |       endColumn: number;
19802 |       /**
19803 |        * Specifies script creation context.
19804 |        */
19805 |       executionContextId: Runtime.ExecutionContextId;
19806 |       /**
19807 |        * Content hash of the script, SHA-256.
19808 |        */
19809 |       hash: string;
19810 |       /**
19811 |        * For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
19812 |        */
19813 |       buildId: string;
19814 |       /**
19815 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
19816 |        */
19817 |       executionContextAuxData?: { [key: string]: string };
19818 |       /**
19819 |        * True, if this script is generated as a result of the live edit operation.
19820 |        */
19821 |       isLiveEdit?: boolean;
19822 |       /**
19823 |        * URL of source map associated with script (if any).
19824 |        */
19825 |       sourceMapURL?: string;
19826 |       /**
19827 |        * True, if this script has sourceURL.
19828 |        */
19829 |       hasSourceURL?: boolean;
19830 |       /**
19831 |        * True, if this script is ES6 module.
19832 |        */
19833 |       isModule?: boolean;
19834 |       /**
19835 |        * This script length.
19836 |        */
19837 |       length?: number;
19838 |       /**
19839 |        * JavaScript top stack frame of where the script parsed event was triggered if available.
19840 |        */
19841 |       stackTrace?: Runtime.StackTrace;
19842 |       /**
19843 |        * If the scriptLanguage is WebAssembly, the code section offset in the module.
19844 |        */
19845 |       codeOffset?: number;
19846 |       /**
19847 |        * The language of the script.
19848 |        */
19849 |       scriptLanguage?: Debugger.ScriptLanguage;
19850 |       /**
19851 |        * If the scriptLanguage is WebAssembly, the source of debug symbols for the module.
19852 |        */
19853 |       debugSymbols?: Debugger.DebugSymbols[];
19854 |       /**
19855 |        * The name the embedder supplied for this script.
19856 |        */
19857 |       embedderName?: string;
19858 |       /**
19859 |        * The list of set breakpoints in this script if calls to `setBreakpointByUrl`
19860 | matches this script's URL or hash. Clients that use this list can ignore the
19861 | `breakpointResolved` event. They are equivalent.
19862 |        */
19863 |       resolvedBreakpoints?: ResolvedBreakpoint[];
19864 |     }
19865 | 
19866 |     /**
19867 |      * Continues execution until specific location is reached.
19868 |      */
19869 |     export type continueToLocationParameters = {
19870 |       /**
19871 |        * Location to continue to.
19872 |        */
19873 |       location: Location;
19874 |       targetCallFrames?: "any"|"current";
19875 |     }
19876 |     export type continueToLocationReturnValue = {
19877 |     }
19878 |     /**
19879 |      * Disables debugger for given page.
19880 |      */
19881 |     export type disableParameters = {
19882 |     }
19883 |     export type disableReturnValue = {
19884 |     }
19885 |     /**
19886 |      * Enables debugger for the given page. Clients should not assume that the debugging has been
19887 | enabled until the result for this command is received.
19888 |      */
19889 |     export type enableParameters = {
19890 |       /**
19891 |        * The maximum size in bytes of collected scripts (not referenced by other heap objects)
19892 | the debugger can hold. Puts no limit if parameter is omitted.
19893 |        */
19894 |       maxScriptsCacheSize?: number;
19895 |     }
19896 |     export type enableReturnValue = {
19897 |       /**
19898 |        * Unique identifier of the debugger.
19899 |        */
19900 |       debuggerId: Runtime.UniqueDebuggerId;
19901 |     }
19902 |     /**
19903 |      * Evaluates expression on a given call frame.
19904 |      */
19905 |     export type evaluateOnCallFrameParameters = {
19906 |       /**
19907 |        * Call frame identifier to evaluate on.
19908 |        */
19909 |       callFrameId: CallFrameId;
19910 |       /**
19911 |        * Expression to evaluate.
19912 |        */
19913 |       expression: string;
19914 |       /**
19915 |        * String object group name to put result into (allows rapid releasing resulting object handles
19916 | using `releaseObjectGroup`).
19917 |        */
19918 |       objectGroup?: string;
19919 |       /**
19920 |        * Specifies whether command line API should be available to the evaluated expression, defaults
19921 | to false.
19922 |        */
19923 |       includeCommandLineAPI?: boolean;
19924 |       /**
19925 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
19926 | execution. Overrides `setPauseOnException` state.
19927 |        */
19928 |       silent?: boolean;
19929 |       /**
19930 |        * Whether the result is expected to be a JSON object that should be sent by value.
19931 |        */
19932 |       returnByValue?: boolean;
19933 |       /**
19934 |        * Whether preview should be generated for the result.
19935 |        */
19936 |       generatePreview?: boolean;
19937 |       /**
19938 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
19939 |        */
19940 |       throwOnSideEffect?: boolean;
19941 |       /**
19942 |        * Terminate execution after timing out (number of milliseconds).
19943 |        */
19944 |       timeout?: Runtime.TimeDelta;
19945 |     }
19946 |     export type evaluateOnCallFrameReturnValue = {
19947 |       /**
19948 |        * Object wrapper for the evaluation result.
19949 |        */
19950 |       result: Runtime.RemoteObject;
19951 |       /**
19952 |        * Exception details.
19953 |        */
19954 |       exceptionDetails?: Runtime.ExceptionDetails;
19955 |     }
19956 |     /**
19957 |      * Returns possible locations for breakpoint. scriptId in start and end range locations should be
19958 | the same.
19959 |      */
19960 |     export type getPossibleBreakpointsParameters = {
19961 |       /**
19962 |        * Start of range to search possible breakpoint locations in.
19963 |        */
19964 |       start: Location;
19965 |       /**
19966 |        * End of range to search possible breakpoint locations in (excluding). When not specified, end
19967 | of scripts is used as end of range.
19968 |        */
19969 |       end?: Location;
19970 |       /**
19971 |        * Only consider locations which are in the same (non-nested) function as start.
19972 |        */
19973 |       restrictToFunction?: boolean;
19974 |     }
19975 |     export type getPossibleBreakpointsReturnValue = {
19976 |       /**
19977 |        * List of the possible breakpoint locations.
19978 |        */
19979 |       locations: BreakLocation[];
19980 |     }
19981 |     /**
19982 |      * Returns source for the script with given id.
19983 |      */
19984 |     export type getScriptSourceParameters = {
19985 |       /**
19986 |        * Id of the script to get source for.
19987 |        */
19988 |       scriptId: Runtime.ScriptId;
19989 |     }
19990 |     export type getScriptSourceReturnValue = {
19991 |       /**
19992 |        * Script source (empty in case of Wasm bytecode).
19993 |        */
19994 |       scriptSource: string;
19995 |       /**
19996 |        * Wasm bytecode.
19997 |        */
19998 |       bytecode?: binary;
19999 |     }
20000 |     export type disassembleWasmModuleParameters = {
20001 |       /**
20002 |        * Id of the script to disassemble
20003 |        */
20004 |       scriptId: Runtime.ScriptId;
20005 |     }
20006 |     export type disassembleWasmModuleReturnValue = {
20007 |       /**
20008 |        * For large modules, return a stream from which additional chunks of
20009 | disassembly can be read successively.
20010 |        */
20011 |       streamId?: string;
20012 |       /**
20013 |        * The total number of lines in the disassembly text.
20014 |        */
20015 |       totalNumberOfLines: number;
20016 |       /**
20017 |        * The offsets of all function bodies, in the format [start1, end1,
20018 | start2, end2, ...] where all ends are exclusive.
20019 |        */
20020 |       functionBodyOffsets: number[];
20021 |       /**
20022 |        * The first chunk of disassembly.
20023 |        */
20024 |       chunk: WasmDisassemblyChunk;
20025 |     }
20026 |     /**
20027 |      * Disassemble the next chunk of lines for the module corresponding to the
20028 | stream. If disassembly is complete, this API will invalidate the streamId
20029 | and return an empty chunk. Any subsequent calls for the now invalid stream
20030 | will return errors.
20031 |      */
20032 |     export type nextWasmDisassemblyChunkParameters = {
20033 |       streamId: string;
20034 |     }
20035 |     export type nextWasmDisassemblyChunkReturnValue = {
20036 |       /**
20037 |        * The next chunk of disassembly.
20038 |        */
20039 |       chunk: WasmDisassemblyChunk;
20040 |     }
20041 |     /**
20042 |      * This command is deprecated. Use getScriptSource instead.
20043 |      */
20044 |     export type getWasmBytecodeParameters = {
20045 |       /**
20046 |        * Id of the Wasm script to get source for.
20047 |        */
20048 |       scriptId: Runtime.ScriptId;
20049 |     }
20050 |     export type getWasmBytecodeReturnValue = {
20051 |       /**
20052 |        * Script source.
20053 |        */
20054 |       bytecode: binary;
20055 |     }
20056 |     /**
20057 |      * Returns stack trace with given `stackTraceId`.
20058 |      */
20059 |     export type getStackTraceParameters = {
20060 |       stackTraceId: Runtime.StackTraceId;
20061 |     }
20062 |     export type getStackTraceReturnValue = {
20063 |       stackTrace: Runtime.StackTrace;
20064 |     }
20065 |     /**
20066 |      * Stops on the next JavaScript statement.
20067 |      */
20068 |     export type pauseParameters = {
20069 |     }
20070 |     export type pauseReturnValue = {
20071 |     }
20072 |     export type pauseOnAsyncCallParameters = {
20073 |       /**
20074 |        * Debugger will pause when async call with given stack trace is started.
20075 |        */
20076 |       parentStackTraceId: Runtime.StackTraceId;
20077 |     }
20078 |     export type pauseOnAsyncCallReturnValue = {
20079 |     }
20080 |     /**
20081 |      * Removes JavaScript breakpoint.
20082 |      */
20083 |     export type removeBreakpointParameters = {
20084 |       breakpointId: BreakpointId;
20085 |     }
20086 |     export type removeBreakpointReturnValue = {
20087 |     }
20088 |     /**
20089 |      * Restarts particular call frame from the beginning. The old, deprecated
20090 | behavior of `restartFrame` is to stay paused and allow further CDP commands
20091 | after a restart was scheduled. This can cause problems with restarting, so
20092 | we now continue execution immediatly after it has been scheduled until we
20093 | reach the beginning of the restarted frame.
20094 | 
20095 | To stay back-wards compatible, `restartFrame` now expects a `mode`
20096 | parameter to be present. If the `mode` parameter is missing, `restartFrame`
20097 | errors out.
20098 | 
20099 | The various return values are deprecated and `callFrames` is always empty.
20100 | Use the call frames from the `Debugger#paused` events instead, that fires
20101 | once V8 pauses at the beginning of the restarted function.
20102 |      */
20103 |     export type restartFrameParameters = {
20104 |       /**
20105 |        * Call frame identifier to evaluate on.
20106 |        */
20107 |       callFrameId: CallFrameId;
20108 |       /**
20109 |        * The `mode` parameter must be present and set to 'StepInto', otherwise
20110 | `restartFrame` will error out.
20111 |        */
20112 |       mode?: "StepInto";
20113 |     }
20114 |     export type restartFrameReturnValue = {
20115 |       /**
20116 |        * New stack trace.
20117 |        */
20118 |       callFrames: CallFrame[];
20119 |       /**
20120 |        * Async stack trace, if any.
20121 |        */
20122 |       asyncStackTrace?: Runtime.StackTrace;
20123 |       /**
20124 |        * Async stack trace, if any.
20125 |        */
20126 |       asyncStackTraceId?: Runtime.StackTraceId;
20127 |     }
20128 |     /**
20129 |      * Resumes JavaScript execution.
20130 |      */
20131 |     export type resumeParameters = {
20132 |       /**
20133 |        * Set to true to terminate execution upon resuming execution. In contrast
20134 | to Runtime.terminateExecution, this will allows to execute further
20135 | JavaScript (i.e. via evaluation) until execution of the paused code
20136 | is actually resumed, at which point termination is triggered.
20137 | If execution is currently not paused, this parameter has no effect.
20138 |        */
20139 |       terminateOnResume?: boolean;
20140 |     }
20141 |     export type resumeReturnValue = {
20142 |     }
20143 |     /**
20144 |      * Searches for given string in script content.
20145 |      */
20146 |     export type searchInContentParameters = {
20147 |       /**
20148 |        * Id of the script to search in.
20149 |        */
20150 |       scriptId: Runtime.ScriptId;
20151 |       /**
20152 |        * String to search for.
20153 |        */
20154 |       query: string;
20155 |       /**
20156 |        * If true, search is case sensitive.
20157 |        */
20158 |       caseSensitive?: boolean;
20159 |       /**
20160 |        * If true, treats string parameter as regex.
20161 |        */
20162 |       isRegex?: boolean;
20163 |     }
20164 |     export type searchInContentReturnValue = {
20165 |       /**
20166 |        * List of search matches.
20167 |        */
20168 |       result: SearchMatch[];
20169 |     }
20170 |     /**
20171 |      * Enables or disables async call stacks tracking.
20172 |      */
20173 |     export type setAsyncCallStackDepthParameters = {
20174 |       /**
20175 |        * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
20176 | call stacks (default).
20177 |        */
20178 |       maxDepth: number;
20179 |     }
20180 |     export type setAsyncCallStackDepthReturnValue = {
20181 |     }
20182 |     /**
20183 |      * Replace previous blackbox execution contexts with passed ones. Forces backend to skip
20184 | stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by
20185 | performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
20186 |      */
20187 |     export type setBlackboxExecutionContextsParameters = {
20188 |       /**
20189 |        * Array of execution context unique ids for the debugger to ignore.
20190 |        */
20191 |       uniqueIds: string[];
20192 |     }
20193 |     export type setBlackboxExecutionContextsReturnValue = {
20194 |     }
20195 |     /**
20196 |      * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
20197 | scripts with url matching one of the patterns. VM will try to leave blackboxed script by
20198 | performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
20199 |      */
20200 |     export type setBlackboxPatternsParameters = {
20201 |       /**
20202 |        * Array of regexps that will be used to check script url for blackbox state.
20203 |        */
20204 |       patterns: string[];
20205 |       /**
20206 |        * If true, also ignore scripts with no source url.
20207 |        */
20208 |       skipAnonymous?: boolean;
20209 |     }
20210 |     export type setBlackboxPatternsReturnValue = {
20211 |     }
20212 |     /**
20213 |      * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
20214 | scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
20215 | Positions array contains positions where blackbox state is changed. First interval isn't
20216 | blackboxed. Array should be sorted.
20217 |      */
20218 |     export type setBlackboxedRangesParameters = {
20219 |       /**
20220 |        * Id of the script.
20221 |        */
20222 |       scriptId: Runtime.ScriptId;
20223 |       positions: ScriptPosition[];
20224 |     }
20225 |     export type setBlackboxedRangesReturnValue = {
20226 |     }
20227 |     /**
20228 |      * Sets JavaScript breakpoint at a given location.
20229 |      */
20230 |     export type setBreakpointParameters = {
20231 |       /**
20232 |        * Location to set breakpoint in.
20233 |        */
20234 |       location: Location;
20235 |       /**
20236 |        * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
20237 | breakpoint if this expression evaluates to true.
20238 |        */
20239 |       condition?: string;
20240 |     }
20241 |     export type setBreakpointReturnValue = {
20242 |       /**
20243 |        * Id of the created breakpoint for further reference.
20244 |        */
20245 |       breakpointId: BreakpointId;
20246 |       /**
20247 |        * Location this breakpoint resolved into.
20248 |        */
20249 |       actualLocation: Location;
20250 |     }
20251 |     /**
20252 |      * Sets instrumentation breakpoint.
20253 |      */
20254 |     export type setInstrumentationBreakpointParameters = {
20255 |       /**
20256 |        * Instrumentation name.
20257 |        */
20258 |       instrumentation: "beforeScriptExecution"|"beforeScriptWithSourceMapExecution";
20259 |     }
20260 |     export type setInstrumentationBreakpointReturnValue = {
20261 |       /**
20262 |        * Id of the created breakpoint for further reference.
20263 |        */
20264 |       breakpointId: BreakpointId;
20265 |     }
20266 |     /**
20267 |      * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
20268 | command is issued, all existing parsed scripts will have breakpoints resolved and returned in
20269 | `locations` property. Further matching script parsing will result in subsequent
20270 | `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
20271 |      */
20272 |     export type setBreakpointByUrlParameters = {
20273 |       /**
20274 |        * Line number to set breakpoint at.
20275 |        */
20276 |       lineNumber: number;
20277 |       /**
20278 |        * URL of the resources to set breakpoint on.
20279 |        */
20280 |       url?: string;
20281 |       /**
20282 |        * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
20283 | `urlRegex` must be specified.
20284 |        */
20285 |       urlRegex?: string;
20286 |       /**
20287 |        * Script hash of the resources to set breakpoint on.
20288 |        */
20289 |       scriptHash?: string;
20290 |       /**
20291 |        * Offset in the line to set breakpoint at.
20292 |        */
20293 |       columnNumber?: number;
20294 |       /**
20295 |        * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
20296 | breakpoint if this expression evaluates to true.
20297 |        */
20298 |       condition?: string;
20299 |     }
20300 |     export type setBreakpointByUrlReturnValue = {
20301 |       /**
20302 |        * Id of the created breakpoint for further reference.
20303 |        */
20304 |       breakpointId: BreakpointId;
20305 |       /**
20306 |        * List of the locations this breakpoint resolved into upon addition.
20307 |        */
20308 |       locations: Location[];
20309 |     }
20310 |     /**
20311 |      * Sets JavaScript breakpoint before each call to the given function.
20312 | If another function was created from the same source as a given one,
20313 | calling it will also trigger the breakpoint.
20314 |      */
20315 |     export type setBreakpointOnFunctionCallParameters = {
20316 |       /**
20317 |        * Function object id.
20318 |        */
20319 |       objectId: Runtime.RemoteObjectId;
20320 |       /**
20321 |        * Expression to use as a breakpoint condition. When specified, debugger will
20322 | stop on the breakpoint if this expression evaluates to true.
20323 |        */
20324 |       condition?: string;
20325 |     }
20326 |     export type setBreakpointOnFunctionCallReturnValue = {
20327 |       /**
20328 |        * Id of the created breakpoint for further reference.
20329 |        */
20330 |       breakpointId: BreakpointId;
20331 |     }
20332 |     /**
20333 |      * Activates / deactivates all breakpoints on the page.
20334 |      */
20335 |     export type setBreakpointsActiveParameters = {
20336 |       /**
20337 |        * New value for breakpoints active state.
20338 |        */
20339 |       active: boolean;
20340 |     }
20341 |     export type setBreakpointsActiveReturnValue = {
20342 |     }
20343 |     /**
20344 |      * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
20345 | or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
20346 |      */
20347 |     export type setPauseOnExceptionsParameters = {
20348 |       /**
20349 |        * Pause on exceptions mode.
20350 |        */
20351 |       state: "none"|"caught"|"uncaught"|"all";
20352 |     }
20353 |     export type setPauseOnExceptionsReturnValue = {
20354 |     }
20355 |     /**
20356 |      * Changes return value in top frame. Available only at return break position.
20357 |      */
20358 |     export type setReturnValueParameters = {
20359 |       /**
20360 |        * New return value.
20361 |        */
20362 |       newValue: Runtime.CallArgument;
20363 |     }
20364 |     export type setReturnValueReturnValue = {
20365 |     }
20366 |     /**
20367 |      * Edits JavaScript source live.
20368 | 
20369 | In general, functions that are currently on the stack can not be edited with
20370 | a single exception: If the edited function is the top-most stack frame and
20371 | that is the only activation of that function on the stack. In this case
20372 | the live edit will be successful and a `Debugger.restartFrame` for the
20373 | top-most function is automatically triggered.
20374 |      */
20375 |     export type setScriptSourceParameters = {
20376 |       /**
20377 |        * Id of the script to edit.
20378 |        */
20379 |       scriptId: Runtime.ScriptId;
20380 |       /**
20381 |        * New content of the script.
20382 |        */
20383 |       scriptSource: string;
20384 |       /**
20385 |        * If true the change will not actually be applied. Dry run may be used to get result
20386 | description without actually modifying the code.
20387 |        */
20388 |       dryRun?: boolean;
20389 |       /**
20390 |        * If true, then `scriptSource` is allowed to change the function on top of the stack
20391 | as long as the top-most stack frame is the only activation of that function.
20392 |        */
20393 |       allowTopFrameEditing?: boolean;
20394 |     }
20395 |     export type setScriptSourceReturnValue = {
20396 |       /**
20397 |        * New stack trace in case editing has happened while VM was stopped.
20398 |        */
20399 |       callFrames?: CallFrame[];
20400 |       /**
20401 |        * Whether current call stack  was modified after applying the changes.
20402 |        */
20403 |       stackChanged?: boolean;
20404 |       /**
20405 |        * Async stack trace, if any.
20406 |        */
20407 |       asyncStackTrace?: Runtime.StackTrace;
20408 |       /**
20409 |        * Async stack trace, if any.
20410 |        */
20411 |       asyncStackTraceId?: Runtime.StackTraceId;
20412 |       /**
20413 |        * Whether the operation was successful or not. Only `Ok` denotes a
20414 | successful live edit while the other enum variants denote why
20415 | the live edit failed.
20416 |        */
20417 |       status: "Ok"|"CompileError"|"BlockedByActiveGenerator"|"BlockedByActiveFunction"|"BlockedByTopLevelEsModuleChange";
20418 |       /**
20419 |        * Exception details if any. Only present when `status` is `CompileError`.
20420 |        */
20421 |       exceptionDetails?: Runtime.ExceptionDetails;
20422 |     }
20423 |     /**
20424 |      * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
20425 |      */
20426 |     export type setSkipAllPausesParameters = {
20427 |       /**
20428 |        * New value for skip pauses state.
20429 |        */
20430 |       skip: boolean;
20431 |     }
20432 |     export type setSkipAllPausesReturnValue = {
20433 |     }
20434 |     /**
20435 |      * Changes value of variable in a callframe. Object-based scopes are not supported and must be
20436 | mutated manually.
20437 |      */
20438 |     export type setVariableValueParameters = {
20439 |       /**
20440 |        * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
20441 | scope types are allowed. Other scopes could be manipulated manually.
20442 |        */
20443 |       scopeNumber: number;
20444 |       /**
20445 |        * Variable name.
20446 |        */
20447 |       variableName: string;
20448 |       /**
20449 |        * New variable value.
20450 |        */
20451 |       newValue: Runtime.CallArgument;
20452 |       /**
20453 |        * Id of callframe that holds variable.
20454 |        */
20455 |       callFrameId: CallFrameId;
20456 |     }
20457 |     export type setVariableValueReturnValue = {
20458 |     }
20459 |     /**
20460 |      * Steps into the function call.
20461 |      */
20462 |     export type stepIntoParameters = {
20463 |       /**
20464 |        * Debugger will pause on the execution of the first async task which was scheduled
20465 | before next pause.
20466 |        */
20467 |       breakOnAsyncCall?: boolean;
20468 |       /**
20469 |        * The skipList specifies location ranges that should be skipped on step into.
20470 |        */
20471 |       skipList?: LocationRange[];
20472 |     }
20473 |     export type stepIntoReturnValue = {
20474 |     }
20475 |     /**
20476 |      * Steps out of the function call.
20477 |      */
20478 |     export type stepOutParameters = {
20479 |     }
20480 |     export type stepOutReturnValue = {
20481 |     }
20482 |     /**
20483 |      * Steps over the statement.
20484 |      */
20485 |     export type stepOverParameters = {
20486 |       /**
20487 |        * The skipList specifies location ranges that should be skipped on step over.
20488 |        */
20489 |       skipList?: LocationRange[];
20490 |     }
20491 |     export type stepOverReturnValue = {
20492 |     }
20493 |   }
20494 | 
20495 |   export namespace HeapProfiler {
20496 |     /**
20497 |      * Heap snapshot object id.
20498 |      */
20499 |     export type HeapSnapshotObjectId = string;
20500 |     /**
20501 |      * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
20502 |      */
20503 |     export interface SamplingHeapProfileNode {
20504 |       /**
20505 |        * Function location.
20506 |        */
20507 |       callFrame: Runtime.CallFrame;
20508 |       /**
20509 |        * Allocations size in bytes for the node excluding children.
20510 |        */
20511 |       selfSize: number;
20512 |       /**
20513 |        * Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
20514 |        */
20515 |       id: number;
20516 |       /**
20517 |        * Child nodes.
20518 |        */
20519 |       children: SamplingHeapProfileNode[];
20520 |     }
20521 |     /**
20522 |      * A single sample from a sampling profile.
20523 |      */
20524 |     export interface SamplingHeapProfileSample {
20525 |       /**
20526 |        * Allocation size in bytes attributed to the sample.
20527 |        */
20528 |       size: number;
20529 |       /**
20530 |        * Id of the corresponding profile tree node.
20531 |        */
20532 |       nodeId: number;
20533 |       /**
20534 |        * Time-ordered sample ordinal number. It is unique across all profiles retrieved
20535 | between startSampling and stopSampling.
20536 |        */
20537 |       ordinal: number;
20538 |     }
20539 |     /**
20540 |      * Sampling profile.
20541 |      */
20542 |     export interface SamplingHeapProfile {
20543 |       head: SamplingHeapProfileNode;
20544 |       samples: SamplingHeapProfileSample[];
20545 |     }
20546 | 
20547 |     export type addHeapSnapshotChunkPayload = {
20548 |       chunk: string;
20549 |     }
20550 |     /**
20551 |      * If heap objects tracking has been started then backend may send update for one or more fragments
20552 |      */
20553 |     export type heapStatsUpdatePayload = {
20554 |       /**
20555 |        * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
20556 | index, the second integer is a total count of objects for the fragment, the third integer is
20557 | a total size of the objects for the fragment.
20558 |        */
20559 |       statsUpdate: number[];
20560 |     }
20561 |     /**
20562 |      * If heap objects tracking has been started then backend regularly sends a current value for last
20563 | seen object id and corresponding timestamp. If the were changes in the heap since last event
20564 | then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
20565 |      */
20566 |     export type lastSeenObjectIdPayload = {
20567 |       lastSeenObjectId: number;
20568 |       timestamp: number;
20569 |     }
20570 |     export type reportHeapSnapshotProgressPayload = {
20571 |       done: number;
20572 |       total: number;
20573 |       finished?: boolean;
20574 |     }
20575 |     export type resetProfilesPayload = void;
20576 | 
20577 |     /**
20578 |      * Enables console to refer to the node with given id via $x (see Command Line API for more details
20579 | $x functions).
20580 |      */
20581 |     export type addInspectedHeapObjectParameters = {
20582 |       /**
20583 |        * Heap snapshot object id to be accessible by means of $x command line API.
20584 |        */
20585 |       heapObjectId: HeapSnapshotObjectId;
20586 |     }
20587 |     export type addInspectedHeapObjectReturnValue = {
20588 |     }
20589 |     export type collectGarbageParameters = {
20590 |     }
20591 |     export type collectGarbageReturnValue = {
20592 |     }
20593 |     export type disableParameters = {
20594 |     }
20595 |     export type disableReturnValue = {
20596 |     }
20597 |     export type enableParameters = {
20598 |     }
20599 |     export type enableReturnValue = {
20600 |     }
20601 |     export type getHeapObjectIdParameters = {
20602 |       /**
20603 |        * Identifier of the object to get heap object id for.
20604 |        */
20605 |       objectId: Runtime.RemoteObjectId;
20606 |     }
20607 |     export type getHeapObjectIdReturnValue = {
20608 |       /**
20609 |        * Id of the heap snapshot object corresponding to the passed remote object id.
20610 |        */
20611 |       heapSnapshotObjectId: HeapSnapshotObjectId;
20612 |     }
20613 |     export type getObjectByHeapObjectIdParameters = {
20614 |       objectId: HeapSnapshotObjectId;
20615 |       /**
20616 |        * Symbolic group name that can be used to release multiple objects.
20617 |        */
20618 |       objectGroup?: string;
20619 |     }
20620 |     export type getObjectByHeapObjectIdReturnValue = {
20621 |       /**
20622 |        * Evaluation result.
20623 |        */
20624 |       result: Runtime.RemoteObject;
20625 |     }
20626 |     export type getSamplingProfileParameters = {
20627 |     }
20628 |     export type getSamplingProfileReturnValue = {
20629 |       /**
20630 |        * Return the sampling profile being collected.
20631 |        */
20632 |       profile: SamplingHeapProfile;
20633 |     }
20634 |     export type startSamplingParameters = {
20635 |       /**
20636 |        * Average sample interval in bytes. Poisson distribution is used for the intervals. The
20637 | default value is 32768 bytes.
20638 |        */
20639 |       samplingInterval?: number;
20640 |       /**
20641 |        * Maximum stack depth. The default value is 128.
20642 |        */
20643 |       stackDepth?: number;
20644 |       /**
20645 |        * By default, the sampling heap profiler reports only objects which are
20646 | still alive when the profile is returned via getSamplingProfile or
20647 | stopSampling, which is useful for determining what functions contribute
20648 | the most to steady-state memory usage. This flag instructs the sampling
20649 | heap profiler to also include information about objects discarded by
20650 | major GC, which will show which functions cause large temporary memory
20651 | usage or long GC pauses.
20652 |        */
20653 |       includeObjectsCollectedByMajorGC?: boolean;
20654 |       /**
20655 |        * By default, the sampling heap profiler reports only objects which are
20656 | still alive when the profile is returned via getSamplingProfile or
20657 | stopSampling, which is useful for determining what functions contribute
20658 | the most to steady-state memory usage. This flag instructs the sampling
20659 | heap profiler to also include information about objects discarded by
20660 | minor GC, which is useful when tuning a latency-sensitive application
20661 | for minimal GC activity.
20662 |        */
20663 |       includeObjectsCollectedByMinorGC?: boolean;
20664 |     }
20665 |     export type startSamplingReturnValue = {
20666 |     }
20667 |     export type startTrackingHeapObjectsParameters = {
20668 |       trackAllocations?: boolean;
20669 |     }
20670 |     export type startTrackingHeapObjectsReturnValue = {
20671 |     }
20672 |     export type stopSamplingParameters = {
20673 |     }
20674 |     export type stopSamplingReturnValue = {
20675 |       /**
20676 |        * Recorded sampling heap profile.
20677 |        */
20678 |       profile: SamplingHeapProfile;
20679 |     }
20680 |     export type stopTrackingHeapObjectsParameters = {
20681 |       /**
20682 |        * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
20683 | when the tracking is stopped.
20684 |        */
20685 |       reportProgress?: boolean;
20686 |       /**
20687 |        * Deprecated in favor of `exposeInternals`.
20688 |        */
20689 |       treatGlobalObjectsAsRoots?: boolean;
20690 |       /**
20691 |        * If true, numerical values are included in the snapshot
20692 |        */
20693 |       captureNumericValue?: boolean;
20694 |       /**
20695 |        * If true, exposes internals of the snapshot.
20696 |        */
20697 |       exposeInternals?: boolean;
20698 |     }
20699 |     export type stopTrackingHeapObjectsReturnValue = {
20700 |     }
20701 |     export type takeHeapSnapshotParameters = {
20702 |       /**
20703 |        * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
20704 |        */
20705 |       reportProgress?: boolean;
20706 |       /**
20707 |        * If true, a raw snapshot without artificial roots will be generated.
20708 | Deprecated in favor of `exposeInternals`.
20709 |        */
20710 |       treatGlobalObjectsAsRoots?: boolean;
20711 |       /**
20712 |        * If true, numerical values are included in the snapshot
20713 |        */
20714 |       captureNumericValue?: boolean;
20715 |       /**
20716 |        * If true, exposes internals of the snapshot.
20717 |        */
20718 |       exposeInternals?: boolean;
20719 |     }
20720 |     export type takeHeapSnapshotReturnValue = {
20721 |     }
20722 |   }
20723 | 
20724 |   export namespace Profiler {
20725 |     /**
20726 |      * Profile node. Holds callsite information, execution statistics and child nodes.
20727 |      */
20728 |     export interface ProfileNode {
20729 |       /**
20730 |        * Unique id of the node.
20731 |        */
20732 |       id: number;
20733 |       /**
20734 |        * Function location.
20735 |        */
20736 |       callFrame: Runtime.CallFrame;
20737 |       /**
20738 |        * Number of samples where this node was on top of the call stack.
20739 |        */
20740 |       hitCount?: number;
20741 |       /**
20742 |        * Child node ids.
20743 |        */
20744 |       children?: number[];
20745 |       /**
20746 |        * The reason of being not optimized. The function may be deoptimized or marked as don't
20747 | optimize.
20748 |        */
20749 |       deoptReason?: string;
20750 |       /**
20751 |        * An array of source position ticks.
20752 |        */
20753 |       positionTicks?: PositionTickInfo[];
20754 |     }
20755 |     /**
20756 |      * Profile.
20757 |      */
20758 |     export interface Profile {
20759 |       /**
20760 |        * The list of profile nodes. First item is the root node.
20761 |        */
20762 |       nodes: ProfileNode[];
20763 |       /**
20764 |        * Profiling start timestamp in microseconds.
20765 |        */
20766 |       startTime: number;
20767 |       /**
20768 |        * Profiling end timestamp in microseconds.
20769 |        */
20770 |       endTime: number;
20771 |       /**
20772 |        * Ids of samples top nodes.
20773 |        */
20774 |       samples?: number[];
20775 |       /**
20776 |        * Time intervals between adjacent samples in microseconds. The first delta is relative to the
20777 | profile startTime.
20778 |        */
20779 |       timeDeltas?: number[];
20780 |     }
20781 |     /**
20782 |      * Specifies a number of samples attributed to a certain source position.
20783 |      */
20784 |     export interface PositionTickInfo {
20785 |       /**
20786 |        * Source line number (1-based).
20787 |        */
20788 |       line: number;
20789 |       /**
20790 |        * Number of samples attributed to the source line.
20791 |        */
20792 |       ticks: number;
20793 |     }
20794 |     /**
20795 |      * Coverage data for a source range.
20796 |      */
20797 |     export interface CoverageRange {
20798 |       /**
20799 |        * JavaScript script source offset for the range start.
20800 |        */
20801 |       startOffset: number;
20802 |       /**
20803 |        * JavaScript script source offset for the range end.
20804 |        */
20805 |       endOffset: number;
20806 |       /**
20807 |        * Collected execution count of the source range.
20808 |        */
20809 |       count: number;
20810 |     }
20811 |     /**
20812 |      * Coverage data for a JavaScript function.
20813 |      */
20814 |     export interface FunctionCoverage {
20815 |       /**
20816 |        * JavaScript function name.
20817 |        */
20818 |       functionName: string;
20819 |       /**
20820 |        * Source ranges inside the function with coverage data.
20821 |        */
20822 |       ranges: CoverageRange[];
20823 |       /**
20824 |        * Whether coverage data for this function has block granularity.
20825 |        */
20826 |       isBlockCoverage: boolean;
20827 |     }
20828 |     /**
20829 |      * Coverage data for a JavaScript script.
20830 |      */
20831 |     export interface ScriptCoverage {
20832 |       /**
20833 |        * JavaScript script id.
20834 |        */
20835 |       scriptId: Runtime.ScriptId;
20836 |       /**
20837 |        * JavaScript script name or url.
20838 |        */
20839 |       url: string;
20840 |       /**
20841 |        * Functions contained in the script that has coverage data.
20842 |        */
20843 |       functions: FunctionCoverage[];
20844 |     }
20845 | 
20846 |     export type consoleProfileFinishedPayload = {
20847 |       id: string;
20848 |       /**
20849 |        * Location of console.profileEnd().
20850 |        */
20851 |       location: Debugger.Location;
20852 |       profile: Profile;
20853 |       /**
20854 |        * Profile title passed as an argument to console.profile().
20855 |        */
20856 |       title?: string;
20857 |     }
20858 |     /**
20859 |      * Sent when new profile recording is started using console.profile() call.
20860 |      */
20861 |     export type consoleProfileStartedPayload = {
20862 |       id: string;
20863 |       /**
20864 |        * Location of console.profile().
20865 |        */
20866 |       location: Debugger.Location;
20867 |       /**
20868 |        * Profile title passed as an argument to console.profile().
20869 |        */
20870 |       title?: string;
20871 |     }
20872 |     /**
20873 |      * Reports coverage delta since the last poll (either from an event like this, or from
20874 | `takePreciseCoverage` for the current isolate. May only be sent if precise code
20875 | coverage has been started. This event can be trigged by the embedder to, for example,
20876 | trigger collection of coverage data immediately at a certain point in time.
20877 |      */
20878 |     export type preciseCoverageDeltaUpdatePayload = {
20879 |       /**
20880 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
20881 |        */
20882 |       timestamp: number;
20883 |       /**
20884 |        * Identifier for distinguishing coverage events.
20885 |        */
20886 |       occasion: string;
20887 |       /**
20888 |        * Coverage data for the current isolate.
20889 |        */
20890 |       result: ScriptCoverage[];
20891 |     }
20892 | 
20893 |     export type disableParameters = {
20894 |     }
20895 |     export type disableReturnValue = {
20896 |     }
20897 |     export type enableParameters = {
20898 |     }
20899 |     export type enableReturnValue = {
20900 |     }
20901 |     /**
20902 |      * Collect coverage data for the current isolate. The coverage data may be incomplete due to
20903 | garbage collection.
20904 |      */
20905 |     export type getBestEffortCoverageParameters = {
20906 |     }
20907 |     export type getBestEffortCoverageReturnValue = {
20908 |       /**
20909 |        * Coverage data for the current isolate.
20910 |        */
20911 |       result: ScriptCoverage[];
20912 |     }
20913 |     /**
20914 |      * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
20915 |      */
20916 |     export type setSamplingIntervalParameters = {
20917 |       /**
20918 |        * New sampling interval in microseconds.
20919 |        */
20920 |       interval: number;
20921 |     }
20922 |     export type setSamplingIntervalReturnValue = {
20923 |     }
20924 |     export type startParameters = {
20925 |     }
20926 |     export type startReturnValue = {
20927 |     }
20928 |     /**
20929 |      * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
20930 | coverage may be incomplete. Enabling prevents running optimized code and resets execution
20931 | counters.
20932 |      */
20933 |     export type startPreciseCoverageParameters = {
20934 |       /**
20935 |        * Collect accurate call counts beyond simple 'covered' or 'not covered'.
20936 |        */
20937 |       callCount?: boolean;
20938 |       /**
20939 |        * Collect block-based coverage.
20940 |        */
20941 |       detailed?: boolean;
20942 |       /**
20943 |        * Allow the backend to send updates on its own initiative
20944 |        */
20945 |       allowTriggeredUpdates?: boolean;
20946 |     }
20947 |     export type startPreciseCoverageReturnValue = {
20948 |       /**
20949 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
20950 |        */
20951 |       timestamp: number;
20952 |     }
20953 |     export type stopParameters = {
20954 |     }
20955 |     export type stopReturnValue = {
20956 |       /**
20957 |        * Recorded profile.
20958 |        */
20959 |       profile: Profile;
20960 |     }
20961 |     /**
20962 |      * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
20963 | executing optimized code.
20964 |      */
20965 |     export type stopPreciseCoverageParameters = {
20966 |     }
20967 |     export type stopPreciseCoverageReturnValue = {
20968 |     }
20969 |     /**
20970 |      * Collect coverage data for the current isolate, and resets execution counters. Precise code
20971 | coverage needs to have started.
20972 |      */
20973 |     export type takePreciseCoverageParameters = {
20974 |     }
20975 |     export type takePreciseCoverageReturnValue = {
20976 |       /**
20977 |        * Coverage data for the current isolate.
20978 |        */
20979 |       result: ScriptCoverage[];
20980 |       /**
20981 |        * Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
20982 |        */
20983 |       timestamp: number;
20984 |     }
20985 |   }
20986 | 
20987 |   /**
20988 |    * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
20989 | Evaluation results are returned as mirror object that expose object type, string representation
20990 | and unique identifier that can be used for further object reference. Original objects are
20991 | maintained in memory unless they are either explicitly released or are released along with the
20992 | other objects in their object group.
20993 |    */
20994 |   export namespace Runtime {
20995 |     /**
20996 |      * Unique script identifier.
20997 |      */
20998 |     export type ScriptId = string;
20999 |     /**
21000 |      * Represents options for serialization. Overrides `generatePreview` and `returnByValue`.
21001 |      */
21002 |     export interface SerializationOptions {
21003 |       serialization: "deep"|"json"|"idOnly";
21004 |       /**
21005 |        * Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
21006 |        */
21007 |       maxDepth?: number;
21008 |       /**
21009 |        * Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM
21010 | serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`.
21011 | Values can be only of type string or integer.
21012 |        */
21013 |       additionalParameters?: { [key: string]: string };
21014 |     }
21015 |     /**
21016 |      * Represents deep serialized value.
21017 |      */
21018 |     export interface DeepSerializedValue {
21019 |       type: "undefined"|"null"|"string"|"number"|"boolean"|"bigint"|"regexp"|"date"|"symbol"|"array"|"object"|"function"|"map"|"set"|"weakmap"|"weakset"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"node"|"window"|"generator";
21020 |       value?: any;
21021 |       objectId?: string;
21022 |       /**
21023 |        * Set if value reference met more then once during serialization. In such
21024 | case, value is provided only to one of the serialized values. Unique
21025 | per value in the scope of one CDP call.
21026 |        */
21027 |       weakLocalObjectReference?: number;
21028 |     }
21029 |     /**
21030 |      * Unique object identifier.
21031 |      */
21032 |     export type RemoteObjectId = string;
21033 |     /**
21034 |      * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
21035 | `-Infinity`, and bigint literals.
21036 |      */
21037 |     export type UnserializableValue = string;
21038 |     /**
21039 |      * Mirror object referencing original JavaScript object.
21040 |      */
21041 |     export interface RemoteObject {
21042 |       /**
21043 |        * Object type.
21044 |        */
21045 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"bigint";
21046 |       /**
21047 |        * Object subtype hint. Specified for `object` type values only.
21048 | NOTE: If you change anything here, make sure to also update
21049 | `subtype` in `ObjectPreview` and `PropertyPreview` below.
21050 |        */
21051 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
21052 |       /**
21053 |        * Object class (constructor) name. Specified for `object` type values only.
21054 |        */
21055 |       className?: string;
21056 |       /**
21057 |        * Remote object value in case of primitive values or JSON values (if it was requested).
21058 |        */
21059 |       value?: any;
21060 |       /**
21061 |        * Primitive value which can not be JSON-stringified does not have `value`, but gets this
21062 | property.
21063 |        */
21064 |       unserializableValue?: UnserializableValue;
21065 |       /**
21066 |        * String representation of the object.
21067 |        */
21068 |       description?: string;
21069 |       /**
21070 |        * Deep serialized value.
21071 |        */
21072 |       deepSerializedValue?: DeepSerializedValue;
21073 |       /**
21074 |        * Unique object identifier (for non-primitive values).
21075 |        */
21076 |       objectId?: RemoteObjectId;
21077 |       /**
21078 |        * Preview containing abbreviated property values. Specified for `object` type values only.
21079 |        */
21080 |       preview?: ObjectPreview;
21081 |       customPreview?: CustomPreview;
21082 |     }
21083 |     export interface CustomPreview {
21084 |       /**
21085 |        * The JSON-stringified result of formatter.header(object, config) call.
21086 | It contains json ML array that represents RemoteObject.
21087 |        */
21088 |       header: string;
21089 |       /**
21090 |        * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
21091 | contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
21092 | The result value is json ML array.
21093 |        */
21094 |       bodyGetterId?: RemoteObjectId;
21095 |     }
21096 |     /**
21097 |      * Object containing abbreviated remote object value.
21098 |      */
21099 |     export interface ObjectPreview {
21100 |       /**
21101 |        * Object type.
21102 |        */
21103 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"bigint";
21104 |       /**
21105 |        * Object subtype hint. Specified for `object` type values only.
21106 |        */
21107 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
21108 |       /**
21109 |        * String representation of the object.
21110 |        */
21111 |       description?: string;
21112 |       /**
21113 |        * True iff some of the properties or entries of the original object did not fit.
21114 |        */
21115 |       overflow: boolean;
21116 |       /**
21117 |        * List of the properties.
21118 |        */
21119 |       properties: PropertyPreview[];
21120 |       /**
21121 |        * List of the entries. Specified for `map` and `set` subtype values only.
21122 |        */
21123 |       entries?: EntryPreview[];
21124 |     }
21125 |     export interface PropertyPreview {
21126 |       /**
21127 |        * Property name.
21128 |        */
21129 |       name: string;
21130 |       /**
21131 |        * Object type. Accessor means that the property itself is an accessor property.
21132 |        */
21133 |       type: "object"|"function"|"undefined"|"string"|"number"|"boolean"|"symbol"|"accessor"|"bigint";
21134 |       /**
21135 |        * User-friendly property value string.
21136 |        */
21137 |       value?: string;
21138 |       /**
21139 |        * Nested value preview.
21140 |        */
21141 |       valuePreview?: ObjectPreview;
21142 |       /**
21143 |        * Object subtype hint. Specified for `object` type values only.
21144 |        */
21145 |       subtype?: "array"|"null"|"node"|"regexp"|"date"|"map"|"set"|"weakmap"|"weakset"|"iterator"|"generator"|"error"|"proxy"|"promise"|"typedarray"|"arraybuffer"|"dataview"|"webassemblymemory"|"wasmvalue"|"trustedtype";
21146 |     }
21147 |     export interface EntryPreview {
21148 |       /**
21149 |        * Preview of the key. Specified for map-like collection entries.
21150 |        */
21151 |       key?: ObjectPreview;
21152 |       /**
21153 |        * Preview of the value.
21154 |        */
21155 |       value: ObjectPreview;
21156 |     }
21157 |     /**
21158 |      * Object property descriptor.
21159 |      */
21160 |     export interface PropertyDescriptor {
21161 |       /**
21162 |        * Property name or symbol description.
21163 |        */
21164 |       name: string;
21165 |       /**
21166 |        * The value associated with the property.
21167 |        */
21168 |       value?: RemoteObject;
21169 |       /**
21170 |        * True if the value associated with the property may be changed (data descriptors only).
21171 |        */
21172 |       writable?: boolean;
21173 |       /**
21174 |        * A function which serves as a getter for the property, or `undefined` if there is no getter
21175 | (accessor descriptors only).
21176 |        */
21177 |       get?: RemoteObject;
21178 |       /**
21179 |        * A function which serves as a setter for the property, or `undefined` if there is no setter
21180 | (accessor descriptors only).
21181 |        */
21182 |       set?: RemoteObject;
21183 |       /**
21184 |        * True if the type of this property descriptor may be changed and if the property may be
21185 | deleted from the corresponding object.
21186 |        */
21187 |       configurable: boolean;
21188 |       /**
21189 |        * True if this property shows up during enumeration of the properties on the corresponding
21190 | object.
21191 |        */
21192 |       enumerable: boolean;
21193 |       /**
21194 |        * True if the result was thrown during the evaluation.
21195 |        */
21196 |       wasThrown?: boolean;
21197 |       /**
21198 |        * True if the property is owned for the object.
21199 |        */
21200 |       isOwn?: boolean;
21201 |       /**
21202 |        * Property symbol object, if the property is of the `symbol` type.
21203 |        */
21204 |       symbol?: RemoteObject;
21205 |     }
21206 |     /**
21207 |      * Object internal property descriptor. This property isn't normally visible in JavaScript code.
21208 |      */
21209 |     export interface InternalPropertyDescriptor {
21210 |       /**
21211 |        * Conventional property name.
21212 |        */
21213 |       name: string;
21214 |       /**
21215 |        * The value associated with the property.
21216 |        */
21217 |       value?: RemoteObject;
21218 |     }
21219 |     /**
21220 |      * Object private field descriptor.
21221 |      */
21222 |     export interface PrivatePropertyDescriptor {
21223 |       /**
21224 |        * Private property name.
21225 |        */
21226 |       name: string;
21227 |       /**
21228 |        * The value associated with the private property.
21229 |        */
21230 |       value?: RemoteObject;
21231 |       /**
21232 |        * A function which serves as a getter for the private property,
21233 | or `undefined` if there is no getter (accessor descriptors only).
21234 |        */
21235 |       get?: RemoteObject;
21236 |       /**
21237 |        * A function which serves as a setter for the private property,
21238 | or `undefined` if there is no setter (accessor descriptors only).
21239 |        */
21240 |       set?: RemoteObject;
21241 |     }
21242 |     /**
21243 |      * Represents function call argument. Either remote object id `objectId`, primitive `value`,
21244 | unserializable primitive value or neither of (for undefined) them should be specified.
21245 |      */
21246 |     export interface CallArgument {
21247 |       /**
21248 |        * Primitive value or serializable javascript object.
21249 |        */
21250 |       value?: any;
21251 |       /**
21252 |        * Primitive value which can not be JSON-stringified.
21253 |        */
21254 |       unserializableValue?: UnserializableValue;
21255 |       /**
21256 |        * Remote object handle.
21257 |        */
21258 |       objectId?: RemoteObjectId;
21259 |     }
21260 |     /**
21261 |      * Id of an execution context.
21262 |      */
21263 |     export type ExecutionContextId = number;
21264 |     /**
21265 |      * Description of an isolated world.
21266 |      */
21267 |     export interface ExecutionContextDescription {
21268 |       /**
21269 |        * Unique id of the execution context. It can be used to specify in which execution context
21270 | script evaluation should be performed.
21271 |        */
21272 |       id: ExecutionContextId;
21273 |       /**
21274 |        * Execution context origin.
21275 |        */
21276 |       origin: string;
21277 |       /**
21278 |        * Human readable name describing given context.
21279 |        */
21280 |       name: string;
21281 |       /**
21282 |        * A system-unique execution context identifier. Unlike the id, this is unique across
21283 | multiple processes, so can be reliably used to identify specific context while backend
21284 | performs a cross-process navigation.
21285 |        */
21286 |       uniqueId: string;
21287 |       /**
21288 |        * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
21289 |        */
21290 |       auxData?: { [key: string]: string };
21291 |     }
21292 |     /**
21293 |      * Detailed information about exception (or error) that was thrown during script compilation or
21294 | execution.
21295 |      */
21296 |     export interface ExceptionDetails {
21297 |       /**
21298 |        * Exception id.
21299 |        */
21300 |       exceptionId: number;
21301 |       /**
21302 |        * Exception text, which should be used together with exception object when available.
21303 |        */
21304 |       text: string;
21305 |       /**
21306 |        * Line number of the exception location (0-based).
21307 |        */
21308 |       lineNumber: number;
21309 |       /**
21310 |        * Column number of the exception location (0-based).
21311 |        */
21312 |       columnNumber: number;
21313 |       /**
21314 |        * Script ID of the exception location.
21315 |        */
21316 |       scriptId?: ScriptId;
21317 |       /**
21318 |        * URL of the exception location, to be used when the script was not reported.
21319 |        */
21320 |       url?: string;
21321 |       /**
21322 |        * JavaScript stack trace if available.
21323 |        */
21324 |       stackTrace?: StackTrace;
21325 |       /**
21326 |        * Exception object if available.
21327 |        */
21328 |       exception?: RemoteObject;
21329 |       /**
21330 |        * Identifier of the context where exception happened.
21331 |        */
21332 |       executionContextId?: ExecutionContextId;
21333 |       /**
21334 |        * Dictionary with entries of meta data that the client associated
21335 | with this exception, such as information about associated network
21336 | requests, etc.
21337 |        */
21338 |       exceptionMetaData?: { [key: string]: string };
21339 |     }
21340 |     /**
21341 |      * Number of milliseconds since epoch.
21342 |      */
21343 |     export type Timestamp = number;
21344 |     /**
21345 |      * Number of milliseconds.
21346 |      */
21347 |     export type TimeDelta = number;
21348 |     /**
21349 |      * Stack entry for runtime errors and assertions.
21350 |      */
21351 |     export interface CallFrame {
21352 |       /**
21353 |        * JavaScript function name.
21354 |        */
21355 |       functionName: string;
21356 |       /**
21357 |        * JavaScript script id.
21358 |        */
21359 |       scriptId: ScriptId;
21360 |       /**
21361 |        * JavaScript script name or url.
21362 |        */
21363 |       url: string;
21364 |       /**
21365 |        * JavaScript script line number (0-based).
21366 |        */
21367 |       lineNumber: number;
21368 |       /**
21369 |        * JavaScript script column number (0-based).
21370 |        */
21371 |       columnNumber: number;
21372 |     }
21373 |     /**
21374 |      * Call frames for assertions or error messages.
21375 |      */
21376 |     export interface StackTrace {
21377 |       /**
21378 |        * String label of this stack trace. For async traces this may be a name of the function that
21379 | initiated the async call.
21380 |        */
21381 |       description?: string;
21382 |       /**
21383 |        * JavaScript function name.
21384 |        */
21385 |       callFrames: CallFrame[];
21386 |       /**
21387 |        * Asynchronous JavaScript stack trace that preceded this stack, if available.
21388 |        */
21389 |       parent?: StackTrace;
21390 |       /**
21391 |        * Asynchronous JavaScript stack trace that preceded this stack, if available.
21392 |        */
21393 |       parentId?: StackTraceId;
21394 |     }
21395 |     /**
21396 |      * Unique identifier of current debugger.
21397 |      */
21398 |     export type UniqueDebuggerId = string;
21399 |     /**
21400 |      * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
21401 | allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
21402 |      */
21403 |     export interface StackTraceId {
21404 |       id: string;
21405 |       debuggerId?: UniqueDebuggerId;
21406 |     }
21407 | 
21408 |     /**
21409 |      * Notification is issued every time when binding is called.
21410 |      */
21411 |     export type bindingCalledPayload = {
21412 |       name: string;
21413 |       payload: string;
21414 |       /**
21415 |        * Identifier of the context where the call was made.
21416 |        */
21417 |       executionContextId: ExecutionContextId;
21418 |     }
21419 |     /**
21420 |      * Issued when console API was called.
21421 |      */
21422 |     export type consoleAPICalledPayload = {
21423 |       /**
21424 |        * Type of the call.
21425 |        */
21426 |       type: "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd";
21427 |       /**
21428 |        * Call arguments.
21429 |        */
21430 |       args: RemoteObject[];
21431 |       /**
21432 |        * Identifier of the context where the call was made.
21433 |        */
21434 |       executionContextId: ExecutionContextId;
21435 |       /**
21436 |        * Call timestamp.
21437 |        */
21438 |       timestamp: Timestamp;
21439 |       /**
21440 |        * Stack trace captured when the call was made. The async stack chain is automatically reported for
21441 | the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
21442 | chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
21443 |        */
21444 |       stackTrace?: StackTrace;
21445 |       /**
21446 |        * Console context descriptor for calls on non-default console context (not console.*):
21447 | 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
21448 | on named context.
21449 |        */
21450 |       context?: string;
21451 |     }
21452 |     /**
21453 |      * Issued when unhandled exception was revoked.
21454 |      */
21455 |     export type exceptionRevokedPayload = {
21456 |       /**
21457 |        * Reason describing why exception was revoked.
21458 |        */
21459 |       reason: string;
21460 |       /**
21461 |        * The id of revoked exception, as reported in `exceptionThrown`.
21462 |        */
21463 |       exceptionId: number;
21464 |     }
21465 |     /**
21466 |      * Issued when exception was thrown and unhandled.
21467 |      */
21468 |     export type exceptionThrownPayload = {
21469 |       /**
21470 |        * Timestamp of the exception.
21471 |        */
21472 |       timestamp: Timestamp;
21473 |       exceptionDetails: ExceptionDetails;
21474 |     }
21475 |     /**
21476 |      * Issued when new execution context is created.
21477 |      */
21478 |     export type executionContextCreatedPayload = {
21479 |       /**
21480 |        * A newly created execution context.
21481 |        */
21482 |       context: ExecutionContextDescription;
21483 |     }
21484 |     /**
21485 |      * Issued when execution context is destroyed.
21486 |      */
21487 |     export type executionContextDestroyedPayload = {
21488 |       /**
21489 |        * Id of the destroyed context
21490 |        */
21491 |       executionContextId: ExecutionContextId;
21492 |       /**
21493 |        * Unique Id of the destroyed context
21494 |        */
21495 |       executionContextUniqueId: string;
21496 |     }
21497 |     /**
21498 |      * Issued when all executionContexts were cleared in browser
21499 |      */
21500 |     export type executionContextsClearedPayload = void;
21501 |     /**
21502 |      * Issued when object should be inspected (for example, as a result of inspect() command line API
21503 | call).
21504 |      */
21505 |     export type inspectRequestedPayload = {
21506 |       object: RemoteObject;
21507 |       hints: { [key: string]: string };
21508 |       /**
21509 |        * Identifier of the context where the call was made.
21510 |        */
21511 |       executionContextId?: ExecutionContextId;
21512 |     }
21513 | 
21514 |     /**
21515 |      * Add handler to promise with given promise object id.
21516 |      */
21517 |     export type awaitPromiseParameters = {
21518 |       /**
21519 |        * Identifier of the promise.
21520 |        */
21521 |       promiseObjectId: RemoteObjectId;
21522 |       /**
21523 |        * Whether the result is expected to be a JSON object that should be sent by value.
21524 |        */
21525 |       returnByValue?: boolean;
21526 |       /**
21527 |        * Whether preview should be generated for the result.
21528 |        */
21529 |       generatePreview?: boolean;
21530 |     }
21531 |     export type awaitPromiseReturnValue = {
21532 |       /**
21533 |        * Promise result. Will contain rejected value if promise was rejected.
21534 |        */
21535 |       result: RemoteObject;
21536 |       /**
21537 |        * Exception details if stack strace is available.
21538 |        */
21539 |       exceptionDetails?: ExceptionDetails;
21540 |     }
21541 |     /**
21542 |      * Calls function with given declaration on the given object. Object group of the result is
21543 | inherited from the target object.
21544 |      */
21545 |     export type callFunctionOnParameters = {
21546 |       /**
21547 |        * Declaration of the function to call.
21548 |        */
21549 |       functionDeclaration: string;
21550 |       /**
21551 |        * Identifier of the object to call function on. Either objectId or executionContextId should
21552 | be specified.
21553 |        */
21554 |       objectId?: RemoteObjectId;
21555 |       /**
21556 |        * Call arguments. All call arguments must belong to the same JavaScript world as the target
21557 | object.
21558 |        */
21559 |       arguments?: CallArgument[];
21560 |       /**
21561 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
21562 | execution. Overrides `setPauseOnException` state.
21563 |        */
21564 |       silent?: boolean;
21565 |       /**
21566 |        * Whether the result is expected to be a JSON object which should be sent by value.
21567 | Can be overriden by `serializationOptions`.
21568 |        */
21569 |       returnByValue?: boolean;
21570 |       /**
21571 |        * Whether preview should be generated for the result.
21572 |        */
21573 |       generatePreview?: boolean;
21574 |       /**
21575 |        * Whether execution should be treated as initiated by user in the UI.
21576 |        */
21577 |       userGesture?: boolean;
21578 |       /**
21579 |        * Whether execution should `await` for resulting value and return once awaited promise is
21580 | resolved.
21581 |        */
21582 |       awaitPromise?: boolean;
21583 |       /**
21584 |        * Specifies execution context which global object will be used to call function on. Either
21585 | executionContextId or objectId should be specified.
21586 |        */
21587 |       executionContextId?: ExecutionContextId;
21588 |       /**
21589 |        * Symbolic group name that can be used to release multiple objects. If objectGroup is not
21590 | specified and objectId is, objectGroup will be inherited from object.
21591 |        */
21592 |       objectGroup?: string;
21593 |       /**
21594 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
21595 |        */
21596 |       throwOnSideEffect?: boolean;
21597 |       /**
21598 |        * An alternative way to specify the execution context to call function on.
21599 | Compared to contextId that may be reused across processes, this is guaranteed to be
21600 | system-unique, so it can be used to prevent accidental function call
21601 | in context different than intended (e.g. as a result of navigation across process
21602 | boundaries).
21603 | This is mutually exclusive with `executionContextId`.
21604 |        */
21605 |       uniqueContextId?: string;
21606 |       /**
21607 |        * Specifies the result serialization. If provided, overrides
21608 | `generatePreview` and `returnByValue`.
21609 |        */
21610 |       serializationOptions?: SerializationOptions;
21611 |     }
21612 |     export type callFunctionOnReturnValue = {
21613 |       /**
21614 |        * Call result.
21615 |        */
21616 |       result: RemoteObject;
21617 |       /**
21618 |        * Exception details.
21619 |        */
21620 |       exceptionDetails?: ExceptionDetails;
21621 |     }
21622 |     /**
21623 |      * Compiles expression.
21624 |      */
21625 |     export type compileScriptParameters = {
21626 |       /**
21627 |        * Expression to compile.
21628 |        */
21629 |       expression: string;
21630 |       /**
21631 |        * Source url to be set for the script.
21632 |        */
21633 |       sourceURL: string;
21634 |       /**
21635 |        * Specifies whether the compiled script should be persisted.
21636 |        */
21637 |       persistScript: boolean;
21638 |       /**
21639 |        * Specifies in which execution context to perform script run. If the parameter is omitted the
21640 | evaluation will be performed in the context of the inspected page.
21641 |        */
21642 |       executionContextId?: ExecutionContextId;
21643 |     }
21644 |     export type compileScriptReturnValue = {
21645 |       /**
21646 |        * Id of the script.
21647 |        */
21648 |       scriptId?: ScriptId;
21649 |       /**
21650 |        * Exception details.
21651 |        */
21652 |       exceptionDetails?: ExceptionDetails;
21653 |     }
21654 |     /**
21655 |      * Disables reporting of execution contexts creation.
21656 |      */
21657 |     export type disableParameters = {
21658 |     }
21659 |     export type disableReturnValue = {
21660 |     }
21661 |     /**
21662 |      * Discards collected exceptions and console API calls.
21663 |      */
21664 |     export type discardConsoleEntriesParameters = {
21665 |     }
21666 |     export type discardConsoleEntriesReturnValue = {
21667 |     }
21668 |     /**
21669 |      * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
21670 | When the reporting gets enabled the event will be sent immediately for each existing execution
21671 | context.
21672 |      */
21673 |     export type enableParameters = {
21674 |     }
21675 |     export type enableReturnValue = {
21676 |     }
21677 |     /**
21678 |      * Evaluates expression on global object.
21679 |      */
21680 |     export type evaluateParameters = {
21681 |       /**
21682 |        * Expression to evaluate.
21683 |        */
21684 |       expression: string;
21685 |       /**
21686 |        * Symbolic group name that can be used to release multiple objects.
21687 |        */
21688 |       objectGroup?: string;
21689 |       /**
21690 |        * Determines whether Command Line API should be available during the evaluation.
21691 |        */
21692 |       includeCommandLineAPI?: boolean;
21693 |       /**
21694 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
21695 | execution. Overrides `setPauseOnException` state.
21696 |        */
21697 |       silent?: boolean;
21698 |       /**
21699 |        * Specifies in which execution context to perform evaluation. If the parameter is omitted the
21700 | evaluation will be performed in the context of the inspected page.
21701 | This is mutually exclusive with `uniqueContextId`, which offers an
21702 | alternative way to identify the execution context that is more reliable
21703 | in a multi-process environment.
21704 |        */
21705 |       contextId?: ExecutionContextId;
21706 |       /**
21707 |        * Whether the result is expected to be a JSON object that should be sent by value.
21708 |        */
21709 |       returnByValue?: boolean;
21710 |       /**
21711 |        * Whether preview should be generated for the result.
21712 |        */
21713 |       generatePreview?: boolean;
21714 |       /**
21715 |        * Whether execution should be treated as initiated by user in the UI.
21716 |        */
21717 |       userGesture?: boolean;
21718 |       /**
21719 |        * Whether execution should `await` for resulting value and return once awaited promise is
21720 | resolved.
21721 |        */
21722 |       awaitPromise?: boolean;
21723 |       /**
21724 |        * Whether to throw an exception if side effect cannot be ruled out during evaluation.
21725 | This implies `disableBreaks` below.
21726 |        */
21727 |       throwOnSideEffect?: boolean;
21728 |       /**
21729 |        * Terminate execution after timing out (number of milliseconds).
21730 |        */
21731 |       timeout?: TimeDelta;
21732 |       /**
21733 |        * Disable breakpoints during execution.
21734 |        */
21735 |       disableBreaks?: boolean;
21736 |       /**
21737 |        * Setting this flag to true enables `let` re-declaration and top-level `await`.
21738 | Note that `let` variables can only be re-declared if they originate from
21739 | `replMode` themselves.
21740 |        */
21741 |       replMode?: boolean;
21742 |       /**
21743 |        * The Content Security Policy (CSP) for the target might block 'unsafe-eval'
21744 | which includes eval(), Function(), setTimeout() and setInterval()
21745 | when called with non-callable arguments. This flag bypasses CSP for this
21746 | evaluation and allows unsafe-eval. Defaults to true.
21747 |        */
21748 |       allowUnsafeEvalBlockedByCSP?: boolean;
21749 |       /**
21750 |        * An alternative way to specify the execution context to evaluate in.
21751 | Compared to contextId that may be reused across processes, this is guaranteed to be
21752 | system-unique, so it can be used to prevent accidental evaluation of the expression
21753 | in context different than intended (e.g. as a result of navigation across process
21754 | boundaries).
21755 | This is mutually exclusive with `contextId`.
21756 |        */
21757 |       uniqueContextId?: string;
21758 |       /**
21759 |        * Specifies the result serialization. If provided, overrides
21760 | `generatePreview` and `returnByValue`.
21761 |        */
21762 |       serializationOptions?: SerializationOptions;
21763 |     }
21764 |     export type evaluateReturnValue = {
21765 |       /**
21766 |        * Evaluation result.
21767 |        */
21768 |       result: RemoteObject;
21769 |       /**
21770 |        * Exception details.
21771 |        */
21772 |       exceptionDetails?: ExceptionDetails;
21773 |     }
21774 |     /**
21775 |      * Returns the isolate id.
21776 |      */
21777 |     export type getIsolateIdParameters = {
21778 |     }
21779 |     export type getIsolateIdReturnValue = {
21780 |       /**
21781 |        * The isolate id.
21782 |        */
21783 |       id: string;
21784 |     }
21785 |     /**
21786 |      * Returns the JavaScript heap usage.
21787 | It is the total usage of the corresponding isolate not scoped to a particular Runtime.
21788 |      */
21789 |     export type getHeapUsageParameters = {
21790 |     }
21791 |     export type getHeapUsageReturnValue = {
21792 |       /**
21793 |        * Used JavaScript heap size in bytes.
21794 |        */
21795 |       usedSize: number;
21796 |       /**
21797 |        * Allocated JavaScript heap size in bytes.
21798 |        */
21799 |       totalSize: number;
21800 |       /**
21801 |        * Used size in bytes in the embedder's garbage-collected heap.
21802 |        */
21803 |       embedderHeapUsedSize: number;
21804 |       /**
21805 |        * Size in bytes of backing storage for array buffers and external strings.
21806 |        */
21807 |       backingStorageSize: number;
21808 |     }
21809 |     /**
21810 |      * Returns properties of a given object. Object group of the result is inherited from the target
21811 | object.
21812 |      */
21813 |     export type getPropertiesParameters = {
21814 |       /**
21815 |        * Identifier of the object to return properties for.
21816 |        */
21817 |       objectId: RemoteObjectId;
21818 |       /**
21819 |        * If true, returns properties belonging only to the element itself, not to its prototype
21820 | chain.
21821 |        */
21822 |       ownProperties?: boolean;
21823 |       /**
21824 |        * If true, returns accessor properties (with getter/setter) only; internal properties are not
21825 | returned either.
21826 |        */
21827 |       accessorPropertiesOnly?: boolean;
21828 |       /**
21829 |        * Whether preview should be generated for the results.
21830 |        */
21831 |       generatePreview?: boolean;
21832 |       /**
21833 |        * If true, returns non-indexed properties only.
21834 |        */
21835 |       nonIndexedPropertiesOnly?: boolean;
21836 |     }
21837 |     export type getPropertiesReturnValue = {
21838 |       /**
21839 |        * Object properties.
21840 |        */
21841 |       result: PropertyDescriptor[];
21842 |       /**
21843 |        * Internal object properties (only of the element itself).
21844 |        */
21845 |       internalProperties?: InternalPropertyDescriptor[];
21846 |       /**
21847 |        * Object private properties.
21848 |        */
21849 |       privateProperties?: PrivatePropertyDescriptor[];
21850 |       /**
21851 |        * Exception details.
21852 |        */
21853 |       exceptionDetails?: ExceptionDetails;
21854 |     }
21855 |     /**
21856 |      * Returns all let, const and class variables from global scope.
21857 |      */
21858 |     export type globalLexicalScopeNamesParameters = {
21859 |       /**
21860 |        * Specifies in which execution context to lookup global scope variables.
21861 |        */
21862 |       executionContextId?: ExecutionContextId;
21863 |     }
21864 |     export type globalLexicalScopeNamesReturnValue = {
21865 |       names: string[];
21866 |     }
21867 |     export type queryObjectsParameters = {
21868 |       /**
21869 |        * Identifier of the prototype to return objects for.
21870 |        */
21871 |       prototypeObjectId: RemoteObjectId;
21872 |       /**
21873 |        * Symbolic group name that can be used to release the results.
21874 |        */
21875 |       objectGroup?: string;
21876 |     }
21877 |     export type queryObjectsReturnValue = {
21878 |       /**
21879 |        * Array with objects.
21880 |        */
21881 |       objects: RemoteObject;
21882 |     }
21883 |     /**
21884 |      * Releases remote object with given id.
21885 |      */
21886 |     export type releaseObjectParameters = {
21887 |       /**
21888 |        * Identifier of the object to release.
21889 |        */
21890 |       objectId: RemoteObjectId;
21891 |     }
21892 |     export type releaseObjectReturnValue = {
21893 |     }
21894 |     /**
21895 |      * Releases all remote objects that belong to a given group.
21896 |      */
21897 |     export type releaseObjectGroupParameters = {
21898 |       /**
21899 |        * Symbolic object group name.
21900 |        */
21901 |       objectGroup: string;
21902 |     }
21903 |     export type releaseObjectGroupReturnValue = {
21904 |     }
21905 |     /**
21906 |      * Tells inspected instance to run if it was waiting for debugger to attach.
21907 |      */
21908 |     export type runIfWaitingForDebuggerParameters = {
21909 |     }
21910 |     export type runIfWaitingForDebuggerReturnValue = {
21911 |     }
21912 |     /**
21913 |      * Runs script with given id in a given context.
21914 |      */
21915 |     export type runScriptParameters = {
21916 |       /**
21917 |        * Id of the script to run.
21918 |        */
21919 |       scriptId: ScriptId;
21920 |       /**
21921 |        * Specifies in which execution context to perform script run. If the parameter is omitted the
21922 | evaluation will be performed in the context of the inspected page.
21923 |        */
21924 |       executionContextId?: ExecutionContextId;
21925 |       /**
21926 |        * Symbolic group name that can be used to release multiple objects.
21927 |        */
21928 |       objectGroup?: string;
21929 |       /**
21930 |        * In silent mode exceptions thrown during evaluation are not reported and do not pause
21931 | execution. Overrides `setPauseOnException` state.
21932 |        */
21933 |       silent?: boolean;
21934 |       /**
21935 |        * Determines whether Command Line API should be available during the evaluation.
21936 |        */
21937 |       includeCommandLineAPI?: boolean;
21938 |       /**
21939 |        * Whether the result is expected to be a JSON object which should be sent by value.
21940 |        */
21941 |       returnByValue?: boolean;
21942 |       /**
21943 |        * Whether preview should be generated for the result.
21944 |        */
21945 |       generatePreview?: boolean;
21946 |       /**
21947 |        * Whether execution should `await` for resulting value and return once awaited promise is
21948 | resolved.
21949 |        */
21950 |       awaitPromise?: boolean;
21951 |     }
21952 |     export type runScriptReturnValue = {
21953 |       /**
21954 |        * Run result.
21955 |        */
21956 |       result: RemoteObject;
21957 |       /**
21958 |        * Exception details.
21959 |        */
21960 |       exceptionDetails?: ExceptionDetails;
21961 |     }
21962 |     /**
21963 |      * Enables or disables async call stacks tracking.
21964 |      */
21965 |     export type setAsyncCallStackDepthParameters = {
21966 |       /**
21967 |        * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
21968 | call stacks (default).
21969 |        */
21970 |       maxDepth: number;
21971 |     }
21972 |     export type setAsyncCallStackDepthReturnValue = {
21973 |     }
21974 |     export type setCustomObjectFormatterEnabledParameters = {
21975 |       enabled: boolean;
21976 |     }
21977 |     export type setCustomObjectFormatterEnabledReturnValue = {
21978 |     }
21979 |     export type setMaxCallStackSizeToCaptureParameters = {
21980 |       size: number;
21981 |     }
21982 |     export type setMaxCallStackSizeToCaptureReturnValue = {
21983 |     }
21984 |     /**
21985 |      * Terminate current or next JavaScript execution.
21986 | Will cancel the termination when the outer-most script execution ends.
21987 |      */
21988 |     export type terminateExecutionParameters = {
21989 |     }
21990 |     export type terminateExecutionReturnValue = {
21991 |     }
21992 |     /**
21993 |      * If executionContextId is empty, adds binding with the given name on the
21994 | global objects of all inspected contexts, including those created later,
21995 | bindings survive reloads.
21996 | Binding function takes exactly one argument, this argument should be string,
21997 | in case of any other input, function throws an exception.
21998 | Each binding function call produces Runtime.bindingCalled notification.
21999 |      */
22000 |     export type addBindingParameters = {
22001 |       name: string;
22002 |       /**
22003 |        * If specified, the binding would only be exposed to the specified
22004 | execution context. If omitted and `executionContextName` is not set,
22005 | the binding is exposed to all execution contexts of the target.
22006 | This parameter is mutually exclusive with `executionContextName`.
22007 | Deprecated in favor of `executionContextName` due to an unclear use case
22008 | and bugs in implementation (crbug.com/1169639). `executionContextId` will be
22009 | removed in the future.
22010 |        */
22011 |       executionContextId?: ExecutionContextId;
22012 |       /**
22013 |        * If specified, the binding is exposed to the executionContext with
22014 | matching name, even for contexts created after the binding is added.
22015 | See also `ExecutionContext.name` and `worldName` parameter to
22016 | `Page.addScriptToEvaluateOnNewDocument`.
22017 | This parameter is mutually exclusive with `executionContextId`.
22018 |        */
22019 |       executionContextName?: string;
22020 |     }
22021 |     export type addBindingReturnValue = {
22022 |     }
22023 |     /**
22024 |      * This method does not remove binding function from global object but
22025 | unsubscribes current runtime agent from Runtime.bindingCalled notifications.
22026 |      */
22027 |     export type removeBindingParameters = {
22028 |       name: string;
22029 |     }
22030 |     export type removeBindingReturnValue = {
22031 |     }
22032 |     /**
22033 |      * This method tries to lookup and populate exception details for a
22034 | JavaScript Error object.
22035 | Note that the stackTrace portion of the resulting exceptionDetails will
22036 | only be populated if the Runtime domain was enabled at the time when the
22037 | Error was thrown.
22038 |      */
22039 |     export type getExceptionDetailsParameters = {
22040 |       /**
22041 |        * The error object for which to resolve the exception details.
22042 |        */
22043 |       errorObjectId: RemoteObjectId;
22044 |     }
22045 |     export type getExceptionDetailsReturnValue = {
22046 |       exceptionDetails?: ExceptionDetails;
22047 |     }
22048 |   }
22049 | 
22050 |   /**
22051 |    * This domain is deprecated.
22052 |    */
22053 |   export namespace Schema {
22054 |     /**
22055 |      * Description of the protocol domain.
22056 |      */
22057 |     export interface Domain {
22058 |       /**
22059 |        * Domain name.
22060 |        */
22061 |       name: string;
22062 |       /**
22063 |        * Domain version.
22064 |        */
22065 |       version: string;
22066 |     }
22067 | 
22068 | 
22069 |     /**
22070 |      * Returns supported domains.
22071 |      */
22072 |     export type getDomainsParameters = {
22073 |     }
22074 |     export type getDomainsReturnValue = {
22075 |       /**
22076 |        * List of supported domains.
22077 |        */
22078 |       domains: Domain[];
22079 |     }
22080 |   }
22081 | 
22082 |   export type Events = {
22083 |     "Accessibility.loadComplete": Accessibility.loadCompletePayload;
22084 |     "Accessibility.nodesUpdated": Accessibility.nodesUpdatedPayload;
22085 |     "Animation.animationCanceled": Animation.animationCanceledPayload;
22086 |     "Animation.animationCreated": Animation.animationCreatedPayload;
22087 |     "Animation.animationStarted": Animation.animationStartedPayload;
22088 |     "Animation.animationUpdated": Animation.animationUpdatedPayload;
22089 |     "Audits.issueAdded": Audits.issueAddedPayload;
22090 |     "Autofill.addressFormFilled": Autofill.addressFormFilledPayload;
22091 |     "BackgroundService.recordingStateChanged": BackgroundService.recordingStateChangedPayload;
22092 |     "BackgroundService.backgroundServiceEventReceived": BackgroundService.backgroundServiceEventReceivedPayload;
22093 |     "BluetoothEmulation.gattOperationReceived": BluetoothEmulation.gattOperationReceivedPayload;
22094 |     "BluetoothEmulation.characteristicOperationReceived": BluetoothEmulation.characteristicOperationReceivedPayload;
22095 |     "BluetoothEmulation.descriptorOperationReceived": BluetoothEmulation.descriptorOperationReceivedPayload;
22096 |     "Browser.downloadWillBegin": Browser.downloadWillBeginPayload;
22097 |     "Browser.downloadProgress": Browser.downloadProgressPayload;
22098 |     "CSS.fontsUpdated": CSS.fontsUpdatedPayload;
22099 |     "CSS.mediaQueryResultChanged": CSS.mediaQueryResultChangedPayload;
22100 |     "CSS.styleSheetAdded": CSS.styleSheetAddedPayload;
22101 |     "CSS.styleSheetChanged": CSS.styleSheetChangedPayload;
22102 |     "CSS.styleSheetRemoved": CSS.styleSheetRemovedPayload;
22103 |     "CSS.computedStyleUpdated": CSS.computedStyleUpdatedPayload;
22104 |     "Cast.sinksUpdated": Cast.sinksUpdatedPayload;
22105 |     "Cast.issueUpdated": Cast.issueUpdatedPayload;
22106 |     "DOM.attributeModified": DOM.attributeModifiedPayload;
22107 |     "DOM.adoptedStyleSheetsModified": DOM.adoptedStyleSheetsModifiedPayload;
22108 |     "DOM.attributeRemoved": DOM.attributeRemovedPayload;
22109 |     "DOM.characterDataModified": DOM.characterDataModifiedPayload;
22110 |     "DOM.childNodeCountUpdated": DOM.childNodeCountUpdatedPayload;
22111 |     "DOM.childNodeInserted": DOM.childNodeInsertedPayload;
22112 |     "DOM.childNodeRemoved": DOM.childNodeRemovedPayload;
22113 |     "DOM.distributedNodesUpdated": DOM.distributedNodesUpdatedPayload;
22114 |     "DOM.documentUpdated": DOM.documentUpdatedPayload;
22115 |     "DOM.inlineStyleInvalidated": DOM.inlineStyleInvalidatedPayload;
22116 |     "DOM.pseudoElementAdded": DOM.pseudoElementAddedPayload;
22117 |     "DOM.topLayerElementsUpdated": DOM.topLayerElementsUpdatedPayload;
22118 |     "DOM.scrollableFlagUpdated": DOM.scrollableFlagUpdatedPayload;
22119 |     "DOM.affectedByStartingStylesFlagUpdated": DOM.affectedByStartingStylesFlagUpdatedPayload;
22120 |     "DOM.pseudoElementRemoved": DOM.pseudoElementRemovedPayload;
22121 |     "DOM.setChildNodes": DOM.setChildNodesPayload;
22122 |     "DOM.shadowRootPopped": DOM.shadowRootPoppedPayload;
22123 |     "DOM.shadowRootPushed": DOM.shadowRootPushedPayload;
22124 |     "DOMStorage.domStorageItemAdded": DOMStorage.domStorageItemAddedPayload;
22125 |     "DOMStorage.domStorageItemRemoved": DOMStorage.domStorageItemRemovedPayload;
22126 |     "DOMStorage.domStorageItemUpdated": DOMStorage.domStorageItemUpdatedPayload;
22127 |     "DOMStorage.domStorageItemsCleared": DOMStorage.domStorageItemsClearedPayload;
22128 |     "DeviceAccess.deviceRequestPrompted": DeviceAccess.deviceRequestPromptedPayload;
22129 |     "Emulation.virtualTimeBudgetExpired": Emulation.virtualTimeBudgetExpiredPayload;
22130 |     "FedCm.dialogShown": FedCm.dialogShownPayload;
22131 |     "FedCm.dialogClosed": FedCm.dialogClosedPayload;
22132 |     "Fetch.requestPaused": Fetch.requestPausedPayload;
22133 |     "Fetch.authRequired": Fetch.authRequiredPayload;
22134 |     "Input.dragIntercepted": Input.dragInterceptedPayload;
22135 |     "Inspector.detached": Inspector.detachedPayload;
22136 |     "Inspector.targetCrashed": Inspector.targetCrashedPayload;
22137 |     "Inspector.targetReloadedAfterCrash": Inspector.targetReloadedAfterCrashPayload;
22138 |     "Inspector.workerScriptLoaded": Inspector.workerScriptLoadedPayload;
22139 |     "LayerTree.layerPainted": LayerTree.layerPaintedPayload;
22140 |     "LayerTree.layerTreeDidChange": LayerTree.layerTreeDidChangePayload;
22141 |     "Log.entryAdded": Log.entryAddedPayload;
22142 |     "Media.playerPropertiesChanged": Media.playerPropertiesChangedPayload;
22143 |     "Media.playerEventsAdded": Media.playerEventsAddedPayload;
22144 |     "Media.playerMessagesLogged": Media.playerMessagesLoggedPayload;
22145 |     "Media.playerErrorsRaised": Media.playerErrorsRaisedPayload;
22146 |     "Media.playerCreated": Media.playerCreatedPayload;
22147 |     "Network.dataReceived": Network.dataReceivedPayload;
22148 |     "Network.eventSourceMessageReceived": Network.eventSourceMessageReceivedPayload;
22149 |     "Network.loadingFailed": Network.loadingFailedPayload;
22150 |     "Network.loadingFinished": Network.loadingFinishedPayload;
22151 |     "Network.requestIntercepted": Network.requestInterceptedPayload;
22152 |     "Network.requestServedFromCache": Network.requestServedFromCachePayload;
22153 |     "Network.requestWillBeSent": Network.requestWillBeSentPayload;
22154 |     "Network.resourceChangedPriority": Network.resourceChangedPriorityPayload;
22155 |     "Network.signedExchangeReceived": Network.signedExchangeReceivedPayload;
22156 |     "Network.responseReceived": Network.responseReceivedPayload;
22157 |     "Network.webSocketClosed": Network.webSocketClosedPayload;
22158 |     "Network.webSocketCreated": Network.webSocketCreatedPayload;
22159 |     "Network.webSocketFrameError": Network.webSocketFrameErrorPayload;
22160 |     "Network.webSocketFrameReceived": Network.webSocketFrameReceivedPayload;
22161 |     "Network.webSocketFrameSent": Network.webSocketFrameSentPayload;
22162 |     "Network.webSocketHandshakeResponseReceived": Network.webSocketHandshakeResponseReceivedPayload;
22163 |     "Network.webSocketWillSendHandshakeRequest": Network.webSocketWillSendHandshakeRequestPayload;
22164 |     "Network.webTransportCreated": Network.webTransportCreatedPayload;
22165 |     "Network.webTransportConnectionEstablished": Network.webTransportConnectionEstablishedPayload;
22166 |     "Network.webTransportClosed": Network.webTransportClosedPayload;
22167 |     "Network.directTCPSocketCreated": Network.directTCPSocketCreatedPayload;
22168 |     "Network.directTCPSocketOpened": Network.directTCPSocketOpenedPayload;
22169 |     "Network.directTCPSocketAborted": Network.directTCPSocketAbortedPayload;
22170 |     "Network.directTCPSocketClosed": Network.directTCPSocketClosedPayload;
22171 |     "Network.directTCPSocketChunkSent": Network.directTCPSocketChunkSentPayload;
22172 |     "Network.directTCPSocketChunkReceived": Network.directTCPSocketChunkReceivedPayload;
22173 |     "Network.directUDPSocketJoinedMulticastGroup": Network.directUDPSocketJoinedMulticastGroupPayload;
22174 |     "Network.directUDPSocketLeftMulticastGroup": Network.directUDPSocketLeftMulticastGroupPayload;
22175 |     "Network.directUDPSocketCreated": Network.directUDPSocketCreatedPayload;
22176 |     "Network.directUDPSocketOpened": Network.directUDPSocketOpenedPayload;
22177 |     "Network.directUDPSocketAborted": Network.directUDPSocketAbortedPayload;
22178 |     "Network.directUDPSocketClosed": Network.directUDPSocketClosedPayload;
22179 |     "Network.directUDPSocketChunkSent": Network.directUDPSocketChunkSentPayload;
22180 |     "Network.directUDPSocketChunkReceived": Network.directUDPSocketChunkReceivedPayload;
22181 |     "Network.requestWillBeSentExtraInfo": Network.requestWillBeSentExtraInfoPayload;
22182 |     "Network.responseReceivedExtraInfo": Network.responseReceivedExtraInfoPayload;
22183 |     "Network.responseReceivedEarlyHints": Network.responseReceivedEarlyHintsPayload;
22184 |     "Network.trustTokenOperationDone": Network.trustTokenOperationDonePayload;
22185 |     "Network.policyUpdated": Network.policyUpdatedPayload;
22186 |     "Network.reportingApiReportAdded": Network.reportingApiReportAddedPayload;
22187 |     "Network.reportingApiReportUpdated": Network.reportingApiReportUpdatedPayload;
22188 |     "Network.reportingApiEndpointsChangedForOrigin": Network.reportingApiEndpointsChangedForOriginPayload;
22189 |     "Network.deviceBoundSessionsAdded": Network.deviceBoundSessionsAddedPayload;
22190 |     "Network.deviceBoundSessionEventOccurred": Network.deviceBoundSessionEventOccurredPayload;
22191 |     "Overlay.inspectNodeRequested": Overlay.inspectNodeRequestedPayload;
22192 |     "Overlay.nodeHighlightRequested": Overlay.nodeHighlightRequestedPayload;
22193 |     "Overlay.screenshotRequested": Overlay.screenshotRequestedPayload;
22194 |     "Overlay.inspectModeCanceled": Overlay.inspectModeCanceledPayload;
22195 |     "Page.domContentEventFired": Page.domContentEventFiredPayload;
22196 |     "Page.fileChooserOpened": Page.fileChooserOpenedPayload;
22197 |     "Page.frameAttached": Page.frameAttachedPayload;
22198 |     "Page.frameClearedScheduledNavigation": Page.frameClearedScheduledNavigationPayload;
22199 |     "Page.frameDetached": Page.frameDetachedPayload;
22200 |     "Page.frameSubtreeWillBeDetached": Page.frameSubtreeWillBeDetachedPayload;
22201 |     "Page.frameNavigated": Page.frameNavigatedPayload;
22202 |     "Page.documentOpened": Page.documentOpenedPayload;
22203 |     "Page.frameResized": Page.frameResizedPayload;
22204 |     "Page.frameStartedNavigating": Page.frameStartedNavigatingPayload;
22205 |     "Page.frameRequestedNavigation": Page.frameRequestedNavigationPayload;
22206 |     "Page.frameScheduledNavigation": Page.frameScheduledNavigationPayload;
22207 |     "Page.frameStartedLoading": Page.frameStartedLoadingPayload;
22208 |     "Page.frameStoppedLoading": Page.frameStoppedLoadingPayload;
22209 |     "Page.downloadWillBegin": Page.downloadWillBeginPayload;
22210 |     "Page.downloadProgress": Page.downloadProgressPayload;
22211 |     "Page.interstitialHidden": Page.interstitialHiddenPayload;
22212 |     "Page.interstitialShown": Page.interstitialShownPayload;
22213 |     "Page.javascriptDialogClosed": Page.javascriptDialogClosedPayload;
22214 |     "Page.javascriptDialogOpening": Page.javascriptDialogOpeningPayload;
22215 |     "Page.lifecycleEvent": Page.lifecycleEventPayload;
22216 |     "Page.backForwardCacheNotUsed": Page.backForwardCacheNotUsedPayload;
22217 |     "Page.loadEventFired": Page.loadEventFiredPayload;
22218 |     "Page.navigatedWithinDocument": Page.navigatedWithinDocumentPayload;
22219 |     "Page.screencastFrame": Page.screencastFramePayload;
22220 |     "Page.screencastVisibilityChanged": Page.screencastVisibilityChangedPayload;
22221 |     "Page.windowOpen": Page.windowOpenPayload;
22222 |     "Page.compilationCacheProduced": Page.compilationCacheProducedPayload;
22223 |     "Performance.metrics": Performance.metricsPayload;
22224 |     "PerformanceTimeline.timelineEventAdded": PerformanceTimeline.timelineEventAddedPayload;
22225 |     "Preload.ruleSetUpdated": Preload.ruleSetUpdatedPayload;
22226 |     "Preload.ruleSetRemoved": Preload.ruleSetRemovedPayload;
22227 |     "Preload.preloadEnabledStateUpdated": Preload.preloadEnabledStateUpdatedPayload;
22228 |     "Preload.prefetchStatusUpdated": Preload.prefetchStatusUpdatedPayload;
22229 |     "Preload.prerenderStatusUpdated": Preload.prerenderStatusUpdatedPayload;
22230 |     "Preload.preloadingAttemptSourcesUpdated": Preload.preloadingAttemptSourcesUpdatedPayload;
22231 |     "Security.certificateError": Security.certificateErrorPayload;
22232 |     "Security.visibleSecurityStateChanged": Security.visibleSecurityStateChangedPayload;
22233 |     "Security.securityStateChanged": Security.securityStateChangedPayload;
22234 |     "ServiceWorker.workerErrorReported": ServiceWorker.workerErrorReportedPayload;
22235 |     "ServiceWorker.workerRegistrationUpdated": ServiceWorker.workerRegistrationUpdatedPayload;
22236 |     "ServiceWorker.workerVersionUpdated": ServiceWorker.workerVersionUpdatedPayload;
22237 |     "Storage.cacheStorageContentUpdated": Storage.cacheStorageContentUpdatedPayload;
22238 |     "Storage.cacheStorageListUpdated": Storage.cacheStorageListUpdatedPayload;
22239 |     "Storage.indexedDBContentUpdated": Storage.indexedDBContentUpdatedPayload;
22240 |     "Storage.indexedDBListUpdated": Storage.indexedDBListUpdatedPayload;
22241 |     "Storage.interestGroupAccessed": Storage.interestGroupAccessedPayload;
22242 |     "Storage.interestGroupAuctionEventOccurred": Storage.interestGroupAuctionEventOccurredPayload;
22243 |     "Storage.interestGroupAuctionNetworkRequestCreated": Storage.interestGroupAuctionNetworkRequestCreatedPayload;
22244 |     "Storage.sharedStorageAccessed": Storage.sharedStorageAccessedPayload;
22245 |     "Storage.sharedStorageWorkletOperationExecutionFinished": Storage.sharedStorageWorkletOperationExecutionFinishedPayload;
22246 |     "Storage.storageBucketCreatedOrUpdated": Storage.storageBucketCreatedOrUpdatedPayload;
22247 |     "Storage.storageBucketDeleted": Storage.storageBucketDeletedPayload;
22248 |     "Storage.attributionReportingSourceRegistered": Storage.attributionReportingSourceRegisteredPayload;
22249 |     "Storage.attributionReportingTriggerRegistered": Storage.attributionReportingTriggerRegisteredPayload;
22250 |     "Storage.attributionReportingReportSent": Storage.attributionReportingReportSentPayload;
22251 |     "Storage.attributionReportingVerboseDebugReportSent": Storage.attributionReportingVerboseDebugReportSentPayload;
22252 |     "Target.attachedToTarget": Target.attachedToTargetPayload;
22253 |     "Target.detachedFromTarget": Target.detachedFromTargetPayload;
22254 |     "Target.receivedMessageFromTarget": Target.receivedMessageFromTargetPayload;
22255 |     "Target.targetCreated": Target.targetCreatedPayload;
22256 |     "Target.targetDestroyed": Target.targetDestroyedPayload;
22257 |     "Target.targetCrashed": Target.targetCrashedPayload;
22258 |     "Target.targetInfoChanged": Target.targetInfoChangedPayload;
22259 |     "Tethering.accepted": Tethering.acceptedPayload;
22260 |     "Tracing.bufferUsage": Tracing.bufferUsagePayload;
22261 |     "Tracing.dataCollected": Tracing.dataCollectedPayload;
22262 |     "Tracing.tracingComplete": Tracing.tracingCompletePayload;
22263 |     "WebAudio.contextCreated": WebAudio.contextCreatedPayload;
22264 |     "WebAudio.contextWillBeDestroyed": WebAudio.contextWillBeDestroyedPayload;
22265 |     "WebAudio.contextChanged": WebAudio.contextChangedPayload;
22266 |     "WebAudio.audioListenerCreated": WebAudio.audioListenerCreatedPayload;
22267 |     "WebAudio.audioListenerWillBeDestroyed": WebAudio.audioListenerWillBeDestroyedPayload;
22268 |     "WebAudio.audioNodeCreated": WebAudio.audioNodeCreatedPayload;
22269 |     "WebAudio.audioNodeWillBeDestroyed": WebAudio.audioNodeWillBeDestroyedPayload;
22270 |     "WebAudio.audioParamCreated": WebAudio.audioParamCreatedPayload;
22271 |     "WebAudio.audioParamWillBeDestroyed": WebAudio.audioParamWillBeDestroyedPayload;
22272 |     "WebAudio.nodesConnected": WebAudio.nodesConnectedPayload;
22273 |     "WebAudio.nodesDisconnected": WebAudio.nodesDisconnectedPayload;
22274 |     "WebAudio.nodeParamConnected": WebAudio.nodeParamConnectedPayload;
22275 |     "WebAudio.nodeParamDisconnected": WebAudio.nodeParamDisconnectedPayload;
22276 |     "WebAuthn.credentialAdded": WebAuthn.credentialAddedPayload;
22277 |     "WebAuthn.credentialDeleted": WebAuthn.credentialDeletedPayload;
22278 |     "WebAuthn.credentialUpdated": WebAuthn.credentialUpdatedPayload;
22279 |     "WebAuthn.credentialAsserted": WebAuthn.credentialAssertedPayload;
22280 |     "Console.messageAdded": Console.messageAddedPayload;
22281 |     "Debugger.breakpointResolved": Debugger.breakpointResolvedPayload;
22282 |     "Debugger.paused": Debugger.pausedPayload;
22283 |     "Debugger.resumed": Debugger.resumedPayload;
22284 |     "Debugger.scriptFailedToParse": Debugger.scriptFailedToParsePayload;
22285 |     "Debugger.scriptParsed": Debugger.scriptParsedPayload;
22286 |     "HeapProfiler.addHeapSnapshotChunk": HeapProfiler.addHeapSnapshotChunkPayload;
22287 |     "HeapProfiler.heapStatsUpdate": HeapProfiler.heapStatsUpdatePayload;
22288 |     "HeapProfiler.lastSeenObjectId": HeapProfiler.lastSeenObjectIdPayload;
22289 |     "HeapProfiler.reportHeapSnapshotProgress": HeapProfiler.reportHeapSnapshotProgressPayload;
22290 |     "HeapProfiler.resetProfiles": HeapProfiler.resetProfilesPayload;
22291 |     "Profiler.consoleProfileFinished": Profiler.consoleProfileFinishedPayload;
22292 |     "Profiler.consoleProfileStarted": Profiler.consoleProfileStartedPayload;
22293 |     "Profiler.preciseCoverageDeltaUpdate": Profiler.preciseCoverageDeltaUpdatePayload;
22294 |     "Runtime.bindingCalled": Runtime.bindingCalledPayload;
22295 |     "Runtime.consoleAPICalled": Runtime.consoleAPICalledPayload;
22296 |     "Runtime.exceptionRevoked": Runtime.exceptionRevokedPayload;
22297 |     "Runtime.exceptionThrown": Runtime.exceptionThrownPayload;
22298 |     "Runtime.executionContextCreated": Runtime.executionContextCreatedPayload;
22299 |     "Runtime.executionContextDestroyed": Runtime.executionContextDestroyedPayload;
22300 |     "Runtime.executionContextsCleared": Runtime.executionContextsClearedPayload;
22301 |     "Runtime.inspectRequested": Runtime.inspectRequestedPayload;
22302 |   }
22303 |   export type EventMap = {
22304 |     ["Accessibility.loadComplete"]: [Accessibility.loadCompletePayload];
22305 |     ["Accessibility.nodesUpdated"]: [Accessibility.nodesUpdatedPayload];
22306 |     ["Animation.animationCanceled"]: [Animation.animationCanceledPayload];
22307 |     ["Animation.animationCreated"]: [Animation.animationCreatedPayload];
22308 |     ["Animation.animationStarted"]: [Animation.animationStartedPayload];
22309 |     ["Animation.animationUpdated"]: [Animation.animationUpdatedPayload];
22310 |     ["Audits.issueAdded"]: [Audits.issueAddedPayload];
22311 |     ["Autofill.addressFormFilled"]: [Autofill.addressFormFilledPayload];
22312 |     ["BackgroundService.recordingStateChanged"]: [BackgroundService.recordingStateChangedPayload];
22313 |     ["BackgroundService.backgroundServiceEventReceived"]: [BackgroundService.backgroundServiceEventReceivedPayload];
22314 |     ["BluetoothEmulation.gattOperationReceived"]: [BluetoothEmulation.gattOperationReceivedPayload];
22315 |     ["BluetoothEmulation.characteristicOperationReceived"]: [BluetoothEmulation.characteristicOperationReceivedPayload];
22316 |     ["BluetoothEmulation.descriptorOperationReceived"]: [BluetoothEmulation.descriptorOperationReceivedPayload];
22317 |     ["Browser.downloadWillBegin"]: [Browser.downloadWillBeginPayload];
22318 |     ["Browser.downloadProgress"]: [Browser.downloadProgressPayload];
22319 |     ["CSS.fontsUpdated"]: [CSS.fontsUpdatedPayload];
22320 |     ["CSS.mediaQueryResultChanged"]: [CSS.mediaQueryResultChangedPayload];
22321 |     ["CSS.styleSheetAdded"]: [CSS.styleSheetAddedPayload];
22322 |     ["CSS.styleSheetChanged"]: [CSS.styleSheetChangedPayload];
22323 |     ["CSS.styleSheetRemoved"]: [CSS.styleSheetRemovedPayload];
22324 |     ["CSS.computedStyleUpdated"]: [CSS.computedStyleUpdatedPayload];
22325 |     ["Cast.sinksUpdated"]: [Cast.sinksUpdatedPayload];
22326 |     ["Cast.issueUpdated"]: [Cast.issueUpdatedPayload];
22327 |     ["DOM.attributeModified"]: [DOM.attributeModifiedPayload];
22328 |     ["DOM.adoptedStyleSheetsModified"]: [DOM.adoptedStyleSheetsModifiedPayload];
22329 |     ["DOM.attributeRemoved"]: [DOM.attributeRemovedPayload];
22330 |     ["DOM.characterDataModified"]: [DOM.characterDataModifiedPayload];
22331 |     ["DOM.childNodeCountUpdated"]: [DOM.childNodeCountUpdatedPayload];
22332 |     ["DOM.childNodeInserted"]: [DOM.childNodeInsertedPayload];
22333 |     ["DOM.childNodeRemoved"]: [DOM.childNodeRemovedPayload];
22334 |     ["DOM.distributedNodesUpdated"]: [DOM.distributedNodesUpdatedPayload];
22335 |     ["DOM.documentUpdated"]: [DOM.documentUpdatedPayload];
22336 |     ["DOM.inlineStyleInvalidated"]: [DOM.inlineStyleInvalidatedPayload];
22337 |     ["DOM.pseudoElementAdded"]: [DOM.pseudoElementAddedPayload];
22338 |     ["DOM.topLayerElementsUpdated"]: [DOM.topLayerElementsUpdatedPayload];
22339 |     ["DOM.scrollableFlagUpdated"]: [DOM.scrollableFlagUpdatedPayload];
22340 |     ["DOM.affectedByStartingStylesFlagUpdated"]: [DOM.affectedByStartingStylesFlagUpdatedPayload];
22341 |     ["DOM.pseudoElementRemoved"]: [DOM.pseudoElementRemovedPayload];
22342 |     ["DOM.setChildNodes"]: [DOM.setChildNodesPayload];
22343 |     ["DOM.shadowRootPopped"]: [DOM.shadowRootPoppedPayload];
22344 |     ["DOM.shadowRootPushed"]: [DOM.shadowRootPushedPayload];
22345 |     ["DOMStorage.domStorageItemAdded"]: [DOMStorage.domStorageItemAddedPayload];
22346 |     ["DOMStorage.domStorageItemRemoved"]: [DOMStorage.domStorageItemRemovedPayload];
22347 |     ["DOMStorage.domStorageItemUpdated"]: [DOMStorage.domStorageItemUpdatedPayload];
22348 |     ["DOMStorage.domStorageItemsCleared"]: [DOMStorage.domStorageItemsClearedPayload];
22349 |     ["DeviceAccess.deviceRequestPrompted"]: [DeviceAccess.deviceRequestPromptedPayload];
22350 |     ["Emulation.virtualTimeBudgetExpired"]: [Emulation.virtualTimeBudgetExpiredPayload];
22351 |     ["FedCm.dialogShown"]: [FedCm.dialogShownPayload];
22352 |     ["FedCm.dialogClosed"]: [FedCm.dialogClosedPayload];
22353 |     ["Fetch.requestPaused"]: [Fetch.requestPausedPayload];
22354 |     ["Fetch.authRequired"]: [Fetch.authRequiredPayload];
22355 |     ["Input.dragIntercepted"]: [Input.dragInterceptedPayload];
22356 |     ["Inspector.detached"]: [Inspector.detachedPayload];
22357 |     ["Inspector.targetCrashed"]: [Inspector.targetCrashedPayload];
22358 |     ["Inspector.targetReloadedAfterCrash"]: [Inspector.targetReloadedAfterCrashPayload];
22359 |     ["Inspector.workerScriptLoaded"]: [Inspector.workerScriptLoadedPayload];
22360 |     ["LayerTree.layerPainted"]: [LayerTree.layerPaintedPayload];
22361 |     ["LayerTree.layerTreeDidChange"]: [LayerTree.layerTreeDidChangePayload];
22362 |     ["Log.entryAdded"]: [Log.entryAddedPayload];
22363 |     ["Media.playerPropertiesChanged"]: [Media.playerPropertiesChangedPayload];
22364 |     ["Media.playerEventsAdded"]: [Media.playerEventsAddedPayload];
22365 |     ["Media.playerMessagesLogged"]: [Media.playerMessagesLoggedPayload];
22366 |     ["Media.playerErrorsRaised"]: [Media.playerErrorsRaisedPayload];
22367 |     ["Media.playerCreated"]: [Media.playerCreatedPayload];
22368 |     ["Network.dataReceived"]: [Network.dataReceivedPayload];
22369 |     ["Network.eventSourceMessageReceived"]: [Network.eventSourceMessageReceivedPayload];
22370 |     ["Network.loadingFailed"]: [Network.loadingFailedPayload];
22371 |     ["Network.loadingFinished"]: [Network.loadingFinishedPayload];
22372 |     ["Network.requestIntercepted"]: [Network.requestInterceptedPayload];
22373 |     ["Network.requestServedFromCache"]: [Network.requestServedFromCachePayload];
22374 |     ["Network.requestWillBeSent"]: [Network.requestWillBeSentPayload];
22375 |     ["Network.resourceChangedPriority"]: [Network.resourceChangedPriorityPayload];
22376 |     ["Network.signedExchangeReceived"]: [Network.signedExchangeReceivedPayload];
22377 |     ["Network.responseReceived"]: [Network.responseReceivedPayload];
22378 |     ["Network.webSocketClosed"]: [Network.webSocketClosedPayload];
22379 |     ["Network.webSocketCreated"]: [Network.webSocketCreatedPayload];
22380 |     ["Network.webSocketFrameError"]: [Network.webSocketFrameErrorPayload];
22381 |     ["Network.webSocketFrameReceived"]: [Network.webSocketFrameReceivedPayload];
22382 |     ["Network.webSocketFrameSent"]: [Network.webSocketFrameSentPayload];
22383 |     ["Network.webSocketHandshakeResponseReceived"]: [Network.webSocketHandshakeResponseReceivedPayload];
22384 |     ["Network.webSocketWillSendHandshakeRequest"]: [Network.webSocketWillSendHandshakeRequestPayload];
22385 |     ["Network.webTransportCreated"]: [Network.webTransportCreatedPayload];
22386 |     ["Network.webTransportConnectionEstablished"]: [Network.webTransportConnectionEstablishedPayload];
22387 |     ["Network.webTransportClosed"]: [Network.webTransportClosedPayload];
22388 |     ["Network.directTCPSocketCreated"]: [Network.directTCPSocketCreatedPayload];
22389 |     ["Network.directTCPSocketOpened"]: [Network.directTCPSocketOpenedPayload];
22390 |     ["Network.directTCPSocketAborted"]: [Network.directTCPSocketAbortedPayload];
22391 |     ["Network.directTCPSocketClosed"]: [Network.directTCPSocketClosedPayload];
22392 |     ["Network.directTCPSocketChunkSent"]: [Network.directTCPSocketChunkSentPayload];
22393 |     ["Network.directTCPSocketChunkReceived"]: [Network.directTCPSocketChunkReceivedPayload];
22394 |     ["Network.directUDPSocketJoinedMulticastGroup"]: [Network.directUDPSocketJoinedMulticastGroupPayload];
22395 |     ["Network.directUDPSocketLeftMulticastGroup"]: [Network.directUDPSocketLeftMulticastGroupPayload];
22396 |     ["Network.directUDPSocketCreated"]: [Network.directUDPSocketCreatedPayload];
22397 |     ["Network.directUDPSocketOpened"]: [Network.directUDPSocketOpenedPayload];
22398 |     ["Network.directUDPSocketAborted"]: [Network.directUDPSocketAbortedPayload];
22399 |     ["Network.directUDPSocketClosed"]: [Network.directUDPSocketClosedPayload];
22400 |     ["Network.directUDPSocketChunkSent"]: [Network.directUDPSocketChunkSentPayload];
22401 |     ["Network.directUDPSocketChunkReceived"]: [Network.directUDPSocketChunkReceivedPayload];
22402 |     ["Network.requestWillBeSentExtraInfo"]: [Network.requestWillBeSentExtraInfoPayload];
22403 |     ["Network.responseReceivedExtraInfo"]: [Network.responseReceivedExtraInfoPayload];
22404 |     ["Network.responseReceivedEarlyHints"]: [Network.responseReceivedEarlyHintsPayload];
22405 |     ["Network.trustTokenOperationDone"]: [Network.trustTokenOperationDonePayload];
22406 |     ["Network.policyUpdated"]: [Network.policyUpdatedPayload];
22407 |     ["Network.reportingApiReportAdded"]: [Network.reportingApiReportAddedPayload];
22408 |     ["Network.reportingApiReportUpdated"]: [Network.reportingApiReportUpdatedPayload];
22409 |     ["Network.reportingApiEndpointsChangedForOrigin"]: [Network.reportingApiEndpointsChangedForOriginPayload];
22410 |     ["Network.deviceBoundSessionsAdded"]: [Network.deviceBoundSessionsAddedPayload];
22411 |     ["Network.deviceBoundSessionEventOccurred"]: [Network.deviceBoundSessionEventOccurredPayload];
22412 |     ["Overlay.inspectNodeRequested"]: [Overlay.inspectNodeRequestedPayload];
22413 |     ["Overlay.nodeHighlightRequested"]: [Overlay.nodeHighlightRequestedPayload];
22414 |     ["Overlay.screenshotRequested"]: [Overlay.screenshotRequestedPayload];
22415 |     ["Overlay.inspectModeCanceled"]: [Overlay.inspectModeCanceledPayload];
22416 |     ["Page.domContentEventFired"]: [Page.domContentEventFiredPayload];
22417 |     ["Page.fileChooserOpened"]: [Page.fileChooserOpenedPayload];
22418 |     ["Page.frameAttached"]: [Page.frameAttachedPayload];
22419 |     ["Page.frameClearedScheduledNavigation"]: [Page.frameClearedScheduledNavigationPayload];
22420 |     ["Page.frameDetached"]: [Page.frameDetachedPayload];
22421 |     ["Page.frameSubtreeWillBeDetached"]: [Page.frameSubtreeWillBeDetachedPayload];
22422 |     ["Page.frameNavigated"]: [Page.frameNavigatedPayload];
22423 |     ["Page.documentOpened"]: [Page.documentOpenedPayload];
22424 |     ["Page.frameResized"]: [Page.frameResizedPayload];
22425 |     ["Page.frameStartedNavigating"]: [Page.frameStartedNavigatingPayload];
22426 |     ["Page.frameRequestedNavigation"]: [Page.frameRequestedNavigationPayload];
22427 |     ["Page.frameScheduledNavigation"]: [Page.frameScheduledNavigationPayload];
22428 |     ["Page.frameStartedLoading"]: [Page.frameStartedLoadingPayload];
22429 |     ["Page.frameStoppedLoading"]: [Page.frameStoppedLoadingPayload];
22430 |     ["Page.downloadWillBegin"]: [Page.downloadWillBeginPayload];
22431 |     ["Page.downloadProgress"]: [Page.downloadProgressPayload];
22432 |     ["Page.interstitialHidden"]: [Page.interstitialHiddenPayload];
22433 |     ["Page.interstitialShown"]: [Page.interstitialShownPayload];
22434 |     ["Page.javascriptDialogClosed"]: [Page.javascriptDialogClosedPayload];
22435 |     ["Page.javascriptDialogOpening"]: [Page.javascriptDialogOpeningPayload];
22436 |     ["Page.lifecycleEvent"]: [Page.lifecycleEventPayload];
22437 |     ["Page.backForwardCacheNotUsed"]: [Page.backForwardCacheNotUsedPayload];
22438 |     ["Page.loadEventFired"]: [Page.loadEventFiredPayload];
22439 |     ["Page.navigatedWithinDocument"]: [Page.navigatedWithinDocumentPayload];
22440 |     ["Page.screencastFrame"]: [Page.screencastFramePayload];
22441 |     ["Page.screencastVisibilityChanged"]: [Page.screencastVisibilityChangedPayload];
22442 |     ["Page.windowOpen"]: [Page.windowOpenPayload];
22443 |     ["Page.compilationCacheProduced"]: [Page.compilationCacheProducedPayload];
22444 |     ["Performance.metrics"]: [Performance.metricsPayload];
22445 |     ["PerformanceTimeline.timelineEventAdded"]: [PerformanceTimeline.timelineEventAddedPayload];
22446 |     ["Preload.ruleSetUpdated"]: [Preload.ruleSetUpdatedPayload];
22447 |     ["Preload.ruleSetRemoved"]: [Preload.ruleSetRemovedPayload];
22448 |     ["Preload.preloadEnabledStateUpdated"]: [Preload.preloadEnabledStateUpdatedPayload];
22449 |     ["Preload.prefetchStatusUpdated"]: [Preload.prefetchStatusUpdatedPayload];
22450 |     ["Preload.prerenderStatusUpdated"]: [Preload.prerenderStatusUpdatedPayload];
22451 |     ["Preload.preloadingAttemptSourcesUpdated"]: [Preload.preloadingAttemptSourcesUpdatedPayload];
22452 |     ["Security.certificateError"]: [Security.certificateErrorPayload];
22453 |     ["Security.visibleSecurityStateChanged"]: [Security.visibleSecurityStateChangedPayload];
22454 |     ["Security.securityStateChanged"]: [Security.securityStateChangedPayload];
22455 |     ["ServiceWorker.workerErrorReported"]: [ServiceWorker.workerErrorReportedPayload];
22456 |     ["ServiceWorker.workerRegistrationUpdated"]: [ServiceWorker.workerRegistrationUpdatedPayload];
22457 |     ["ServiceWorker.workerVersionUpdated"]: [ServiceWorker.workerVersionUpdatedPayload];
22458 |     ["Storage.cacheStorageContentUpdated"]: [Storage.cacheStorageContentUpdatedPayload];
22459 |     ["Storage.cacheStorageListUpdated"]: [Storage.cacheStorageListUpdatedPayload];
22460 |     ["Storage.indexedDBContentUpdated"]: [Storage.indexedDBContentUpdatedPayload];
22461 |     ["Storage.indexedDBListUpdated"]: [Storage.indexedDBListUpdatedPayload];
22462 |     ["Storage.interestGroupAccessed"]: [Storage.interestGroupAccessedPayload];
22463 |     ["Storage.interestGroupAuctionEventOccurred"]: [Storage.interestGroupAuctionEventOccurredPayload];
22464 |     ["Storage.interestGroupAuctionNetworkRequestCreated"]: [Storage.interestGroupAuctionNetworkRequestCreatedPayload];
22465 |     ["Storage.sharedStorageAccessed"]: [Storage.sharedStorageAccessedPayload];
22466 |     ["Storage.sharedStorageWorkletOperationExecutionFinished"]: [Storage.sharedStorageWorkletOperationExecutionFinishedPayload];
22467 |     ["Storage.storageBucketCreatedOrUpdated"]: [Storage.storageBucketCreatedOrUpdatedPayload];
22468 |     ["Storage.storageBucketDeleted"]: [Storage.storageBucketDeletedPayload];
22469 |     ["Storage.attributionReportingSourceRegistered"]: [Storage.attributionReportingSourceRegisteredPayload];
22470 |     ["Storage.attributionReportingTriggerRegistered"]: [Storage.attributionReportingTriggerRegisteredPayload];
22471 |     ["Storage.attributionReportingReportSent"]: [Storage.attributionReportingReportSentPayload];
22472 |     ["Storage.attributionReportingVerboseDebugReportSent"]: [Storage.attributionReportingVerboseDebugReportSentPayload];
22473 |     ["Target.attachedToTarget"]: [Target.attachedToTargetPayload];
22474 |     ["Target.detachedFromTarget"]: [Target.detachedFromTargetPayload];
22475 |     ["Target.receivedMessageFromTarget"]: [Target.receivedMessageFromTargetPayload];
22476 |     ["Target.targetCreated"]: [Target.targetCreatedPayload];
22477 |     ["Target.targetDestroyed"]: [Target.targetDestroyedPayload];
22478 |     ["Target.targetCrashed"]: [Target.targetCrashedPayload];
22479 |     ["Target.targetInfoChanged"]: [Target.targetInfoChangedPayload];
22480 |     ["Tethering.accepted"]: [Tethering.acceptedPayload];
22481 |     ["Tracing.bufferUsage"]: [Tracing.bufferUsagePayload];
22482 |     ["Tracing.dataCollected"]: [Tracing.dataCollectedPayload];
22483 |     ["Tracing.tracingComplete"]: [Tracing.tracingCompletePayload];
22484 |     ["WebAudio.contextCreated"]: [WebAudio.contextCreatedPayload];
22485 |     ["WebAudio.contextWillBeDestroyed"]: [WebAudio.contextWillBeDestroyedPayload];
22486 |     ["WebAudio.contextChanged"]: [WebAudio.contextChangedPayload];
22487 |     ["WebAudio.audioListenerCreated"]: [WebAudio.audioListenerCreatedPayload];
22488 |     ["WebAudio.audioListenerWillBeDestroyed"]: [WebAudio.audioListenerWillBeDestroyedPayload];
22489 |     ["WebAudio.audioNodeCreated"]: [WebAudio.audioNodeCreatedPayload];
22490 |     ["WebAudio.audioNodeWillBeDestroyed"]: [WebAudio.audioNodeWillBeDestroyedPayload];
22491 |     ["WebAudio.audioParamCreated"]: [WebAudio.audioParamCreatedPayload];
22492 |     ["WebAudio.audioParamWillBeDestroyed"]: [WebAudio.audioParamWillBeDestroyedPayload];
22493 |     ["WebAudio.nodesConnected"]: [WebAudio.nodesConnectedPayload];
22494 |     ["WebAudio.nodesDisconnected"]: [WebAudio.nodesDisconnectedPayload];
22495 |     ["WebAudio.nodeParamConnected"]: [WebAudio.nodeParamConnectedPayload];
22496 |     ["WebAudio.nodeParamDisconnected"]: [WebAudio.nodeParamDisconnectedPayload];
22497 |     ["WebAuthn.credentialAdded"]: [WebAuthn.credentialAddedPayload];
22498 |     ["WebAuthn.credentialDeleted"]: [WebAuthn.credentialDeletedPayload];
22499 |     ["WebAuthn.credentialUpdated"]: [WebAuthn.credentialUpdatedPayload];
22500 |     ["WebAuthn.credentialAsserted"]: [WebAuthn.credentialAssertedPayload];
22501 |     ["Console.messageAdded"]: [Console.messageAddedPayload];
22502 |     ["Debugger.breakpointResolved"]: [Debugger.breakpointResolvedPayload];
22503 |     ["Debugger.paused"]: [Debugger.pausedPayload];
22504 |     ["Debugger.resumed"]: [Debugger.resumedPayload];
22505 |     ["Debugger.scriptFailedToParse"]: [Debugger.scriptFailedToParsePayload];
22506 |     ["Debugger.scriptParsed"]: [Debugger.scriptParsedPayload];
22507 |     ["HeapProfiler.addHeapSnapshotChunk"]: [HeapProfiler.addHeapSnapshotChunkPayload];
22508 |     ["HeapProfiler.heapStatsUpdate"]: [HeapProfiler.heapStatsUpdatePayload];
22509 |     ["HeapProfiler.lastSeenObjectId"]: [HeapProfiler.lastSeenObjectIdPayload];
22510 |     ["HeapProfiler.reportHeapSnapshotProgress"]: [HeapProfiler.reportHeapSnapshotProgressPayload];
22511 |     ["HeapProfiler.resetProfiles"]: [HeapProfiler.resetProfilesPayload];
22512 |     ["Profiler.consoleProfileFinished"]: [Profiler.consoleProfileFinishedPayload];
22513 |     ["Profiler.consoleProfileStarted"]: [Profiler.consoleProfileStartedPayload];
22514 |     ["Profiler.preciseCoverageDeltaUpdate"]: [Profiler.preciseCoverageDeltaUpdatePayload];
22515 |     ["Runtime.bindingCalled"]: [Runtime.bindingCalledPayload];
22516 |     ["Runtime.consoleAPICalled"]: [Runtime.consoleAPICalledPayload];
22517 |     ["Runtime.exceptionRevoked"]: [Runtime.exceptionRevokedPayload];
22518 |     ["Runtime.exceptionThrown"]: [Runtime.exceptionThrownPayload];
22519 |     ["Runtime.executionContextCreated"]: [Runtime.executionContextCreatedPayload];
22520 |     ["Runtime.executionContextDestroyed"]: [Runtime.executionContextDestroyedPayload];
22521 |     ["Runtime.executionContextsCleared"]: [Runtime.executionContextsClearedPayload];
22522 |     ["Runtime.inspectRequested"]: [Runtime.inspectRequestedPayload];
22523 |   }
22524 |   export interface CommandParameters {
22525 |     "Accessibility.disable": Accessibility.disableParameters;
22526 |     "Accessibility.enable": Accessibility.enableParameters;
22527 |     "Accessibility.getPartialAXTree": Accessibility.getPartialAXTreeParameters;
22528 |     "Accessibility.getFullAXTree": Accessibility.getFullAXTreeParameters;
22529 |     "Accessibility.getRootAXNode": Accessibility.getRootAXNodeParameters;
22530 |     "Accessibility.getAXNodeAndAncestors": Accessibility.getAXNodeAndAncestorsParameters;
22531 |     "Accessibility.getChildAXNodes": Accessibility.getChildAXNodesParameters;
22532 |     "Accessibility.queryAXTree": Accessibility.queryAXTreeParameters;
22533 |     "Animation.disable": Animation.disableParameters;
22534 |     "Animation.enable": Animation.enableParameters;
22535 |     "Animation.getCurrentTime": Animation.getCurrentTimeParameters;
22536 |     "Animation.getPlaybackRate": Animation.getPlaybackRateParameters;
22537 |     "Animation.releaseAnimations": Animation.releaseAnimationsParameters;
22538 |     "Animation.resolveAnimation": Animation.resolveAnimationParameters;
22539 |     "Animation.seekAnimations": Animation.seekAnimationsParameters;
22540 |     "Animation.setPaused": Animation.setPausedParameters;
22541 |     "Animation.setPlaybackRate": Animation.setPlaybackRateParameters;
22542 |     "Animation.setTiming": Animation.setTimingParameters;
22543 |     "Audits.getEncodedResponse": Audits.getEncodedResponseParameters;
22544 |     "Audits.disable": Audits.disableParameters;
22545 |     "Audits.enable": Audits.enableParameters;
22546 |     "Audits.checkContrast": Audits.checkContrastParameters;
22547 |     "Audits.checkFormsIssues": Audits.checkFormsIssuesParameters;
22548 |     "Autofill.trigger": Autofill.triggerParameters;
22549 |     "Autofill.setAddresses": Autofill.setAddressesParameters;
22550 |     "Autofill.disable": Autofill.disableParameters;
22551 |     "Autofill.enable": Autofill.enableParameters;
22552 |     "BackgroundService.startObserving": BackgroundService.startObservingParameters;
22553 |     "BackgroundService.stopObserving": BackgroundService.stopObservingParameters;
22554 |     "BackgroundService.setRecording": BackgroundService.setRecordingParameters;
22555 |     "BackgroundService.clearEvents": BackgroundService.clearEventsParameters;
22556 |     "BluetoothEmulation.enable": BluetoothEmulation.enableParameters;
22557 |     "BluetoothEmulation.setSimulatedCentralState": BluetoothEmulation.setSimulatedCentralStateParameters;
22558 |     "BluetoothEmulation.disable": BluetoothEmulation.disableParameters;
22559 |     "BluetoothEmulation.simulatePreconnectedPeripheral": BluetoothEmulation.simulatePreconnectedPeripheralParameters;
22560 |     "BluetoothEmulation.simulateAdvertisement": BluetoothEmulation.simulateAdvertisementParameters;
22561 |     "BluetoothEmulation.simulateGATTOperationResponse": BluetoothEmulation.simulateGATTOperationResponseParameters;
22562 |     "BluetoothEmulation.simulateCharacteristicOperationResponse": BluetoothEmulation.simulateCharacteristicOperationResponseParameters;
22563 |     "BluetoothEmulation.simulateDescriptorOperationResponse": BluetoothEmulation.simulateDescriptorOperationResponseParameters;
22564 |     "BluetoothEmulation.addService": BluetoothEmulation.addServiceParameters;
22565 |     "BluetoothEmulation.removeService": BluetoothEmulation.removeServiceParameters;
22566 |     "BluetoothEmulation.addCharacteristic": BluetoothEmulation.addCharacteristicParameters;
22567 |     "BluetoothEmulation.removeCharacteristic": BluetoothEmulation.removeCharacteristicParameters;
22568 |     "BluetoothEmulation.addDescriptor": BluetoothEmulation.addDescriptorParameters;
22569 |     "BluetoothEmulation.removeDescriptor": BluetoothEmulation.removeDescriptorParameters;
22570 |     "BluetoothEmulation.simulateGATTDisconnection": BluetoothEmulation.simulateGATTDisconnectionParameters;
22571 |     "Browser.setPermission": Browser.setPermissionParameters;
22572 |     "Browser.grantPermissions": Browser.grantPermissionsParameters;
22573 |     "Browser.resetPermissions": Browser.resetPermissionsParameters;
22574 |     "Browser.setDownloadBehavior": Browser.setDownloadBehaviorParameters;
22575 |     "Browser.cancelDownload": Browser.cancelDownloadParameters;
22576 |     "Browser.close": Browser.closeParameters;
22577 |     "Browser.crash": Browser.crashParameters;
22578 |     "Browser.crashGpuProcess": Browser.crashGpuProcessParameters;
22579 |     "Browser.getVersion": Browser.getVersionParameters;
22580 |     "Browser.getBrowserCommandLine": Browser.getBrowserCommandLineParameters;
22581 |     "Browser.getHistograms": Browser.getHistogramsParameters;
22582 |     "Browser.getHistogram": Browser.getHistogramParameters;
22583 |     "Browser.getWindowBounds": Browser.getWindowBoundsParameters;
22584 |     "Browser.getWindowForTarget": Browser.getWindowForTargetParameters;
22585 |     "Browser.setWindowBounds": Browser.setWindowBoundsParameters;
22586 |     "Browser.setContentsSize": Browser.setContentsSizeParameters;
22587 |     "Browser.setDockTile": Browser.setDockTileParameters;
22588 |     "Browser.executeBrowserCommand": Browser.executeBrowserCommandParameters;
22589 |     "Browser.addPrivacySandboxEnrollmentOverride": Browser.addPrivacySandboxEnrollmentOverrideParameters;
22590 |     "Browser.addPrivacySandboxCoordinatorKeyConfig": Browser.addPrivacySandboxCoordinatorKeyConfigParameters;
22591 |     "CSS.addRule": CSS.addRuleParameters;
22592 |     "CSS.collectClassNames": CSS.collectClassNamesParameters;
22593 |     "CSS.createStyleSheet": CSS.createStyleSheetParameters;
22594 |     "CSS.disable": CSS.disableParameters;
22595 |     "CSS.enable": CSS.enableParameters;
22596 |     "CSS.forcePseudoState": CSS.forcePseudoStateParameters;
22597 |     "CSS.forceStartingStyle": CSS.forceStartingStyleParameters;
22598 |     "CSS.getBackgroundColors": CSS.getBackgroundColorsParameters;
22599 |     "CSS.getComputedStyleForNode": CSS.getComputedStyleForNodeParameters;
22600 |     "CSS.resolveValues": CSS.resolveValuesParameters;
22601 |     "CSS.getLonghandProperties": CSS.getLonghandPropertiesParameters;
22602 |     "CSS.getInlineStylesForNode": CSS.getInlineStylesForNodeParameters;
22603 |     "CSS.getAnimatedStylesForNode": CSS.getAnimatedStylesForNodeParameters;
22604 |     "CSS.getMatchedStylesForNode": CSS.getMatchedStylesForNodeParameters;
22605 |     "CSS.getEnvironmentVariables": CSS.getEnvironmentVariablesParameters;
22606 |     "CSS.getMediaQueries": CSS.getMediaQueriesParameters;
22607 |     "CSS.getPlatformFontsForNode": CSS.getPlatformFontsForNodeParameters;
22608 |     "CSS.getStyleSheetText": CSS.getStyleSheetTextParameters;
22609 |     "CSS.getLayersForNode": CSS.getLayersForNodeParameters;
22610 |     "CSS.getLocationForSelector": CSS.getLocationForSelectorParameters;
22611 |     "CSS.trackComputedStyleUpdatesForNode": CSS.trackComputedStyleUpdatesForNodeParameters;
22612 |     "CSS.trackComputedStyleUpdates": CSS.trackComputedStyleUpdatesParameters;
22613 |     "CSS.takeComputedStyleUpdates": CSS.takeComputedStyleUpdatesParameters;
22614 |     "CSS.setEffectivePropertyValueForNode": CSS.setEffectivePropertyValueForNodeParameters;
22615 |     "CSS.setPropertyRulePropertyName": CSS.setPropertyRulePropertyNameParameters;
22616 |     "CSS.setKeyframeKey": CSS.setKeyframeKeyParameters;
22617 |     "CSS.setMediaText": CSS.setMediaTextParameters;
22618 |     "CSS.setContainerQueryText": CSS.setContainerQueryTextParameters;
22619 |     "CSS.setSupportsText": CSS.setSupportsTextParameters;
22620 |     "CSS.setScopeText": CSS.setScopeTextParameters;
22621 |     "CSS.setRuleSelector": CSS.setRuleSelectorParameters;
22622 |     "CSS.setStyleSheetText": CSS.setStyleSheetTextParameters;
22623 |     "CSS.setStyleTexts": CSS.setStyleTextsParameters;
22624 |     "CSS.startRuleUsageTracking": CSS.startRuleUsageTrackingParameters;
22625 |     "CSS.stopRuleUsageTracking": CSS.stopRuleUsageTrackingParameters;
22626 |     "CSS.takeCoverageDelta": CSS.takeCoverageDeltaParameters;
22627 |     "CSS.setLocalFontsEnabled": CSS.setLocalFontsEnabledParameters;
22628 |     "CacheStorage.deleteCache": CacheStorage.deleteCacheParameters;
22629 |     "CacheStorage.deleteEntry": CacheStorage.deleteEntryParameters;
22630 |     "CacheStorage.requestCacheNames": CacheStorage.requestCacheNamesParameters;
22631 |     "CacheStorage.requestCachedResponse": CacheStorage.requestCachedResponseParameters;
22632 |     "CacheStorage.requestEntries": CacheStorage.requestEntriesParameters;
22633 |     "Cast.enable": Cast.enableParameters;
22634 |     "Cast.disable": Cast.disableParameters;
22635 |     "Cast.setSinkToUse": Cast.setSinkToUseParameters;
22636 |     "Cast.startDesktopMirroring": Cast.startDesktopMirroringParameters;
22637 |     "Cast.startTabMirroring": Cast.startTabMirroringParameters;
22638 |     "Cast.stopCasting": Cast.stopCastingParameters;
22639 |     "DOM.collectClassNamesFromSubtree": DOM.collectClassNamesFromSubtreeParameters;
22640 |     "DOM.copyTo": DOM.copyToParameters;
22641 |     "DOM.describeNode": DOM.describeNodeParameters;
22642 |     "DOM.scrollIntoViewIfNeeded": DOM.scrollIntoViewIfNeededParameters;
22643 |     "DOM.disable": DOM.disableParameters;
22644 |     "DOM.discardSearchResults": DOM.discardSearchResultsParameters;
22645 |     "DOM.enable": DOM.enableParameters;
22646 |     "DOM.focus": DOM.focusParameters;
22647 |     "DOM.getAttributes": DOM.getAttributesParameters;
22648 |     "DOM.getBoxModel": DOM.getBoxModelParameters;
22649 |     "DOM.getContentQuads": DOM.getContentQuadsParameters;
22650 |     "DOM.getDocument": DOM.getDocumentParameters;
22651 |     "DOM.getFlattenedDocument": DOM.getFlattenedDocumentParameters;
22652 |     "DOM.getNodesForSubtreeByStyle": DOM.getNodesForSubtreeByStyleParameters;
22653 |     "DOM.getNodeForLocation": DOM.getNodeForLocationParameters;
22654 |     "DOM.getOuterHTML": DOM.getOuterHTMLParameters;
22655 |     "DOM.getRelayoutBoundary": DOM.getRelayoutBoundaryParameters;
22656 |     "DOM.getSearchResults": DOM.getSearchResultsParameters;
22657 |     "DOM.hideHighlight": DOM.hideHighlightParameters;
22658 |     "DOM.highlightNode": DOM.highlightNodeParameters;
22659 |     "DOM.highlightRect": DOM.highlightRectParameters;
22660 |     "DOM.markUndoableState": DOM.markUndoableStateParameters;
22661 |     "DOM.moveTo": DOM.moveToParameters;
22662 |     "DOM.performSearch": DOM.performSearchParameters;
22663 |     "DOM.pushNodeByPathToFrontend": DOM.pushNodeByPathToFrontendParameters;
22664 |     "DOM.pushNodesByBackendIdsToFrontend": DOM.pushNodesByBackendIdsToFrontendParameters;
22665 |     "DOM.querySelector": DOM.querySelectorParameters;
22666 |     "DOM.querySelectorAll": DOM.querySelectorAllParameters;
22667 |     "DOM.getTopLayerElements": DOM.getTopLayerElementsParameters;
22668 |     "DOM.getElementByRelation": DOM.getElementByRelationParameters;
22669 |     "DOM.redo": DOM.redoParameters;
22670 |     "DOM.removeAttribute": DOM.removeAttributeParameters;
22671 |     "DOM.removeNode": DOM.removeNodeParameters;
22672 |     "DOM.requestChildNodes": DOM.requestChildNodesParameters;
22673 |     "DOM.requestNode": DOM.requestNodeParameters;
22674 |     "DOM.resolveNode": DOM.resolveNodeParameters;
22675 |     "DOM.setAttributeValue": DOM.setAttributeValueParameters;
22676 |     "DOM.setAttributesAsText": DOM.setAttributesAsTextParameters;
22677 |     "DOM.setFileInputFiles": DOM.setFileInputFilesParameters;
22678 |     "DOM.setNodeStackTracesEnabled": DOM.setNodeStackTracesEnabledParameters;
22679 |     "DOM.getNodeStackTraces": DOM.getNodeStackTracesParameters;
22680 |     "DOM.getFileInfo": DOM.getFileInfoParameters;
22681 |     "DOM.getDetachedDomNodes": DOM.getDetachedDomNodesParameters;
22682 |     "DOM.setInspectedNode": DOM.setInspectedNodeParameters;
22683 |     "DOM.setNodeName": DOM.setNodeNameParameters;
22684 |     "DOM.setNodeValue": DOM.setNodeValueParameters;
22685 |     "DOM.setOuterHTML": DOM.setOuterHTMLParameters;
22686 |     "DOM.undo": DOM.undoParameters;
22687 |     "DOM.getFrameOwner": DOM.getFrameOwnerParameters;
22688 |     "DOM.getContainerForNode": DOM.getContainerForNodeParameters;
22689 |     "DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerParameters;
22690 |     "DOM.getAnchorElement": DOM.getAnchorElementParameters;
22691 |     "DOM.forceShowPopover": DOM.forceShowPopoverParameters;
22692 |     "DOMDebugger.getEventListeners": DOMDebugger.getEventListenersParameters;
22693 |     "DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointParameters;
22694 |     "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointParameters;
22695 |     "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointParameters;
22696 |     "DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointParameters;
22697 |     "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationParameters;
22698 |     "DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointParameters;
22699 |     "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointParameters;
22700 |     "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointParameters;
22701 |     "DOMDebugger.setXHRBreakpoint": DOMDebugger.setXHRBreakpointParameters;
22702 |     "DOMSnapshot.disable": DOMSnapshot.disableParameters;
22703 |     "DOMSnapshot.enable": DOMSnapshot.enableParameters;
22704 |     "DOMSnapshot.getSnapshot": DOMSnapshot.getSnapshotParameters;
22705 |     "DOMSnapshot.captureSnapshot": DOMSnapshot.captureSnapshotParameters;
22706 |     "DOMStorage.clear": DOMStorage.clearParameters;
22707 |     "DOMStorage.disable": DOMStorage.disableParameters;
22708 |     "DOMStorage.enable": DOMStorage.enableParameters;
22709 |     "DOMStorage.getDOMStorageItems": DOMStorage.getDOMStorageItemsParameters;
22710 |     "DOMStorage.removeDOMStorageItem": DOMStorage.removeDOMStorageItemParameters;
22711 |     "DOMStorage.setDOMStorageItem": DOMStorage.setDOMStorageItemParameters;
22712 |     "DeviceAccess.enable": DeviceAccess.enableParameters;
22713 |     "DeviceAccess.disable": DeviceAccess.disableParameters;
22714 |     "DeviceAccess.selectPrompt": DeviceAccess.selectPromptParameters;
22715 |     "DeviceAccess.cancelPrompt": DeviceAccess.cancelPromptParameters;
22716 |     "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.clearDeviceOrientationOverrideParameters;
22717 |     "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.setDeviceOrientationOverrideParameters;
22718 |     "Emulation.canEmulate": Emulation.canEmulateParameters;
22719 |     "Emulation.clearDeviceMetricsOverride": Emulation.clearDeviceMetricsOverrideParameters;
22720 |     "Emulation.clearGeolocationOverride": Emulation.clearGeolocationOverrideParameters;
22721 |     "Emulation.resetPageScaleFactor": Emulation.resetPageScaleFactorParameters;
22722 |     "Emulation.setFocusEmulationEnabled": Emulation.setFocusEmulationEnabledParameters;
22723 |     "Emulation.setAutoDarkModeOverride": Emulation.setAutoDarkModeOverrideParameters;
22724 |     "Emulation.setCPUThrottlingRate": Emulation.setCPUThrottlingRateParameters;
22725 |     "Emulation.setDefaultBackgroundColorOverride": Emulation.setDefaultBackgroundColorOverrideParameters;
22726 |     "Emulation.setSafeAreaInsetsOverride": Emulation.setSafeAreaInsetsOverrideParameters;
22727 |     "Emulation.setDeviceMetricsOverride": Emulation.setDeviceMetricsOverrideParameters;
22728 |     "Emulation.setDevicePostureOverride": Emulation.setDevicePostureOverrideParameters;
22729 |     "Emulation.clearDevicePostureOverride": Emulation.clearDevicePostureOverrideParameters;
22730 |     "Emulation.setDisplayFeaturesOverride": Emulation.setDisplayFeaturesOverrideParameters;
22731 |     "Emulation.clearDisplayFeaturesOverride": Emulation.clearDisplayFeaturesOverrideParameters;
22732 |     "Emulation.setScrollbarsHidden": Emulation.setScrollbarsHiddenParameters;
22733 |     "Emulation.setDocumentCookieDisabled": Emulation.setDocumentCookieDisabledParameters;
22734 |     "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseParameters;
22735 |     "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaParameters;
22736 |     "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyParameters;
22737 |     "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleParameters;
22738 |     "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideParameters;
22739 |     "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationParameters;
22740 |     "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledParameters;
22741 |     "Emulation.setSensorOverrideReadings": Emulation.setSensorOverrideReadingsParameters;
22742 |     "Emulation.setPressureSourceOverrideEnabled": Emulation.setPressureSourceOverrideEnabledParameters;
22743 |     "Emulation.setPressureStateOverride": Emulation.setPressureStateOverrideParameters;
22744 |     "Emulation.setPressureDataOverride": Emulation.setPressureDataOverrideParameters;
22745 |     "Emulation.setIdleOverride": Emulation.setIdleOverrideParameters;
22746 |     "Emulation.clearIdleOverride": Emulation.clearIdleOverrideParameters;
22747 |     "Emulation.setNavigatorOverrides": Emulation.setNavigatorOverridesParameters;
22748 |     "Emulation.setPageScaleFactor": Emulation.setPageScaleFactorParameters;
22749 |     "Emulation.setScriptExecutionDisabled": Emulation.setScriptExecutionDisabledParameters;
22750 |     "Emulation.setTouchEmulationEnabled": Emulation.setTouchEmulationEnabledParameters;
22751 |     "Emulation.setVirtualTimePolicy": Emulation.setVirtualTimePolicyParameters;
22752 |     "Emulation.setLocaleOverride": Emulation.setLocaleOverrideParameters;
22753 |     "Emulation.setTimezoneOverride": Emulation.setTimezoneOverrideParameters;
22754 |     "Emulation.setVisibleSize": Emulation.setVisibleSizeParameters;
22755 |     "Emulation.setDisabledImageTypes": Emulation.setDisabledImageTypesParameters;
22756 |     "Emulation.setDataSaverOverride": Emulation.setDataSaverOverrideParameters;
22757 |     "Emulation.setHardwareConcurrencyOverride": Emulation.setHardwareConcurrencyOverrideParameters;
22758 |     "Emulation.setUserAgentOverride": Emulation.setUserAgentOverrideParameters;
22759 |     "Emulation.setAutomationOverride": Emulation.setAutomationOverrideParameters;
22760 |     "Emulation.setSmallViewportHeightDifferenceOverride": Emulation.setSmallViewportHeightDifferenceOverrideParameters;
22761 |     "Emulation.getScreenInfos": Emulation.getScreenInfosParameters;
22762 |     "Emulation.addScreen": Emulation.addScreenParameters;
22763 |     "Emulation.removeScreen": Emulation.removeScreenParameters;
22764 |     "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.setInstrumentationBreakpointParameters;
22765 |     "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.removeInstrumentationBreakpointParameters;
22766 |     "EventBreakpoints.disable": EventBreakpoints.disableParameters;
22767 |     "Extensions.loadUnpacked": Extensions.loadUnpackedParameters;
22768 |     "Extensions.uninstall": Extensions.uninstallParameters;
22769 |     "Extensions.getStorageItems": Extensions.getStorageItemsParameters;
22770 |     "Extensions.removeStorageItems": Extensions.removeStorageItemsParameters;
22771 |     "Extensions.clearStorageItems": Extensions.clearStorageItemsParameters;
22772 |     "Extensions.setStorageItems": Extensions.setStorageItemsParameters;
22773 |     "FedCm.enable": FedCm.enableParameters;
22774 |     "FedCm.disable": FedCm.disableParameters;
22775 |     "FedCm.selectAccount": FedCm.selectAccountParameters;
22776 |     "FedCm.clickDialogButton": FedCm.clickDialogButtonParameters;
22777 |     "FedCm.openUrl": FedCm.openUrlParameters;
22778 |     "FedCm.dismissDialog": FedCm.dismissDialogParameters;
22779 |     "FedCm.resetCooldown": FedCm.resetCooldownParameters;
22780 |     "Fetch.disable": Fetch.disableParameters;
22781 |     "Fetch.enable": Fetch.enableParameters;
22782 |     "Fetch.failRequest": Fetch.failRequestParameters;
22783 |     "Fetch.fulfillRequest": Fetch.fulfillRequestParameters;
22784 |     "Fetch.continueRequest": Fetch.continueRequestParameters;
22785 |     "Fetch.continueWithAuth": Fetch.continueWithAuthParameters;
22786 |     "Fetch.continueResponse": Fetch.continueResponseParameters;
22787 |     "Fetch.getResponseBody": Fetch.getResponseBodyParameters;
22788 |     "Fetch.takeResponseBodyAsStream": Fetch.takeResponseBodyAsStreamParameters;
22789 |     "FileSystem.getDirectory": FileSystem.getDirectoryParameters;
22790 |     "HeadlessExperimental.beginFrame": HeadlessExperimental.beginFrameParameters;
22791 |     "HeadlessExperimental.disable": HeadlessExperimental.disableParameters;
22792 |     "HeadlessExperimental.enable": HeadlessExperimental.enableParameters;
22793 |     "IO.close": IO.closeParameters;
22794 |     "IO.read": IO.readParameters;
22795 |     "IO.resolveBlob": IO.resolveBlobParameters;
22796 |     "IndexedDB.clearObjectStore": IndexedDB.clearObjectStoreParameters;
22797 |     "IndexedDB.deleteDatabase": IndexedDB.deleteDatabaseParameters;
22798 |     "IndexedDB.deleteObjectStoreEntries": IndexedDB.deleteObjectStoreEntriesParameters;
22799 |     "IndexedDB.disable": IndexedDB.disableParameters;
22800 |     "IndexedDB.enable": IndexedDB.enableParameters;
22801 |     "IndexedDB.requestData": IndexedDB.requestDataParameters;
22802 |     "IndexedDB.getMetadata": IndexedDB.getMetadataParameters;
22803 |     "IndexedDB.requestDatabase": IndexedDB.requestDatabaseParameters;
22804 |     "IndexedDB.requestDatabaseNames": IndexedDB.requestDatabaseNamesParameters;
22805 |     "Input.dispatchDragEvent": Input.dispatchDragEventParameters;
22806 |     "Input.dispatchKeyEvent": Input.dispatchKeyEventParameters;
22807 |     "Input.insertText": Input.insertTextParameters;
22808 |     "Input.imeSetComposition": Input.imeSetCompositionParameters;
22809 |     "Input.dispatchMouseEvent": Input.dispatchMouseEventParameters;
22810 |     "Input.dispatchTouchEvent": Input.dispatchTouchEventParameters;
22811 |     "Input.cancelDragging": Input.cancelDraggingParameters;
22812 |     "Input.emulateTouchFromMouseEvent": Input.emulateTouchFromMouseEventParameters;
22813 |     "Input.setIgnoreInputEvents": Input.setIgnoreInputEventsParameters;
22814 |     "Input.setInterceptDrags": Input.setInterceptDragsParameters;
22815 |     "Input.synthesizePinchGesture": Input.synthesizePinchGestureParameters;
22816 |     "Input.synthesizeScrollGesture": Input.synthesizeScrollGestureParameters;
22817 |     "Input.synthesizeTapGesture": Input.synthesizeTapGestureParameters;
22818 |     "Inspector.disable": Inspector.disableParameters;
22819 |     "Inspector.enable": Inspector.enableParameters;
22820 |     "LayerTree.compositingReasons": LayerTree.compositingReasonsParameters;
22821 |     "LayerTree.disable": LayerTree.disableParameters;
22822 |     "LayerTree.enable": LayerTree.enableParameters;
22823 |     "LayerTree.loadSnapshot": LayerTree.loadSnapshotParameters;
22824 |     "LayerTree.makeSnapshot": LayerTree.makeSnapshotParameters;
22825 |     "LayerTree.profileSnapshot": LayerTree.profileSnapshotParameters;
22826 |     "LayerTree.releaseSnapshot": LayerTree.releaseSnapshotParameters;
22827 |     "LayerTree.replaySnapshot": LayerTree.replaySnapshotParameters;
22828 |     "LayerTree.snapshotCommandLog": LayerTree.snapshotCommandLogParameters;
22829 |     "Log.clear": Log.clearParameters;
22830 |     "Log.disable": Log.disableParameters;
22831 |     "Log.enable": Log.enableParameters;
22832 |     "Log.startViolationsReport": Log.startViolationsReportParameters;
22833 |     "Log.stopViolationsReport": Log.stopViolationsReportParameters;
22834 |     "Media.enable": Media.enableParameters;
22835 |     "Media.disable": Media.disableParameters;
22836 |     "Memory.getDOMCounters": Memory.getDOMCountersParameters;
22837 |     "Memory.getDOMCountersForLeakDetection": Memory.getDOMCountersForLeakDetectionParameters;
22838 |     "Memory.prepareForLeakDetection": Memory.prepareForLeakDetectionParameters;
22839 |     "Memory.forciblyPurgeJavaScriptMemory": Memory.forciblyPurgeJavaScriptMemoryParameters;
22840 |     "Memory.setPressureNotificationsSuppressed": Memory.setPressureNotificationsSuppressedParameters;
22841 |     "Memory.simulatePressureNotification": Memory.simulatePressureNotificationParameters;
22842 |     "Memory.startSampling": Memory.startSamplingParameters;
22843 |     "Memory.stopSampling": Memory.stopSamplingParameters;
22844 |     "Memory.getAllTimeSamplingProfile": Memory.getAllTimeSamplingProfileParameters;
22845 |     "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileParameters;
22846 |     "Memory.getSamplingProfile": Memory.getSamplingProfileParameters;
22847 |     "Network.setAcceptedEncodings": Network.setAcceptedEncodingsParameters;
22848 |     "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideParameters;
22849 |     "Network.canClearBrowserCache": Network.canClearBrowserCacheParameters;
22850 |     "Network.canClearBrowserCookies": Network.canClearBrowserCookiesParameters;
22851 |     "Network.canEmulateNetworkConditions": Network.canEmulateNetworkConditionsParameters;
22852 |     "Network.clearBrowserCache": Network.clearBrowserCacheParameters;
22853 |     "Network.clearBrowserCookies": Network.clearBrowserCookiesParameters;
22854 |     "Network.continueInterceptedRequest": Network.continueInterceptedRequestParameters;
22855 |     "Network.deleteCookies": Network.deleteCookiesParameters;
22856 |     "Network.disable": Network.disableParameters;
22857 |     "Network.emulateNetworkConditions": Network.emulateNetworkConditionsParameters;
22858 |     "Network.emulateNetworkConditionsByRule": Network.emulateNetworkConditionsByRuleParameters;
22859 |     "Network.overrideNetworkState": Network.overrideNetworkStateParameters;
22860 |     "Network.enable": Network.enableParameters;
22861 |     "Network.configureDurableMessages": Network.configureDurableMessagesParameters;
22862 |     "Network.getAllCookies": Network.getAllCookiesParameters;
22863 |     "Network.getCertificate": Network.getCertificateParameters;
22864 |     "Network.getCookies": Network.getCookiesParameters;
22865 |     "Network.getResponseBody": Network.getResponseBodyParameters;
22866 |     "Network.getRequestPostData": Network.getRequestPostDataParameters;
22867 |     "Network.getResponseBodyForInterception": Network.getResponseBodyForInterceptionParameters;
22868 |     "Network.takeResponseBodyForInterceptionAsStream": Network.takeResponseBodyForInterceptionAsStreamParameters;
22869 |     "Network.replayXHR": Network.replayXHRParameters;
22870 |     "Network.searchInResponseBody": Network.searchInResponseBodyParameters;
22871 |     "Network.setBlockedURLs": Network.setBlockedURLsParameters;
22872 |     "Network.setBypassServiceWorker": Network.setBypassServiceWorkerParameters;
22873 |     "Network.setCacheDisabled": Network.setCacheDisabledParameters;
22874 |     "Network.setCookie": Network.setCookieParameters;
22875 |     "Network.setCookies": Network.setCookiesParameters;
22876 |     "Network.setExtraHTTPHeaders": Network.setExtraHTTPHeadersParameters;
22877 |     "Network.setAttachDebugStack": Network.setAttachDebugStackParameters;
22878 |     "Network.setRequestInterception": Network.setRequestInterceptionParameters;
22879 |     "Network.setUserAgentOverride": Network.setUserAgentOverrideParameters;
22880 |     "Network.streamResourceContent": Network.streamResourceContentParameters;
22881 |     "Network.getSecurityIsolationStatus": Network.getSecurityIsolationStatusParameters;
22882 |     "Network.enableReportingApi": Network.enableReportingApiParameters;
22883 |     "Network.enableDeviceBoundSessions": Network.enableDeviceBoundSessionsParameters;
22884 |     "Network.fetchSchemefulSite": Network.fetchSchemefulSiteParameters;
22885 |     "Network.loadNetworkResource": Network.loadNetworkResourceParameters;
22886 |     "Network.setCookieControls": Network.setCookieControlsParameters;
22887 |     "Overlay.disable": Overlay.disableParameters;
22888 |     "Overlay.enable": Overlay.enableParameters;
22889 |     "Overlay.getHighlightObjectForTest": Overlay.getHighlightObjectForTestParameters;
22890 |     "Overlay.getGridHighlightObjectsForTest": Overlay.getGridHighlightObjectsForTestParameters;
22891 |     "Overlay.getSourceOrderHighlightObjectForTest": Overlay.getSourceOrderHighlightObjectForTestParameters;
22892 |     "Overlay.hideHighlight": Overlay.hideHighlightParameters;
22893 |     "Overlay.highlightFrame": Overlay.highlightFrameParameters;
22894 |     "Overlay.highlightNode": Overlay.highlightNodeParameters;
22895 |     "Overlay.highlightQuad": Overlay.highlightQuadParameters;
22896 |     "Overlay.highlightRect": Overlay.highlightRectParameters;
22897 |     "Overlay.highlightSourceOrder": Overlay.highlightSourceOrderParameters;
22898 |     "Overlay.setInspectMode": Overlay.setInspectModeParameters;
22899 |     "Overlay.setShowAdHighlights": Overlay.setShowAdHighlightsParameters;
22900 |     "Overlay.setPausedInDebuggerMessage": Overlay.setPausedInDebuggerMessageParameters;
22901 |     "Overlay.setShowDebugBorders": Overlay.setShowDebugBordersParameters;
22902 |     "Overlay.setShowFPSCounter": Overlay.setShowFPSCounterParameters;
22903 |     "Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysParameters;
22904 |     "Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysParameters;
22905 |     "Overlay.setShowScrollSnapOverlays": Overlay.setShowScrollSnapOverlaysParameters;
22906 |     "Overlay.setShowContainerQueryOverlays": Overlay.setShowContainerQueryOverlaysParameters;
22907 |     "Overlay.setShowPaintRects": Overlay.setShowPaintRectsParameters;
22908 |     "Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsParameters;
22909 |     "Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsParameters;
22910 |     "Overlay.setShowHitTestBorders": Overlay.setShowHitTestBordersParameters;
22911 |     "Overlay.setShowWebVitals": Overlay.setShowWebVitalsParameters;
22912 |     "Overlay.setShowViewportSizeOnResize": Overlay.setShowViewportSizeOnResizeParameters;
22913 |     "Overlay.setShowHinge": Overlay.setShowHingeParameters;
22914 |     "Overlay.setShowIsolatedElements": Overlay.setShowIsolatedElementsParameters;
22915 |     "Overlay.setShowWindowControlsOverlay": Overlay.setShowWindowControlsOverlayParameters;
22916 |     "PWA.getOsAppState": PWA.getOsAppStateParameters;
22917 |     "PWA.install": PWA.installParameters;
22918 |     "PWA.uninstall": PWA.uninstallParameters;
22919 |     "PWA.launch": PWA.launchParameters;
22920 |     "PWA.launchFilesInApp": PWA.launchFilesInAppParameters;
22921 |     "PWA.openCurrentPageInApp": PWA.openCurrentPageInAppParameters;
22922 |     "PWA.changeAppUserSettings": PWA.changeAppUserSettingsParameters;
22923 |     "Page.addScriptToEvaluateOnLoad": Page.addScriptToEvaluateOnLoadParameters;
22924 |     "Page.addScriptToEvaluateOnNewDocument": Page.addScriptToEvaluateOnNewDocumentParameters;
22925 |     "Page.bringToFront": Page.bringToFrontParameters;
22926 |     "Page.captureScreenshot": Page.captureScreenshotParameters;
22927 |     "Page.captureSnapshot": Page.captureSnapshotParameters;
22928 |     "Page.clearDeviceMetricsOverride": Page.clearDeviceMetricsOverrideParameters;
22929 |     "Page.clearDeviceOrientationOverride": Page.clearDeviceOrientationOverrideParameters;
22930 |     "Page.clearGeolocationOverride": Page.clearGeolocationOverrideParameters;
22931 |     "Page.createIsolatedWorld": Page.createIsolatedWorldParameters;
22932 |     "Page.deleteCookie": Page.deleteCookieParameters;
22933 |     "Page.disable": Page.disableParameters;
22934 |     "Page.enable": Page.enableParameters;
22935 |     "Page.getAppManifest": Page.getAppManifestParameters;
22936 |     "Page.getInstallabilityErrors": Page.getInstallabilityErrorsParameters;
22937 |     "Page.getManifestIcons": Page.getManifestIconsParameters;
22938 |     "Page.getAppId": Page.getAppIdParameters;
22939 |     "Page.getAdScriptAncestry": Page.getAdScriptAncestryParameters;
22940 |     "Page.getFrameTree": Page.getFrameTreeParameters;
22941 |     "Page.getLayoutMetrics": Page.getLayoutMetricsParameters;
22942 |     "Page.getNavigationHistory": Page.getNavigationHistoryParameters;
22943 |     "Page.resetNavigationHistory": Page.resetNavigationHistoryParameters;
22944 |     "Page.getResourceContent": Page.getResourceContentParameters;
22945 |     "Page.getResourceTree": Page.getResourceTreeParameters;
22946 |     "Page.handleJavaScriptDialog": Page.handleJavaScriptDialogParameters;
22947 |     "Page.navigate": Page.navigateParameters;
22948 |     "Page.navigateToHistoryEntry": Page.navigateToHistoryEntryParameters;
22949 |     "Page.printToPDF": Page.printToPDFParameters;
22950 |     "Page.reload": Page.reloadParameters;
22951 |     "Page.removeScriptToEvaluateOnLoad": Page.removeScriptToEvaluateOnLoadParameters;
22952 |     "Page.removeScriptToEvaluateOnNewDocument": Page.removeScriptToEvaluateOnNewDocumentParameters;
22953 |     "Page.screencastFrameAck": Page.screencastFrameAckParameters;
22954 |     "Page.searchInResource": Page.searchInResourceParameters;
22955 |     "Page.setAdBlockingEnabled": Page.setAdBlockingEnabledParameters;
22956 |     "Page.setBypassCSP": Page.setBypassCSPParameters;
22957 |     "Page.getPermissionsPolicyState": Page.getPermissionsPolicyStateParameters;
22958 |     "Page.getOriginTrials": Page.getOriginTrialsParameters;
22959 |     "Page.setDeviceMetricsOverride": Page.setDeviceMetricsOverrideParameters;
22960 |     "Page.setDeviceOrientationOverride": Page.setDeviceOrientationOverrideParameters;
22961 |     "Page.setFontFamilies": Page.setFontFamiliesParameters;
22962 |     "Page.setFontSizes": Page.setFontSizesParameters;
22963 |     "Page.setDocumentContent": Page.setDocumentContentParameters;
22964 |     "Page.setDownloadBehavior": Page.setDownloadBehaviorParameters;
22965 |     "Page.setGeolocationOverride": Page.setGeolocationOverrideParameters;
22966 |     "Page.setLifecycleEventsEnabled": Page.setLifecycleEventsEnabledParameters;
22967 |     "Page.setTouchEmulationEnabled": Page.setTouchEmulationEnabledParameters;
22968 |     "Page.startScreencast": Page.startScreencastParameters;
22969 |     "Page.stopLoading": Page.stopLoadingParameters;
22970 |     "Page.crash": Page.crashParameters;
22971 |     "Page.close": Page.closeParameters;
22972 |     "Page.setWebLifecycleState": Page.setWebLifecycleStateParameters;
22973 |     "Page.stopScreencast": Page.stopScreencastParameters;
22974 |     "Page.produceCompilationCache": Page.produceCompilationCacheParameters;
22975 |     "Page.addCompilationCache": Page.addCompilationCacheParameters;
22976 |     "Page.clearCompilationCache": Page.clearCompilationCacheParameters;
22977 |     "Page.setSPCTransactionMode": Page.setSPCTransactionModeParameters;
22978 |     "Page.setRPHRegistrationMode": Page.setRPHRegistrationModeParameters;
22979 |     "Page.generateTestReport": Page.generateTestReportParameters;
22980 |     "Page.waitForDebugger": Page.waitForDebuggerParameters;
22981 |     "Page.setInterceptFileChooserDialog": Page.setInterceptFileChooserDialogParameters;
22982 |     "Page.setPrerenderingAllowed": Page.setPrerenderingAllowedParameters;
22983 |     "Page.getAnnotatedPageContent": Page.getAnnotatedPageContentParameters;
22984 |     "Performance.disable": Performance.disableParameters;
22985 |     "Performance.enable": Performance.enableParameters;
22986 |     "Performance.setTimeDomain": Performance.setTimeDomainParameters;
22987 |     "Performance.getMetrics": Performance.getMetricsParameters;
22988 |     "PerformanceTimeline.enable": PerformanceTimeline.enableParameters;
22989 |     "Preload.enable": Preload.enableParameters;
22990 |     "Preload.disable": Preload.disableParameters;
22991 |     "Security.disable": Security.disableParameters;
22992 |     "Security.enable": Security.enableParameters;
22993 |     "Security.setIgnoreCertificateErrors": Security.setIgnoreCertificateErrorsParameters;
22994 |     "Security.handleCertificateError": Security.handleCertificateErrorParameters;
22995 |     "Security.setOverrideCertificateErrors": Security.setOverrideCertificateErrorsParameters;
22996 |     "ServiceWorker.deliverPushMessage": ServiceWorker.deliverPushMessageParameters;
22997 |     "ServiceWorker.disable": ServiceWorker.disableParameters;
22998 |     "ServiceWorker.dispatchSyncEvent": ServiceWorker.dispatchSyncEventParameters;
22999 |     "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.dispatchPeriodicSyncEventParameters;
23000 |     "ServiceWorker.enable": ServiceWorker.enableParameters;
23001 |     "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.setForceUpdateOnPageLoadParameters;
23002 |     "ServiceWorker.skipWaiting": ServiceWorker.skipWaitingParameters;
23003 |     "ServiceWorker.startWorker": ServiceWorker.startWorkerParameters;
23004 |     "ServiceWorker.stopAllWorkers": ServiceWorker.stopAllWorkersParameters;
23005 |     "ServiceWorker.stopWorker": ServiceWorker.stopWorkerParameters;
23006 |     "ServiceWorker.unregister": ServiceWorker.unregisterParameters;
23007 |     "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationParameters;
23008 |     "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameParameters;
23009 |     "Storage.getStorageKey": Storage.getStorageKeyParameters;
23010 |     "Storage.clearDataForOrigin": Storage.clearDataForOriginParameters;
23011 |     "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyParameters;
23012 |     "Storage.getCookies": Storage.getCookiesParameters;
23013 |     "Storage.setCookies": Storage.setCookiesParameters;
23014 |     "Storage.clearCookies": Storage.clearCookiesParameters;
23015 |     "Storage.getUsageAndQuota": Storage.getUsageAndQuotaParameters;
23016 |     "Storage.overrideQuotaForOrigin": Storage.overrideQuotaForOriginParameters;
23017 |     "Storage.trackCacheStorageForOrigin": Storage.trackCacheStorageForOriginParameters;
23018 |     "Storage.trackCacheStorageForStorageKey": Storage.trackCacheStorageForStorageKeyParameters;
23019 |     "Storage.trackIndexedDBForOrigin": Storage.trackIndexedDBForOriginParameters;
23020 |     "Storage.trackIndexedDBForStorageKey": Storage.trackIndexedDBForStorageKeyParameters;
23021 |     "Storage.untrackCacheStorageForOrigin": Storage.untrackCacheStorageForOriginParameters;
23022 |     "Storage.untrackCacheStorageForStorageKey": Storage.untrackCacheStorageForStorageKeyParameters;
23023 |     "Storage.untrackIndexedDBForOrigin": Storage.untrackIndexedDBForOriginParameters;
23024 |     "Storage.untrackIndexedDBForStorageKey": Storage.untrackIndexedDBForStorageKeyParameters;
23025 |     "Storage.getTrustTokens": Storage.getTrustTokensParameters;
23026 |     "Storage.clearTrustTokens": Storage.clearTrustTokensParameters;
23027 |     "Storage.getInterestGroupDetails": Storage.getInterestGroupDetailsParameters;
23028 |     "Storage.setInterestGroupTracking": Storage.setInterestGroupTrackingParameters;
23029 |     "Storage.setInterestGroupAuctionTracking": Storage.setInterestGroupAuctionTrackingParameters;
23030 |     "Storage.getSharedStorageMetadata": Storage.getSharedStorageMetadataParameters;
23031 |     "Storage.getSharedStorageEntries": Storage.getSharedStorageEntriesParameters;
23032 |     "Storage.setSharedStorageEntry": Storage.setSharedStorageEntryParameters;
23033 |     "Storage.deleteSharedStorageEntry": Storage.deleteSharedStorageEntryParameters;
23034 |     "Storage.clearSharedStorageEntries": Storage.clearSharedStorageEntriesParameters;
23035 |     "Storage.resetSharedStorageBudget": Storage.resetSharedStorageBudgetParameters;
23036 |     "Storage.setSharedStorageTracking": Storage.setSharedStorageTrackingParameters;
23037 |     "Storage.setStorageBucketTracking": Storage.setStorageBucketTrackingParameters;
23038 |     "Storage.deleteStorageBucket": Storage.deleteStorageBucketParameters;
23039 |     "Storage.runBounceTrackingMitigations": Storage.runBounceTrackingMitigationsParameters;
23040 |     "Storage.setAttributionReportingLocalTestingMode": Storage.setAttributionReportingLocalTestingModeParameters;
23041 |     "Storage.setAttributionReportingTracking": Storage.setAttributionReportingTrackingParameters;
23042 |     "Storage.sendPendingAttributionReports": Storage.sendPendingAttributionReportsParameters;
23043 |     "Storage.getRelatedWebsiteSets": Storage.getRelatedWebsiteSetsParameters;
23044 |     "Storage.getAffectedUrlsForThirdPartyCookieMetadata": Storage.getAffectedUrlsForThirdPartyCookieMetadataParameters;
23045 |     "Storage.setProtectedAudienceKAnonymity": Storage.setProtectedAudienceKAnonymityParameters;
23046 |     "SystemInfo.getInfo": SystemInfo.getInfoParameters;
23047 |     "SystemInfo.getFeatureState": SystemInfo.getFeatureStateParameters;
23048 |     "SystemInfo.getProcessInfo": SystemInfo.getProcessInfoParameters;
23049 |     "Target.activateTarget": Target.activateTargetParameters;
23050 |     "Target.attachToTarget": Target.attachToTargetParameters;
23051 |     "Target.attachToBrowserTarget": Target.attachToBrowserTargetParameters;
23052 |     "Target.closeTarget": Target.closeTargetParameters;
23053 |     "Target.exposeDevToolsProtocol": Target.exposeDevToolsProtocolParameters;
23054 |     "Target.createBrowserContext": Target.createBrowserContextParameters;
23055 |     "Target.getBrowserContexts": Target.getBrowserContextsParameters;
23056 |     "Target.createTarget": Target.createTargetParameters;
23057 |     "Target.detachFromTarget": Target.detachFromTargetParameters;
23058 |     "Target.disposeBrowserContext": Target.disposeBrowserContextParameters;
23059 |     "Target.getTargetInfo": Target.getTargetInfoParameters;
23060 |     "Target.getTargets": Target.getTargetsParameters;
23061 |     "Target.sendMessageToTarget": Target.sendMessageToTargetParameters;
23062 |     "Target.setAutoAttach": Target.setAutoAttachParameters;
23063 |     "Target.autoAttachRelated": Target.autoAttachRelatedParameters;
23064 |     "Target.setDiscoverTargets": Target.setDiscoverTargetsParameters;
23065 |     "Target.setRemoteLocations": Target.setRemoteLocationsParameters;
23066 |     "Target.getDevToolsTarget": Target.getDevToolsTargetParameters;
23067 |     "Target.openDevTools": Target.openDevToolsParameters;
23068 |     "Tethering.bind": Tethering.bindParameters;
23069 |     "Tethering.unbind": Tethering.unbindParameters;
23070 |     "Tracing.end": Tracing.endParameters;
23071 |     "Tracing.getCategories": Tracing.getCategoriesParameters;
23072 |     "Tracing.getTrackEventDescriptor": Tracing.getTrackEventDescriptorParameters;
23073 |     "Tracing.recordClockSyncMarker": Tracing.recordClockSyncMarkerParameters;
23074 |     "Tracing.requestMemoryDump": Tracing.requestMemoryDumpParameters;
23075 |     "Tracing.start": Tracing.startParameters;
23076 |     "WebAudio.enable": WebAudio.enableParameters;
23077 |     "WebAudio.disable": WebAudio.disableParameters;
23078 |     "WebAudio.getRealtimeData": WebAudio.getRealtimeDataParameters;
23079 |     "WebAuthn.enable": WebAuthn.enableParameters;
23080 |     "WebAuthn.disable": WebAuthn.disableParameters;
23081 |     "WebAuthn.addVirtualAuthenticator": WebAuthn.addVirtualAuthenticatorParameters;
23082 |     "WebAuthn.setResponseOverrideBits": WebAuthn.setResponseOverrideBitsParameters;
23083 |     "WebAuthn.removeVirtualAuthenticator": WebAuthn.removeVirtualAuthenticatorParameters;
23084 |     "WebAuthn.addCredential": WebAuthn.addCredentialParameters;
23085 |     "WebAuthn.getCredential": WebAuthn.getCredentialParameters;
23086 |     "WebAuthn.getCredentials": WebAuthn.getCredentialsParameters;
23087 |     "WebAuthn.removeCredential": WebAuthn.removeCredentialParameters;
23088 |     "WebAuthn.clearCredentials": WebAuthn.clearCredentialsParameters;
23089 |     "WebAuthn.setUserVerified": WebAuthn.setUserVerifiedParameters;
23090 |     "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.setAutomaticPresenceSimulationParameters;
23091 |     "WebAuthn.setCredentialProperties": WebAuthn.setCredentialPropertiesParameters;
23092 |     "Console.clearMessages": Console.clearMessagesParameters;
23093 |     "Console.disable": Console.disableParameters;
23094 |     "Console.enable": Console.enableParameters;
23095 |     "Debugger.continueToLocation": Debugger.continueToLocationParameters;
23096 |     "Debugger.disable": Debugger.disableParameters;
23097 |     "Debugger.enable": Debugger.enableParameters;
23098 |     "Debugger.evaluateOnCallFrame": Debugger.evaluateOnCallFrameParameters;
23099 |     "Debugger.getPossibleBreakpoints": Debugger.getPossibleBreakpointsParameters;
23100 |     "Debugger.getScriptSource": Debugger.getScriptSourceParameters;
23101 |     "Debugger.disassembleWasmModule": Debugger.disassembleWasmModuleParameters;
23102 |     "Debugger.nextWasmDisassemblyChunk": Debugger.nextWasmDisassemblyChunkParameters;
23103 |     "Debugger.getWasmBytecode": Debugger.getWasmBytecodeParameters;
23104 |     "Debugger.getStackTrace": Debugger.getStackTraceParameters;
23105 |     "Debugger.pause": Debugger.pauseParameters;
23106 |     "Debugger.pauseOnAsyncCall": Debugger.pauseOnAsyncCallParameters;
23107 |     "Debugger.removeBreakpoint": Debugger.removeBreakpointParameters;
23108 |     "Debugger.restartFrame": Debugger.restartFrameParameters;
23109 |     "Debugger.resume": Debugger.resumeParameters;
23110 |     "Debugger.searchInContent": Debugger.searchInContentParameters;
23111 |     "Debugger.setAsyncCallStackDepth": Debugger.setAsyncCallStackDepthParameters;
23112 |     "Debugger.setBlackboxExecutionContexts": Debugger.setBlackboxExecutionContextsParameters;
23113 |     "Debugger.setBlackboxPatterns": Debugger.setBlackboxPatternsParameters;
23114 |     "Debugger.setBlackboxedRanges": Debugger.setBlackboxedRangesParameters;
23115 |     "Debugger.setBreakpoint": Debugger.setBreakpointParameters;
23116 |     "Debugger.setInstrumentationBreakpoint": Debugger.setInstrumentationBreakpointParameters;
23117 |     "Debugger.setBreakpointByUrl": Debugger.setBreakpointByUrlParameters;
23118 |     "Debugger.setBreakpointOnFunctionCall": Debugger.setBreakpointOnFunctionCallParameters;
23119 |     "Debugger.setBreakpointsActive": Debugger.setBreakpointsActiveParameters;
23120 |     "Debugger.setPauseOnExceptions": Debugger.setPauseOnExceptionsParameters;
23121 |     "Debugger.setReturnValue": Debugger.setReturnValueParameters;
23122 |     "Debugger.setScriptSource": Debugger.setScriptSourceParameters;
23123 |     "Debugger.setSkipAllPauses": Debugger.setSkipAllPausesParameters;
23124 |     "Debugger.setVariableValue": Debugger.setVariableValueParameters;
23125 |     "Debugger.stepInto": Debugger.stepIntoParameters;
23126 |     "Debugger.stepOut": Debugger.stepOutParameters;
23127 |     "Debugger.stepOver": Debugger.stepOverParameters;
23128 |     "HeapProfiler.addInspectedHeapObject": HeapProfiler.addInspectedHeapObjectParameters;
23129 |     "HeapProfiler.collectGarbage": HeapProfiler.collectGarbageParameters;
23130 |     "HeapProfiler.disable": HeapProfiler.disableParameters;
23131 |     "HeapProfiler.enable": HeapProfiler.enableParameters;
23132 |     "HeapProfiler.getHeapObjectId": HeapProfiler.getHeapObjectIdParameters;
23133 |     "HeapProfiler.getObjectByHeapObjectId": HeapProfiler.getObjectByHeapObjectIdParameters;
23134 |     "HeapProfiler.getSamplingProfile": HeapProfiler.getSamplingProfileParameters;
23135 |     "HeapProfiler.startSampling": HeapProfiler.startSamplingParameters;
23136 |     "HeapProfiler.startTrackingHeapObjects": HeapProfiler.startTrackingHeapObjectsParameters;
23137 |     "HeapProfiler.stopSampling": HeapProfiler.stopSamplingParameters;
23138 |     "HeapProfiler.stopTrackingHeapObjects": HeapProfiler.stopTrackingHeapObjectsParameters;
23139 |     "HeapProfiler.takeHeapSnapshot": HeapProfiler.takeHeapSnapshotParameters;
23140 |     "Profiler.disable": Profiler.disableParameters;
23141 |     "Profiler.enable": Profiler.enableParameters;
23142 |     "Profiler.getBestEffortCoverage": Profiler.getBestEffortCoverageParameters;
23143 |     "Profiler.setSamplingInterval": Profiler.setSamplingIntervalParameters;
23144 |     "Profiler.start": Profiler.startParameters;
23145 |     "Profiler.startPreciseCoverage": Profiler.startPreciseCoverageParameters;
23146 |     "Profiler.stop": Profiler.stopParameters;
23147 |     "Profiler.stopPreciseCoverage": Profiler.stopPreciseCoverageParameters;
23148 |     "Profiler.takePreciseCoverage": Profiler.takePreciseCoverageParameters;
23149 |     "Runtime.awaitPromise": Runtime.awaitPromiseParameters;
23150 |     "Runtime.callFunctionOn": Runtime.callFunctionOnParameters;
23151 |     "Runtime.compileScript": Runtime.compileScriptParameters;
23152 |     "Runtime.disable": Runtime.disableParameters;
23153 |     "Runtime.discardConsoleEntries": Runtime.discardConsoleEntriesParameters;
23154 |     "Runtime.enable": Runtime.enableParameters;
23155 |     "Runtime.evaluate": Runtime.evaluateParameters;
23156 |     "Runtime.getIsolateId": Runtime.getIsolateIdParameters;
23157 |     "Runtime.getHeapUsage": Runtime.getHeapUsageParameters;
23158 |     "Runtime.getProperties": Runtime.getPropertiesParameters;
23159 |     "Runtime.globalLexicalScopeNames": Runtime.globalLexicalScopeNamesParameters;
23160 |     "Runtime.queryObjects": Runtime.queryObjectsParameters;
23161 |     "Runtime.releaseObject": Runtime.releaseObjectParameters;
23162 |     "Runtime.releaseObjectGroup": Runtime.releaseObjectGroupParameters;
23163 |     "Runtime.runIfWaitingForDebugger": Runtime.runIfWaitingForDebuggerParameters;
23164 |     "Runtime.runScript": Runtime.runScriptParameters;
23165 |     "Runtime.setAsyncCallStackDepth": Runtime.setAsyncCallStackDepthParameters;
23166 |     "Runtime.setCustomObjectFormatterEnabled": Runtime.setCustomObjectFormatterEnabledParameters;
23167 |     "Runtime.setMaxCallStackSizeToCapture": Runtime.setMaxCallStackSizeToCaptureParameters;
23168 |     "Runtime.terminateExecution": Runtime.terminateExecutionParameters;
23169 |     "Runtime.addBinding": Runtime.addBindingParameters;
23170 |     "Runtime.removeBinding": Runtime.removeBindingParameters;
23171 |     "Runtime.getExceptionDetails": Runtime.getExceptionDetailsParameters;
23172 |     "Schema.getDomains": Schema.getDomainsParameters;
23173 |   }
23174 |   export interface CommandReturnValues {
23175 |     "Accessibility.disable": Accessibility.disableReturnValue;
23176 |     "Accessibility.enable": Accessibility.enableReturnValue;
23177 |     "Accessibility.getPartialAXTree": Accessibility.getPartialAXTreeReturnValue;
23178 |     "Accessibility.getFullAXTree": Accessibility.getFullAXTreeReturnValue;
23179 |     "Accessibility.getRootAXNode": Accessibility.getRootAXNodeReturnValue;
23180 |     "Accessibility.getAXNodeAndAncestors": Accessibility.getAXNodeAndAncestorsReturnValue;
23181 |     "Accessibility.getChildAXNodes": Accessibility.getChildAXNodesReturnValue;
23182 |     "Accessibility.queryAXTree": Accessibility.queryAXTreeReturnValue;
23183 |     "Animation.disable": Animation.disableReturnValue;
23184 |     "Animation.enable": Animation.enableReturnValue;
23185 |     "Animation.getCurrentTime": Animation.getCurrentTimeReturnValue;
23186 |     "Animation.getPlaybackRate": Animation.getPlaybackRateReturnValue;
23187 |     "Animation.releaseAnimations": Animation.releaseAnimationsReturnValue;
23188 |     "Animation.resolveAnimation": Animation.resolveAnimationReturnValue;
23189 |     "Animation.seekAnimations": Animation.seekAnimationsReturnValue;
23190 |     "Animation.setPaused": Animation.setPausedReturnValue;
23191 |     "Animation.setPlaybackRate": Animation.setPlaybackRateReturnValue;
23192 |     "Animation.setTiming": Animation.setTimingReturnValue;
23193 |     "Audits.getEncodedResponse": Audits.getEncodedResponseReturnValue;
23194 |     "Audits.disable": Audits.disableReturnValue;
23195 |     "Audits.enable": Audits.enableReturnValue;
23196 |     "Audits.checkContrast": Audits.checkContrastReturnValue;
23197 |     "Audits.checkFormsIssues": Audits.checkFormsIssuesReturnValue;
23198 |     "Autofill.trigger": Autofill.triggerReturnValue;
23199 |     "Autofill.setAddresses": Autofill.setAddressesReturnValue;
23200 |     "Autofill.disable": Autofill.disableReturnValue;
23201 |     "Autofill.enable": Autofill.enableReturnValue;
23202 |     "BackgroundService.startObserving": BackgroundService.startObservingReturnValue;
23203 |     "BackgroundService.stopObserving": BackgroundService.stopObservingReturnValue;
23204 |     "BackgroundService.setRecording": BackgroundService.setRecordingReturnValue;
23205 |     "BackgroundService.clearEvents": BackgroundService.clearEventsReturnValue;
23206 |     "BluetoothEmulation.enable": BluetoothEmulation.enableReturnValue;
23207 |     "BluetoothEmulation.setSimulatedCentralState": BluetoothEmulation.setSimulatedCentralStateReturnValue;
23208 |     "BluetoothEmulation.disable": BluetoothEmulation.disableReturnValue;
23209 |     "BluetoothEmulation.simulatePreconnectedPeripheral": BluetoothEmulation.simulatePreconnectedPeripheralReturnValue;
23210 |     "BluetoothEmulation.simulateAdvertisement": BluetoothEmulation.simulateAdvertisementReturnValue;
23211 |     "BluetoothEmulation.simulateGATTOperationResponse": BluetoothEmulation.simulateGATTOperationResponseReturnValue;
23212 |     "BluetoothEmulation.simulateCharacteristicOperationResponse": BluetoothEmulation.simulateCharacteristicOperationResponseReturnValue;
23213 |     "BluetoothEmulation.simulateDescriptorOperationResponse": BluetoothEmulation.simulateDescriptorOperationResponseReturnValue;
23214 |     "BluetoothEmulation.addService": BluetoothEmulation.addServiceReturnValue;
23215 |     "BluetoothEmulation.removeService": BluetoothEmulation.removeServiceReturnValue;
23216 |     "BluetoothEmulation.addCharacteristic": BluetoothEmulation.addCharacteristicReturnValue;
23217 |     "BluetoothEmulation.removeCharacteristic": BluetoothEmulation.removeCharacteristicReturnValue;
23218 |     "BluetoothEmulation.addDescriptor": BluetoothEmulation.addDescriptorReturnValue;
23219 |     "BluetoothEmulation.removeDescriptor": BluetoothEmulation.removeDescriptorReturnValue;
23220 |     "BluetoothEmulation.simulateGATTDisconnection": BluetoothEmulation.simulateGATTDisconnectionReturnValue;
23221 |     "Browser.setPermission": Browser.setPermissionReturnValue;
23222 |     "Browser.grantPermissions": Browser.grantPermissionsReturnValue;
23223 |     "Browser.resetPermissions": Browser.resetPermissionsReturnValue;
23224 |     "Browser.setDownloadBehavior": Browser.setDownloadBehaviorReturnValue;
23225 |     "Browser.cancelDownload": Browser.cancelDownloadReturnValue;
23226 |     "Browser.close": Browser.closeReturnValue;
23227 |     "Browser.crash": Browser.crashReturnValue;
23228 |     "Browser.crashGpuProcess": Browser.crashGpuProcessReturnValue;
23229 |     "Browser.getVersion": Browser.getVersionReturnValue;
23230 |     "Browser.getBrowserCommandLine": Browser.getBrowserCommandLineReturnValue;
23231 |     "Browser.getHistograms": Browser.getHistogramsReturnValue;
23232 |     "Browser.getHistogram": Browser.getHistogramReturnValue;
23233 |     "Browser.getWindowBounds": Browser.getWindowBoundsReturnValue;
23234 |     "Browser.getWindowForTarget": Browser.getWindowForTargetReturnValue;
23235 |     "Browser.setWindowBounds": Browser.setWindowBoundsReturnValue;
23236 |     "Browser.setContentsSize": Browser.setContentsSizeReturnValue;
23237 |     "Browser.setDockTile": Browser.setDockTileReturnValue;
23238 |     "Browser.executeBrowserCommand": Browser.executeBrowserCommandReturnValue;
23239 |     "Browser.addPrivacySandboxEnrollmentOverride": Browser.addPrivacySandboxEnrollmentOverrideReturnValue;
23240 |     "Browser.addPrivacySandboxCoordinatorKeyConfig": Browser.addPrivacySandboxCoordinatorKeyConfigReturnValue;
23241 |     "CSS.addRule": CSS.addRuleReturnValue;
23242 |     "CSS.collectClassNames": CSS.collectClassNamesReturnValue;
23243 |     "CSS.createStyleSheet": CSS.createStyleSheetReturnValue;
23244 |     "CSS.disable": CSS.disableReturnValue;
23245 |     "CSS.enable": CSS.enableReturnValue;
23246 |     "CSS.forcePseudoState": CSS.forcePseudoStateReturnValue;
23247 |     "CSS.forceStartingStyle": CSS.forceStartingStyleReturnValue;
23248 |     "CSS.getBackgroundColors": CSS.getBackgroundColorsReturnValue;
23249 |     "CSS.getComputedStyleForNode": CSS.getComputedStyleForNodeReturnValue;
23250 |     "CSS.resolveValues": CSS.resolveValuesReturnValue;
23251 |     "CSS.getLonghandProperties": CSS.getLonghandPropertiesReturnValue;
23252 |     "CSS.getInlineStylesForNode": CSS.getInlineStylesForNodeReturnValue;
23253 |     "CSS.getAnimatedStylesForNode": CSS.getAnimatedStylesForNodeReturnValue;
23254 |     "CSS.getMatchedStylesForNode": CSS.getMatchedStylesForNodeReturnValue;
23255 |     "CSS.getEnvironmentVariables": CSS.getEnvironmentVariablesReturnValue;
23256 |     "CSS.getMediaQueries": CSS.getMediaQueriesReturnValue;
23257 |     "CSS.getPlatformFontsForNode": CSS.getPlatformFontsForNodeReturnValue;
23258 |     "CSS.getStyleSheetText": CSS.getStyleSheetTextReturnValue;
23259 |     "CSS.getLayersForNode": CSS.getLayersForNodeReturnValue;
23260 |     "CSS.getLocationForSelector": CSS.getLocationForSelectorReturnValue;
23261 |     "CSS.trackComputedStyleUpdatesForNode": CSS.trackComputedStyleUpdatesForNodeReturnValue;
23262 |     "CSS.trackComputedStyleUpdates": CSS.trackComputedStyleUpdatesReturnValue;
23263 |     "CSS.takeComputedStyleUpdates": CSS.takeComputedStyleUpdatesReturnValue;
23264 |     "CSS.setEffectivePropertyValueForNode": CSS.setEffectivePropertyValueForNodeReturnValue;
23265 |     "CSS.setPropertyRulePropertyName": CSS.setPropertyRulePropertyNameReturnValue;
23266 |     "CSS.setKeyframeKey": CSS.setKeyframeKeyReturnValue;
23267 |     "CSS.setMediaText": CSS.setMediaTextReturnValue;
23268 |     "CSS.setContainerQueryText": CSS.setContainerQueryTextReturnValue;
23269 |     "CSS.setSupportsText": CSS.setSupportsTextReturnValue;
23270 |     "CSS.setScopeText": CSS.setScopeTextReturnValue;
23271 |     "CSS.setRuleSelector": CSS.setRuleSelectorReturnValue;
23272 |     "CSS.setStyleSheetText": CSS.setStyleSheetTextReturnValue;
23273 |     "CSS.setStyleTexts": CSS.setStyleTextsReturnValue;
23274 |     "CSS.startRuleUsageTracking": CSS.startRuleUsageTrackingReturnValue;
23275 |     "CSS.stopRuleUsageTracking": CSS.stopRuleUsageTrackingReturnValue;
23276 |     "CSS.takeCoverageDelta": CSS.takeCoverageDeltaReturnValue;
23277 |     "CSS.setLocalFontsEnabled": CSS.setLocalFontsEnabledReturnValue;
23278 |     "CacheStorage.deleteCache": CacheStorage.deleteCacheReturnValue;
23279 |     "CacheStorage.deleteEntry": CacheStorage.deleteEntryReturnValue;
23280 |     "CacheStorage.requestCacheNames": CacheStorage.requestCacheNamesReturnValue;
23281 |     "CacheStorage.requestCachedResponse": CacheStorage.requestCachedResponseReturnValue;
23282 |     "CacheStorage.requestEntries": CacheStorage.requestEntriesReturnValue;
23283 |     "Cast.enable": Cast.enableReturnValue;
23284 |     "Cast.disable": Cast.disableReturnValue;
23285 |     "Cast.setSinkToUse": Cast.setSinkToUseReturnValue;
23286 |     "Cast.startDesktopMirroring": Cast.startDesktopMirroringReturnValue;
23287 |     "Cast.startTabMirroring": Cast.startTabMirroringReturnValue;
23288 |     "Cast.stopCasting": Cast.stopCastingReturnValue;
23289 |     "DOM.collectClassNamesFromSubtree": DOM.collectClassNamesFromSubtreeReturnValue;
23290 |     "DOM.copyTo": DOM.copyToReturnValue;
23291 |     "DOM.describeNode": DOM.describeNodeReturnValue;
23292 |     "DOM.scrollIntoViewIfNeeded": DOM.scrollIntoViewIfNeededReturnValue;
23293 |     "DOM.disable": DOM.disableReturnValue;
23294 |     "DOM.discardSearchResults": DOM.discardSearchResultsReturnValue;
23295 |     "DOM.enable": DOM.enableReturnValue;
23296 |     "DOM.focus": DOM.focusReturnValue;
23297 |     "DOM.getAttributes": DOM.getAttributesReturnValue;
23298 |     "DOM.getBoxModel": DOM.getBoxModelReturnValue;
23299 |     "DOM.getContentQuads": DOM.getContentQuadsReturnValue;
23300 |     "DOM.getDocument": DOM.getDocumentReturnValue;
23301 |     "DOM.getFlattenedDocument": DOM.getFlattenedDocumentReturnValue;
23302 |     "DOM.getNodesForSubtreeByStyle": DOM.getNodesForSubtreeByStyleReturnValue;
23303 |     "DOM.getNodeForLocation": DOM.getNodeForLocationReturnValue;
23304 |     "DOM.getOuterHTML": DOM.getOuterHTMLReturnValue;
23305 |     "DOM.getRelayoutBoundary": DOM.getRelayoutBoundaryReturnValue;
23306 |     "DOM.getSearchResults": DOM.getSearchResultsReturnValue;
23307 |     "DOM.hideHighlight": DOM.hideHighlightReturnValue;
23308 |     "DOM.highlightNode": DOM.highlightNodeReturnValue;
23309 |     "DOM.highlightRect": DOM.highlightRectReturnValue;
23310 |     "DOM.markUndoableState": DOM.markUndoableStateReturnValue;
23311 |     "DOM.moveTo": DOM.moveToReturnValue;
23312 |     "DOM.performSearch": DOM.performSearchReturnValue;
23313 |     "DOM.pushNodeByPathToFrontend": DOM.pushNodeByPathToFrontendReturnValue;
23314 |     "DOM.pushNodesByBackendIdsToFrontend": DOM.pushNodesByBackendIdsToFrontendReturnValue;
23315 |     "DOM.querySelector": DOM.querySelectorReturnValue;
23316 |     "DOM.querySelectorAll": DOM.querySelectorAllReturnValue;
23317 |     "DOM.getTopLayerElements": DOM.getTopLayerElementsReturnValue;
23318 |     "DOM.getElementByRelation": DOM.getElementByRelationReturnValue;
23319 |     "DOM.redo": DOM.redoReturnValue;
23320 |     "DOM.removeAttribute": DOM.removeAttributeReturnValue;
23321 |     "DOM.removeNode": DOM.removeNodeReturnValue;
23322 |     "DOM.requestChildNodes": DOM.requestChildNodesReturnValue;
23323 |     "DOM.requestNode": DOM.requestNodeReturnValue;
23324 |     "DOM.resolveNode": DOM.resolveNodeReturnValue;
23325 |     "DOM.setAttributeValue": DOM.setAttributeValueReturnValue;
23326 |     "DOM.setAttributesAsText": DOM.setAttributesAsTextReturnValue;
23327 |     "DOM.setFileInputFiles": DOM.setFileInputFilesReturnValue;
23328 |     "DOM.setNodeStackTracesEnabled": DOM.setNodeStackTracesEnabledReturnValue;
23329 |     "DOM.getNodeStackTraces": DOM.getNodeStackTracesReturnValue;
23330 |     "DOM.getFileInfo": DOM.getFileInfoReturnValue;
23331 |     "DOM.getDetachedDomNodes": DOM.getDetachedDomNodesReturnValue;
23332 |     "DOM.setInspectedNode": DOM.setInspectedNodeReturnValue;
23333 |     "DOM.setNodeName": DOM.setNodeNameReturnValue;
23334 |     "DOM.setNodeValue": DOM.setNodeValueReturnValue;
23335 |     "DOM.setOuterHTML": DOM.setOuterHTMLReturnValue;
23336 |     "DOM.undo": DOM.undoReturnValue;
23337 |     "DOM.getFrameOwner": DOM.getFrameOwnerReturnValue;
23338 |     "DOM.getContainerForNode": DOM.getContainerForNodeReturnValue;
23339 |     "DOM.getQueryingDescendantsForContainer": DOM.getQueryingDescendantsForContainerReturnValue;
23340 |     "DOM.getAnchorElement": DOM.getAnchorElementReturnValue;
23341 |     "DOM.forceShowPopover": DOM.forceShowPopoverReturnValue;
23342 |     "DOMDebugger.getEventListeners": DOMDebugger.getEventListenersReturnValue;
23343 |     "DOMDebugger.removeDOMBreakpoint": DOMDebugger.removeDOMBreakpointReturnValue;
23344 |     "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointReturnValue;
23345 |     "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointReturnValue;
23346 |     "DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointReturnValue;
23347 |     "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationReturnValue;
23348 |     "DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointReturnValue;
23349 |     "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointReturnValue;
23350 |     "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointReturnValue;
23351 |     "DOMDebugger.setXHRBreakpoint": DOMDebugger.setXHRBreakpointReturnValue;
23352 |     "DOMSnapshot.disable": DOMSnapshot.disableReturnValue;
23353 |     "DOMSnapshot.enable": DOMSnapshot.enableReturnValue;
23354 |     "DOMSnapshot.getSnapshot": DOMSnapshot.getSnapshotReturnValue;
23355 |     "DOMSnapshot.captureSnapshot": DOMSnapshot.captureSnapshotReturnValue;
23356 |     "DOMStorage.clear": DOMStorage.clearReturnValue;
23357 |     "DOMStorage.disable": DOMStorage.disableReturnValue;
23358 |     "DOMStorage.enable": DOMStorage.enableReturnValue;
23359 |     "DOMStorage.getDOMStorageItems": DOMStorage.getDOMStorageItemsReturnValue;
23360 |     "DOMStorage.removeDOMStorageItem": DOMStorage.removeDOMStorageItemReturnValue;
23361 |     "DOMStorage.setDOMStorageItem": DOMStorage.setDOMStorageItemReturnValue;
23362 |     "DeviceAccess.enable": DeviceAccess.enableReturnValue;
23363 |     "DeviceAccess.disable": DeviceAccess.disableReturnValue;
23364 |     "DeviceAccess.selectPrompt": DeviceAccess.selectPromptReturnValue;
23365 |     "DeviceAccess.cancelPrompt": DeviceAccess.cancelPromptReturnValue;
23366 |     "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.clearDeviceOrientationOverrideReturnValue;
23367 |     "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.setDeviceOrientationOverrideReturnValue;
23368 |     "Emulation.canEmulate": Emulation.canEmulateReturnValue;
23369 |     "Emulation.clearDeviceMetricsOverride": Emulation.clearDeviceMetricsOverrideReturnValue;
23370 |     "Emulation.clearGeolocationOverride": Emulation.clearGeolocationOverrideReturnValue;
23371 |     "Emulation.resetPageScaleFactor": Emulation.resetPageScaleFactorReturnValue;
23372 |     "Emulation.setFocusEmulationEnabled": Emulation.setFocusEmulationEnabledReturnValue;
23373 |     "Emulation.setAutoDarkModeOverride": Emulation.setAutoDarkModeOverrideReturnValue;
23374 |     "Emulation.setCPUThrottlingRate": Emulation.setCPUThrottlingRateReturnValue;
23375 |     "Emulation.setDefaultBackgroundColorOverride": Emulation.setDefaultBackgroundColorOverrideReturnValue;
23376 |     "Emulation.setSafeAreaInsetsOverride": Emulation.setSafeAreaInsetsOverrideReturnValue;
23377 |     "Emulation.setDeviceMetricsOverride": Emulation.setDeviceMetricsOverrideReturnValue;
23378 |     "Emulation.setDevicePostureOverride": Emulation.setDevicePostureOverrideReturnValue;
23379 |     "Emulation.clearDevicePostureOverride": Emulation.clearDevicePostureOverrideReturnValue;
23380 |     "Emulation.setDisplayFeaturesOverride": Emulation.setDisplayFeaturesOverrideReturnValue;
23381 |     "Emulation.clearDisplayFeaturesOverride": Emulation.clearDisplayFeaturesOverrideReturnValue;
23382 |     "Emulation.setScrollbarsHidden": Emulation.setScrollbarsHiddenReturnValue;
23383 |     "Emulation.setDocumentCookieDisabled": Emulation.setDocumentCookieDisabledReturnValue;
23384 |     "Emulation.setEmitTouchEventsForMouse": Emulation.setEmitTouchEventsForMouseReturnValue;
23385 |     "Emulation.setEmulatedMedia": Emulation.setEmulatedMediaReturnValue;
23386 |     "Emulation.setEmulatedVisionDeficiency": Emulation.setEmulatedVisionDeficiencyReturnValue;
23387 |     "Emulation.setEmulatedOSTextScale": Emulation.setEmulatedOSTextScaleReturnValue;
23388 |     "Emulation.setGeolocationOverride": Emulation.setGeolocationOverrideReturnValue;
23389 |     "Emulation.getOverriddenSensorInformation": Emulation.getOverriddenSensorInformationReturnValue;
23390 |     "Emulation.setSensorOverrideEnabled": Emulation.setSensorOverrideEnabledReturnValue;
23391 |     "Emulation.setSensorOverrideReadings": Emulation.setSensorOverrideReadingsReturnValue;
23392 |     "Emulation.setPressureSourceOverrideEnabled": Emulation.setPressureSourceOverrideEnabledReturnValue;
23393 |     "Emulation.setPressureStateOverride": Emulation.setPressureStateOverrideReturnValue;
23394 |     "Emulation.setPressureDataOverride": Emulation.setPressureDataOverrideReturnValue;
23395 |     "Emulation.setIdleOverride": Emulation.setIdleOverrideReturnValue;
23396 |     "Emulation.clearIdleOverride": Emulation.clearIdleOverrideReturnValue;
23397 |     "Emulation.setNavigatorOverrides": Emulation.setNavigatorOverridesReturnValue;
23398 |     "Emulation.setPageScaleFactor": Emulation.setPageScaleFactorReturnValue;
23399 |     "Emulation.setScriptExecutionDisabled": Emulation.setScriptExecutionDisabledReturnValue;
23400 |     "Emulation.setTouchEmulationEnabled": Emulation.setTouchEmulationEnabledReturnValue;
23401 |     "Emulation.setVirtualTimePolicy": Emulation.setVirtualTimePolicyReturnValue;
23402 |     "Emulation.setLocaleOverride": Emulation.setLocaleOverrideReturnValue;
23403 |     "Emulation.setTimezoneOverride": Emulation.setTimezoneOverrideReturnValue;
23404 |     "Emulation.setVisibleSize": Emulation.setVisibleSizeReturnValue;
23405 |     "Emulation.setDisabledImageTypes": Emulation.setDisabledImageTypesReturnValue;
23406 |     "Emulation.setDataSaverOverride": Emulation.setDataSaverOverrideReturnValue;
23407 |     "Emulation.setHardwareConcurrencyOverride": Emulation.setHardwareConcurrencyOverrideReturnValue;
23408 |     "Emulation.setUserAgentOverride": Emulation.setUserAgentOverrideReturnValue;
23409 |     "Emulation.setAutomationOverride": Emulation.setAutomationOverrideReturnValue;
23410 |     "Emulation.setSmallViewportHeightDifferenceOverride": Emulation.setSmallViewportHeightDifferenceOverrideReturnValue;
23411 |     "Emulation.getScreenInfos": Emulation.getScreenInfosReturnValue;
23412 |     "Emulation.addScreen": Emulation.addScreenReturnValue;
23413 |     "Emulation.removeScreen": Emulation.removeScreenReturnValue;
23414 |     "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.setInstrumentationBreakpointReturnValue;
23415 |     "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.removeInstrumentationBreakpointReturnValue;
23416 |     "EventBreakpoints.disable": EventBreakpoints.disableReturnValue;
23417 |     "Extensions.loadUnpacked": Extensions.loadUnpackedReturnValue;
23418 |     "Extensions.uninstall": Extensions.uninstallReturnValue;
23419 |     "Extensions.getStorageItems": Extensions.getStorageItemsReturnValue;
23420 |     "Extensions.removeStorageItems": Extensions.removeStorageItemsReturnValue;
23421 |     "Extensions.clearStorageItems": Extensions.clearStorageItemsReturnValue;
23422 |     "Extensions.setStorageItems": Extensions.setStorageItemsReturnValue;
23423 |     "FedCm.enable": FedCm.enableReturnValue;
23424 |     "FedCm.disable": FedCm.disableReturnValue;
23425 |     "FedCm.selectAccount": FedCm.selectAccountReturnValue;
23426 |     "FedCm.clickDialogButton": FedCm.clickDialogButtonReturnValue;
23427 |     "FedCm.openUrl": FedCm.openUrlReturnValue;
23428 |     "FedCm.dismissDialog": FedCm.dismissDialogReturnValue;
23429 |     "FedCm.resetCooldown": FedCm.resetCooldownReturnValue;
23430 |     "Fetch.disable": Fetch.disableReturnValue;
23431 |     "Fetch.enable": Fetch.enableReturnValue;
23432 |     "Fetch.failRequest": Fetch.failRequestReturnValue;
23433 |     "Fetch.fulfillRequest": Fetch.fulfillRequestReturnValue;
23434 |     "Fetch.continueRequest": Fetch.continueRequestReturnValue;
23435 |     "Fetch.continueWithAuth": Fetch.continueWithAuthReturnValue;
23436 |     "Fetch.continueResponse": Fetch.continueResponseReturnValue;
23437 |     "Fetch.getResponseBody": Fetch.getResponseBodyReturnValue;
23438 |     "Fetch.takeResponseBodyAsStream": Fetch.takeResponseBodyAsStreamReturnValue;
23439 |     "FileSystem.getDirectory": FileSystem.getDirectoryReturnValue;
23440 |     "HeadlessExperimental.beginFrame": HeadlessExperimental.beginFrameReturnValue;
23441 |     "HeadlessExperimental.disable": HeadlessExperimental.disableReturnValue;
23442 |     "HeadlessExperimental.enable": HeadlessExperimental.enableReturnValue;
23443 |     "IO.close": IO.closeReturnValue;
23444 |     "IO.read": IO.readReturnValue;
23445 |     "IO.resolveBlob": IO.resolveBlobReturnValue;
23446 |     "IndexedDB.clearObjectStore": IndexedDB.clearObjectStoreReturnValue;
23447 |     "IndexedDB.deleteDatabase": IndexedDB.deleteDatabaseReturnValue;
23448 |     "IndexedDB.deleteObjectStoreEntries": IndexedDB.deleteObjectStoreEntriesReturnValue;
23449 |     "IndexedDB.disable": IndexedDB.disableReturnValue;
23450 |     "IndexedDB.enable": IndexedDB.enableReturnValue;
23451 |     "IndexedDB.requestData": IndexedDB.requestDataReturnValue;
23452 |     "IndexedDB.getMetadata": IndexedDB.getMetadataReturnValue;
23453 |     "IndexedDB.requestDatabase": IndexedDB.requestDatabaseReturnValue;
23454 |     "IndexedDB.requestDatabaseNames": IndexedDB.requestDatabaseNamesReturnValue;
23455 |     "Input.dispatchDragEvent": Input.dispatchDragEventReturnValue;
23456 |     "Input.dispatchKeyEvent": Input.dispatchKeyEventReturnValue;
23457 |     "Input.insertText": Input.insertTextReturnValue;
23458 |     "Input.imeSetComposition": Input.imeSetCompositionReturnValue;
23459 |     "Input.dispatchMouseEvent": Input.dispatchMouseEventReturnValue;
23460 |     "Input.dispatchTouchEvent": Input.dispatchTouchEventReturnValue;
23461 |     "Input.cancelDragging": Input.cancelDraggingReturnValue;
23462 |     "Input.emulateTouchFromMouseEvent": Input.emulateTouchFromMouseEventReturnValue;
23463 |     "Input.setIgnoreInputEvents": Input.setIgnoreInputEventsReturnValue;
23464 |     "Input.setInterceptDrags": Input.setInterceptDragsReturnValue;
23465 |     "Input.synthesizePinchGesture": Input.synthesizePinchGestureReturnValue;
23466 |     "Input.synthesizeScrollGesture": Input.synthesizeScrollGestureReturnValue;
23467 |     "Input.synthesizeTapGesture": Input.synthesizeTapGestureReturnValue;
23468 |     "Inspector.disable": Inspector.disableReturnValue;
23469 |     "Inspector.enable": Inspector.enableReturnValue;
23470 |     "LayerTree.compositingReasons": LayerTree.compositingReasonsReturnValue;
23471 |     "LayerTree.disable": LayerTree.disableReturnValue;
23472 |     "LayerTree.enable": LayerTree.enableReturnValue;
23473 |     "LayerTree.loadSnapshot": LayerTree.loadSnapshotReturnValue;
23474 |     "LayerTree.makeSnapshot": LayerTree.makeSnapshotReturnValue;
23475 |     "LayerTree.profileSnapshot": LayerTree.profileSnapshotReturnValue;
23476 |     "LayerTree.releaseSnapshot": LayerTree.releaseSnapshotReturnValue;
23477 |     "LayerTree.replaySnapshot": LayerTree.replaySnapshotReturnValue;
23478 |     "LayerTree.snapshotCommandLog": LayerTree.snapshotCommandLogReturnValue;
23479 |     "Log.clear": Log.clearReturnValue;
23480 |     "Log.disable": Log.disableReturnValue;
23481 |     "Log.enable": Log.enableReturnValue;
23482 |     "Log.startViolationsReport": Log.startViolationsReportReturnValue;
23483 |     "Log.stopViolationsReport": Log.stopViolationsReportReturnValue;
23484 |     "Media.enable": Media.enableReturnValue;
23485 |     "Media.disable": Media.disableReturnValue;
23486 |     "Memory.getDOMCounters": Memory.getDOMCountersReturnValue;
23487 |     "Memory.getDOMCountersForLeakDetection": Memory.getDOMCountersForLeakDetectionReturnValue;
23488 |     "Memory.prepareForLeakDetection": Memory.prepareForLeakDetectionReturnValue;
23489 |     "Memory.forciblyPurgeJavaScriptMemory": Memory.forciblyPurgeJavaScriptMemoryReturnValue;
23490 |     "Memory.setPressureNotificationsSuppressed": Memory.setPressureNotificationsSuppressedReturnValue;
23491 |     "Memory.simulatePressureNotification": Memory.simulatePressureNotificationReturnValue;
23492 |     "Memory.startSampling": Memory.startSamplingReturnValue;
23493 |     "Memory.stopSampling": Memory.stopSamplingReturnValue;
23494 |     "Memory.getAllTimeSamplingProfile": Memory.getAllTimeSamplingProfileReturnValue;
23495 |     "Memory.getBrowserSamplingProfile": Memory.getBrowserSamplingProfileReturnValue;
23496 |     "Memory.getSamplingProfile": Memory.getSamplingProfileReturnValue;
23497 |     "Network.setAcceptedEncodings": Network.setAcceptedEncodingsReturnValue;
23498 |     "Network.clearAcceptedEncodingsOverride": Network.clearAcceptedEncodingsOverrideReturnValue;
23499 |     "Network.canClearBrowserCache": Network.canClearBrowserCacheReturnValue;
23500 |     "Network.canClearBrowserCookies": Network.canClearBrowserCookiesReturnValue;
23501 |     "Network.canEmulateNetworkConditions": Network.canEmulateNetworkConditionsReturnValue;
23502 |     "Network.clearBrowserCache": Network.clearBrowserCacheReturnValue;
23503 |     "Network.clearBrowserCookies": Network.clearBrowserCookiesReturnValue;
23504 |     "Network.continueInterceptedRequest": Network.continueInterceptedRequestReturnValue;
23505 |     "Network.deleteCookies": Network.deleteCookiesReturnValue;
23506 |     "Network.disable": Network.disableReturnValue;
23507 |     "Network.emulateNetworkConditions": Network.emulateNetworkConditionsReturnValue;
23508 |     "Network.emulateNetworkConditionsByRule": Network.emulateNetworkConditionsByRuleReturnValue;
23509 |     "Network.overrideNetworkState": Network.overrideNetworkStateReturnValue;
23510 |     "Network.enable": Network.enableReturnValue;
23511 |     "Network.configureDurableMessages": Network.configureDurableMessagesReturnValue;
23512 |     "Network.getAllCookies": Network.getAllCookiesReturnValue;
23513 |     "Network.getCertificate": Network.getCertificateReturnValue;
23514 |     "Network.getCookies": Network.getCookiesReturnValue;
23515 |     "Network.getResponseBody": Network.getResponseBodyReturnValue;
23516 |     "Network.getRequestPostData": Network.getRequestPostDataReturnValue;
23517 |     "Network.getResponseBodyForInterception": Network.getResponseBodyForInterceptionReturnValue;
23518 |     "Network.takeResponseBodyForInterceptionAsStream": Network.takeResponseBodyForInterceptionAsStreamReturnValue;
23519 |     "Network.replayXHR": Network.replayXHRReturnValue;
23520 |     "Network.searchInResponseBody": Network.searchInResponseBodyReturnValue;
23521 |     "Network.setBlockedURLs": Network.setBlockedURLsReturnValue;
23522 |     "Network.setBypassServiceWorker": Network.setBypassServiceWorkerReturnValue;
23523 |     "Network.setCacheDisabled": Network.setCacheDisabledReturnValue;
23524 |     "Network.setCookie": Network.setCookieReturnValue;
23525 |     "Network.setCookies": Network.setCookiesReturnValue;
23526 |     "Network.setExtraHTTPHeaders": Network.setExtraHTTPHeadersReturnValue;
23527 |     "Network.setAttachDebugStack": Network.setAttachDebugStackReturnValue;
23528 |     "Network.setRequestInterception": Network.setRequestInterceptionReturnValue;
23529 |     "Network.setUserAgentOverride": Network.setUserAgentOverrideReturnValue;
23530 |     "Network.streamResourceContent": Network.streamResourceContentReturnValue;
23531 |     "Network.getSecurityIsolationStatus": Network.getSecurityIsolationStatusReturnValue;
23532 |     "Network.enableReportingApi": Network.enableReportingApiReturnValue;
23533 |     "Network.enableDeviceBoundSessions": Network.enableDeviceBoundSessionsReturnValue;
23534 |     "Network.fetchSchemefulSite": Network.fetchSchemefulSiteReturnValue;
23535 |     "Network.loadNetworkResource": Network.loadNetworkResourceReturnValue;
23536 |     "Network.setCookieControls": Network.setCookieControlsReturnValue;
23537 |     "Overlay.disable": Overlay.disableReturnValue;
23538 |     "Overlay.enable": Overlay.enableReturnValue;
23539 |     "Overlay.getHighlightObjectForTest": Overlay.getHighlightObjectForTestReturnValue;
23540 |     "Overlay.getGridHighlightObjectsForTest": Overlay.getGridHighlightObjectsForTestReturnValue;
23541 |     "Overlay.getSourceOrderHighlightObjectForTest": Overlay.getSourceOrderHighlightObjectForTestReturnValue;
23542 |     "Overlay.hideHighlight": Overlay.hideHighlightReturnValue;
23543 |     "Overlay.highlightFrame": Overlay.highlightFrameReturnValue;
23544 |     "Overlay.highlightNode": Overlay.highlightNodeReturnValue;
23545 |     "Overlay.highlightQuad": Overlay.highlightQuadReturnValue;
23546 |     "Overlay.highlightRect": Overlay.highlightRectReturnValue;
23547 |     "Overlay.highlightSourceOrder": Overlay.highlightSourceOrderReturnValue;
23548 |     "Overlay.setInspectMode": Overlay.setInspectModeReturnValue;
23549 |     "Overlay.setShowAdHighlights": Overlay.setShowAdHighlightsReturnValue;
23550 |     "Overlay.setPausedInDebuggerMessage": Overlay.setPausedInDebuggerMessageReturnValue;
23551 |     "Overlay.setShowDebugBorders": Overlay.setShowDebugBordersReturnValue;
23552 |     "Overlay.setShowFPSCounter": Overlay.setShowFPSCounterReturnValue;
23553 |     "Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysReturnValue;
23554 |     "Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysReturnValue;
23555 |     "Overlay.setShowScrollSnapOverlays": Overlay.setShowScrollSnapOverlaysReturnValue;
23556 |     "Overlay.setShowContainerQueryOverlays": Overlay.setShowContainerQueryOverlaysReturnValue;
23557 |     "Overlay.setShowPaintRects": Overlay.setShowPaintRectsReturnValue;
23558 |     "Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsReturnValue;
23559 |     "Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsReturnValue;
23560 |     "Overlay.setShowHitTestBorders": Overlay.setShowHitTestBordersReturnValue;
23561 |     "Overlay.setShowWebVitals": Overlay.setShowWebVitalsReturnValue;
23562 |     "Overlay.setShowViewportSizeOnResize": Overlay.setShowViewportSizeOnResizeReturnValue;
23563 |     "Overlay.setShowHinge": Overlay.setShowHingeReturnValue;
23564 |     "Overlay.setShowIsolatedElements": Overlay.setShowIsolatedElementsReturnValue;
23565 |     "Overlay.setShowWindowControlsOverlay": Overlay.setShowWindowControlsOverlayReturnValue;
23566 |     "PWA.getOsAppState": PWA.getOsAppStateReturnValue;
23567 |     "PWA.install": PWA.installReturnValue;
23568 |     "PWA.uninstall": PWA.uninstallReturnValue;
23569 |     "PWA.launch": PWA.launchReturnValue;
23570 |     "PWA.launchFilesInApp": PWA.launchFilesInAppReturnValue;
23571 |     "PWA.openCurrentPageInApp": PWA.openCurrentPageInAppReturnValue;
23572 |     "PWA.changeAppUserSettings": PWA.changeAppUserSettingsReturnValue;
23573 |     "Page.addScriptToEvaluateOnLoad": Page.addScriptToEvaluateOnLoadReturnValue;
23574 |     "Page.addScriptToEvaluateOnNewDocument": Page.addScriptToEvaluateOnNewDocumentReturnValue;
23575 |     "Page.bringToFront": Page.bringToFrontReturnValue;
23576 |     "Page.captureScreenshot": Page.captureScreenshotReturnValue;
23577 |     "Page.captureSnapshot": Page.captureSnapshotReturnValue;
23578 |     "Page.clearDeviceMetricsOverride": Page.clearDeviceMetricsOverrideReturnValue;
23579 |     "Page.clearDeviceOrientationOverride": Page.clearDeviceOrientationOverrideReturnValue;
23580 |     "Page.clearGeolocationOverride": Page.clearGeolocationOverrideReturnValue;
23581 |     "Page.createIsolatedWorld": Page.createIsolatedWorldReturnValue;
23582 |     "Page.deleteCookie": Page.deleteCookieReturnValue;
23583 |     "Page.disable": Page.disableReturnValue;
23584 |     "Page.enable": Page.enableReturnValue;
23585 |     "Page.getAppManifest": Page.getAppManifestReturnValue;
23586 |     "Page.getInstallabilityErrors": Page.getInstallabilityErrorsReturnValue;
23587 |     "Page.getManifestIcons": Page.getManifestIconsReturnValue;
23588 |     "Page.getAppId": Page.getAppIdReturnValue;
23589 |     "Page.getAdScriptAncestry": Page.getAdScriptAncestryReturnValue;
23590 |     "Page.getFrameTree": Page.getFrameTreeReturnValue;
23591 |     "Page.getLayoutMetrics": Page.getLayoutMetricsReturnValue;
23592 |     "Page.getNavigationHistory": Page.getNavigationHistoryReturnValue;
23593 |     "Page.resetNavigationHistory": Page.resetNavigationHistoryReturnValue;
23594 |     "Page.getResourceContent": Page.getResourceContentReturnValue;
23595 |     "Page.getResourceTree": Page.getResourceTreeReturnValue;
23596 |     "Page.handleJavaScriptDialog": Page.handleJavaScriptDialogReturnValue;
23597 |     "Page.navigate": Page.navigateReturnValue;
23598 |     "Page.navigateToHistoryEntry": Page.navigateToHistoryEntryReturnValue;
23599 |     "Page.printToPDF": Page.printToPDFReturnValue;
23600 |     "Page.reload": Page.reloadReturnValue;
23601 |     "Page.removeScriptToEvaluateOnLoad": Page.removeScriptToEvaluateOnLoadReturnValue;
23602 |     "Page.removeScriptToEvaluateOnNewDocument": Page.removeScriptToEvaluateOnNewDocumentReturnValue;
23603 |     "Page.screencastFrameAck": Page.screencastFrameAckReturnValue;
23604 |     "Page.searchInResource": Page.searchInResourceReturnValue;
23605 |     "Page.setAdBlockingEnabled": Page.setAdBlockingEnabledReturnValue;
23606 |     "Page.setBypassCSP": Page.setBypassCSPReturnValue;
23607 |     "Page.getPermissionsPolicyState": Page.getPermissionsPolicyStateReturnValue;
23608 |     "Page.getOriginTrials": Page.getOriginTrialsReturnValue;
23609 |     "Page.setDeviceMetricsOverride": Page.setDeviceMetricsOverrideReturnValue;
23610 |     "Page.setDeviceOrientationOverride": Page.setDeviceOrientationOverrideReturnValue;
23611 |     "Page.setFontFamilies": Page.setFontFamiliesReturnValue;
23612 |     "Page.setFontSizes": Page.setFontSizesReturnValue;
23613 |     "Page.setDocumentContent": Page.setDocumentContentReturnValue;
23614 |     "Page.setDownloadBehavior": Page.setDownloadBehaviorReturnValue;
23615 |     "Page.setGeolocationOverride": Page.setGeolocationOverrideReturnValue;
23616 |     "Page.setLifecycleEventsEnabled": Page.setLifecycleEventsEnabledReturnValue;
23617 |     "Page.setTouchEmulationEnabled": Page.setTouchEmulationEnabledReturnValue;
23618 |     "Page.startScreencast": Page.startScreencastReturnValue;
23619 |     "Page.stopLoading": Page.stopLoadingReturnValue;
23620 |     "Page.crash": Page.crashReturnValue;
23621 |     "Page.close": Page.closeReturnValue;
23622 |     "Page.setWebLifecycleState": Page.setWebLifecycleStateReturnValue;
23623 |     "Page.stopScreencast": Page.stopScreencastReturnValue;
23624 |     "Page.produceCompilationCache": Page.produceCompilationCacheReturnValue;
23625 |     "Page.addCompilationCache": Page.addCompilationCacheReturnValue;
23626 |     "Page.clearCompilationCache": Page.clearCompilationCacheReturnValue;
23627 |     "Page.setSPCTransactionMode": Page.setSPCTransactionModeReturnValue;
23628 |     "Page.setRPHRegistrationMode": Page.setRPHRegistrationModeReturnValue;
23629 |     "Page.generateTestReport": Page.generateTestReportReturnValue;
23630 |     "Page.waitForDebugger": Page.waitForDebuggerReturnValue;
23631 |     "Page.setInterceptFileChooserDialog": Page.setInterceptFileChooserDialogReturnValue;
23632 |     "Page.setPrerenderingAllowed": Page.setPrerenderingAllowedReturnValue;
23633 |     "Page.getAnnotatedPageContent": Page.getAnnotatedPageContentReturnValue;
23634 |     "Performance.disable": Performance.disableReturnValue;
23635 |     "Performance.enable": Performance.enableReturnValue;
23636 |     "Performance.setTimeDomain": Performance.setTimeDomainReturnValue;
23637 |     "Performance.getMetrics": Performance.getMetricsReturnValue;
23638 |     "PerformanceTimeline.enable": PerformanceTimeline.enableReturnValue;
23639 |     "Preload.enable": Preload.enableReturnValue;
23640 |     "Preload.disable": Preload.disableReturnValue;
23641 |     "Security.disable": Security.disableReturnValue;
23642 |     "Security.enable": Security.enableReturnValue;
23643 |     "Security.setIgnoreCertificateErrors": Security.setIgnoreCertificateErrorsReturnValue;
23644 |     "Security.handleCertificateError": Security.handleCertificateErrorReturnValue;
23645 |     "Security.setOverrideCertificateErrors": Security.setOverrideCertificateErrorsReturnValue;
23646 |     "ServiceWorker.deliverPushMessage": ServiceWorker.deliverPushMessageReturnValue;
23647 |     "ServiceWorker.disable": ServiceWorker.disableReturnValue;
23648 |     "ServiceWorker.dispatchSyncEvent": ServiceWorker.dispatchSyncEventReturnValue;
23649 |     "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.dispatchPeriodicSyncEventReturnValue;
23650 |     "ServiceWorker.enable": ServiceWorker.enableReturnValue;
23651 |     "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.setForceUpdateOnPageLoadReturnValue;
23652 |     "ServiceWorker.skipWaiting": ServiceWorker.skipWaitingReturnValue;
23653 |     "ServiceWorker.startWorker": ServiceWorker.startWorkerReturnValue;
23654 |     "ServiceWorker.stopAllWorkers": ServiceWorker.stopAllWorkersReturnValue;
23655 |     "ServiceWorker.stopWorker": ServiceWorker.stopWorkerReturnValue;
23656 |     "ServiceWorker.unregister": ServiceWorker.unregisterReturnValue;
23657 |     "ServiceWorker.updateRegistration": ServiceWorker.updateRegistrationReturnValue;
23658 |     "Storage.getStorageKeyForFrame": Storage.getStorageKeyForFrameReturnValue;
23659 |     "Storage.getStorageKey": Storage.getStorageKeyReturnValue;
23660 |     "Storage.clearDataForOrigin": Storage.clearDataForOriginReturnValue;
23661 |     "Storage.clearDataForStorageKey": Storage.clearDataForStorageKeyReturnValue;
23662 |     "Storage.getCookies": Storage.getCookiesReturnValue;
23663 |     "Storage.setCookies": Storage.setCookiesReturnValue;
23664 |     "Storage.clearCookies": Storage.clearCookiesReturnValue;
23665 |     "Storage.getUsageAndQuota": Storage.getUsageAndQuotaReturnValue;
23666 |     "Storage.overrideQuotaForOrigin": Storage.overrideQuotaForOriginReturnValue;
23667 |     "Storage.trackCacheStorageForOrigin": Storage.trackCacheStorageForOriginReturnValue;
23668 |     "Storage.trackCacheStorageForStorageKey": Storage.trackCacheStorageForStorageKeyReturnValue;
23669 |     "Storage.trackIndexedDBForOrigin": Storage.trackIndexedDBForOriginReturnValue;
23670 |     "Storage.trackIndexedDBForStorageKey": Storage.trackIndexedDBForStorageKeyReturnValue;
23671 |     "Storage.untrackCacheStorageForOrigin": Storage.untrackCacheStorageForOriginReturnValue;
23672 |     "Storage.untrackCacheStorageForStorageKey": Storage.untrackCacheStorageForStorageKeyReturnValue;
23673 |     "Storage.untrackIndexedDBForOrigin": Storage.untrackIndexedDBForOriginReturnValue;
23674 |     "Storage.untrackIndexedDBForStorageKey": Storage.untrackIndexedDBForStorageKeyReturnValue;
23675 |     "Storage.getTrustTokens": Storage.getTrustTokensReturnValue;
23676 |     "Storage.clearTrustTokens": Storage.clearTrustTokensReturnValue;
23677 |     "Storage.getInterestGroupDetails": Storage.getInterestGroupDetailsReturnValue;
23678 |     "Storage.setInterestGroupTracking": Storage.setInterestGroupTrackingReturnValue;
23679 |     "Storage.setInterestGroupAuctionTracking": Storage.setInterestGroupAuctionTrackingReturnValue;
23680 |     "Storage.getSharedStorageMetadata": Storage.getSharedStorageMetadataReturnValue;
23681 |     "Storage.getSharedStorageEntries": Storage.getSharedStorageEntriesReturnValue;
23682 |     "Storage.setSharedStorageEntry": Storage.setSharedStorageEntryReturnValue;
23683 |     "Storage.deleteSharedStorageEntry": Storage.deleteSharedStorageEntryReturnValue;
23684 |     "Storage.clearSharedStorageEntries": Storage.clearSharedStorageEntriesReturnValue;
23685 |     "Storage.resetSharedStorageBudget": Storage.resetSharedStorageBudgetReturnValue;
23686 |     "Storage.setSharedStorageTracking": Storage.setSharedStorageTrackingReturnValue;
23687 |     "Storage.setStorageBucketTracking": Storage.setStorageBucketTrackingReturnValue;
23688 |     "Storage.deleteStorageBucket": Storage.deleteStorageBucketReturnValue;
23689 |     "Storage.runBounceTrackingMitigations": Storage.runBounceTrackingMitigationsReturnValue;
23690 |     "Storage.setAttributionReportingLocalTestingMode": Storage.setAttributionReportingLocalTestingModeReturnValue;
23691 |     "Storage.setAttributionReportingTracking": Storage.setAttributionReportingTrackingReturnValue;
23692 |     "Storage.sendPendingAttributionReports": Storage.sendPendingAttributionReportsReturnValue;
23693 |     "Storage.getRelatedWebsiteSets": Storage.getRelatedWebsiteSetsReturnValue;
23694 |     "Storage.getAffectedUrlsForThirdPartyCookieMetadata": Storage.getAffectedUrlsForThirdPartyCookieMetadataReturnValue;
23695 |     "Storage.setProtectedAudienceKAnonymity": Storage.setProtectedAudienceKAnonymityReturnValue;
23696 |     "SystemInfo.getInfo": SystemInfo.getInfoReturnValue;
23697 |     "SystemInfo.getFeatureState": SystemInfo.getFeatureStateReturnValue;
23698 |     "SystemInfo.getProcessInfo": SystemInfo.getProcessInfoReturnValue;
23699 |     "Target.activateTarget": Target.activateTargetReturnValue;
23700 |     "Target.attachToTarget": Target.attachToTargetReturnValue;
23701 |     "Target.attachToBrowserTarget": Target.attachToBrowserTargetReturnValue;
23702 |     "Target.closeTarget": Target.closeTargetReturnValue;
23703 |     "Target.exposeDevToolsProtocol": Target.exposeDevToolsProtocolReturnValue;
23704 |     "Target.createBrowserContext": Target.createBrowserContextReturnValue;
23705 |     "Target.getBrowserContexts": Target.getBrowserContextsReturnValue;
23706 |     "Target.createTarget": Target.createTargetReturnValue;
23707 |     "Target.detachFromTarget": Target.detachFromTargetReturnValue;
23708 |     "Target.disposeBrowserContext": Target.disposeBrowserContextReturnValue;
23709 |     "Target.getTargetInfo": Target.getTargetInfoReturnValue;
23710 |     "Target.getTargets": Target.getTargetsReturnValue;
23711 |     "Target.sendMessageToTarget": Target.sendMessageToTargetReturnValue;
23712 |     "Target.setAutoAttach": Target.setAutoAttachReturnValue;
23713 |     "Target.autoAttachRelated": Target.autoAttachRelatedReturnValue;
23714 |     "Target.setDiscoverTargets": Target.setDiscoverTargetsReturnValue;
23715 |     "Target.setRemoteLocations": Target.setRemoteLocationsReturnValue;
23716 |     "Target.getDevToolsTarget": Target.getDevToolsTargetReturnValue;
23717 |     "Target.openDevTools": Target.openDevToolsReturnValue;
23718 |     "Tethering.bind": Tethering.bindReturnValue;
23719 |     "Tethering.unbind": Tethering.unbindReturnValue;
23720 |     "Tracing.end": Tracing.endReturnValue;
23721 |     "Tracing.getCategories": Tracing.getCategoriesReturnValue;
23722 |     "Tracing.getTrackEventDescriptor": Tracing.getTrackEventDescriptorReturnValue;
23723 |     "Tracing.recordClockSyncMarker": Tracing.recordClockSyncMarkerReturnValue;
23724 |     "Tracing.requestMemoryDump": Tracing.requestMemoryDumpReturnValue;
23725 |     "Tracing.start": Tracing.startReturnValue;
23726 |     "WebAudio.enable": WebAudio.enableReturnValue;
23727 |     "WebAudio.disable": WebAudio.disableReturnValue;
23728 |     "WebAudio.getRealtimeData": WebAudio.getRealtimeDataReturnValue;
23729 |     "WebAuthn.enable": WebAuthn.enableReturnValue;
23730 |     "WebAuthn.disable": WebAuthn.disableReturnValue;
23731 |     "WebAuthn.addVirtualAuthenticator": WebAuthn.addVirtualAuthenticatorReturnValue;
23732 |     "WebAuthn.setResponseOverrideBits": WebAuthn.setResponseOverrideBitsReturnValue;
23733 |     "WebAuthn.removeVirtualAuthenticator": WebAuthn.removeVirtualAuthenticatorReturnValue;
23734 |     "WebAuthn.addCredential": WebAuthn.addCredentialReturnValue;
23735 |     "WebAuthn.getCredential": WebAuthn.getCredentialReturnValue;
23736 |     "WebAuthn.getCredentials": WebAuthn.getCredentialsReturnValue;
23737 |     "WebAuthn.removeCredential": WebAuthn.removeCredentialReturnValue;
23738 |     "WebAuthn.clearCredentials": WebAuthn.clearCredentialsReturnValue;
23739 |     "WebAuthn.setUserVerified": WebAuthn.setUserVerifiedReturnValue;
23740 |     "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.setAutomaticPresenceSimulationReturnValue;
23741 |     "WebAuthn.setCredentialProperties": WebAuthn.setCredentialPropertiesReturnValue;
23742 |     "Console.clearMessages": Console.clearMessagesReturnValue;
23743 |     "Console.disable": Console.disableReturnValue;
23744 |     "Console.enable": Console.enableReturnValue;
23745 |     "Debugger.continueToLocation": Debugger.continueToLocationReturnValue;
23746 |     "Debugger.disable": Debugger.disableReturnValue;
23747 |     "Debugger.enable": Debugger.enableReturnValue;
23748 |     "Debugger.evaluateOnCallFrame": Debugger.evaluateOnCallFrameReturnValue;
23749 |     "Debugger.getPossibleBreakpoints": Debugger.getPossibleBreakpointsReturnValue;
23750 |     "Debugger.getScriptSource": Debugger.getScriptSourceReturnValue;
23751 |     "Debugger.disassembleWasmModule": Debugger.disassembleWasmModuleReturnValue;
23752 |     "Debugger.nextWasmDisassemblyChunk": Debugger.nextWasmDisassemblyChunkReturnValue;
23753 |     "Debugger.getWasmBytecode": Debugger.getWasmBytecodeReturnValue;
23754 |     "Debugger.getStackTrace": Debugger.getStackTraceReturnValue;
23755 |     "Debugger.pause": Debugger.pauseReturnValue;
23756 |     "Debugger.pauseOnAsyncCall": Debugger.pauseOnAsyncCallReturnValue;
23757 |     "Debugger.removeBreakpoint": Debugger.removeBreakpointReturnValue;
23758 |     "Debugger.restartFrame": Debugger.restartFrameReturnValue;
23759 |     "Debugger.resume": Debugger.resumeReturnValue;
23760 |     "Debugger.searchInContent": Debugger.searchInContentReturnValue;
23761 |     "Debugger.setAsyncCallStackDepth": Debugger.setAsyncCallStackDepthReturnValue;
23762 |     "Debugger.setBlackboxExecutionContexts": Debugger.setBlackboxExecutionContextsReturnValue;
23763 |     "Debugger.setBlackboxPatterns": Debugger.setBlackboxPatternsReturnValue;
23764 |     "Debugger.setBlackboxedRanges": Debugger.setBlackboxedRangesReturnValue;
23765 |     "Debugger.setBreakpoint": Debugger.setBreakpointReturnValue;
23766 |     "Debugger.setInstrumentationBreakpoint": Debugger.setInstrumentationBreakpointReturnValue;
23767 |     "Debugger.setBreakpointByUrl": Debugger.setBreakpointByUrlReturnValue;
23768 |     "Debugger.setBreakpointOnFunctionCall": Debugger.setBreakpointOnFunctionCallReturnValue;
23769 |     "Debugger.setBreakpointsActive": Debugger.setBreakpointsActiveReturnValue;
23770 |     "Debugger.setPauseOnExceptions": Debugger.setPauseOnExceptionsReturnValue;
23771 |     "Debugger.setReturnValue": Debugger.setReturnValueReturnValue;
23772 |     "Debugger.setScriptSource": Debugger.setScriptSourceReturnValue;
23773 |     "Debugger.setSkipAllPauses": Debugger.setSkipAllPausesReturnValue;
23774 |     "Debugger.setVariableValue": Debugger.setVariableValueReturnValue;
23775 |     "Debugger.stepInto": Debugger.stepIntoReturnValue;
23776 |     "Debugger.stepOut": Debugger.stepOutReturnValue;
23777 |     "Debugger.stepOver": Debugger.stepOverReturnValue;
23778 |     "HeapProfiler.addInspectedHeapObject": HeapProfiler.addInspectedHeapObjectReturnValue;
23779 |     "HeapProfiler.collectGarbage": HeapProfiler.collectGarbageReturnValue;
23780 |     "HeapProfiler.disable": HeapProfiler.disableReturnValue;
23781 |     "HeapProfiler.enable": HeapProfiler.enableReturnValue;
23782 |     "HeapProfiler.getHeapObjectId": HeapProfiler.getHeapObjectIdReturnValue;
23783 |     "HeapProfiler.getObjectByHeapObjectId": HeapProfiler.getObjectByHeapObjectIdReturnValue;
23784 |     "HeapProfiler.getSamplingProfile": HeapProfiler.getSamplingProfileReturnValue;
23785 |     "HeapProfiler.startSampling": HeapProfiler.startSamplingReturnValue;
23786 |     "HeapProfiler.startTrackingHeapObjects": HeapProfiler.startTrackingHeapObjectsReturnValue;
23787 |     "HeapProfiler.stopSampling": HeapProfiler.stopSamplingReturnValue;
23788 |     "HeapProfiler.stopTrackingHeapObjects": HeapProfiler.stopTrackingHeapObjectsReturnValue;
23789 |     "HeapProfiler.takeHeapSnapshot": HeapProfiler.takeHeapSnapshotReturnValue;
23790 |     "Profiler.disable": Profiler.disableReturnValue;
23791 |     "Profiler.enable": Profiler.enableReturnValue;
23792 |     "Profiler.getBestEffortCoverage": Profiler.getBestEffortCoverageReturnValue;
23793 |     "Profiler.setSamplingInterval": Profiler.setSamplingIntervalReturnValue;
23794 |     "Profiler.start": Profiler.startReturnValue;
23795 |     "Profiler.startPreciseCoverage": Profiler.startPreciseCoverageReturnValue;
23796 |     "Profiler.stop": Profiler.stopReturnValue;
23797 |     "Profiler.stopPreciseCoverage": Profiler.stopPreciseCoverageReturnValue;
23798 |     "Profiler.takePreciseCoverage": Profiler.takePreciseCoverageReturnValue;
23799 |     "Runtime.awaitPromise": Runtime.awaitPromiseReturnValue;
23800 |     "Runtime.callFunctionOn": Runtime.callFunctionOnReturnValue;
23801 |     "Runtime.compileScript": Runtime.compileScriptReturnValue;
23802 |     "Runtime.disable": Runtime.disableReturnValue;
23803 |     "Runtime.discardConsoleEntries": Runtime.discardConsoleEntriesReturnValue;
23804 |     "Runtime.enable": Runtime.enableReturnValue;
23805 |     "Runtime.evaluate": Runtime.evaluateReturnValue;
23806 |     "Runtime.getIsolateId": Runtime.getIsolateIdReturnValue;
23807 |     "Runtime.getHeapUsage": Runtime.getHeapUsageReturnValue;
23808 |     "Runtime.getProperties": Runtime.getPropertiesReturnValue;
23809 |     "Runtime.globalLexicalScopeNames": Runtime.globalLexicalScopeNamesReturnValue;
23810 |     "Runtime.queryObjects": Runtime.queryObjectsReturnValue;
23811 |     "Runtime.releaseObject": Runtime.releaseObjectReturnValue;
23812 |     "Runtime.releaseObjectGroup": Runtime.releaseObjectGroupReturnValue;
23813 |     "Runtime.runIfWaitingForDebugger": Runtime.runIfWaitingForDebuggerReturnValue;
23814 |     "Runtime.runScript": Runtime.runScriptReturnValue;
23815 |     "Runtime.setAsyncCallStackDepth": Runtime.setAsyncCallStackDepthReturnValue;
23816 |     "Runtime.setCustomObjectFormatterEnabled": Runtime.setCustomObjectFormatterEnabledReturnValue;
23817 |     "Runtime.setMaxCallStackSizeToCapture": Runtime.setMaxCallStackSizeToCaptureReturnValue;
23818 |     "Runtime.terminateExecution": Runtime.terminateExecutionReturnValue;
23819 |     "Runtime.addBinding": Runtime.addBindingReturnValue;
23820 |     "Runtime.removeBinding": Runtime.removeBindingReturnValue;
23821 |     "Runtime.getExceptionDetails": Runtime.getExceptionDetailsReturnValue;
23822 |     "Schema.getDomains": Schema.getDomainsReturnValue;
23823 |   }
23824 | }


------------------------------------------------------------
[24] اسم الملف: structs.d.ts
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/types/structs.d.ts
------------------------------------------------------------
0001 | /**
0002 |  * Copyright (c) Microsoft Corporation.
0003 |  *
0004 |  * Licensed under the Apache License, Version 2.0 (the "License");
0005 |  * you may not use this file except in compliance with the License.
0006 |  * You may obtain a copy of the License at
0007 |  *
0008 |  * http://www.apache.org/licenses/LICENSE-2.0
0009 |  *
0010 |  * Unless required by applicable law or agreed to in writing, software
0011 |  * distributed under the License is distributed on an "AS IS" BASIS,
0012 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 |  * See the License for the specific language governing permissions and
0014 |  * limitations under the License.
0015 |  */
0016 | 
0017 | import { JSHandle, ElementHandle, Frame, Page, BrowserContext } from './types';
0018 | 
0019 | /**
0020 |  * Can be converted to JSON
0021 |  */
0022 | export type Serializable = any;
0023 | /**
0024 |  * Can be converted to JSON, but may also contain JSHandles.
0025 |  */
0026 | export type EvaluationArgument = {};
0027 | 
0028 | export type NoHandles<Arg> = Arg extends JSHandle ? never : (Arg extends object ? { [Key in keyof Arg]: NoHandles<Arg[Key]> } : Arg);
0029 | export type Unboxed<Arg> =
0030 |   Arg extends ElementHandle<infer T> ? T :
0031 |   Arg extends JSHandle<infer T> ? T :
0032 |   Arg extends NoHandles<Arg> ? Arg :
0033 |   Arg extends [infer A0] ? [Unboxed<A0>] :
0034 |   Arg extends [infer A0, infer A1] ? [Unboxed<A0>, Unboxed<A1>] :
0035 |   Arg extends [infer A0, infer A1, infer A2] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>] :
0036 |   Arg extends [infer A0, infer A1, infer A2, infer A3] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>, Unboxed<A3>] :
0037 |   Arg extends Array<infer T> ? Array<Unboxed<T>> :
0038 |   Arg extends object ? { [Key in keyof Arg]: Unboxed<Arg[Key]> } :
0039 |   Arg;
0040 | export type PageFunction0<R> = string | (() => R | Promise<R>);
0041 | export type PageFunction<Arg, R> = string | ((arg: Unboxed<Arg>) => R | Promise<R>);
0042 | export type PageFunctionOn<On, Arg2, R> = string | ((on: On, arg2: Unboxed<Arg2>) => R | Promise<R>);
0043 | export type SmartHandle<T> = [T] extends [Node] ? ElementHandle<T> : JSHandle<T>;
0044 | export type ElementHandleForTag<K extends keyof HTMLElementTagNameMap> = ElementHandle<HTMLElementTagNameMap[K]>;
0045 | export type BindingSource = { context: BrowserContext, page: Page, frame: Frame };


------------------------------------------------------------
[25] اسم الملف: reinstall_msedge_beta_linux.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_beta_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old beta if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-beta[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-beta
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # GnuPG is not preinstalled in slim images
0036 | if ! command -v gpg >/dev/null; then
0037 |   apt-get update
0038 |   apt-get install -y gpg
0039 | fi
0040 | 
0041 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0042 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0043 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0044 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
0045 | rm /tmp/microsoft.gpg
0046 | apt-get update && apt-get install -y microsoft-edge-beta
0047 | 
0048 | microsoft-edge-beta --version


------------------------------------------------------------
[26] اسم الملف: reinstall_chrome_beta_linux.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_beta_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | if [[ $(arch) == "aarch64" ]]; then
0006 |   echo "ERROR: not supported on Linux Arm64"
0007 |   exit 1
0008 | fi
0009 | 
0010 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0011 |   if [[ ! -f "/etc/os-release" ]]; then
0012 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0013 |     exit 1
0014 |   fi
0015 | 
0016 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0017 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0018 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0019 |     exit 1
0020 |   fi
0021 | fi
0022 | 
0023 | # 1. make sure to remove old beta if any.
0024 | if dpkg --get-selections | grep -q "^google-chrome-beta[[:space:]]*install$" >/dev/null; then
0025 |   apt-get remove -y google-chrome-beta
0026 | fi
0027 | 
0028 | # 2. Update apt lists (needed to install curl and chrome dependencies)
0029 | apt-get update
0030 | 
0031 | # 3. Install curl to download chrome
0032 | if ! command -v curl >/dev/null; then
0033 |   apt-get install -y curl
0034 | fi
0035 | 
0036 | # 4. download chrome beta from dl.google.com and install it.
0037 | cd /tmp
0038 | curl -O https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
0039 | apt-get install -y ./google-chrome-beta_current_amd64.deb
0040 | rm -rf ./google-chrome-beta_current_amd64.deb
0041 | cd -
0042 | google-chrome-beta --version


------------------------------------------------------------
[27] اسم الملف: reinstall_msedge_beta_mac.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_beta_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl --retry 3 -o ./msedge_beta.pkg "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_beta.pkg -target /
0010 | rm -rf /tmp/msedge_beta.pkg
0011 | /Applications/Microsoft\ Edge\ Beta.app/Contents/MacOS/Microsoft\ Edge\ Beta --version


------------------------------------------------------------
[28] اسم الملف: reinstall_msedge_stable_mac.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_stable_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl --retry 3 -o ./msedge_stable.pkg "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_stable.pkg -target /
0010 | rm -rf /tmp/msedge_stable.pkg
0011 | /Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --version


------------------------------------------------------------
[29] اسم الملف: reinstall_chrome_stable_mac.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_stable_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | rm -rf "/Applications/Google Chrome.app"
0006 | cd /tmp
0007 | curl --retry 3 -o ./googlechrome.dmg https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg
0008 | hdiutil attach -nobrowse -quiet -noautofsck -noautoopen -mountpoint /Volumes/googlechrome.dmg ./googlechrome.dmg
0009 | cp -pR "/Volumes/googlechrome.dmg/Google Chrome.app" /Applications
0010 | hdiutil detach /Volumes/googlechrome.dmg
0011 | rm -rf /tmp/googlechrome.dmg
0012 | /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version


------------------------------------------------------------
[30] اسم الملف: reinstall_msedge_stable_linux.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_stable_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old stable if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-stable[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-stable
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # GnuPG is not preinstalled in slim images
0036 | if ! command -v gpg >/dev/null; then
0037 |   apt-get update
0038 |   apt-get install -y gpg
0039 | fi
0040 | 
0041 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0042 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0043 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0044 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-stable.list'
0045 | rm /tmp/microsoft.gpg
0046 | apt-get update && apt-get install -y microsoft-edge-stable
0047 | 
0048 | microsoft-edge-stable --version


------------------------------------------------------------
[31] اسم الملف: reinstall_chrome_beta_mac.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_beta_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | rm -rf "/Applications/Google Chrome Beta.app"
0006 | cd /tmp
0007 | curl --retry 3 -o ./googlechromebeta.dmg https://dl.google.com/chrome/mac/universal/beta/googlechromebeta.dmg
0008 | hdiutil attach -nobrowse -quiet -noautofsck -noautoopen -mountpoint /Volumes/googlechromebeta.dmg ./googlechromebeta.dmg
0009 | cp -pR "/Volumes/googlechromebeta.dmg/Google Chrome Beta.app" /Applications
0010 | hdiutil detach /Volumes/googlechromebeta.dmg
0011 | rm -rf /tmp/googlechromebeta.dmg
0012 | 
0013 | /Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --version


------------------------------------------------------------
[32] اسم الملف: reinstall_msedge_dev_linux.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_dev_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | 
0003 | set -e
0004 | set -x
0005 | 
0006 | if [[ $(arch) == "aarch64" ]]; then
0007 |   echo "ERROR: not supported on Linux Arm64"
0008 |   exit 1
0009 | fi
0010 | 
0011 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0012 |   if [[ ! -f "/etc/os-release" ]]; then
0013 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0014 |     exit 1
0015 |   fi
0016 | 
0017 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0018 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0019 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0020 |     exit 1
0021 |   fi
0022 | fi
0023 | 
0024 | # 1. make sure to remove old dev if any.
0025 | if dpkg --get-selections | grep -q "^microsoft-edge-dev[[:space:]]*install$" >/dev/null; then
0026 |   apt-get remove -y microsoft-edge-dev
0027 | fi
0028 | 
0029 | # 2. Install curl to download Microsoft gpg key
0030 | if ! command -v curl >/dev/null; then
0031 |   apt-get update
0032 |   apt-get install -y curl
0033 | fi
0034 | 
0035 | # GnuPG is not preinstalled in slim images
0036 | if ! command -v gpg >/dev/null; then
0037 |   apt-get update
0038 |   apt-get install -y gpg
0039 | fi
0040 | 
0041 | # 3. Add the GPG key, the apt repo, update the apt cache, and install the package
0042 | curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
0043 | install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
0044 | sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
0045 | rm /tmp/microsoft.gpg
0046 | apt-get update && apt-get install -y microsoft-edge-dev
0047 | 
0048 | microsoft-edge-dev --version


------------------------------------------------------------
[33] اسم الملف: reinstall_chrome_stable_linux.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_chrome_stable_linux.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | if [[ $(arch) == "aarch64" ]]; then
0006 |   echo "ERROR: not supported on Linux Arm64"
0007 |   exit 1
0008 | fi
0009 | 
0010 | if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then
0011 |   if [[ ! -f "/etc/os-release" ]]; then
0012 |     echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"
0013 |     exit 1
0014 |   fi
0015 | 
0016 |   ID=$(bash -c 'source /etc/os-release && echo $ID')
0017 |   if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then
0018 |     echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"
0019 |     exit 1
0020 |   fi
0021 | fi
0022 | 
0023 | # 1. make sure to remove old stable if any.
0024 | if dpkg --get-selections | grep -q "^google-chrome[[:space:]]*install$" >/dev/null; then
0025 |   apt-get remove -y google-chrome
0026 | fi
0027 | 
0028 | # 2. Update apt lists (needed to install curl and chrome dependencies)
0029 | apt-get update
0030 | 
0031 | # 3. Install curl to download chrome
0032 | if ! command -v curl >/dev/null; then
0033 |   apt-get install -y curl
0034 | fi
0035 | 
0036 | # 4. download chrome stable from dl.google.com and install it.
0037 | cd /tmp
0038 | curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
0039 | apt-get install -y ./google-chrome-stable_current_amd64.deb
0040 | rm -rf ./google-chrome-stable_current_amd64.deb
0041 | cd -
0042 | google-chrome --version


------------------------------------------------------------
[34] اسم الملف: reinstall_msedge_dev_mac.sh
المسار: ./venv/lib/python3.13/site-packages/playwright/driver/package/bin/reinstall_msedge_dev_mac.sh
------------------------------------------------------------
0001 | #!/usr/bin/env bash
0002 | set -e
0003 | set -x
0004 | 
0005 | cd /tmp
0006 | curl --retry 3 -o ./msedge_dev.pkg "$1"
0007 | # Note: there's no way to uninstall previously installed MSEdge.
0008 | # However, running PKG again seems to update installation.
0009 | sudo installer -pkg /tmp/msedge_dev.pkg -target /
0010 | rm -rf /tmp/msedge_dev.pkg
0011 | /Applications/Microsoft\ Edge\ Dev.app/Contents/MacOS/Microsoft\ Edge\ Dev --version


------------------------------------------------------------
[35] اسم الملف: style.json
المسار: ./infrastructure/docker/martin/style.json
------------------------------------------------------------
0001 | {
0002 |   "version": 8,
0003 |   "name": "Intaleq Premium Map Style",
0004 |   "metadata": {
0005 |     "brand": "Intaleq",
0006 |     "version": "2.0.0",
0007 |     "description": "Google + OSM hybrid style with 3D buildings, railways, subway, waterways, and Intaleq brand palette"
0008 |   },
0009 |   "center": [
0010 |     36.276008,
0011 |     33.513685
0012 |   ],
0013 |   "zoom": 15,
0014 |   "glyphs": "https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf",
0015 |   "sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite",
0016 |   "sources": {
0017 |     "local-osm-polygons": {
0018 |       "type": "vector",
0019 |       "tiles": [
0020 |         "https://tiles.intaleqapp.com/planet_osm_polygon/{z}/{x}/{y}"
0021 |       ],
0022 |       "maxzoom": 14,
0023 |       "attribution": "© Intaleq | © OpenStreetMap contributors"
0024 |     },
0025 |     "local-osm-lines": {
0026 |       "type": "vector",
0027 |       "tiles": [
0028 |         "https://tiles.intaleqapp.com/planet_osm_line/{z}/{x}/{y}"
0029 |       ],
0030 |       "maxzoom": 14
0031 |     },
0032 |     "local-osm-points": {
0033 |       "type": "vector",
0034 |       "tiles": [
0035 |         "https://tiles.intaleqapp.com/planet_osm_point/{z}/{x}/{y}"
0036 |       ],
0037 |       "maxzoom": 14
0038 |     },
0039 |     "imported-pois": {
0040 |       "type": "vector",
0041 |       "tiles": [
0042 |         "https://tiles.intaleqapp.com/places_egypt/{z}/{x}/{y}"
0043 |       ],
0044 |       "maxzoom": 14
0045 |     }
0046 |   },
0047 |   "layers": [
0048 |     {
0049 |       "id": "background",
0050 |       "type": "background",
0051 |       "paint": {
0052 |         "background-color": "#EEF2F7"
0053 |       }
0054 |     },
0055 |     {
0056 |       "id": "landuse-residential",
0057 |       "type": "fill",
0058 |       "source": "local-osm-polygons",
0059 |       "source-layer": "planet_osm_polygon",
0060 |       "filter": [
0061 |         "==",
0062 |         "landuse",
0063 |         "residential"
0064 |       ],
0065 |       "paint": {
0066 |         "fill-color": "#F0F4F8",
0067 |         "fill-opacity": 1
0068 |       }
0069 |     },
0070 |     {
0071 |       "id": "landuse-commercial",
0072 |       "type": "fill",
0073 |       "source": "local-osm-polygons",
0074 |       "source-layer": "planet_osm_polygon",
0075 |       "filter": [
0076 |         "==",
0077 |         "landuse",
0078 |         "commercial"
0079 |       ],
0080 |       "paint": {
0081 |         "fill-color": "#FAF5EE",
0082 |         "fill-opacity": 1
0083 |       }
0084 |     },
0085 |     {
0086 |       "id": "landuse-industrial",
0087 |       "type": "fill",
0088 |       "source": "local-osm-polygons",
0089 |       "source-layer": "planet_osm_polygon",
0090 |       "filter": [
0091 |         "in",
0092 |         "landuse",
0093 |         "industrial",
0094 |         "railway"
0095 |       ],
0096 |       "paint": {
0097 |         "fill-color": "#E4E8EE",
0098 |         "fill-opacity": 1
0099 |       }
0100 |     },
0101 |     {
0102 |       "id": "landuse-cemetery",
0103 |       "type": "fill",
0104 |       "source": "local-osm-polygons",
0105 |       "source-layer": "planet_osm_polygon",
0106 |       "filter": [
0107 |         "==",
0108 |         "landuse",
0109 |         "cemetery"
0110 |       ],
0111 |       "paint": {
0112 |         "fill-color": "#B8D4BA",
0113 |         "fill-opacity": 0.9
0114 |       }
0115 |     },
0116 |     {
0117 |       "id": "landuse-military",
0118 |       "type": "fill",
0119 |       "source": "local-osm-polygons",
0120 |       "source-layer": "planet_osm_polygon",
0121 |       "filter": [
0122 |         "==",
0123 |         "landuse",
0124 |         "military"
0125 |       ],
0126 |       "paint": {
0127 |         "fill-color": "#E2D9CC",
0128 |         "fill-opacity": 0.8
0129 |       }
0130 |     },
0131 |     {
0132 |       "id": "park-layer",
0133 |       "type": "fill",
0134 |       "source": "local-osm-polygons",
0135 |       "source-layer": "planet_osm_polygon",
0136 |       "filter": [
0137 |         "any",
0138 |         [
0139 |           "in",
0140 |           "leisure",
0141 |           "park",
0142 |           "garden",
0143 |           "nature_reserve",
0144 |           "pitch",
0145 |           "playground"
0146 |         ],
0147 |         [
0148 |           "in",
0149 |           "landuse",
0150 |           "grass",
0151 |           "meadow",
0152 |           "forest"
0153 |         ],
0154 |         [
0155 |           "in",
0156 |           "natural",
0157 |           "wood",
0158 |           "scrub",
0159 |           "heath"
0160 |         ]
0161 |       ],
0162 |       "paint": {
0163 |         "fill-color": [
0164 |           "match",
0165 |           [
0166 |             "get",
0167 |             "leisure"
0168 |           ],
0169 |           "pitch",
0170 |           "#9ED4A0",
0171 |           "playground",
0172 |           "#B8E6B8",
0173 |           "#C5E8C5"
0174 |         ],
0175 |         "fill-opacity": 0.85
0176 |       }
0177 |     },
0178 |     {
0179 |       "id": "park-outline",
0180 |       "type": "line",
0181 |       "source": "local-osm-polygons",
0182 |       "source-layer": "planet_osm_polygon",
0183 |       "filter": [
0184 |         "in",
0185 |         "leisure",
0186 |         "park",
0187 |         "garden",
0188 |         "nature_reserve"
0189 |       ],
0190 |       "paint": {
0191 |         "line-color": "#94D4A0",
0192 |         "line-width": 0.8,
0193 |         "line-opacity": 0.7
0194 |       }
0195 |     },
0196 |     {
0197 |       "id": "water-polygon",
0198 |       "type": "fill",
0199 |       "source": "local-osm-polygons",
0200 |       "source-layer": "planet_osm_polygon",
0201 |       "filter": [
0202 |         "any",
0203 |         [
0204 |           "in",
0205 |           "natural",
0206 |           "water",
0207 |           "lake",
0208 |           "bay"
0209 |         ],
0210 |         [
0211 |           "==",
0212 |           "waterway",
0213 |           "riverbank"
0214 |         ],
0215 |         [
0216 |           "in",
0217 |           "landuse",
0218 |           "basin",
0219 |           "reservoir"
0220 |         ],
0221 |         [
0222 |           "==",
0223 |           "amenity",
0224 |           "fountain"
0225 |         ]
0226 |       ],
0227 |       "paint": {
0228 |         "fill-color": "#9ECFE8",
0229 |         "fill-opacity": 0.95
0230 |       }
0231 |     },
0232 |     {
0233 |       "id": "water-polygon-outline",
0234 |       "type": "line",
0235 |       "source": "local-osm-polygons",
0236 |       "source-layer": "planet_osm_polygon",
0237 |       "filter": [
0238 |         "any",
0239 |         [
0240 |           "in",
0241 |           "natural",
0242 |           "water",
0243 |           "lake",
0244 |           "bay"
0245 |         ],
0246 |         [
0247 |           "==",
0248 |           "waterway",
0249 |           "riverbank"
0250 |         ],
0251 |         [
0252 |           "in",
0253 |           "landuse",
0254 |           "basin",
0255 |           "reservoir"
0256 |         ]
0257 |       ],
0258 |       "paint": {
0259 |         "line-color": "#6BB8D8",
0260 |         "line-width": 0.8,
0261 |         "line-opacity": 0.8
0262 |       }
0263 |     },
0264 |     {
0265 |       "id": "waterway-river",
0266 |       "type": "line",
0267 |       "source": "local-osm-lines",
0268 |       "source-layer": "planet_osm_line",
0269 |       "filter": [
0270 |         "all",
0271 |         [
0272 |           "in",
0273 |           "waterway",
0274 |           "river",
0275 |           "canal"
0276 |         ],
0277 |         [
0278 |           "!=",
0279 |           "intermittent",
0280 |           "yes"
0281 |         ],
0282 |         [
0283 |           "!=",
0284 |           "seasonal",
0285 |           "yes"
0286 |         ],
0287 |         [
0288 |           "!=",
0289 |           "tunnel",
0290 |           "yes"
0291 |         ]
0292 |       ],
0293 |       "paint": {
0294 |         "line-color": "#6BB8D8",
0295 |         "line-width": [
0296 |           "interpolate",
0297 |           [
0298 |             "linear"
0299 |           ],
0300 |           [
0301 |             "zoom"
0302 |           ],
0303 |           10,
0304 |           1.5,
0305 |           14,
0306 |           4,
0307 |           16,
0308 |           7
0309 |         ],
0310 |         "line-opacity": 0.95
0311 |       }
0312 |     },
0313 |     {
0314 |       "id": "waterway-stream-drain",
0315 |       "type": "line",
0316 |       "source": "local-osm-lines",
0317 |       "source-layer": "planet_osm_line",
0318 |       "filter": [
0319 |         "all",
0320 |         [
0321 |           "in",
0322 |           "waterway",
0323 |           "stream",
0324 |           "drain",
0325 |           "ditch"
0326 |         ],
0327 |         [
0328 |           "!=",
0329 |           "intermittent",
0330 |           "yes"
0331 |         ],
0332 |         [
0333 |           "!=",
0334 |           "seasonal",
0335 |           "yes"
0336 |         ],
0337 |         [
0338 |           "!=",
0339 |           "tunnel",
0340 |           "yes"
0341 |         ]
0342 |       ],
0343 |       "minzoom": 13,
0344 |       "paint": {
0345 |         "line-color": "#7FBFD8",
0346 |         "line-width": [
0347 |           "interpolate",
0348 |           [
0349 |             "linear"
0350 |           ],
0351 |           [
0352 |             "zoom"
0353 |           ],
0354 |           13,
0355 |           0.8,
0356 |           16,
0357 |           2.5
0358 |         ],
0359 |         "line-opacity": 0.85
0360 |       }
0361 |     },
0362 |     {
0363 |       "id": "railway-area",
0364 |       "type": "fill",
0365 |       "source": "local-osm-polygons",
0366 |       "source-layer": "planet_osm_polygon",
0367 |       "filter": [
0368 |         "==",
0369 |         "landuse",
0370 |         "railway"
0371 |       ],
0372 |       "paint": {
0373 |         "fill-color": "#DDE2EA",
0374 |         "fill-opacity": 0.9
0375 |       }
0376 |     },
0377 |     {
0378 |       "id": "railway-rail-casing",
0379 |       "type": "line",
0380 |       "source": "local-osm-lines",
0381 |       "source-layer": "planet_osm_line",
0382 |       "filter": [
0383 |         "all",
0384 |         [
0385 |           "in",
0386 |           "railway",
0387 |           "rail",
0388 |           "narrow_gauge",
0389 |           "preserved"
0390 |         ],
0391 |         [
0392 |           "!=",
0393 |           "service",
0394 |           "yard"
0395 |         ],
0396 |         [
0397 |           "!=",
0398 |           "service",
0399 |           "siding"
0400 |         ]
0401 |       ],
0402 |       "minzoom": 8,
0403 |       "paint": {
0404 |         "line-color": "#B0B8C5",
0405 |         "line-width": [
0406 |           "interpolate",
0407 |           [
0408 |             "linear"
0409 |           ],
0410 |           [
0411 |             "zoom"
0412 |           ],
0413 |           8,
0414 |           2,
0415 |           12,
0416 |           4,
0417 |           16,
0418 |           8
0419 |         ]
0420 |       }
0421 |     },
0422 |     {
0423 |       "id": "railway-rail-core",
0424 |       "type": "line",
0425 |       "source": "local-osm-lines",
0426 |       "source-layer": "planet_osm_line",
0427 |       "filter": [
0428 |         "all",
0429 |         [
0430 |           "in",
0431 |           "railway",
0432 |           "rail",
0433 |           "narrow_gauge",
0434 |           "preserved"
0435 |         ],
0436 |         [
0437 |           "!=",
0438 |           "service",
0439 |           "yard"
0440 |         ],
0441 |         [
0442 |           "!=",
0443 |           "service",
0444 |           "siding"
0445 |         ]
0446 |       ],
0447 |       "minzoom": 8,
0448 |       "paint": {
0449 |         "line-color": "#6B7A8E",
0450 |         "line-width": [
0451 |           "interpolate",
0452 |           [
0453 |             "linear"
0454 |           ],
0455 |           [
0456 |             "zoom"
0457 |           ],
0458 |           8,
0459 |           1,
0460 |           12,
0461 |           2.5,
0462 |           16,
0463 |           5
0464 |         ],
0465 |         "line-dasharray": [
0466 |           6,
0467 |           4
0468 |         ]
0469 |       }
0470 |     },
0471 |     {
0472 |       "id": "railway-subway-casing",
0473 |       "type": "line",
0474 |       "source": "local-osm-lines",
0475 |       "source-layer": "planet_osm_line",
0476 |       "filter": [
0477 |         "in",
0478 |         "railway",
0479 |         "subway",
0480 |         "light_rail",
0481 |         "tram",
0482 |         "monorail"
0483 |       ],
0484 |       "minzoom": 10,
0485 |       "paint": {
0486 |         "line-color": [
0487 |           "match",
0488 |           [
0489 |             "get",
0490 |             "railway"
0491 |           ],
0492 |           "subway",
0493 |           "#CC2233",
0494 |           "light_rail",
0495 |           "#0066CC",
0496 |           "tram",
0497 |           "#8833BB",
0498 |           "monorail",
0499 |           "#008855",
0500 |           "#BB3344"
0501 |         ],
0502 |         "line-width": [
0503 |           "interpolate",
0504 |           [
0505 |             "linear"
0506 |           ],
0507 |           [
0508 |             "zoom"
0509 |           ],
0510 |           10,
0511 |           3,
0512 |           14,
0513 |           6,
0514 |           16,
0515 |           10
0516 |         ]
0517 |       }
0518 |     },
0519 |     {
0520 |       "id": "railway-subway-core",
0521 |       "type": "line",
0522 |       "source": "local-osm-lines",
0523 |       "source-layer": "planet_osm_line",
0524 |       "filter": [
0525 |         "in",
0526 |         "railway",
0527 |         "subway",
0528 |         "light_rail",
0529 |         "tram",
0530 |         "monorail"
0531 |       ],
0532 |       "minzoom": 10,
0533 |       "paint": {
0534 |         "line-color": [
0535 |           "match",
0536 |           [
0537 |             "get",
0538 |             "railway"
0539 |           ],
0540 |           "subway",
0541 |           "#FF3347",
0542 |           "light_rail",
0543 |           "#2288FF",
0544 |           "tram",
0545 |           "#AA44EE",
0546 |           "monorail",
0547 |           "#00BB66",
0548 |           "#FF4455"
0549 |         ],
0550 |         "line-width": [
0551 |           "interpolate",
0552 |           [
0553 |             "linear"
0554 |           ],
0555 |           [
0556 |             "zoom"
0557 |           ],
0558 |           10,
0559 |           1.5,
0560 |           14,
0561 |           3.5,
0562 |           16,
0563 |           6
0564 |         ]
0565 |       }
0566 |     },
0567 |     {
0568 |       "id": "road-casing-track-path",
0569 |       "type": "line",
0570 |       "source": "local-osm-lines",
0571 |       "source-layer": "planet_osm_line",
0572 |       "filter": [
0573 |         "in",
0574 |         "highway",
0575 |         "track",
0576 |         "path",
0577 |         "footway",
0578 |         "cycleway",
0579 |         "steps"
0580 |       ],
0581 |       "minzoom": 14,
0582 |       "paint": {
0583 |         "line-color": "#C8CDD6",
0584 |         "line-width": [
0585 |           "interpolate",
0586 |           [
0587 |             "linear"
0588 |           ],
0589 |           [
0590 |             "zoom"
0591 |           ],
0592 |           14,
0593 |           1,
0594 |           16,
0595 |           4
0596 |         ],
0597 |         "line-dasharray": [
0598 |           4,
0599 |           3
0600 |         ]
0601 |       }
0602 |     },
0603 |     {
0604 |       "id": "road-casing-minor",
0605 |       "type": "line",
0606 |       "source": "local-osm-lines",
0607 |       "source-layer": "planet_osm_line",
0608 |       "filter": [
0609 |         "in",
0610 |         "highway",
0611 |         "residential",
0612 |         "service",
0613 |         "unclassified",
0614 |         "living_street",
0615 |         "pedestrian"
0616 |       ],
0617 |       "paint": {
0618 |         "line-color": "#C8D0DA",
0619 |         "line-width": [
0620 |           "interpolate",
0621 |           [
0622 |             "linear"
0623 |           ],
0624 |           [
0625 |             "zoom"
0626 |           ],
0627 |           12,
0628 |           1.5,
0629 |           16,
0630 |           10
0631 |         ]
0632 |       }
0633 |     },
0634 |     {
0635 |       "id": "road-core-minor",
0636 |       "type": "line",
0637 |       "source": "local-osm-lines",
0638 |       "source-layer": "planet_osm_line",
0639 |       "filter": [
0640 |         "in",
0641 |         "highway",
0642 |         "residential",
0643 |         "service",
0644 |         "unclassified",
0645 |         "living_street",
0646 |         "pedestrian"
0647 |       ],
0648 |       "paint": {
0649 |         "line-color": "#FFFFFF",
0650 |         "line-width": [
0651 |           "interpolate",
0652 |           [
0653 |             "linear"
0654 |           ],
0655 |           [
0656 |             "zoom"
0657 |           ],
0658 |           12,
0659 |           0.8,
0660 |           16,
0661 |           8
0662 |         ]
0663 |       }
0664 |     },
0665 |     {
0666 |       "id": "road-casing-tertiary",
0667 |       "type": "line",
0668 |       "source": "local-osm-lines",
0669 |       "source-layer": "planet_osm_line",
0670 |       "filter": [
0671 |         "in",
0672 |         "highway",
0673 |         "tertiary",
0674 |         "tertiary_link"
0675 |       ],
0676 |       "paint": {
0677 |         "line-color": "#BCC5D2",
0678 |         "line-width": [
0679 |           "interpolate",
0680 |           [
0681 |             "linear"
0682 |           ],
0683 |           [
0684 |             "zoom"
0685 |           ],
0686 |           11,
0687 |           2,
0688 |           16,
0689 |           14
0690 |         ]
0691 |       }
0692 |     },
0693 |     {
0694 |       "id": "road-core-tertiary",
0695 |       "type": "line",
0696 |       "source": "local-osm-lines",
0697 |       "source-layer": "planet_osm_line",
0698 |       "filter": [
0699 |         "in",
0700 |         "highway",
0701 |         "tertiary",
0702 |         "tertiary_link"
0703 |       ],
0704 |       "paint": {
0705 |         "line-color": "#FFFFFF",
0706 |         "line-width": [
0707 |           "interpolate",
0708 |           [
0709 |             "linear"
0710 |           ],
0711 |           [
0712 |             "zoom"
0713 |           ],
0714 |           11,
0715 |           1.2,
0716 |           16,
0717 |           11
0718 |         ]
0719 |       }
0720 |     },
0721 |     {
0722 |       "id": "road-casing-secondary",
0723 |       "type": "line",
0724 |       "source": "local-osm-lines",
0725 |       "source-layer": "planet_osm_line",
0726 |       "filter": [
0727 |         "in",
0728 |         "highway",
0729 |         "secondary",
0730 |         "secondary_link"
0731 |       ],
0732 |       "paint": {
0733 |         "line-color": "#B8D4EC",
0734 |         "line-width": [
0735 |           "interpolate",
0736 |           [
0737 |             "linear"
0738 |           ],
0739 |           [
0740 |             "zoom"
0741 |           ],
0742 |           11,
0743 |           2.5,
0744 |           16,
0745 |           16
0746 |         ]
0747 |       }
0748 |     },
0749 |     {
0750 |       "id": "road-core-secondary",
0751 |       "type": "line",
0752 |       "source": "local-osm-lines",
0753 |       "source-layer": "planet_osm_line",
0754 |       "filter": [
0755 |         "in",
0756 |         "highway",
0757 |         "secondary",
0758 |         "secondary_link"
0759 |       ],
0760 |       "paint": {
0761 |         "line-color": "#F0F7FF",
0762 |         "line-width": [
0763 |           "interpolate",
0764 |           [
0765 |             "linear"
0766 |           ],
0767 |           [
0768 |             "zoom"
0769 |           ],
0770 |           11,
0771 |           1.8,
0772 |           16,
0773 |           13
0774 |         ]
0775 |       }
0776 |     },
0777 |     {
0778 |       "id": "road-casing-primary",
0779 |       "type": "line",
0780 |       "source": "local-osm-lines",
0781 |       "source-layer": "planet_osm_line",
0782 |       "filter": [
0783 |         "in",
0784 |         "highway",
0785 |         "primary",
0786 |         "primary_link"
0787 |       ],
0788 |       "paint": {
0789 |         "line-color": "#E8C96A",
0790 |         "line-width": [
0791 |           "interpolate",
0792 |           [
0793 |             "linear"
0794 |           ],
0795 |           [
0796 |             "zoom"
0797 |           ],
0798 |           10,
0799 |           3,
0800 |           16,
0801 |           18
0802 |         ]
0803 |       }
0804 |     },
0805 |     {
0806 |       "id": "road-core-primary",
0807 |       "type": "line",
0808 |       "source": "local-osm-lines",
0809 |       "source-layer": "planet_osm_line",
0810 |       "filter": [
0811 |         "in",
0812 |         "highway",
0813 |         "primary",
0814 |         "primary_link"
0815 |       ],
0816 |       "paint": {
0817 |         "line-color": "#FFC72C",
0818 |         "line-width": [
0819 |           "interpolate",
0820 |           [
0821 |             "linear"
0822 |           ],
0823 |           [
0824 |             "zoom"
0825 |           ],
0826 |           10,
0827 |           2,
0828 |           16,
0829 |           14
0830 |         ]
0831 |       }
0832 |     },
0833 |     {
0834 |       "id": "road-casing-motorway-trunk",
0835 |       "type": "line",
0836 |       "source": "local-osm-lines",
0837 |       "source-layer": "planet_osm_line",
0838 |       "filter": [
0839 |         "in",
0840 |         "highway",
0841 |         "motorway",
0842 |         "motorway_link",
0843 |         "trunk",
0844 |         "trunk_link"
0845 |       ],
0846 |       "paint": {
0847 |         "line-color": "#F4A261",
0848 |         "line-width": [
0849 |           "interpolate",
0850 |           [
0851 |             "linear"
0852 |           ],
0853 |           [
0854 |             "zoom"
0855 |           ],
0856 |           9,
0857 |           4,
0858 |           16,
0859 |           20
0860 |         ]
0861 |       }
0862 |     },
0863 |     {
0864 |       "id": "road-core-motorway-trunk",
0865 |       "type": "line",
0866 |       "source": "local-osm-lines",
0867 |       "source-layer": "planet_osm_line",
0868 |       "filter": [
0869 |         "in",
0870 |         "highway",
0871 |         "motorway",
0872 |         "motorway_link",
0873 |         "trunk",
0874 |         "trunk_link"
0875 |       ],
0876 |       "paint": {
0877 |         "line-color": "#E76F2A",
0878 |         "line-width": [
0879 |           "interpolate",
0880 |           [
0881 |             "linear"
0882 |           ],
0883 |           [
0884 |             "zoom"
0885 |           ],
0886 |           9,
0887 |           2.5,
0888 |           16,
0889 |           16
0890 |         ]
0891 |       }
0892 |     },
0893 |     {
0894 |       "id": "building-fill-flat",
0895 |       "type": "fill",
0896 |       "source": "local-osm-polygons",
0897 |       "source-layer": "planet_osm_polygon",
0898 |       "filter": [
0899 |         "has",
0900 |         "building"
0901 |       ],
0902 |       "maxzoom": 15,
0903 |       "paint": {
0904 |         "fill-color": "#DDD8D0",
0905 |         "fill-opacity": 0.9,
0906 |         "fill-outline-color": "#C8C2B8"
0907 |       }
0908 |     },
0909 |     {
0910 |       "id": "building-3d",
0911 |       "type": "fill-extrusion",
0912 |       "source": "local-osm-polygons",
0913 |       "source-layer": "planet_osm_polygon",
0914 |       "minzoom": 15,
0915 |       "filter": [
0916 |         "has",
0917 |         "building"
0918 |       ],
0919 |       "paint": {
0920 |         "fill-extrusion-color": [
0921 |           "match",
0922 |           [
0923 |             "get",
0924 |             "building"
0925 |           ],
0926 |           "commercial",
0927 |           "#E0D8CC",
0928 |           "retail",
0929 |           "#E8DDD0",
0930 |           "industrial",
0931 |           "#D8DDE4",
0932 |           "church",
0933 |           "#E4DCF0",
0934 |           "mosque",
0935 |           "#D4EAD8",
0936 |           "hospital",
0937 |           "#F0E0E0",
0938 |           "school",
0939 |           "#E8ECD4",
0940 |           "university",
0941 |           "#E4E8D4",
0942 |           "hotel",
0943 |           "#E0E4EE",
0944 |           "apartments",
0945 |           "#E8E4DC",
0946 |           "#E4DFDA"
0947 |         ],
0948 |         "fill-extrusion-height": [
0949 |           "coalesce",
0950 |           [
0951 |             "to-number",
0952 |             [
0953 |               "get",
0954 |               "height"
0955 |             ],
0956 |             0
0957 |           ],
0958 |           [
0959 |             "*",
0960 |             [
0961 |               "to-number",
0962 |               [
0963 |                 "get",
0964 |                 "building:levels"
0965 |               ],
0966 |               3
0967 |             ],
0968 |             3.5
0969 |           ],
0970 |           12
0971 |         ],
0972 |         "fill-extrusion-base": [
0973 |           "coalesce",
0974 |           [
0975 |             "to-number",
0976 |             [
0977 |               "get",
0978 |               "min_height"
0979 |             ],
0980 |             0
0981 |           ],
0982 |           0
0983 |         ],
0984 |         "fill-extrusion-opacity": 0.85,
0985 |         "fill-extrusion-vertical-gradient": true
0986 |       }
0987 |     },
0988 |     {
0989 |       "id": "railway-label",
0990 |       "type": "symbol",
0991 |       "source": "local-osm-lines",
0992 |       "source-layer": "planet_osm_line",
0993 |       "filter": [
0994 |         "in",
0995 |         "railway",
0996 |         "rail",
0997 |         "subway",
0998 |         "light_rail",
0999 |         "tram"
1000 |       ],
1001 |       "minzoom": 13,
1002 |       "layout": {
1003 |         "text-field": [
1004 |           "coalesce",
1005 |           [
1006 |             "get",
1007 |             "name:ar"
1008 |           ],
1009 |           [
1010 |             "get",
1011 |             "name"
1012 |           ],
1013 |           ""
1014 |         ],
1015 |         "text-font": [
1016 |           "Noto Sans Regular"
1017 |         ],
1018 |         "text-size": 10,
1019 |         "symbol-placement": "line",
1020 |         "text-padding": 6,
1021 |         "text-allow-overlap": false
1022 |       },
1023 |       "paint": {
1024 |         "text-color": [
1025 |           "match",
1026 |           [
1027 |             "get",
1028 |             "railway"
1029 |           ],
1030 |           "subway",
1031 |           "#CC2233",
1032 |           "light_rail",
1033 |           "#0055BB",
1034 |           "tram",
1035 |           "#7722AA",
1036 |           "#4A5568"
1037 |         ],
1038 |         "text-halo-color": "rgba(255,255,255,0.9)",
1039 |         "text-halo-width": 2
1040 |       }
1041 |     },
1042 |     {
1043 |       "id": "waterway-label",
1044 |       "type": "symbol",
1045 |       "source": "local-osm-lines",
1046 |       "source-layer": "planet_osm_line",
1047 |       "filter": [
1048 |         "all",
1049 |         [
1050 |           "in",
1051 |           "waterway",
1052 |           "river",
1053 |           "canal"
1054 |         ],
1055 |         [
1056 |           "!=",
1057 |           "intermittent",
1058 |           "yes"
1059 |         ],
1060 |         [
1061 |           "has",
1062 |           "name"
1063 |         ]
1064 |       ],
1065 |       "minzoom": 12,
1066 |       "layout": {
1067 |         "text-field": [
1068 |           "coalesce",
1069 |           [
1070 |             "get",
1071 |             "name:ar"
1072 |           ],
1073 |           [
1074 |             "get",
1075 |             "name"
1076 |           ],
1077 |           ""
1078 |         ],
1079 |         "text-font": [
1080 |           "Noto Sans Regular"
1081 |         ],
1082 |         "text-size": 11,
1083 |         "symbol-placement": "line",
1084 |         "text-letter-spacing": 0.1
1085 |       },
1086 |       "paint": {
1087 |         "text-color": "#2E86AB",
1088 |         "text-halo-color": "rgba(255,255,255,0.85)",
1089 |         "text-halo-width": 2
1090 |       }
1091 |     },
1092 |     {
1093 |       "id": "building-number-polygon",
1094 |       "type": "symbol",
1095 |       "source": "local-osm-polygons",
1096 |       "source-layer": "planet_osm_polygon",
1097 |       "minzoom": 17,
1098 |       "filter": [
1099 |         "has",
1100 |         "addr:housenumber"
1101 |       ],
1102 |       "layout": {
1103 |         "text-field": "{addr:housenumber}",
1104 |         "text-font": [
1105 |           "Noto Sans Regular"
1106 |         ],
1107 |         "text-size": 10,
1108 |         "text-allow-overlap": false,
1109 |         "text-ignore-placement": false
1110 |       },
1111 |       "paint": {
1112 |         "text-color": "#5A5048",
1113 |         "text-halo-color": "rgba(255,255,255,0.95)",
1114 |         "text-halo-width": 1.5
1115 |       }
1116 |     },
1117 |     {
1118 |       "id": "building-number-point",
1119 |       "type": "symbol",
1120 |       "source": "local-osm-points",
1121 |       "source-layer": "planet_osm_point",
1122 |       "minzoom": 17,
1123 |       "filter": [
1124 |         "has",
1125 |         "addr:housenumber"
1126 |       ],
1127 |       "layout": {
1128 |         "text-field": "{addr:housenumber}",
1129 |         "text-font": [
1130 |           "Noto Sans Regular"
1131 |         ],
1132 |         "text-size": 10,
1133 |         "text-allow-overlap": false
1134 |       },
1135 |       "paint": {
1136 |         "text-color": "#5A5048",
1137 |         "text-halo-color": "rgba(255,255,255,0.95)",
1138 |         "text-halo-width": 1.5
1139 |       }
1140 |     },
1141 |     {
1142 |       "id": "road-labels-minor",
1143 |       "type": "symbol",
1144 |       "source": "local-osm-lines",
1145 |       "source-layer": "planet_osm_line",
1146 |       "filter": [
1147 |         "in",
1148 |         "highway",
1149 |         "residential",
1150 |         "service",
1151 |         "unclassified",
1152 |         "living_street"
1153 |       ],
1154 |       "minzoom": 16,
1155 |       "layout": {
1156 |         "text-field": [
1157 |           "coalesce",
1158 |           [
1159 |             "get",
1160 |             "name:ar"
1161 |           ],
1162 |           [
1163 |             "get",
1164 |             "name"
1165 |           ],
1166 |           ""
1167 |         ],
1168 |         "text-font": [
1169 |           "Noto Sans Regular"
1170 |         ],
1171 |         "text-size": 11,
1172 |         "symbol-placement": "line",
1173 |         "text-letter-spacing": 0.04,
1174 |         "text-padding": 4,
1175 |         "text-allow-overlap": false
1176 |       },
1177 |       "paint": {
1178 |         "text-color": "#4A5568",
1179 |         "text-halo-color": "rgba(255,255,255,0.85)",
1180 |         "text-halo-width": 1.5
1181 |       }
1182 |     },
1183 |     {
1184 |       "id": "road-labels-major",
1185 |       "type": "symbol",
1186 |       "source": "local-osm-lines",
1187 |       "source-layer": "planet_osm_line",
1188 |       "filter": [
1189 |         "in",
1190 |         "highway",
1191 |         "primary",
1192 |         "secondary",
1193 |         "tertiary",
1194 |         "motorway",
1195 |         "trunk"
1196 |       ],
1197 |       "minzoom": 13,
1198 |       "layout": {
1199 |         "text-field": [
1200 |           "coalesce",
1201 |           [
1202 |             "get",
1203 |             "name:ar"
1204 |           ],
1205 |           [
1206 |             "get",
1207 |             "name"
1208 |           ],
1209 |           ""
1210 |         ],
1211 |         "text-font": [
1212 |           "Noto Sans Regular"
1213 |         ],
1214 |         "text-size": [
1215 |           "interpolate",
1216 |           [
1217 |             "linear"
1218 |           ],
1219 |           [
1220 |             "zoom"
1221 |           ],
1222 |           13,
1223 |           11,
1224 |           16,
1225 |           14
1226 |         ],
1227 |         "symbol-placement": "line",
1228 |         "text-letter-spacing": 0.05,
1229 |         "text-padding": 5,
1230 |         "text-allow-overlap": false
1231 |       },
1232 |       "paint": {
1233 |         "text-color": "#2D3748",
1234 |         "text-halo-color": "rgba(255,255,255,0.9)",
1235 |         "text-halo-width": 2
1236 |       }
1237 |     },
1238 |     {
1239 |       "id": "poi-hospital",
1240 |       "type": "symbol",
1241 |       "source": "local-osm-points",
1242 |       "source-layer": "planet_osm_point",
1243 |       "minzoom": 13,
1244 |       "filter": [
1245 |         "==",
1246 |         "amenity",
1247 |         "hospital"
1248 |       ],
1249 |       "layout": {
1250 |         "icon-image": "hospital",
1251 |         "icon-size": 1,
1252 |         "text-field": [
1253 |           "coalesce",
1254 |           [
1255 |             "get",
1256 |             "name:ar"
1257 |           ],
1258 |           [
1259 |             "get",
1260 |             "name"
1261 |           ],
1262 |           ""
1263 |         ],
1264 |         "text-font": [
1265 |           "Noto Sans Regular"
1266 |         ],
1267 |         "text-size": 11,
1268 |         "text-offset": [
1269 |           0,
1270 |           1.2
1271 |         ],
1272 |         "text-anchor": "top",
1273 |         "text-allow-overlap": false
1274 |       },
1275 |       "paint": {
1276 |         "text-color": "#C0392B",
1277 |         "text-halo-color": "white",
1278 |         "text-halo-width": 2
1279 |       }
1280 |     },
1281 |     {
1282 |       "id": "poi-pharmacy",
1283 |       "type": "symbol",
1284 |       "source": "local-osm-points",
1285 |       "source-layer": "planet_osm_point",
1286 |       "minzoom": 15,
1287 |       "filter": [
1288 |         "==",
1289 |         "amenity",
1290 |         "pharmacy"
1291 |       ],
1292 |       "layout": {
1293 |         "icon-image": "pharmacy",
1294 |         "icon-size": 0.8,
1295 |         "text-field": [
1296 |           "coalesce",
1297 |           [
1298 |             "get",
1299 |             "name:ar"
1300 |           ],
1301 |           [
1302 |             "get",
1303 |             "name"
1304 |           ],
1305 |           ""
1306 |         ],
1307 |         "text-font": [
1308 |           "Noto Sans Regular"
1309 |         ],
1310 |         "text-size": 10,
1311 |         "text-offset": [
1312 |           0,
1313 |           1.2
1314 |         ],
1315 |         "text-anchor": "top"
1316 |       },
1317 |       "paint": {
1318 |         "text-color": "#1A7A3C",
1319 |         "text-halo-color": "white",
1320 |         "text-halo-width": 1.5
1321 |       }
1322 |     },
1323 |     {
1324 |       "id": "poi-place-of-worship",
1325 |       "type": "symbol",
1326 |       "source": "local-osm-points",
1327 |       "source-layer": "planet_osm_point",
1328 |       "minzoom": 14,
1329 |       "filter": [
1330 |         "==",
1331 |         "amenity",
1332 |         "place_of_worship"
1333 |       ],
1334 |       "layout": {
1335 |         "icon-image": "tourist",
1336 |         "icon-size": 0.8,
1337 |         "text-field": [
1338 |           "coalesce",
1339 |           [
1340 |             "get",
1341 |             "name:ar"
1342 |           ],
1343 |           [
1344 |             "get",
1345 |             "name"
1346 |           ],
1347 |           ""
1348 |         ],
1349 |         "text-font": [
1350 |           "Noto Sans Regular"
1351 |         ],
1352 |         "text-size": 11,
1353 |         "text-offset": [
1354 |           0,
1355 |           1.2
1356 |         ],
1357 |         "text-anchor": "top"
1358 |       },
1359 |       "paint": {
1360 |         "text-color": "#1A6B3A",
1361 |         "text-halo-color": "white",
1362 |         "text-halo-width": 2
1363 |       }
1364 |     },
1365 |     {
1366 |       "id": "poi-restaurant-cafe",
1367 |       "type": "symbol",
1368 |       "source": "local-osm-points",
1369 |       "source-layer": "planet_osm_point",
1370 |       "minzoom": 16,
1371 |       "filter": [
1372 |         "in",
1373 |         "amenity",
1374 |         "restaurant",
1375 |         "cafe",
1376 |         "fast_food"
1377 |       ],
1378 |       "layout": {
1379 |         "icon-image": [
1380 |           "match",
1381 |           [
1382 |             "get",
1383 |             "amenity"
1384 |           ],
1385 |           "cafe",
1386 |           "cafe",
1387 |           "restaurant"
1388 |         ],
1389 |         "icon-size": 0.8,
1390 |         "text-field": [
1391 |           "coalesce",
1392 |           [
1393 |             "get",
1394 |             "name:ar"
1395 |           ],
1396 |           [
1397 |             "get",
1398 |             "name"
1399 |           ],
1400 |           ""
1401 |         ],
1402 |         "text-font": [
1403 |           "Noto Sans Regular"
1404 |         ],
1405 |         "text-size": 10,
1406 |         "text-offset": [
1407 |           0,
1408 |           1.2
1409 |         ],
1410 |         "text-anchor": "top"
1411 |       },
1412 |       "paint": {
1413 |         "text-color": "#3D4A5C",
1414 |         "text-halo-color": "white",
1415 |         "text-halo-width": 1.5
1416 |       }
1417 |     },
1418 |     {
1419 |       "id": "poi-school",
1420 |       "type": "symbol",
1421 |       "source": "local-osm-points",
1422 |       "source-layer": "planet_osm_point",
1423 |       "minzoom": 14,
1424 |       "filter": [
1425 |         "in",
1426 |         "amenity",
1427 |         "school",
1428 |         "university",
1429 |         "college"
1430 |       ],
1431 |       "layout": {
1432 |         "icon-image": "college",
1433 |         "icon-size": 0.8,
1434 |         "text-field": [
1435 |           "coalesce",
1436 |           [
1437 |             "get",
1438 |             "name:ar"
1439 |           ],
1440 |           [
1441 |             "get",
1442 |             "name"
1443 |           ],
1444 |           ""
1445 |         ],
1446 |         "text-font": [
1447 |           "Noto Sans Regular"
1448 |         ],
1449 |         "text-size": 11,
1450 |         "text-offset": [
1451 |           0,
1452 |           1.2
1453 |         ],
1454 |         "text-anchor": "top"
1455 |       },
1456 |       "paint": {
1457 |         "text-color": "#5A4A8A",
1458 |         "text-halo-color": "white",
1459 |         "text-halo-width": 2
1460 |       }
1461 |     },
1462 |     {
1463 |       "id": "poi-transit-station",
1464 |       "type": "symbol",
1465 |       "source": "local-osm-points",
1466 |       "source-layer": "planet_osm_point",
1467 |       "minzoom": 12,
1468 |       "filter": [
1469 |         "any",
1470 |         [
1471 |           "==",
1472 |           "railway",
1473 |           "station"
1474 |         ],
1475 |         [
1476 |           "==",
1477 |           "railway",
1478 |           "halt"
1479 |         ],
1480 |         [
1481 |           "==",
1482 |           "railway",
1483 |           "tram_stop"
1484 |         ],
1485 |         [
1486 |           "==",
1487 |           "station",
1488 |           "subway"
1489 |         ],
1490 |         [
1491 |           "==",
1492 |           "amenity",
1493 |           "bus_station"
1494 |         ]
1495 |       ],
1496 |       "layout": {
1497 |         "icon-image": "rail",
1498 |         "icon-size": 1,
1499 |         "text-field": [
1500 |           "coalesce",
1501 |           [
1502 |             "get",
1503 |             "name:ar"
1504 |           ],
1505 |           [
1506 |             "get",
1507 |             "name"
1508 |           ],
1509 |           ""
1510 |         ],
1511 |         "text-font": [
1512 |           "Noto Sans Regular"
1513 |         ],
1514 |         "text-size": 11,
1515 |         "text-offset": [
1516 |           0,
1517 |           1.4
1518 |         ],
1519 |         "text-anchor": "top",
1520 |         "text-allow-overlap": false
1521 |       },
1522 |       "paint": {
1523 |         "text-color": "#CC2233",
1524 |         "text-halo-color": "rgba(255,255,255,0.95)",
1525 |         "text-halo-width": 2
1526 |       }
1527 |     },
1528 |     {
1529 |       "id": "place-labels-area",
1530 |       "type": "symbol",
1531 |       "source": "local-osm-polygons",
1532 |       "source-layer": "planet_osm_polygon",
1533 |       "minzoom": 10,
1534 |       "filter": [
1535 |         "has",
1536 |         "name"
1537 |       ],
1538 |       "layout": {
1539 |         "text-field": [
1540 |           "coalesce",
1541 |           [
1542 |             "get",
1543 |             "name:ar"
1544 |           ],
1545 |           [
1546 |             "get",
1547 |             "name"
1548 |           ],
1549 |           ""
1550 |         ],
1551 |         "text-font": [
1552 |           "Noto Sans Regular"
1553 |         ],
1554 |         "text-size": [
1555 |           "interpolate",
1556 |           [
1557 |             "linear"
1558 |           ],
1559 |           [
1560 |             "zoom"
1561 |           ],
1562 |           10,
1563 |           10,
1564 |           14,
1565 |           13
1566 |         ],
1567 |         "text-padding": 8,
1568 |         "text-allow-overlap": false,
1569 |         "text-ignore-placement": false
1570 |       },
1571 |       "paint": {
1572 |         "text-color": "#34495E",
1573 |         "text-halo-color": "rgba(255,255,255,0.85)",
1574 |         "text-halo-width": 2
1575 |       }
1576 |     },
1577 |     {
1578 |       "id": "place-labels-point",
1579 |       "type": "symbol",
1580 |       "source": "local-osm-points",
1581 |       "source-layer": "planet_osm_point",
1582 |       "minzoom": 10,
1583 |       "filter": [
1584 |         "any",
1585 |         [
1586 |           "in",
1587 |           "place",
1588 |           "city",
1589 |           "town",
1590 |           "village",
1591 |           "suburb",
1592 |           "neighbourhood",
1593 |           "hamlet",
1594 |           "locality",
1595 |           "quarter"
1596 |         ],
1597 |         [
1598 |           "in",
1599 |           "natural",
1600 |           "peak",
1601 |           "spring"
1602 |         ]
1603 |       ],
1604 |       "layout": {
1605 |         "text-field": [
1606 |           "coalesce",
1607 |           [
1608 |             "get",
1609 |             "name:ar"
1610 |           ],
1611 |           [
1612 |             "get",
1613 |             "name"
1614 |           ],
1615 |           ""
1616 |         ],
1617 |         "text-font": [
1618 |           "Noto Sans Regular"
1619 |         ],
1620 |         "text-size": [
1621 |           "interpolate",
1622 |           [
1623 |             "linear"
1624 |           ],
1625 |           [
1626 |             "zoom"
1627 |           ],
1628 |           10,
1629 |           [
1630 |             "match",
1631 |             [
1632 |               "get",
1633 |               "place"
1634 |             ],
1635 |             "city",
1636 |             16,
1637 |             "town",
1638 |             14,
1639 |             11
1640 |           ],
1641 |           14,
1642 |           [
1643 |             "match",
1644 |             [
1645 |               "get",
1646 |               "place"
1647 |             ],
1648 |             "city",
1649 |             20,
1650 |             "town",
1651 |             16,
1652 |             13
1653 |           ],
1654 |           17,
1655 |           14
1656 |         ],
1657 |         "text-letter-spacing": [
1658 |           "match",
1659 |           [
1660 |             "get",
1661 |             "place"
1662 |           ],
1663 |           "city",
1664 |           0.08,
1665 |           "town",
1666 |           0.05,
1667 |           0.02
1668 |         ],
1669 |         "text-anchor": "center",
1670 |         "text-padding": 10,
1671 |         "text-allow-overlap": false
1672 |       },
1673 |       "paint": {
1674 |         "text-color": [
1675 |           "match",
1676 |           [
1677 |             "get",
1678 |             "place"
1679 |           ],
1680 |           "city",
1681 |           "#1A2740",
1682 |           "town",
1683 |           "#2C3E50",
1684 |           "village",
1685 |           "#3D4F62",
1686 |           "suburb",
1687 |           "#4A5568",
1688 |           "neighbourhood",
1689 |           "#556677",
1690 |           "#607080"
1691 |         ],
1692 |         "text-halo-color": "rgba(255,255,255,0.92)",
1693 |         "text-halo-width": [
1694 |           "match",
1695 |           [
1696 |             "get",
1697 |             "place"
1698 |           ],
1699 |           "city",
1700 |           3,
1701 |           "town",
1702 |           2.5,
1703 |           2
1704 |         ]
1705 |       }
1706 |     }
1707 |   ]
1708 | }


------------------------------------------------------------
[36] اسم الملف: server_restore.sh
المسار: ./infrastructure/scripts/server_restore.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Server Restoration Script for Syria Landmarks
0003 | # To be run on the server terminal
0004 | 
0005 | set -e
0006 | 
0007 | APP_DIR="/home/hamzadoctor/app"
0008 | EXPORT_FILE="infrastructure/docker/postgis/syria_export.sql"
0009 | 
0010 | echo "🔄 Restoring Syria landmarks to production database..."
0011 | 
0012 | # 1. Clean existing manual imports to avoid PK conflicts
0013 | echo "🧹 Clearing existing manual entries..."
0014 | docker exec -i map-db psql -U mapuser -d mapdb -c "DELETE FROM places_syria WHERE source = 'manual_import_2026_04';"
0015 | 
0016 | # 2. Inject the SQL dump
0017 | echo "📥 Injecting SQL dump..."
0018 | docker exec -i map-db psql -U mapuser -d mapdb < "$APP_DIR/$EXPORT_FILE"
0019 | 
0020 | # 3. Refresh API cache
0021 | echo "🧹 Flushing Redis..."
0022 | docker exec -i map-redis redis-cli flushall
0023 | 
0024 | echo "✅ Restoration complete! Syria landmarks are live."


------------------------------------------------------------
[37] اسم الملف: execute_import.sh
المسار: ./infrastructure/scripts/execute_import.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Script to execute Syria data import on the server
0003 | # To be run from /home/hamzadoctor/app
0004 | 
0005 | APP_DIR="/home/hamzadoctor/app"
0006 | CSV_FILE="syria_final_complete.csv"
0007 | SQL_FILE="infrastructure/docker/postgis/import_syria_csv.sql"
0008 | 
0009 | echo "📦 Transferring CSV to PostGIS container..."
0010 | docker cp "$APP_DIR/$CSV_FILE" map-db:/tmp/syria_data.csv
0011 | 
0012 | echo "💾 Running SQL import script..."
0013 | # We use docker compose exec db psql to run the logic
0014 | # First, update the SQL logic to use the /tmp path for COPY
0015 | # We'll create a temporary SQL wrapper to handle the COPY command with the correct path
0016 | 
0017 | docker exec -i map-db psql -U mapuser -d mapdb <<EOF
0018 | -- Load schema
0019 | \i /home/hamzadoctor/app/$SQL_FILE
0020 | 
0021 | -- Perform COPY (must be done in the container pointing to /tmp/syria_data.csv)
0022 | CREATE TEMP TABLE staging_syria_temp (
0023 |     name TEXT,
0024 |     latitude DECIMAL(10, 8),
0025 |     longitude DECIMAL(11, 8),
0026 |     category TEXT,
0027 |     address TEXT,
0028 |     description TEXT,
0029 |     created_at TIMESTAMP
0030 | );
0031 | 
0032 | COPY staging_syria_temp(name, latitude, longitude, category, address, description, created_at)
0033 | FROM '/tmp/syria_data.csv'
0034 | WITH (FORMAT csv, HEADER false, QUOTE '"', ENCODING 'UTF8');
0035 | 
0036 | INSERT INTO staging_syria SELECT * FROM staging_syria_temp;
0037 | DROP TABLE staging_syria_temp;
0038 | 
0039 | -- Final merge logic is already in the SQL file loaded via \i
0040 | EOF
0041 | 
0042 | echo "✅ Import completed successfully!"


------------------------------------------------------------
[38] اسم الملف: local_db_prep.sh
المسار: ./infrastructure/scripts/local_db_prep.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Local Database Preparation & Merge Script
0003 | # To be run on the Mac terminal after download_server_data.sh
0004 | 
0005 | set -e
0006 | 
0007 | echo "🚀 Starting local database merge and preparation..."
0008 | 
0009 | # 1. Start the DB container
0010 | echo "📦 Starting PostGIS container..."
0011 | docker compose up -d db
0012 | 
0013 | # 2. Wait for DB to be ready
0014 | echo "⏳ Waiting for database to be ready..."
0015 | until docker compose exec -T db pg_isready -U mapuser -d mapdb; do
0016 |   sleep 2
0017 | done
0018 | 
0019 | # 3. Initialize Schema & Import Existing Server Data
0020 | echo "🛠️ Initializing schema and loading server data..."
0021 | docker compose exec -T db psql -U mapuser -d mapdb -c "
0022 | DROP TABLE IF EXISTS places_syria;
0023 | CREATE TABLE places_syria (
0024 |     id SERIAL PRIMARY KEY,
0025 |     latitude DECIMAL(10, 8),
0026 |     longitude DECIMAL(11, 8),
0027 |     name TEXT,
0028 |     name_ar TEXT,
0029 |     name_en TEXT,
0030 |     address TEXT,
0031 |     category TEXT,
0032 |     neighbourhood TEXT,
0033 |     city TEXT,
0034 |     description TEXT,
0035 |     created_at TIMESTAMP DEFAULT NOW(),
0036 |     source TEXT,
0037 |     location GEOMETRY(Point, 4326)
0038 | );
0039 | 
0040 | CREATE OR REPLACE FUNCTION sync_place_location() RETURNS trigger AS \$\$
0041 | BEGIN
0042 |   IF NEW.latitude IS NOT NULL AND NEW.longitude IS NOT NULL THEN
0043 |     NEW.location := ST_SetSRID(ST_MakePoint(CAST(NEW.longitude AS FLOAT), CAST(NEW.latitude AS FLOAT)), 4326);
0044 |   END IF;
0045 |   RETURN NEW;
0046 | END;
0047 | \$\$ LANGUAGE plpgsql;
0048 | 
0049 | DROP TRIGGER IF EXISTS trg_sync_place_location ON places_syria;
0050 | CREATE TRIGGER trg_sync_place_location
0051 | BEFORE INSERT OR UPDATE ON places_syria
0052 | FOR EACH ROW EXECUTE FUNCTION sync_place_location();
0053 | "
0054 | 
0055 | # Load existing data if available
0056 | if [ -f "infrastructure/docker/postgis/existing_syria_data.sql" ]; then
0057 |     echo "📥 Loading existing server data..."
0058 |     docker compose exec -T db psql -U mapuser -d mapdb < infrastructure/docker/postgis/existing_syria_data.sql
0059 | fi
0060 | 
0061 | # 4. Import New CSV Data
0062 | echo "📥 Importing new CSV landmark data..."
0063 | docker cp infrastructure/docker/postgis/syria_final_complete.csv map-db:/tmp/syria_data.csv
0064 | 
0065 | docker compose exec -T db psql -U mapuser -d mapdb -c "
0066 | DROP TABLE IF EXISTS staging_syria;
0067 | CREATE TABLE staging_syria (
0068 |     name TEXT,
0069 |     latitude DECIMAL(10, 8),
0070 |     longitude DECIMAL(11, 8),
0071 |     category TEXT,
0072 |     address TEXT,
0073 |     description TEXT,
0074 |     created_at TIMESTAMP
0075 | );
0076 | 
0077 | -- HEADER true fixes the 'invalid input syntax' error
0078 | COPY staging_syria(name, latitude, longitude, category, address, description, created_at)
0079 | FROM '/tmp/syria_data.csv'
0080 | WITH (FORMAT csv, HEADER true, QUOTE '\"', ENCODING 'UTF8');
0081 | 
0082 | -- Merge into places_syria while avoiding duplicates
0083 | -- We check for name + spatial proximity (approx 50m)
0084 | INSERT INTO places_syria (name, name_ar, latitude, longitude, category, address, description, source, created_at)
0085 | SELECT
0086 |     name,
0087 |     name,
0088 |     latitude,
0089 |     longitude,
0090 |     category,
0091 |     address,
0092 |     description,
0093 |     'csv_import_2026_04',
0094 |     COALESCE(created_at, NOW())
0095 | FROM staging_syria s
0096 | WHERE NOT EXISTS (
0097 |     SELECT 1 FROM places_syria p
0098 |     WHERE (p.name = s.name OR p.name_ar = s.name)
0099 |     AND ST_DWithin(
0100 |         ST_SetSRID(ST_MakePoint(CAST(p.longitude AS FLOAT), CAST(p.latitude AS FLOAT)), 4326)::geography,
0101 |         ST_SetSRID(ST_MakePoint(CAST(s.longitude AS FLOAT), CAST(s.latitude AS FLOAT)), 4326)::geography,
0102 |         50
0103 |     )
0104 | );
0105 | 
0106 | DROP TABLE staging_syria;
0107 | "
0108 | 
0109 | echo "✅ Local database merge complete."
0110 | echo "Run ./infrastructure/scripts/local_verify.sh to review the results."


------------------------------------------------------------
[39] اسم الملف: import-regions.sh
المسار: ./infrastructure/scripts/import-regions.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Script to import Egypt and Jordan OSM data into the PostGIS database
0003 | # نص برمجي لاستيراد بيانات مصر والأردن إلى قاعدة البيانات
0004 | 
0005 | set -e
0006 | 
0007 | DATA_DIR="./infrastructure/osm-data"
0008 | DB_USER=${POSTGRES_USER:-mapuser}
0009 | DB_NAME=${POSTGRES_DB:-mapdb}
0010 | 
0011 | echo "🌍 Starting MENA Regional Data Import..."
0012 | echo "🌍 البدء في استيراد البيانات الإقليمية..."
0013 | 
0014 | # 1. Check for files
0015 | if [ ! -f "$DATA_DIR/jordan-latest.osm.pbf" ]; then
0016 |     echo "❌ Jordan PBF missing. Please run setup-osm.sh first."
0017 |     exit 1
0018 | fi
0019 | 
0020 | if [ ! -f "$DATA_DIR/egypt-latest.osm.pbf" ]; then
0021 |     echo "📥 Downloading Egypt OSM PBF..."
0022 |     curl -L https://download.geofabrik.de/africa/egypt-latest.osm.pbf -o "$DATA_DIR/egypt-latest.osm.pbf"
0023 | fi
0024 | 
0025 | # 2. Detect Docker Compose Command
0026 | if command -v docker-compose &> /dev/null; then
0027 |     DOKCER_COMPOSE="docker-compose"
0028 | else
0029 |     DOKCER_COMPOSE="docker compose"
0030 | fi
0031 | 
0032 | echo "🐳 Using $DOKCER_COMPOSE..."
0033 | 
0034 | # 3. Import Jordan (Append)
0035 | echo "🇯🇴 Importing Jordan data (Append mode)..."
0036 | $DOKCER_COMPOSE --profile import run --rm osm-import osm2pgsql \
0037 |     --append --slim --cache 1000 \
0038 |     --database "$DB_NAME" --host db --user "$DB_USER" \
0039 |     /data/jordan-latest.osm.pbf
0040 | 
0041 | # 4. Import Egypt (Append)
0042 | echo "🇪🇬 Importing Egypt data (Append mode)..."
0043 | $DOKCER_COMPOSE --profile import run --rm osm-import osm2pgsql \
0044 |     --append --slim --cache 1000 \
0045 |     --database "$DB_NAME" --host db --user "$DB_USER" \
0046 |     /data/egypt-latest.osm.pbf
0047 | 
0048 | echo "✅ Import complete. Restarting tile and routing services..."
0049 | $DOKCER_COMPOSE restart martin routing
0050 | 
0051 | echo "🚀 MENA Regional mapping is now live!"
0052 | echo "🚀 تم تفعيل خرائط المنطقة بنجاح!"


------------------------------------------------------------
[40] اسم الملف: download_server_data.sh
المسار: ./infrastructure/scripts/download_server_data.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Download Existing Syria Data from Server to Mac
0003 | # To be run on the Mac terminal
0004 | 
0005 | SERVER_IP="188.68.36.205"
0006 | SERVER_USER="hamzadoctor"
0007 | REMOTE_PATH="/home/hamzadoctor/app"
0008 | KEY_PATH="/Users/hamzaaleghwairyeen/.ssh/doctory-key"
0009 | 
0010 | echo "🌍 Connecting to server to dump existing Syria landmarks..."
0011 | 
0012 | # 1. Generate dump on server
0013 | ssh -i "$KEY_PATH" "$SERVER_USER@$SERVER_IP" "docker exec -t map-db pg_dump -U mapuser -d mapdb -t places_syria --data-only --inserts > $REMOTE_PATH/existing_syria_data.sql"
0014 | 
0015 | # 2. Download the dump to local Mac
0016 | echo "📥 Downloading dump to Mac..."
0017 | rsync -avz -e "ssh -i $KEY_PATH" "$SERVER_USER@$SERVER_IP:$REMOTE_PATH/existing_syria_data.sql" infrastructure/docker/postgis/
0018 | 
0019 | echo "✅ Download complete: infrastructure/docker/postgis/existing_syria_data.sql"
0020 | echo "Now run ./infrastructure/scripts/local_db_prep.sh to merge."


------------------------------------------------------------
[41] اسم الملف: setup-osm.sh
المسار: ./infrastructure/scripts/setup-osm.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # script to download Jordan OSM data
0003 | # نص برمجبي لتحميل بيانات الخرائط للأردن
0004 | 
0005 | set -e
0006 | 
0007 | DATA_DIR="./infrastructure/osm-data"
0008 | PBF_URL="https://download.geofabrik.de/asia/jordan-latest.osm.pbf"
0009 | 
0010 | echo "📍 Starting Jordan Map Setup..."
0011 | echo "📍 البدء في إعداد خرائط الأردن..."
0012 | 
0013 | mkdir -p $DATA_DIR
0014 | 
0015 | if [ ! -f "$DATA_DIR/jordan-latest.osm.pbf" ]; then
0016 |     echo "📥 Downloading Jordan OSM PBF from Geofabrik..."
0017 |     echo "📥 جاري تحميل بيانات الخرائط من Geofabrik..."
0018 |     curl -L $PBF_URL -o "$DATA_DIR/jordan-latest.osm.pbf"
0019 | else
0020 |     echo "✅ Jordan PBF already exists."
0021 |     echo "✅ ملف البيانات موجود بالفعل."
0022 | fi
0023 | 
0024 | # Note on MBTiles:
0025 | # Tileserver-GL requires an .mbtiles file to serve tiles locally.
0026 | # You can generate one from the .pbf using 'tilemaker' or download a free extract
0027 | # from MapTiler (https://maptiler.com/data) and place it in $DATA_DIR/jordan.mbtiles
0028 | 
0029 | echo "⚠️  Important: To serve tiles locally, you need 'jordan.mbtiles' in $DATA_DIR"
0030 | echo "⚠️  تنبيه: لتشغيل الخرائط محلياً، يجب توفير ملف 'jordan.mbtiles' في المجلد المذكور"
0031 | 
0032 | echo "🚀 Setup complete. Please ensure jordan.mbtiles is present before running 'docker-compose up'."
0033 | echo "🚀 اكتمل الإعداد. تأكد من وجود ملف mbtiles قبل تشغيل النظام."


------------------------------------------------------------
[42] اسم الملف: local_verify.sh
المسار: ./infrastructure/scripts/local_verify.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # Local Verification Script for Syria Landmarks
0003 | # To be run on the Mac terminal
0004 | 
0005 | set -e
0006 | 
0007 | echo "📊 --- Local Syria Data Audit ---"
0008 | 
0009 | # 1. Total Count
0010 | TOTAL=$(docker compose exec -T db psql -U mapuser -d mapdb -t -c "SELECT count(*) FROM places_syria;")
0011 | echo "📍 Total Landmarks: $TOTAL"
0012 | 
0013 | # 2. Category Distribution
0014 | echo "🗂️  Category Distribution:"
0015 | docker compose exec -T db psql -U mapuser -d mapdb -c "
0016 | SELECT category, count(*) as count
0017 | FROM places_syria
0018 | GROUP BY category
0019 | ORDER BY count DESC
0020 | LIMIT 10;
0021 | "
0022 | 
0023 | # 3. Spatial Bounds Check (Damascus region)
0024 | echo "🌍 Spatial Check (Damascus):"
0025 | DM_COUNT=$(docker compose exec -T db psql -U mapuser -d mapdb -t -c "
0026 | SELECT count(*) FROM places_syria
0027 | WHERE latitude BETWEEN 33.4 AND 33.6 AND longitude BETWEEN 36.2 AND 36.4;
0028 | ")
0029 | echo "🏙️  Landmarks in Damascus area: $DM_COUNT"
0030 | 
0031 | # 4. Generate Export if user is satisfied
0032 | echo "💾 Generating SQL Export..."
0033 | docker compose exec -T db pg_dump -U mapuser -d mapdb -t places_syria --data-only --inserts > infrastructure/docker/postgis/syria_export.sql
0034 | 
0035 | echo "--------------------------------"
0036 | echo "✅ Verification complete. Export saved to: infrastructure/docker/postgis/syria_export.sql"
0037 | echo "If you are happy with the results, run sync_to_server.sh to push the data."


------------------------------------------------------------
[43] اسم الملف: overture_ingest.sh
المسار: ./infrastructure/scripts/overture_ingest.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | 
0003 | # overture_ingest.sh - Data pipeline for Overture Maps
0004 | # سكريبت سحب وحقن بيانات المباني والشوارع
0005 | 
0006 | set -e
0007 | 
0008 | # Configuration
0009 | DB_HOST="localhost"
0010 | DB_PORT="5432"
0011 | DB_USER="mapuser"
0012 | DB_NAME="mapdb"
0013 | DB_PASS="mappass"
0014 | 
0015 | # Jordan North BBOX (Amman, Irbid, Zarqa)
0016 | BBOX_JORDAN_NORTH="35.5,31.7,39.3,33.4"
0017 | # Jordan South BBOX (Aqaba, Karak, Ma'an)
0018 | BBOX_JORDAN_SOUTH="34.9,29.1,38.0,31.7"
0019 | # Syria BBOX (Full Country)
0020 | BBOX_SYRIA="35.7,32.3,42.4,37.3"
0021 | 
0022 | echo "🚀 Starting Overture Data Pipeline (Jordan & Syria)..."
0023 | 
0024 | # 1. Setup Python Environment
0025 | # ... (rest of setup)
0026 | if [ ! -d "venv_overture" ]; then
0027 |     echo "📦 Creating virtual environment..."
0028 |     python3 -m venv venv_overture
0029 | fi
0030 | source venv_overture/bin/activate
0031 | pip install --upgrade pip
0032 | pip install overturemaps
0033 | 
0034 | # 2. Function to download and ingest
0035 | process_city() {
0036 |     local city=$1
0037 |     local bbox=$2
0038 |     local theme=$3 # building, segment, or division_area
0039 | 
0040 |     echo "🌍 Processing $city - Theme: $theme..."
0041 |     output_file="overture_${city}_${theme}.geojson"
0042 | 
0043 |     # Download
0044 |     overturemaps download --bbox="$bbox" -f geojson --type="$theme" -o "$output_file"
0045 | 
0046 |     # If division_area, we use our NestJS API to import for better control
0047 |     if [ "$theme" == "division_area" ]; then
0048 |         echo "📍 Administrative data downloaded: $output_file"
0049 |         echo "💡 Use the NestJS /geocoding/import-boundaries endpoint to ingest this file."
0050 |         return
0051 |     fi
0052 | 
0053 |     # Ingest into PostGIS for buildings and segments
0054 |     echo "🔌 Injecting into PostGIS (Table: overture_${theme})..."
0055 |     export PGPASSWORD=$DB_PASS
0056 |     ogr2ogr -f "PostgreSQL" \
0057 |         PG:"host=$DB_HOST port=$DB_PORT user=$DB_USER dbname=$DB_NAME password=$DB_PASS" \
0058 |         "$output_file" \
0059 |         -nln "overture_${theme}" \
0060 |         -update -append \
0061 |         -nlt PROMOTE_TO_MULTI \
0062 |         -lco GEOMETRY_NAME=location
0063 | 
0064 |     echo "✅ Finished $city $theme"
0065 |     rm "$output_file"
0066 | }
0067 | 
0068 | # 3. Execution (Jordan & Syria)
0069 | # Jordan
0070 | process_city "jordan_north" "$BBOX_JORDAN_NORTH" "division_area"
0071 | process_city "jordan_south" "$BBOX_JORDAN_SOUTH" "division_area"
0072 | 
0073 | # Syria
0074 | process_city "syria" "$BBOX_SYRIA" "division_area"
0075 | 
0076 | echo "🎉 Administrative boundary GeoJSONs ready for import!"


------------------------------------------------------------
[44] اسم الملف: update-data.sh
المسار: ./infrastructure/scripts/update-data.sh
------------------------------------------------------------
0001 | #!/bin/bash
0002 | # --------------------------------------------------------------------------
0003 | # Intaleq Map Platform - 10-Day Update Script
0004 | # سكربت تحديث خرائط انطلاقة - التحديث الدوري (كل 10 أيام)
0005 | # --------------------------------------------------------------------------
0006 | 
0007 | set -e # Exit on error
0008 | 
0009 | echo "🚀 Starting 10-day map update..."
0010 | 
0011 | # 1. Configuration (From .env or defaults)
0012 | PBF_FILE="/data/jordan-latest.osm.pbf"
0013 | SOURCE_URL="https://download.geofabrik.de/asia/jordan-latest.osm.pbf"
0014 | APP_DIR="/home/hamzadoctor/app"
0015 | 
0016 | cd "$APP_DIR"
0017 | 
0018 | # 2. Download latest OSM data (Running on Host)
0019 | # تحميل أحدث البيانات للأردن وسوريا
0020 | echo "🌍 Downloading latest OpenStreetMap data for Jordan & Syria..."
0021 | wget -O "infrastructure/osm-data/jordan-latest.osm.pbf.new" "https://download.geofabrik.de/asia/jordan-latest.osm.pbf"
0022 | wget -O "infrastructure/osm-data/syria-latest.osm.pbf.new" "https://download.geofabrik.de/asia/syria-latest.osm.pbf"
0023 | 
0024 | mv "infrastructure/osm-data/jordan-latest.osm.pbf.new" "infrastructure/osm-data/jordan-latest.osm.pbf"
0025 | mv "infrastructure/osm-data/syria-latest.osm.pbf.new" "infrastructure/osm-data/syria-latest.osm.pbf"
0026 | 
0027 | # 3. Import new data to PostGIS
0028 | # استيراد البيانات إلى قاعدة البيانات
0029 | echo "💾 Importing Jordan (Create)..."
0030 | docker compose --profile import run --rm osm-import osm2pgsql --create --slim --cache 1000 --database mapdb --host db --user mapuser /data/jordan-latest.osm.pbf
0031 | 
0032 | echo "💾 Importing Syria (Append)..."
0033 | docker compose --profile import run --rm osm-import osm2pgsql --append --slim --cache 1000 --database mapdb --host db --user mapuser /data/syria-latest.osm.pbf
0034 | 
0035 | # 4. Merge Data (Jordan + Syria)
0036 | OSM_FILE="infrastructure/osm-data/region.osm.pbf"
0037 | echo "🗺️ Merging Jordan and Syria data into $OSM_FILE..."
0038 | osmium merge infrastructure/osm-data/jordan-latest.osm.pbf infrastructure/osm-data/syria-latest.osm.pbf -o $OSM_FILE --overwrite
0039 | 
0040 | # 5. Spatial Integrity check for Geocoding (Landmarks)
0041 | # Purge any legacy landmarks outside the expanded region
0042 | echo "📍 Syncing user-submitted landmarks and purging invalid coordinates..."
0043 | DELETED_COUNT=$(docker compose exec -T db psql -U mapuser -d mapdb -t -c "DELETE FROM places_syria WHERE longitude < 34 OR longitude > 43 OR latitude < 29 OR latitude > 38;")
0044 | echo "   ✅ Purged ${DELETED_COUNT//[[:space:]]/} invalid landmarks outside the expanded region."
0045 | 
0046 | # Force Spatial Geometry Update
0047 | docker compose exec -T db psql -U mapuser -d mapdb -c "UPDATE places_syria SET location = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326) WHERE location IS NULL OR latitude IS NOT NULL;"
0048 | 
0049 | # 6. Rebuild Routing Index (GraphHopper)
0050 | echo "🚗 Rebuilding GraphHopper routing index (This may take ~5-8 minutes)..."
0051 | docker compose stop routing
0052 | # Delete old cache - VERY IMPORTANT to force full re-index
0053 | rm -rf infrastructure/osm-data/graph-cache infrastructure/osm-data/default-gh
0054 | docker compose up -d routing
0055 | 
0056 | # 7. Final Cleanup & Cache Flush
0057 | echo "🧹 Clearing Redis traffic cache..."
0058 | docker compose exec -T redis redis-cli flushall
0059 | 
0060 | echo "Done! Map platform is now fully synchronized with Jordan & Syria roads (including Damascus)."


------------------------------------------------------------
[45] اسم الملف: style.json
المسار: ./apps/web/public/style.json
------------------------------------------------------------
0001 | {
0002 |   "version": 8,
0003 |   "name": "Intaleq Premium Map Style",
0004 |   "metadata": {
0005 |     "brand": "Intaleq",
0006 |     "version": "2.0.0",
0007 |     "description": "Google + OSM hybrid style with 3D buildings, railways, subway, waterways, and Intaleq brand palette"
0008 |   },
0009 |   "center": [
0010 |     36.276008,
0011 |     33.513685
0012 |   ],
0013 |   "zoom": 15,
0014 |   "glyphs": "https://cdn.protomaps.com/fonts/pbf/{fontstack}/{range}.pbf",
0015 |   "sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite",
0016 |   "sources": {
0017 |     "local-osm-polygons": {
0018 |       "type": "vector",
0019 |       "tiles": [
0020 |         "https://tiles.intaleqapp.com/planet_osm_polygon/{z}/{x}/{y}"
0021 |       ],
0022 |       "maxzoom": 14,
0023 |       "attribution": "© Intaleq | © OpenStreetMap contributors"
0024 |     },
0025 |     "local-osm-lines": {
0026 |       "type": "vector",
0027 |       "tiles": [
0028 |         "https://tiles.intaleqapp.com/planet_osm_line/{z}/{x}/{y}"
0029 |       ],
0030 |       "maxzoom": 14
0031 |     },
0032 |     "local-osm-points": {
0033 |       "type": "vector",
0034 |       "tiles": [
0035 |         "https://tiles.intaleqapp.com/planet_osm_point/{z}/{x}/{y}"
0036 |       ],
0037 |       "maxzoom": 14
0038 |     },
0039 |     "places_egypt": {
0040 |       "type": "vector",
0041 |       "tiles": [
0042 |         "https://tiles.intaleqapp.com/places_egypt/{z}/{x}/{y}"
0043 |       ],
0044 |       "maxzoom": 14
0045 |     },
0046 |     "places_syria": {
0047 |       "type": "vector",
0048 |       "tiles": [
0049 |         "https://tiles.intaleqapp.com/places_syria/{z}/{x}/{y}"
0050 |       ],
0051 |       "maxzoom": 14
0052 |     },
0053 |     "places_jordan": {
0054 |       "type": "vector",
0055 |       "tiles": [
0056 |         "https://tiles.intaleqapp.com/places_jordan/{z}/{x}/{y}"
0057 |       ],
0058 |       "maxzoom": 14
0059 |     },
0060 |     "overture_buildings": {
0061 |       "type": "vector",
0062 |       "tiles": ["https://tiles.intaleqapp.com/overture_building/{z}/{x}/{y}"],
0063 |       "maxzoom": 14
0064 |     },
0065 |     "overture_segments": {
0066 |       "type": "vector",
0067 |       "tiles": ["https://tiles.intaleqapp.com/overture_segment/{z}/{x}/{y}"],
0068 |       "maxzoom": 14
0069 |     }
0070 |   },
0071 |   "layers": [
0072 |     {
0073 |       "id": "background",
0074 |       "type": "background",
0075 |       "paint": {
0076 |         "background-color": "#EEF2F7"
0077 |       }
0078 |     },
0079 |     {
0080 |       "id": "landuse-residential",
0081 |       "type": "fill",
0082 |       "source": "local-osm-polygons",
0083 |       "source-layer": "planet_osm_polygon",
0084 |       "filter": [
0085 |         "==",
0086 |         "landuse",
0087 |         "residential"
0088 |       ],
0089 |       "paint": {
0090 |         "fill-color": "#F0F4F8",
0091 |         "fill-opacity": 1
0092 |       }
0093 |     },
0094 |     {
0095 |       "id": "landuse-commercial",
0096 |       "type": "fill",
0097 |       "source": "local-osm-polygons",
0098 |       "source-layer": "planet_osm_polygon",
0099 |       "filter": [
0100 |         "==",
0101 |         "landuse",
0102 |         "commercial"
0103 |       ],
0104 |       "paint": {
0105 |         "fill-color": "#FAF5EE",
0106 |         "fill-opacity": 1
0107 |       }
0108 |     },
0109 |     {
0110 |       "id": "landuse-industrial",
0111 |       "type": "fill",
0112 |       "source": "local-osm-polygons",
0113 |       "source-layer": "planet_osm_polygon",
0114 |       "filter": [
0115 |         "in",
0116 |         "landuse",
0117 |         "industrial",
0118 |         "railway"
0119 |       ],
0120 |       "paint": {
0121 |         "fill-color": "#E4E8EE",
0122 |         "fill-opacity": 1
0123 |       }
0124 |     },
0125 |     {
0126 |       "id": "landuse-cemetery",
0127 |       "type": "fill",
0128 |       "source": "local-osm-polygons",
0129 |       "source-layer": "planet_osm_polygon",
0130 |       "filter": [
0131 |         "==",
0132 |         "landuse",
0133 |         "cemetery"
0134 |       ],
0135 |       "paint": {
0136 |         "fill-color": "#B8D4BA",
0137 |         "fill-opacity": 0.9
0138 |       }
0139 |     },
0140 |     {
0141 |       "id": "landuse-military",
0142 |       "type": "fill",
0143 |       "source": "local-osm-polygons",
0144 |       "source-layer": "planet_osm_polygon",
0145 |       "filter": [
0146 |         "==",
0147 |         "landuse",
0148 |         "military"
0149 |       ],
0150 |       "paint": {
0151 |         "fill-color": "#E2D9CC",
0152 |         "fill-opacity": 0.8
0153 |       }
0154 |     },
0155 |     {
0156 |       "id": "park-layer",
0157 |       "type": "fill",
0158 |       "source": "local-osm-polygons",
0159 |       "source-layer": "planet_osm_polygon",
0160 |       "filter": [
0161 |         "any",
0162 |         [
0163 |           "in",
0164 |           "leisure",
0165 |           "park",
0166 |           "garden",
0167 |           "nature_reserve",
0168 |           "pitch",
0169 |           "playground"
0170 |         ],
0171 |         [
0172 |           "in",
0173 |           "landuse",
0174 |           "grass",
0175 |           "meadow",
0176 |           "forest"
0177 |         ],
0178 |         [
0179 |           "in",
0180 |           "natural",
0181 |           "wood",
0182 |           "scrub",
0183 |           "heath"
0184 |         ]
0185 |       ],
0186 |       "paint": {
0187 |         "fill-color": [
0188 |           "match",
0189 |           [
0190 |             "get",
0191 |             "leisure"
0192 |           ],
0193 |           "pitch",
0194 |           "#9ED4A0",
0195 |           "playground",
0196 |           "#B8E6B8",
0197 |           "#C5E8C5"
0198 |         ],
0199 |         "fill-opacity": 0.85
0200 |       }
0201 |     },
0202 |     {
0203 |       "id": "park-outline",
0204 |       "type": "line",
0205 |       "source": "local-osm-polygons",
0206 |       "source-layer": "planet_osm_polygon",
0207 |       "filter": [
0208 |         "in",
0209 |         "leisure",
0210 |         "park",
0211 |         "garden",
0212 |         "nature_reserve"
0213 |       ],
0214 |       "paint": {
0215 |         "line-color": "#94D4A0",
0216 |         "line-width": 0.8,
0217 |         "line-opacity": 0.7
0218 |       }
0219 |     },
0220 |     {
0221 |       "id": "water-polygon",
0222 |       "type": "fill",
0223 |       "source": "local-osm-polygons",
0224 |       "source-layer": "planet_osm_polygon",
0225 |       "filter": [
0226 |         "any",
0227 |         [
0228 |           "in",
0229 |           "natural",
0230 |           "water",
0231 |           "lake",
0232 |           "bay"
0233 |         ],
0234 |         [
0235 |           "==",
0236 |           "waterway",
0237 |           "riverbank"
0238 |         ],
0239 |         [
0240 |           "in",
0241 |           "landuse",
0242 |           "basin",
0243 |           "reservoir"
0244 |         ],
0245 |         [
0246 |           "==",
0247 |           "amenity",
0248 |           "fountain"
0249 |         ]
0250 |       ],
0251 |       "paint": {
0252 |         "fill-color": "#9ECFE8",
0253 |         "fill-opacity": 0.95
0254 |       }
0255 |     },
0256 |     {
0257 |       "id": "water-polygon-outline",
0258 |       "type": "line",
0259 |       "source": "local-osm-polygons",
0260 |       "source-layer": "planet_osm_polygon",
0261 |       "filter": [
0262 |         "any",
0263 |         [
0264 |           "in",
0265 |           "natural",
0266 |           "water",
0267 |           "lake",
0268 |           "bay"
0269 |         ],
0270 |         [
0271 |           "==",
0272 |           "waterway",
0273 |           "riverbank"
0274 |         ],
0275 |         [
0276 |           "in",
0277 |           "landuse",
0278 |           "basin",
0279 |           "reservoir"
0280 |         ]
0281 |       ],
0282 |       "paint": {
0283 |         "line-color": "#6BB8D8",
0284 |         "line-width": 0.8,
0285 |         "line-opacity": 0.8
0286 |       }
0287 |     },
0288 |     {
0289 |       "id": "waterway-river",
0290 |       "type": "line",
0291 |       "source": "local-osm-lines",
0292 |       "source-layer": "planet_osm_line",
0293 |       "filter": [
0294 |         "all",
0295 |         [
0296 |           "in",
0297 |           "waterway",
0298 |           "river",
0299 |           "canal"
0300 |         ],
0301 |         [
0302 |           "!=",
0303 |           "intermittent",
0304 |           "yes"
0305 |         ],
0306 |         [
0307 |           "!=",
0308 |           "seasonal",
0309 |           "yes"
0310 |         ],
0311 |         [
0312 |           "!=",
0313 |           "tunnel",
0314 |           "yes"
0315 |         ]
0316 |       ],
0317 |       "paint": {
0318 |         "line-color": "#6BB8D8",
0319 |         "line-width": [
0320 |           "interpolate",
0321 |           [
0322 |             "linear"
0323 |           ],
0324 |           [
0325 |             "zoom"
0326 |           ],
0327 |           10,
0328 |           1.5,
0329 |           14,
0330 |           4,
0331 |           16,
0332 |           7
0333 |         ],
0334 |         "line-opacity": 0.95
0335 |       }
0336 |     },
0337 |     {
0338 |       "id": "waterway-stream-drain",
0339 |       "type": "line",
0340 |       "source": "local-osm-lines",
0341 |       "source-layer": "planet_osm_line",
0342 |       "filter": [
0343 |         "all",
0344 |         [
0345 |           "in",
0346 |           "waterway",
0347 |           "stream",
0348 |           "drain",
0349 |           "ditch"
0350 |         ],
0351 |         [
0352 |           "!=",
0353 |           "intermittent",
0354 |           "yes"
0355 |         ],
0356 |         [
0357 |           "!=",
0358 |           "seasonal",
0359 |           "yes"
0360 |         ],
0361 |         [
0362 |           "!=",
0363 |           "tunnel",
0364 |           "yes"
0365 |         ]
0366 |       ],
0367 |       "minzoom": 13,
0368 |       "paint": {
0369 |         "line-color": "#7FBFD8",
0370 |         "line-width": [
0371 |           "interpolate",
0372 |           [
0373 |             "linear"
0374 |           ],
0375 |           [
0376 |             "zoom"
0377 |           ],
0378 |           13,
0379 |           0.8,
0380 |           16,
0381 |           2.5
0382 |         ],
0383 |         "line-opacity": 0.85
0384 |       }
0385 |     },
0386 |     {
0387 |       "id": "railway-area",
0388 |       "type": "fill",
0389 |       "source": "local-osm-polygons",
0390 |       "source-layer": "planet_osm_polygon",
0391 |       "filter": [
0392 |         "==",
0393 |         "landuse",
0394 |         "railway"
0395 |       ],
0396 |       "paint": {
0397 |         "fill-color": "#DDE2EA",
0398 |         "fill-opacity": 0.9
0399 |       }
0400 |     },
0401 |     {
0402 |       "id": "railway-rail-casing",
0403 |       "type": "line",
0404 |       "source": "local-osm-lines",
0405 |       "source-layer": "planet_osm_line",
0406 |       "filter": [
0407 |         "all",
0408 |         [
0409 |           "in",
0410 |           "railway",
0411 |           "rail",
0412 |           "narrow_gauge",
0413 |           "preserved"
0414 |         ],
0415 |         [
0416 |           "!=",
0417 |           "service",
0418 |           "yard"
0419 |         ],
0420 |         [
0421 |           "!=",
0422 |           "service",
0423 |           "siding"
0424 |         ]
0425 |       ],
0426 |       "minzoom": 8,
0427 |       "paint": {
0428 |         "line-color": "#B0B8C5",
0429 |         "line-width": [
0430 |           "interpolate",
0431 |           [
0432 |             "linear"
0433 |           ],
0434 |           [
0435 |             "zoom"
0436 |           ],
0437 |           8,
0438 |           2,
0439 |           12,
0440 |           4,
0441 |           16,
0442 |           8
0443 |         ]
0444 |       }
0445 |     },
0446 |     {
0447 |       "id": "railway-rail-core",
0448 |       "type": "line",
0449 |       "source": "local-osm-lines",
0450 |       "source-layer": "planet_osm_line",
0451 |       "filter": [
0452 |         "all",
0453 |         [
0454 |           "in",
0455 |           "railway",
0456 |           "rail",
0457 |           "narrow_gauge",
0458 |           "preserved"
0459 |         ],
0460 |         [
0461 |           "!=",
0462 |           "service",
0463 |           "yard"
0464 |         ],
0465 |         [
0466 |           "!=",
0467 |           "service",
0468 |           "siding"
0469 |         ]
0470 |       ],
0471 |       "minzoom": 8,
0472 |       "paint": {
0473 |         "line-color": "#6B7A8E",
0474 |         "line-width": [
0475 |           "interpolate",
0476 |           [
0477 |             "linear"
0478 |           ],
0479 |           [
0480 |             "zoom"
0481 |           ],
0482 |           8,
0483 |           1,
0484 |           12,
0485 |           2.5,
0486 |           16,
0487 |           5
0488 |         ],
0489 |         "line-dasharray": [
0490 |           6,
0491 |           4
0492 |         ]
0493 |       }
0494 |     },
0495 |     {
0496 |       "id": "railway-subway-casing",
0497 |       "type": "line",
0498 |       "source": "local-osm-lines",
0499 |       "source-layer": "planet_osm_line",
0500 |       "filter": [
0501 |         "in",
0502 |         "railway",
0503 |         "subway",
0504 |         "light_rail",
0505 |         "tram",
0506 |         "monorail"
0507 |       ],
0508 |       "minzoom": 10,
0509 |       "paint": {
0510 |         "line-color": [
0511 |           "match",
0512 |           [
0513 |             "get",
0514 |             "railway"
0515 |           ],
0516 |           "subway",
0517 |           "#CC2233",
0518 |           "light_rail",
0519 |           "#0066CC",
0520 |           "tram",
0521 |           "#8833BB",
0522 |           "monorail",
0523 |           "#008855",
0524 |           "#BB3344"
0525 |         ],
0526 |         "line-width": [
0527 |           "interpolate",
0528 |           [
0529 |             "linear"
0530 |           ],
0531 |           [
0532 |             "zoom"
0533 |           ],
0534 |           10,
0535 |           3,
0536 |           14,
0537 |           6,
0538 |           16,
0539 |           10
0540 |         ]
0541 |       }
0542 |     },
0543 |     {
0544 |       "id": "railway-subway-core",
0545 |       "type": "line",
0546 |       "source": "local-osm-lines",
0547 |       "source-layer": "planet_osm_line",
0548 |       "filter": [
0549 |         "in",
0550 |         "railway",
0551 |         "subway",
0552 |         "light_rail",
0553 |         "tram",
0554 |         "monorail"
0555 |       ],
0556 |       "minzoom": 10,
0557 |       "paint": {
0558 |         "line-color": [
0559 |           "match",
0560 |           [
0561 |             "get",
0562 |             "railway"
0563 |           ],
0564 |           "subway",
0565 |           "#FF3347",
0566 |           "light_rail",
0567 |           "#2288FF",
0568 |           "tram",
0569 |           "#AA44EE",
0570 |           "monorail",
0571 |           "#00BB66",
0572 |           "#FF4455"
0573 |         ],
0574 |         "line-width": [
0575 |           "interpolate",
0576 |           [
0577 |             "linear"
0578 |           ],
0579 |           [
0580 |             "zoom"
0581 |           ],
0582 |           10,
0583 |           1.5,
0584 |           14,
0585 |           3.5,
0586 |           16,
0587 |           6
0588 |         ]
0589 |       }
0590 |     },
0591 |     {
0592 |       "id": "road-casing-track-path",
0593 |       "type": "line",
0594 |       "source": "local-osm-lines",
0595 |       "source-layer": "planet_osm_line",
0596 |       "filter": [
0597 |         "in",
0598 |         "highway",
0599 |         "track",
0600 |         "path",
0601 |         "footway",
0602 |          "cycleway",
0603 |         "steps"
0604 |       ],
0605 |       "minzoom": 14,
0606 |       "paint": {
0607 |         "line-color": "#C8CDD6",
0608 |         "line-width": [
0609 |           "interpolate",
0610 |           [
0611 |             "linear"
0612 |           ],
0613 |           [
0614 |             "zoom"
0615 |           ],
0616 |           14,
0617 |           1,
0618 |           16,
0619 |           4
0620 |         ],
0621 |         "line-dasharray": [
0622 |           4,
0623 |           3
0624 |         ]
0625 |       }
0626 |     },
0627 |     {
0628 |       "id": "road-casing-minor",
0629 |       "type": "line",
0630 |       "source": "local-osm-lines",
0631 |       "source-layer": "planet_osm_line",
0632 |       "filter": [
0633 |         "in",
0634 |         "highway",
0635 |         "residential",
0636 |         "service",
0637 |         "unclassified",
0638 |         "living_street",
0639 |         "pedestrian"
0640 |       ],
0641 |       "paint": {
0642 |         "line-color": "#D4D8DF",
0643 |         "line-width": [
0644 |           "interpolate",
0645 |           [
0646 |             "linear"
0647 |           ],
0648 |           [
0649 |             "zoom"
0650 |           ],
0651 |           12,
0652 |           1.5,
0653 |           16,
0654 |           10
0655 |         ],
0656 |         "line-opacity": 0.7
0657 |       }
0658 |     },
0659 |     {
0660 |       "id": "road-core-minor",
0661 |       "type": "line",
0662 |       "source": "local-osm-lines",
0663 |       "source-layer": "planet_osm_line",
0664 |       "filter": [
0665 |         "in",
0666 |         "highway",
0667 |         "residential",
0668 |         "service",
0669 |         "unclassified",
0670 |         "living_street",
0671 |         "pedestrian"
0672 |       ],
0673 |       "paint": {
0674 |         "line-color": "#FFFFFF",
0675 |         "line-width": [
0676 |           "interpolate",
0677 |           [
0678 |             "linear"
0679 |           ],
0680 |           [
0681 |             "zoom"
0682 |           ],
0683 |           12,
0684 |           0.8,
0685 |           16,
0686 |           8
0687 |         ]
0688 |       }
0689 |     },
0690 |     {
0691 |       "id": "road-casing-tertiary",
0692 |       "type": "line",
0693 |       "source": "local-osm-lines",
0694 |       "source-layer": "planet_osm_line",
0695 |       "filter": [
0696 |         "in",
0697 |         "highway",
0698 |         "tertiary",
0699 |         "tertiary_link"
0700 |       ],
0701 |       "paint": {
0702 |         "line-color": "#C9CED8",
0703 |         "line-width": [
0704 |           "interpolate",
0705 |           [
0706 |             "linear"
0707 |           ],
0708 |           [
0709 |             "zoom"
0710 |           ],
0711 |           11,
0712 |           2,
0713 |           16,
0714 |           14
0715 |         ],
0716 |         "line-opacity": 0.75
0717 |       }
0718 |     },
0719 |     {
0720 |       "id": "road-core-tertiary",
0721 |       "type": "line",
0722 |       "source": "local-osm-lines",
0723 |       "source-layer": "planet_osm_line",
0724 |       "filter": [
0725 |         "in",
0726 |         "highway",
0727 |         "tertiary",
0728 |         "tertiary_link"
0729 |       ],
0730 |       "paint": {
0731 |         "line-color": "#FFFFFF",
0732 |         "line-width": [
0733 |           "interpolate",
0734 |           [
0735 |             "linear"
0736 |           ],
0737 |           [
0738 |             "zoom"
0739 |           ],
0740 |           11,
0741 |           1.2,
0742 |           16,
0743 |           11
0744 |         ]
0745 |       }
0746 |     },
0747 |     {
0748 |       "id": "road-casing-secondary",
0749 |       "type": "line",
0750 |       "source": "local-osm-lines",
0751 |       "source-layer": "planet_osm_line",
0752 |       "filter": [
0753 |         "in",
0754 |         "highway",
0755 |         "secondary",
0756 |         "secondary_link"
0757 |       ],
0758 |       "paint": {
0759 |         "line-color": "#C4CFDE",
0760 |         "line-width": [
0761 |           "interpolate",
0762 |           [
0763 |             "linear"
0764 |           ],
0765 |           [
0766 |             "zoom"
0767 |           ],
0768 |           11,
0769 |           2.5,
0770 |           16,
0771 |           16
0772 |         ],
0773 |         "line-opacity": 0.8
0774 |       }
0775 |     },
0776 |     {
0777 |       "id": "road-core-secondary",
0778 |       "type": "line",
0779 |       "source": "local-osm-lines",
0780 |       "source-layer": "planet_osm_line",
0781 |       "filter": [
0782 |         "in",
0783 |         "highway",
0784 |         "secondary",
0785 |         "secondary_link"
0786 |       ],
0787 |       "paint": {
0788 |         "line-color": "#F8FBFF",
0789 |         "line-width": [
0790 |           "interpolate",
0791 |           [
0792 |             "linear"
0793 |           ],
0794 |           [
0795 |             "zoom"
0796 |           ],
0797 |           11,
0798 |           1.8,
0799 |           16,
0800 |           13
0801 |         ]
0802 |       }
0803 |     },
0804 |     {
0805 |       "id": "road-casing-primary",
0806 |       "type": "line",
0807 |       "source": "local-osm-lines",
0808 |       "source-layer": "planet_osm_line",
0809 |       "filter": [
0810 |         "in",
0811 |         "highway",
0812 |         "primary",
0813 |         "primary_link"
0814 |       ],
0815 |       "paint": {
0816 |         "line-color": "#C8B868",
0817 |         "line-width": [
0818 |           "interpolate",
0819 |           [
0820 |             "linear"
0821 |           ],
0822 |           [
0823 |             "zoom"
0824 |           ],
0825 |           10,
0826 |           3,
0827 |           16,
0828 |           18
0829 |         ],
0830 |         "line-opacity": 0.7
0831 |       }
0832 |     },
0833 |     {
0834 |       "id": "road-core-primary",
0835 |       "type": "line",
0836 |       "source": "local-osm-lines",
0837 |       "source-layer": "planet_osm_line",
0838 |       "filter": [
0839 |         "in",
0840 |         "highway",
0841 |         "primary",
0842 |         "primary_link"
0843 |       ],
0844 |       "paint": {
0845 |         "line-color": "#EDD870",
0846 |         "line-width": [
0847 |           "interpolate",
0848 |           [
0849 |             "linear"
0850 |           ],
0851 |           [
0852 |             "zoom"
0853 |           ],
0854 |           10,
0855 |           2,
0856 |           16,
0857 |           14
0858 |         ]
0859 |       }
0860 |     },
0861 |     {
0862 |       "id": "road-casing-motorway-trunk",
0863 |       "type": "line",
0864 |       "source": "local-osm-lines",
0865 |       "source-layer": "planet_osm_line",
0866 |       "filter": [
0867 |         "in",
0868 |         "highway",
0869 |         "motorway",
0870 |         "motorway_link",
0871 |         "trunk",
0872 |         "trunk_link"
0873 |       ],
0874 |       "paint": {
0875 |         "line-color": "#C8A84B",
0876 |         "line-width": [
0877 |           "interpolate",
0878 |           [
0879 |             "linear"
0880 |           ],
0881 |           [
0882 |             "zoom"
0883 |           ],
0884 |           9,
0885 |           4,
0886 |           16,
0887 |           20
0888 |         ],
0889 |         "line-opacity": 0.75
0890 |       }
0891 |     },
0892 |     {
0893 |       "id": "road-core-motorway-trunk",
0894 |       "type": "line",
0895 |       "source": "local-osm-lines",
0896 |       "source-layer": "planet_osm_line",
0897 |       "filter": [
0898 |         "in",
0899 |         "highway",
0900 |         "motorway",
0901 |         "motorway_link",
0902 |         "trunk",
0903 |         "trunk_link"
0904 |       ],
0905 |       "paint": {
0906 |         "line-color": "#F0C040",
0907 |         "line-width": [
0908 |           "interpolate",
0909 |           [
0910 |             "linear"
0911 |           ],
0912 |           [
0913 |             "zoom"
0914 |           ],
0915 |           9,
0916 |           2.5,
0917 |           16,
0918 |           16
0919 |         ]
0920 |       }
0921 |     },
0922 |     {
0923 |       "id": "road-direction-arrows",
0924 |       "type": "symbol",
0925 |       "source": "local-osm-lines",
0926 |       "source-layer": "planet_osm_line",
0927 |       "minzoom": 15,
0928 |       "filter": [
0929 |         "all",
0930 |         ["in", "highway", "motorway", "trunk", "primary", "secondary", "tertiary", "residential", "unclassified", "living_street"],
0931 |         ["==", "oneway", "yes"]
0932 |       ],
0933 |       "layout": {
0934 |         "symbol-placement": "line",
0935 |         "symbol-spacing": 80,
0936 |         "text-field": "▸",
0937 |         "text-font": ["Noto Sans Regular"],
0938 |         "text-size": ["interpolate", ["linear"], ["zoom"], 15, 12, 18, 18],
0939 |         "text-keep-upright": false,
0940 |         "text-rotation-alignment": "map",
0941 |         "text-allow-overlap": true,
0942 |         "text-ignore-placement": true,
0943 |         "text-padding": 0
0944 |       },
0945 |       "paint": {
0946 |         "text-color": ["interpolate", ["linear"], ["zoom"], 15, "rgba(100,116,139,0.4)", 18, "rgba(100,116,139,0.7)"],
0947 |         "text-halo-color": "rgba(255,255,255,0.3)",
0948 |         "text-halo-width": 0.5
0949 |       }
0950 |     },
0951 |     {
0952 |       "id": "building-fill-flat",
0953 |       "type": "fill",
0954 |       "source": "local-osm-polygons",
0955 |       "source-layer": "planet_osm_polygon",
0956 |       "filter": [
0957 |         "has",
0958 |         "building"
0959 |       ],
0960 |       "maxzoom": 14,
0961 |       "paint": {
0962 |         "fill-color": "#DDD8D0",
0963 |         "fill-opacity": 0.85,
0964 |         "fill-outline-color": "#C4BEB4"
0965 |       }
0966 |     },
0967 |     {
0968 |       "id": "building-3d",
0969 |       "type": "fill-extrusion",
0970 |       "source": "overture_buildings",
0971 |       "source-layer": "overture_building",
0972 |       "minzoom": 14,
0973 |       "layout": {
0974 |         "visibility": "visible"
0975 |       },
0976 |       "paint": {
0977 |         "fill-extrusion-color": "#DDD8D0",
0978 |         "fill-extrusion-height": [
0979 |           "interpolate",
0980 |           ["linear"],
0981 |           ["zoom"],
0982 |           14,
0983 |           [
0984 |             "*",
0985 |             ["coalesce", ["to-number", ["get", "num_floors"], null], 3],
0986 |             2.5
0987 |           ],
0988 |           17,
0989 |           [
0990 |             "coalesce",
0991 |             ["to-number", ["get", "height"], null],
0992 |             [
0993 |               "*",
0994 |               ["coalesce", ["to-number", ["get", "num_floors"], null], 3],
0995 |               3.5
0996 |             ],
0997 |             12
0998 |           ]
0999 |         ],
1000 |         "fill-extrusion-base": 0,
1001 |         "fill-extrusion-opacity": [
1002 |           "interpolate",
1003 |           ["linear"],
1004 |           ["zoom"],
1005 |           14, 0.55,
1006 |           16, 0.85
1007 |         ],
1008 |         "fill-extrusion-vertical-gradient": true
1009 |       }
1010 |     },
1011 |     {
1012 |       "id": "railway-label",
1013 |       "type": "symbol",
1014 |       "source": "local-osm-lines",
1015 |       "source-layer": "planet_osm_line",
1016 |       "filter": [
1017 |         "in",
1018 |         "railway",
1019 |         "rail",
1020 |         "subway",
1021 |         "light_rail",
1022 |         "tram"
1023 |       ],
1024 |       "minzoom": 13,
1025 |       "layout": {
1026 |         "text-field": [
1027 |           "coalesce",
1028 |           [
1029 |             "get",
1030 |             "name:ar"
1031 |           ],
1032 |           [
1033 |             "get",
1034 |             "name"
1035 |           ],
1036 |           ""
1037 |         ],
1038 |         "text-font": [
1039 |           "Noto Sans Regular"
1040 |         ],
1041 |         "text-size": 10,
1042 |         "symbol-placement": "line",
1043 |         "text-padding": 6,
1044 |         "text-allow-overlap": false
1045 |       },
1046 |       "paint": {
1047 |         "text-color": [
1048 |           "match",
1049 |           [
1050 |             "get",
1051 |             "railway"
1052 |           ],
1053 |           "subway",
1054 |           "#CC2233",
1055 |           "light_rail",
1056 |           "#0055BB",
1057 |           "tram",
1058 |           "#7722AA",
1059 |           "#4A5568"
1060 |         ],
1061 |         "text-halo-color": "rgba(255,255,255,0.9)",
1062 |         "text-halo-width": 2
1063 |       }
1064 |     },
1065 |     {
1066 |       "id": "waterway-label",
1067 |       "type": "symbol",
1068 |       "source": "local-osm-lines",
1069 |       "source-layer": "planet_osm_line",
1070 |       "filter": [
1071 |         "all",
1072 |         [
1073 |           "in",
1074 |           "waterway",
1075 |           "river",
1076 |           "canal"
1077 |         ],
1078 |         [
1079 |           "!=",
1080 |           "intermittent",
1081 |           "yes"
1082 |         ],
1083 |         [
1084 |           "has",
1085 |           "name"
1086 |         ]
1087 |       ],
1088 |       "minzoom": 12,
1089 |       "layout": {
1090 |         "text-field": [
1091 |           "coalesce",
1092 |           [
1093 |             "get",
1094 |             "name:ar"
1095 |           ],
1096 |           [
1097 |             "get",
1098 |             "name"
1099 |           ],
1100 |           ""
1101 |         ],
1102 |         "text-font": [
1103 |           "Noto Sans Regular"
1104 |         ],
1105 |         "text-size": 11,
1106 |         "symbol-placement": "line",
1107 |         "text-letter-spacing": 0.1
1108 |       },
1109 |       "paint": {
1110 |         "text-color": "#2E86AB",
1111 |         "text-halo-color": "rgba(255,255,255,0.85)",
1112 |         "text-halo-width": 2
1113 |       }
1114 |     },
1115 |     {
1116 |       "id": "building-number-polygon",
1117 |       "type": "symbol",
1118 |       "source": "local-osm-polygons",
1119 |       "source-layer": "planet_osm_polygon",
1120 |       "minzoom": 17,
1121 |       "filter": [
1122 |         "has",
1123 |         "addr:housenumber"
1124 |       ],
1125 |       "layout": {
1126 |         "text-field": "{addr:housenumber}",
1127 |         "text-font": [
1128 |           "Noto Sans Regular"
1129 |         ],
1130 |         "text-size": 10,
1131 |         "text-allow-overlap": false,
1132 |         "text-ignore-placement": false
1133 |       },
1134 |       "paint": {
1135 |         "text-color": "#5A5048",
1136 |         "text-halo-color": "rgba(255,255,255,0.95)",
1137 |         "text-halo-width": 1.5
1138 |       }
1139 |     },
1140 |     {
1141 |       "id": "building-number-point",
1142 |       "type": "symbol",
1143 |       "source": "local-osm-points",
1144 |       "source-layer": "planet_osm_point",
1145 |       "minzoom": 17,
1146 |       "filter": [
1147 |         "has",
1148 |         "addr:housenumber"
1149 |       ],
1150 |       "layout": {
1151 |         "text-field": "{addr:housenumber}",
1152 |         "text-font": [
1153 |           "Noto Sans Regular"
1154 |         ],
1155 |         "text-size": 10,
1156 |         "text-allow-overlap": false
1157 |       },
1158 |       "paint": {
1159 |         "text-color": "#5A5048",
1160 |         "text-halo-color": "rgba(255,255,255,0.95)",
1161 |         "text-halo-width": 1.5
1162 |       }
1163 |     },
1164 |     {
1165 |       "id": "road-labels-minor",
1166 |       "type": "symbol",
1167 |       "source": "local-osm-lines",
1168 |       "source-layer": "planet_osm_line",
1169 |       "filter": [
1170 |         "in",
1171 |         "highway",
1172 |         "residential",
1173 |         "service",
1174 |         "unclassified",
1175 |         "living_street"
1176 |       ],
1177 |       "minzoom": 15,
1178 |       "layout": {
1179 |         "text-field": [
1180 |           "coalesce",
1181 |           ["get", "name:ar"],
1182 |           ["get", "name"],
1183 |           ""
1184 |         ],
1185 |         "text-font": ["Noto Sans Regular"],
1186 |         "text-size": ["interpolate", ["linear"], ["zoom"], 15, 10, 18, 13],
1187 |         "symbol-placement": "line",
1188 |         "text-letter-spacing": 0.05,
1189 |         "text-padding": 15,
1190 |         "symbol-spacing": 300,
1191 |         "text-max-angle": 30,
1192 |         "text-allow-overlap": false,
1193 |         "text-ignore-placement": false
1194 |       },
1195 |       "paint": {
1196 |         "text-color": "#4A5568",
1197 |         "text-halo-color": "rgba(255,255,255,0.92)",
1198 |         "text-halo-width": 1.8
1199 |       }
1200 |     },
1201 |     {
1202 |       "id": "road-labels-major",
1203 |       "type": "symbol",
1204 |       "source": "local-osm-lines",
1205 |       "source-layer": "planet_osm_line",
1206 |       "filter": [
1207 |         "in",
1208 |         "highway",
1209 |         "primary",
1210 |         "secondary",
1211 |         "tertiary",
1212 |         "motorway",
1213 |         "trunk"
1214 |       ],
1215 |       "minzoom": 12,
1216 |       "layout": {
1217 |         "text-field": [
1218 |           "coalesce",
1219 |           ["get", "name:ar"],
1220 |           ["get", "name"],
1221 |           ""
1222 |         ],
1223 |         "text-font": ["Noto Sans Bold"],
1224 |         "text-size": ["interpolate", ["linear"], ["zoom"], 12, 10, 14, 13, 18, 16],
1225 |         "symbol-placement": "line",
1226 |         "text-letter-spacing": 0.06,
1227 |         "text-padding": 20,
1228 |         "symbol-spacing": 350,
1229 |         "text-max-angle": 25,
1230 |         "text-allow-overlap": false,
1231 |         "text-ignore-placement": false
1232 |       },
1233 |       "paint": {
1234 |         "text-color": "#1A2332",
1235 |         "text-halo-color": "rgba(255,255,255,0.95)",
1236 |         "text-halo-width": 2.5
1237 |       }
1238 |     },
1239 |     {
1240 |       "id": "poi-hospital",
1241 |       "type": "symbol",
1242 |       "source": "local-osm-points",
1243 |       "source-layer": "planet_osm_point",
1244 |       "minzoom": 13,
1245 |       "filter": [
1246 |         "==",
1247 |         "amenity",
1248 |         "hospital"
1249 |       ],
1250 |       "layout": {
1251 |         "icon-image": "hospital",
1252 |         "icon-size": 1,
1253 |         "text-field": [
1254 |           "coalesce",
1255 |           [
1256 |             "get",
1257 |             "name:ar"
1258 |           ],
1259 |           [
1260 |             "get",
1261 |             "name"
1262 |           ],
1263 |           ""
1264 |         ],
1265 |         "text-font": [
1266 |           "Noto Sans Regular"
1267 |         ],
1268 |         "text-size": 11,
1269 |         "text-offset": [
1270 |           0,
1271 |           1.2
1272 |         ],
1273 |         "text-anchor": "top",
1274 |         "text-allow-overlap": false
1275 |       },
1276 |       "paint": {
1277 |         "text-color": "#C0392B",
1278 |         "text-halo-color": "white",
1279 |         "text-halo-width": 2
1280 |       }
1281 |     },
1282 |     {
1283 |       "id": "poi-pharmacy",
1284 |       "type": "symbol",
1285 |       "source": "local-osm-points",
1286 |       "source-layer": "planet_osm_point",
1287 |       "minzoom": 15,
1288 |       "filter": [
1289 |         "==",
1290 |         "amenity",
1291 |         "pharmacy"
1292 |       ],
1293 |       "layout": {
1294 |         "icon-image": "pharmacy",
1295 |         "icon-size": 0.8,
1296 |         "text-field": [
1297 |           "coalesce",
1298 |           [
1299 |             "get",
1300 |             "name:ar"
1301 |           ],
1302 |           [
1303 |             "get",
1304 |             "name"
1305 |           ],
1306 |           ""
1307 |         ],
1308 |         "text-font": [
1309 |           "Noto Sans Regular"
1310 |         ],
1311 |         "text-size": 10,
1312 |         "text-offset": [
1313 |           0,
1314 |           1.2
1315 |         ],
1316 |         "text-anchor": "top"
1317 |       },
1318 |       "paint": {
1319 |         "text-color": "#1A7A3C",
1320 |         "text-halo-color": "white",
1321 |         "text-halo-width": 1.5
1322 |       }
1323 |     },
1324 |     {
1325 |       "id": "poi-place-of-worship",
1326 |       "type": "symbol",
1327 |       "source": "local-osm-points",
1328 |       "source-layer": "planet_osm_point",
1329 |       "minzoom": 14,
1330 |       "filter": [
1331 |         "==",
1332 |         "amenity",
1333 |         "place_of_worship"
1334 |       ],
1335 |       "layout": {
1336 |         "icon-image": "tourist",
1337 |         "icon-size": 0.8,
1338 |         "text-field": [
1339 |           "coalesce",
1340 |           [
1341 |             "get",
1342 |             "name:ar"
1343 |           ],
1344 |           [
1345 |             "get",
1346 |             "name"
1347 |           ],
1348 |           ""
1349 |         ],
1350 |         "text-font": [
1351 |           "Noto Sans Regular"
1352 |         ],
1353 |         "text-size": 11,
1354 |         "text-offset": [
1355 |           0,
1356 |           1.2
1357 |         ],
1358 |         "text-anchor": "top"
1359 |       },
1360 |       "paint": {
1361 |         "text-color": "#1A6B3A",
1362 |         "text-halo-color": "white",
1363 |         "text-halo-width": 2
1364 |       }
1365 |     },
1366 |     {
1367 |       "id": "poi-restaurant-cafe",
1368 |       "type": "symbol",
1369 |       "source": "local-osm-points",
1370 |       "source-layer": "planet_osm_point",
1371 |       "minzoom": 16,
1372 |       "filter": [
1373 |         "in",
1374 |         "amenity",
1375 |         "restaurant",
1376 |         "cafe",
1377 |         "fast_food"
1378 |       ],
1379 |       "layout": {
1380 |         "icon-image": [
1381 |           "match",
1382 |           [
1383 |             "get",
1384 |             "amenity"
1385 |           ],
1386 |           "cafe",
1387 |           "cafe",
1388 |           "restaurant"
1389 |         ],
1390 |         "icon-size": 0.8,
1391 |         "text-field": [
1392 |           "coalesce",
1393 |           [
1394 |             "get",
1395 |             "name:ar"
1396 |           ],
1397 |           [
1398 |             "get",
1399 |             "name"
1400 |           ],
1401 |           ""
1402 |         ],
1403 |         "text-font": [
1404 |           "Noto Sans Regular"
1405 |         ],
1406 |         "text-size": 10,
1407 |         "text-offset": [
1408 |           0,
1409 |           1.2
1410 |         ],
1411 |         "text-anchor": "top"
1412 |       },
1413 |       "paint": {
1414 |         "text-color": "#3D4A5C",
1415 |         "text-halo-color": "white",
1416 |         "text-halo-width": 1.5
1417 |       }
1418 |     },
1419 |     {
1420 |       "id": "poi-school",
1421 |       "type": "symbol",
1422 |       "source": "local-osm-points",
1423 |       "source-layer": "planet_osm_point",
1424 |       "minzoom": 14,
1425 |       "filter": [
1426 |         "in",
1427 |         "amenity",
1428 |         "school",
1429 |         "university",
1430 |         "college"
1431 |       ],
1432 |       "layout": {
1433 |         "icon-image": "college",
1434 |         "icon-size": 0.8,
1435 |         "text-field": [
1436 |           "coalesce",
1437 |           [
1438 |             "get",
1439 |             "name:ar"
1440 |           ],
1441 |           [
1442 |             "get",
1443 |             "name"
1444 |           ],
1445 |           ""
1446 |         ],
1447 |         "text-font": [
1448 |            "Noto Sans Regular"
1449 |         ],
1450 |         "text-size": 11,
1451 |         "text-offset": [
1452 |           0,
1453 |           1.2
1454 |         ],
1455 |         "text-anchor": "top"
1456 |       },
1457 |       "paint": {
1458 |         "text-color": "#5A4A8A",
1459 |         "text-halo-color": "white",
1460 |         "text-halo-width": 2
1461 |       }
1462 |     },
1463 |     {
1464 |       "id": "poi-transit-station",
1465 |       "type": "symbol",
1466 |       "source": "local-osm-points",
1467 |       "source-layer": "planet_osm_point",
1468 |       "minzoom": 12,
1469 |       "filter": [
1470 |         "any",
1471 |         [
1472 |           "==",
1473 |           "railway",
1474 |           "station"
1475 |         ],
1476 |         [
1477 |           "==",
1478 |           "railway",
1479 |           "halt"
1480 |         ],
1481 |         [
1482 |           "==",
1483 |           "railway",
1484 |           "tram_stop"
1485 |         ],
1486 |         [
1487 |           "==",
1488 |           "station",
1489 |           "subway"
1490 |         ],
1491 |         [
1492 |           "==",
1493 |           "amenity",
1494 |           "bus_station"
1495 |         ]
1496 |       ],
1497 |       "layout": {
1498 |         "icon-image": "rail",
1499 |         "icon-size": 1,
1500 |         "text-field": [
1501 |           "coalesce",
1502 |           [
1503 |             "get",
1504 |             "name:ar"
1505 |           ],
1506 |           [
1507 |             "get",
1508 |             "name"
1509 |           ],
1510 |           ""
1511 |         ],
1512 |         "text-font": [
1513 |           "Noto Sans Regular"
1514 |         ],
1515 |         "text-size": 11,
1516 |         "text-offset": [
1517 |           0,
1518 |           1.4
1519 |         ],
1520 |         "text-anchor": "top",
1521 |         "text-allow-overlap": false
1522 |       },
1523 |       "paint": {
1524 |         "text-color": "#CC2233",
1525 |         "text-halo-color": "rgba(255,255,255,0.95)",
1526 |         "text-halo-width": 2
1527 |       }
1528 |     },
1529 |     {
1530 |       "id": "place-labels-area",
1531 |       "type": "symbol",
1532 |       "source": "local-osm-polygons",
1533 |       "source-layer": "planet_osm_polygon",
1534 |       "minzoom": 10,
1535 |       "filter": [
1536 |         "has",
1537 |         "name"
1538 |       ],
1539 |       "layout": {
1540 |         "text-field": [
1541 |           "coalesce",
1542 |           [
1543 |             "get",
1544 |             "name:ar"
1545 |           ],
1546 |           [
1547 |             "get",
1548 |             "name"
1549 |           ],
1550 |           ""
1551 |         ],
1552 |         "text-font": [
1553 |            "Noto Sans Regular"
1554 |         ],
1555 |         "text-size": [
1556 |           "interpolate",
1557 |           [
1558 |             "linear"
1559 |           ],
1560 |           [
1561 |             "zoom"
1562 |           ],
1563 |           10,
1564 |           10,
1565 |           14,
1566 |           13
1567 |         ],
1568 |         "text-padding": 8,
1569 |         "text-allow-overlap": false,
1570 |         "text-ignore-placement": false
1571 |       },
1572 |       "paint": {
1573 |         "text-color": "#34495E",
1574 |         "text-halo-color": "rgba(255,255,255,0.85)",
1575 |         "text-halo-width": 2
1576 |       }
1577 |     },
1578 |     {
1579 |       "id": "place-labels-point",
1580 |       "type": "symbol",
1581 |       "source": "local-osm-points",
1582 |       "source-layer": "planet_osm_point",
1583 |       "minzoom": 10,
1584 |       "filter": [
1585 |         "any",
1586 |         [
1587 |           "in",
1588 |           "place",
1589 |           "city",
1590 |           "town",
1591 |           "village",
1592 |           "suburb",
1593 |           "neighbourhood",
1594 |           "hamlet",
1595 |           "locality",
1596 |           "quarter"
1597 |         ],
1598 |         [
1599 |           "in",
1600 |           "natural",
1601 |           "peak",
1602 |           "spring"
1603 |         ]
1604 |       ],
1605 |       "layout": {
1606 |         "text-field": [
1607 |           "coalesce",
1608 |           [
1609 |             "get",
1610 |             "name:ar"
1611 |           ],
1612 |           [
1613 |             "get",
1614 |             "name"
1615 |           ],
1616 |           ""
1617 |         ],
1618 |         "text-font": [
1619 |           "Noto Sans Regular"
1620 |         ],
1621 |         "text-size": [
1622 |           "interpolate",
1623 |           [
1624 |             "linear"
1625 |           ],
1626 |           [
1627 |             "zoom"
1628 |           ],
1629 |           10,
1630 |           [
1631 |             "match",
1632 |             [
1633 |               "get",
1634 |               "place"
1635 |             ],
1636 |             "city",
1637 |             16,
1638 |             "town",
1639 |             14,
1640 |             11
1641 |           ],
1642 |           14,
1643 |           [
1644 |             "match",
1645 |             [
1646 |               "get",
1647 |               "place"
1648 |             ],
1649 |             "city",
1650 |             20,
1651 |             "town",
1652 |             16,
1653 |             13
1654 |           ],
1655 |           17,
1656 |           14
1657 |         ],
1658 |         "text-letter-spacing": [
1659 |           "match",
1660 |           [
1661 |             "get",
1662 |             "place"
1663 |           ],
1664 |           "city",
1665 |           0.08,
1666 |           "town",
1667 |           0.05,
1668 |           0.02
1669 |         ],
1670 |         "text-anchor": "center",
1671 |         "text-padding": 10,
1672 |         "text-allow-overlap": false
1673 |       },
1674 |       "paint": {
1675 |         "text-color": [
1676 |           "match",
1677 |           [
1678 |             "get",
1679 |             "place"
1680 |           ],
1681 |           "city",
1682 |           "#1A2740",
1683 |           "town",
1684 |           "#2C3E50",
1685 |           "village",
1686 |           "#3D4F62",
1687 |           "suburb",
1688 |           "#4A5568",
1689 |           "neighbourhood",
1690 |           "#556677",
1691 |           "#607080"
1692 |         ],
1693 |         "text-halo-color": "rgba(255,255,255,0.92)",
1694 |         "text-halo-width": [
1695 |           "match",
1696 |           [
1697 |             "get",
1698 |             "place"
1699 |           ],
1700 |           "city",
1701 |           3,
1702 |           "town",
1703 |           2.5,
1704 |           2
1705 |         ]
1706 |       }
1707 |     },
1708 |     {
1709 |       "id": "places-egypt-labels",
1710 |       "type": "symbol",
1711 |       "source": "places_egypt",
1712 |       "source-layer": "places_egypt",
1713 |       "minzoom": 12,
1714 |       "layout": {
1715 |         "text-field": [
1716 |           "coalesce",
1717 |           [
1718 |             "get",
1719 |             "name_ar"
1720 |           ],
1721 |           [
1722 |             "get",
1723 |             "name"
1724 |           ],
1725 |           ""
1726 |         ],
1727 |         "text-font": [
1728 |           "Noto Sans Bold"
1729 |         ],
1730 |         "text-size": [
1731 |           "interpolate",
1732 |           [
1733 |              "linear"
1734 |           ],
1735 |           [
1736 |             "zoom"
1737 |           ],
1738 |           12,
1739 |           9,
1740 |           16,
1741 |           13
1742 |         ],
1743 |         "text-offset": [
1744 |           0,
1745 |           1.5
1746 |         ],
1747 |         "text-anchor": "top",
1748 |         "text-padding": 8,
1749 |         "text-allow-overlap": false
1750 |       },
1751 |       "paint": {
1752 |         "text-color": "#2D3748",
1753 |         "text-halo-color": "rgba(255, 255, 255, 0.9)",
1754 |         "text-halo-width": 2
1755 |       }
1756 |     },
1757 |     {
1758 |       "id": "places-syria-labels",
1759 |       "type": "symbol",
1760 |       "source": "places_syria",
1761 |       "source-layer": "places_syria",
1762 |       "minzoom": 10,
1763 |       "filter": ["!in", "category", "street"],
1764 |       "layout": {
1765 |         "text-field": [
1766 |           "coalesce",
1767 |           [
1768 |             "get",
1769 |             "name_ar"
1770 |           ],
1771 |           [
1772 |             "get",
1773 |             "name"
1774 |           ],
1775 |           ""
1776 |         ],
1777 |         "text-font": [
1778 |           "Noto Sans Bold"
1779 |         ],
1780 |         "text-size": [
1781 |           "interpolate",
1782 |           [
1783 |             "linear"
1784 |           ],
1785 |           [
1786 |             "zoom"
1787 |           ],
1788 |           12,
1789 |           9,
1790 |           16,
1791 |           13
1792 |         ],
1793 |         "text-offset": [
1794 |           0,
1795 |           1.5
1796 |         ],
1797 |         "text-anchor": "top",
1798 |         "text-padding": 8,
1799 |         "text-allow-overlap": false
1800 |       },
1801 |       "paint": {
1802 |         "text-color": "#2D3748",
1803 |         "text-halo-color": "rgba(255, 255, 255, 0.9)",
1804 |         "text-halo-width": 2
1805 |       }
1806 |     },
1807 |     {
1808 |       "id": "places-jordan-labels",
1809 |       "type": "symbol",
1810 |       "source": "places_jordan",
1811 |       "source-layer": "places_jordan",
1812 |       "minzoom": 10,
1813 |       "filter": ["!in", "category", "street"],
1814 |       "layout": {
1815 |         "text-field": [
1816 |           "coalesce",
1817 |           [
1818 |             "get",
1819 |             "name_ar"
1820 |           ],
1821 |           [
1822 |             "get",
1823 |             "name"
1824 |           ],
1825 |           ""
1826 |         ],
1827 |         "text-font": [
1828 |           "Noto Sans Bold"
1829 |         ],
1830 |         "text-size": [
1831 |           "interpolate",
1832 |           [
1833 |             "linear"
1834 |           ],
1835 |           [
1836 |             "zoom"
1837 |           ],
1838 |           12,
1839 |           9,
1840 |           16,
1841 |           13
1842 |         ],
1843 |         "text-offset": [
1844 |           0,
1845 |           1.5
1846 |         ],
1847 |         "text-anchor": "top",
1848 |         "text-padding": 8,
1849 |         "text-allow-overlap": false
1850 |       },
1851 |       "paint": {
1852 |         "text-color": "#2D3748",
1853 |         "text-halo-color": "rgba(255, 255, 255, 0.9)",
1854 |         "text-halo-width": 2
1855 |       }
1856 |     },
1857 |     {
1858 |       "id": "overture-building-footprint",
1859 |       "type": "fill",
1860 |       "source": "overture_buildings",
1861 |       "source-layer": "overture_building",
1862 |       "maxzoom": 14,
1863 |       "paint": {
1864 |         "fill-color": "#DDD8D0",
1865 |         "fill-opacity": 0.85,
1866 |         "fill-outline-color": "#C4BEB4"
1867 |       }
1868 |     },
1869 |     {
1870 |       "id": "overture-building-names",
1871 |       "type": "symbol",
1872 |       "source": "overture_buildings",
1873 |       "source-layer": "overture_building",
1874 |       "minzoom": 16,
1875 |       "filter": [
1876 |         "has",
1877 |         "names"
1878 |       ],
1879 |       "layout": {
1880 |         "text-field": [
1881 |           "coalesce",
1882 |           [
1883 |             "get",
1884 |             "names"
1885 |           ],
1886 |           ""
1887 |         ],
1888 |         "text-font": [
1889 |           "Noto Sans Regular"
1890 |         ],
1891 |         "text-size": 10,
1892 |         "text-anchor": "center",
1893 |         "text-allow-overlap": false,
1894 |         "text-max-width": 8
1895 |       },
1896 |       "paint": {
1897 |         "text-color": "#5a5248",
1898 |         "text-halo-color": "rgba(255, 255, 255, 0.9)",
1899 |         "text-halo-width": 1.5
1900 |       }
1901 |     },
1902 |     {
1903 |       "id": "overture-street-names",
1904 |       "type": "symbol",
1905 |       "source": "overture_segments",
1906 |       "source-layer": "overture_segment",
1907 |       "minzoom": 14,
1908 |       "filter": ["has", "names"],
1909 |       "layout": {
1910 |         "text-field": ["coalesce", ["get", "names"], ""],
1911 |         "text-font": ["Noto Sans Regular"],
1912 |         "text-size": ["interpolate", ["linear"], ["zoom"], 14, 9, 16, 12, 18, 14],
1913 |         "symbol-placement": "line",
1914 |         "text-rotation-alignment": "map",
1915 |         "text-pitch-alignment": "viewport",
1916 |         "text-keep-upright": true,
1917 |         "text-padding": 20,
1918 |         "text-letter-spacing": 0.04,
1919 |         "text-max-angle": 30,
1920 |         "symbol-spacing": 300,
1921 |         "text-allow-overlap": false,
1922 |         "text-ignore-placement": false
1923 |       },
1924 |       "paint": {
1925 |         "text-color": "#4A5568",
1926 |         "text-halo-color": "rgba(255, 255, 255, 0.95)",
1927 |         "text-halo-width": 2.2
1928 |       }
1929 |     }
1930 |   ]
1931 | }


------------------------------------------------------------
[46] اسم الملف: polyline.ts
المسار: ./apps/web/src/utils/polyline.ts
------------------------------------------------------------
0001 | /**
0002 |  * Decodes an encoded Polyline string into an array of [lng, lat] coordinates.
0003 |  * @param str The encoded polyline string
0004 |  * @param precision The precision of the coordinates (default 5 for Google Polyline)
0005 |  * @returns Array of [lng, lat] coordinates
0006 |  */
0007 | export function decodePolyline(str: string, precision: number = 5): [number, number][] {
0008 |   let index = 0;
0009 |   let lat = 0;
0010 |   let lng = 0;
0011 |   const coordinates: [number, number][] = [];
0012 |   let shift = 0;
0013 |   let result = 0;
0014 |   let byte: number | null = null;
0015 |   let latitude_change: number;
0016 |   let longitude_change: number;
0017 |   const factor = Math.pow(10, precision);
0018 | 
0019 |   while (index < str.length) {
0020 |     byte = null;
0021 |     shift = 0;
0022 |     result = 0;
0023 | 
0024 |     do {
0025 |       byte = str.charCodeAt(index++) - 63;
0026 |       result |= (byte & 0x1f) << shift;
0027 |       shift += 5;
0028 |     } while (byte >= 0x20);
0029 | 
0030 |     latitude_change = ((result & 1) ? ~(result >> 1) : (result >> 1));
0031 |     lat += latitude_change;
0032 | 
0033 |     shift = 0;
0034 |     result = 0;
0035 | 
0036 |     do {
0037 |       byte = str.charCodeAt(index++) - 63;
0038 |       result |= (byte & 0x1f) << shift;
0039 |       shift += 5;
0040 |     } while (byte >= 0x20);
0041 | 
0042 |     longitude_change = ((result & 1) ? ~(result >> 1) : (result >> 1));
0043 |     lng += longitude_change;
0044 | 
0045 |     coordinates.push([lng / factor, lat / factor]);
0046 |   }
0047 | 
0048 |   return coordinates;
0049 | }


------------------------------------------------------------
[47] اسم الملف: app.e2e-spec.ts
المسار: ./apps/api/test/app.e2e-spec.ts
------------------------------------------------------------
0001 | import { Test, TestingModule } from '@nestjs/testing';
0002 | import { INestApplication } from '@nestjs/common';
0003 | import request from 'supertest';
0004 | import { App } from 'supertest/types';
0005 | import { AppModule } from './../src/app.module';
0006 | 
0007 | describe('AppController (e2e)', () => {
0008 |   let app: INestApplication<App>;
0009 | 
0010 |   beforeEach(async () => {
0011 |     const moduleFixture: TestingModule = await Test.createTestingModule({
0012 |       imports: [AppModule],
0013 |     }).compile();
0014 | 
0015 |     app = moduleFixture.createNestApplication();
0016 |     await app.init();
0017 |   });
0018 | 
0019 |   it('/ (GET)', () => {
0020 |     return request(app.getHttpServer())
0021 |       .get('/')
0022 |       .expect(200)
0023 |       .expect('Hello World!');
0024 |   });
0025 | });


------------------------------------------------------------
[48] اسم الملف: main.ts
المسار: ./apps/api/src/main.ts
------------------------------------------------------------
0001 | import { NestFactory } from '@nestjs/core';
0002 | import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
0003 | import { AppModule } from './app.module';
0004 | 
0005 | async function bootstrap() {
0006 |   const app = await NestFactory.create(AppModule);
0007 | 
0008 |   // Enable CORS for frontend
0009 |   // تفعيل تبادل الموارد مع الواجهة الأمامية
0010 |   app.enableCors();
0011 | 
0012 |   // Set global API prefix
0013 |   app.setGlobalPrefix('api');
0014 | 
0015 |   // Swagger Documentation Setup
0016 |   const config = new DocumentBuilder()
0017 |     .setTitle('Jordan Map Platform API')
0018 |     .setDescription('Backend API for map services, routing, and driver telemetry for Jordan')
0019 |     .setVersion('1.0')
0020 |     .addTag('maps')
0021 |     .addTag('telemetry') // Corrected line to add 'telemetry' tag
0022 |     .build();
0023 | 
0024 |   const document = SwaggerModule.createDocument(app, config);
0025 |   SwaggerModule.setup('docs', app, document);
0026 | 
0027 |   const port = process.env.API_PORT || 3000;
0028 |   await app.listen(port);
0029 |   console.log(`🚀 Jordan Map API is running on: http://localhost:${port}/api`);
0030 | }
0031 | bootstrap();


------------------------------------------------------------
[49] اسم الملف: app.service.ts
المسار: ./apps/api/src/app.service.ts
------------------------------------------------------------
0001 | import { Injectable } from '@nestjs/common';
0002 | 
0003 | @Injectable()
0004 | export class AppService {
0005 |   getHello(): string {
0006 |     return 'Hello World!';
0007 |   }
0008 | }


------------------------------------------------------------
[50] اسم الملف: app.module.ts
المسار: ./apps/api/src/app.module.ts
------------------------------------------------------------
0001 | import { Module } from '@nestjs/common';
0002 | import { ConfigModule, ConfigService } from '@nestjs/config';
0003 | import { TypeOrmModule } from '@nestjs/typeorm';
0004 | import { ScheduleModule } from '@nestjs/schedule';
0005 | import { TelemetryModule } from './telemetry/telemetry.module';
0006 | import { MapsModule } from './maps/maps.module';
0007 | import { GeocodingModule } from './geocoding/geocoding.module';
0008 | 
0009 | @Module({
0010 |   imports: [
0011 |     ConfigModule.forRoot({
0012 |       isGlobal: true,
0013 |     }),
0014 |     ScheduleModule.forRoot(),
0015 |     TypeOrmModule.forRootAsync({
0016 |       imports: [ConfigModule],
0017 |       inject: [ConfigService],
0018 |       useFactory: (config: ConfigService) => ({
0019 |         type: 'postgres',
0020 |         url: config.get('DATABASE_URL'),
0021 |         autoLoadEntities: true,
0022 |         synchronize: true, // Only for prototype! Use migrations for production.
0023 |         // synchronize: true, // للمعاينة فقط؛ يفضل استخدام migrations للإنتاج
0024 |       }),
0025 |     }),
0026 |     TelemetryModule,
0027 |     MapsModule,
0028 |     GeocodingModule,
0029 |   ],
0030 | })
0031 | export class AppModule {}


------------------------------------------------------------
[51] اسم الملف: app.controller.ts
المسار: ./apps/api/src/app.controller.ts
------------------------------------------------------------
0001 | import { Controller, Get } from '@nestjs/common';
0002 | import { AppService } from './app.service';
0003 | 
0004 | @Controller()
0005 | export class AppController {
0006 |   constructor(private readonly appService: AppService) {}
0007 | 
0008 |   @Get()
0009 |   getHello(): string {
0010 |     return this.appService.getHello();
0011 |   }
0012 | }


------------------------------------------------------------
[52] اسم الملف: candidate-road.entity.ts
المسار: ./apps/api/src/maps/candidate-road.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn, Index, CreateDateColumn } from 'typeorm';
0002 | 
0003 | /**
0004 |  * Candidate Road Entity - طرق مرشحة مكتشفة من بيانات التتبع
0005 |  *
0006 |  * Stores potential new roads discovered from telemetry data where
0007 |  * multiple drivers traveled off-road in a consistent linear pattern.
0008 |  */
0009 | @Entity('candidate_roads')
0010 | export class CandidateRoad {
0011 |   @PrimaryGeneratedColumn('uuid')
0012 |   id: string;
0013 | 
0014 |   // GeoJSON LineString representing the discovered road path
0015 |   // خط يمثل المسار المكتشف
0016 |   @Column({
0017 |     type: 'geography',
0018 |     spatialFeatureType: 'LineString',
0019 |     srid: 4326,
0020 |     nullable: false,
0021 |   })
0022 |   @Index({ spatial: true })
0023 |   geometry: any;
0024 | 
0025 |   // Number of unique drivers who used this path
0026 |   // عدد السائقين الفريدين الذين استخدموا هذا المسار
0027 |   @Column('int', { default: 0 })
0028 |   uniqueDriverCount: number;
0029 | 
0030 |   // Total telemetry points that contributed to this candidate
0031 |   // عدد النقاط الإجمالي المساهم في اكتشاف هذا المسار
0032 |   @Column('int', { default: 0 })
0033 |   totalPoints: number;
0034 | 
0035 |   // Average speed observed on this candidate road (km/h)
0036 |   // متوسط السرعة المسجلة (كم/ساعة)
0037 |   @Column('float', { default: 0 })
0038 |   averageSpeed: number;
0039 | 
0040 |   // Estimated length in meters
0041 |   // الطول التقريبي بالمتر
0042 |   @Column('float', { default: 0 })
0043 |   lengthMeters: number;
0044 | 
0045 |   // Confidence score (0-1): higher = more likely a real road
0046 |   // درجة الثقة (0-1): كلما زادت كلما كان احتمال كونها طريق حقيقي أعلى
0047 |   @Column('float', { default: 0 })
0048 |   confidence: number;
0049 | 
0050 |   // Review status: 'pending', 'approved', 'rejected'
0051 |   // حالة المراجعة: pending=بانتظار المراجعة، approved=تمت الموافقة، rejected=مرفوض
0052 |   @Column({ default: 'pending' })
0053 |   status: string;
0054 | 
0055 |   @CreateDateColumn()
0056 |   discoveredAt: Date;
0057 | 
0058 |   @Column({ type: 'timestamp', nullable: true })
0059 |   reviewedAt: Date;
0060 | }


------------------------------------------------------------
[53] اسم الملف: maps.module.ts
المسار: ./apps/api/src/maps/maps.module.ts
------------------------------------------------------------
0001 | import { Module } from '@nestjs/common';
0002 | import { TypeOrmModule } from '@nestjs/typeorm';
0003 | import { MapsService } from './maps.service';
0004 | import { TrafficGridService } from './traffic-grid.service';
0005 | import { MapsController } from './maps.controller';
0006 | import { RoadSegmentStat } from './road-stat.entity';
0007 | import { CandidateRoad } from './candidate-road.entity';
0008 | import { RedisModule } from '../common/redis.module';
0009 | 
0010 | @Module({
0011 |   imports: [
0012 |     TypeOrmModule.forFeature([RoadSegmentStat, CandidateRoad]),
0013 |     RedisModule,
0014 |   ],
0015 |   controllers: [MapsController],
0016 |   providers: [MapsService, TrafficGridService],
0017 |   exports: [MapsService, TrafficGridService],
0018 | })
0019 | export class MapsModule {}


------------------------------------------------------------
[54] اسم الملف: road-stat.entity.ts
المسار: ./apps/api/src/maps/road-stat.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryColumn, Index } from 'typeorm';
0002 | 
0003 | @Entity('road_segment_stats')
0004 | @Index('idx_segment_congestion', ['congestionFactor'], { where: '"congestionFactor" > 1.1' })
0005 | export class RoadSegmentStat {
0006 |   @PrimaryColumn()
0007 |   segmentId: string; // OSM Way ID or similar
0008 | 
0009 |   @Column('float', { default: 0 })
0010 |   averageSpeed: number;
0011 | 
0012 |   @Column('float', { default: 1.0 })
0013 |   congestionFactor: number; // 1.0 = Free flow, >1.0 = Congested
0014 | 
0015 |   @Column('boolean', { default: false })
0016 |   @Index()
0017 |   isClosed: boolean;
0018 | 
0019 |   @Column('int', { default: 0 })
0020 |   sampleCount: number;
0021 | 
0022 |   @Column({
0023 |     type: 'geography',
0024 |     spatialFeatureType: 'LineString',
0025 |     srid: 4326,
0026 |     nullable: true,
0027 |   })
0028 |   @Index({ spatial: true })
0029 |   geometry: any;
0030 | 
0031 |   @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
0032 |   lastUpdated: Date;
0033 | }


------------------------------------------------------------
[55] اسم الملف: maps.service.ts
المسار: ./apps/api/src/maps/maps.service.ts
------------------------------------------------------------
0001 | import { Injectable, HttpException, HttpStatus } from '@nestjs/common';
0002 | import { ConfigService } from '@nestjs/config';
0003 | import { InjectRepository } from '@nestjs/typeorm';
0004 | import { Repository, DataSource } from 'typeorm';
0005 | import { RoadSpeedProfile } from './road-speed-profile.entity';
0006 | import axios from 'axios';
0007 | import { RoadSegmentStat } from './road-stat.entity';
0008 | import { TrafficGridService } from './traffic-grid.service';
0009 | 
0010 | @Injectable()
0011 | export class MapsService {
0012 |   private readonly graphHopperUrl: string;
0013 | 
0014 |   constructor(
0015 |     private configService: ConfigService,
0016 |     @InjectRepository(RoadSegmentStat)
0017 |     private roadStatRepo: Repository<RoadSegmentStat>,
0018 |     private trafficGrid: TrafficGridService
0019 |   ) {
0020 |     this.graphHopperUrl = this.configService.get('GRAPH_HOPPER_URL', 'http://routing:8080');
0021 |   }
0022 | 
0023 |   async getRoute(waypoints: [number, number][], profile: string = 'car') {
0024 |     if (waypoints.length < 2) {
0025 |       throw new HttpException('At least two waypoints are required', HttpStatus.BAD_REQUEST);
0026 |     }
0027 | 
0028 |     try {
0029 |       // GraphHopper expects [lng, lat] order
0030 |       const ghPoints = waypoints.map(wp => [wp[1], wp[0]]);
0031 | 
0032 |       const payload: any = {
0033 |         points: ghPoints,
0034 |         profile: profile,
0035 |         locale: 'en',
0036 |         calc_points: true,
0037 |         points_encoded: true,
0038 |       };
0039 | 
0040 |       // GraphHopper ONLY supports alternative routes if there are exactly 2 points (Start and End)
0041 |       if (waypoints.length === 2) {
0042 |         payload.algorithm = 'alternative_route';
0043 |         payload['ch.disable'] = true; // Required for alternative routes
0044 |         payload['alternative_route.max_paths'] = 2; // Return main route + 1 alternative
0045 |         payload['alternative_route.max_weight_factor'] = 1.6;
0046 |         payload['alternative_route.max_share_factor'] = 0.6;
0047 |       }
0048 | 
0049 |       console.log(`Routing Request: ${waypoints.length} points via ${profile} on ${this.graphHopperUrl}`);
0050 |       const response = await axios.post(`${this.graphHopperUrl}/route`, payload, { timeout: 10000 });
0051 | 
0052 |       console.log('Routing SUCCESS');
0053 |       const paths = response.data.paths;
0054 |       if (!paths || paths.length === 0) throw new HttpException('No route found', HttpStatus.NOT_FOUND);
0055 | 
0056 |       const route = paths[0];
0057 | 
0058 |       // --- PHASE 3: TRAFFIC-AWARE ADJUSTMENT (V3 Optimized) ---
0059 |       const now = new Date();
0060 |       const hr = now.getHours();
0061 |       const dow = now.getDay();
0062 | 
0063 |       const coords = this.decodePolyline(route.points);
0064 |       const trafficFactor = this.trafficGrid.getTrafficFactor(coords, hr, dow);
0065 | 
0066 |       const baseDuration = route.time / 1000;
0067 |       const trafficAwareDuration = baseDuration * trafficFactor;
0068 | 
0069 |       // Process alternative routes if any without breaking existing frontend variables
0070 |       const alternatives = paths.slice(1).map(alt => ({
0071 |         distance: alt.distance,
0072 |         duration: Math.round(alt.time / 1000),
0073 |         points: alt.points,
0074 |         bbox: alt.bbox
0075 |       }));
0076 | 
0077 |       return {
0078 |         distance: route.distance,
0079 |         duration: Math.round(baseDuration),
0080 |         trafficAwareDuration: Math.round(trafficAwareDuration),
0081 |         trafficFactor: Math.round(trafficFactor * 100) / 100,
0082 |         points: route.points,
0083 |         bbox: route.bbox,
0084 |         alternatives: alternatives // NEW: array of other routes
0085 |       };
0086 |     } catch (error) {
0087 |       const msg = error.response ? `GH Error: ${JSON.stringify(error.response.data)}` : `DNS/Connection Error: ${error.message}`;
0088 |       console.error('CRITICAL ROUTING FAILURE:', msg);
0089 |       throw new HttpException(`Routing Failure: ${msg}`, HttpStatus.BAD_GATEWAY);
0090 |     }
0091 |   }
0092 | 
0093 |   /**
0094 |    * Manual decoder for Google Polyline algorithm (Server-side spatial matching)
0095 |    */
0096 |   private decodePolyline(encoded: string): [number, number][] {
0097 |     const points: [number, number][] = [];
0098 |     let index = 0, len = encoded.length;
0099 |     let lat = 0, lng = 0;
0100 | 
0101 |     while (index < len) {
0102 |       let b, shift = 0, result = 0;
0103 |       do {
0104 |         b = encoded.charCodeAt(index++) - 63;
0105 |         result |= (b & 0x1f) << shift;
0106 |         shift += 5;
0107 |       } while (b >= 0x20);
0108 |       let dlat = ((result & 1) ? ~(result >> 1) : (result >> 1));
0109 |       lat += dlat;
0110 | 
0111 |       shift = 0;
0112 |       result = 0;
0113 |       do {
0114 |         b = encoded.charCodeAt(index++) - 63;
0115 |         result |= (b & 0x1f) << shift;
0116 |         shift += 5;
0117 |       } while (b >= 0x20);
0118 |       let dlng = ((result & 1) ? ~(result >> 1) : (result >> 1));
0119 |       lng += dlng;
0120 | 
0121 |       points.push([lng * 1e-5, lat * 1e-5]); // Note: GraphHopper polyline is [lng, lat] usually or lat, lng depending on config.
0122 |       // GH polyline standard is [lat, lng] but we need [lng, lat] for PostGIS GeoJSON Coordinates.
0123 |       // Let's verify: GraphHopper default polyline is Lat,Lng.
0124 |     }
0125 |     return points;
0126 |   }
0127 | 
0128 |   async getMapConfig() {
0129 |     // Return basic map configuration for clients
0130 |     // إرجاع إعدادات الخريطة للواجهة الأمامية
0131 |     return {
0132 |       center: [31.95, 35.91], // Amman, Jordan
0133 |       zoom: 12,
0134 |       tileServerUrl: this.configService.get('TILE_SERVER_URL', 'http://localhost:3001'),
0135 |     };
0136 |   }
0137 | }


------------------------------------------------------------
[56] اسم الملف: road-speed-profile.entity.ts
المسار: ./apps/api/src/maps/road-speed-profile.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryColumn, Index, CreateDateColumn } from 'typeorm';
0002 | 
0003 | @Entity('road_speed_profiles')
0004 | @Index(['segmentId', 'hourOfDay', 'dayOfWeek'], { unique: true })
0005 | export class RoadSpeedProfile {
0006 |   @PrimaryColumn()
0007 |   segmentId: string;
0008 | 
0009 |   @PrimaryColumn()
0010 |   hourOfDay: number; // 0-23
0011 | 
0012 |   @PrimaryColumn()
0013 |   dayOfWeek: number; // 0-6 (0 = Sunday)
0014 | 
0015 |   @Column('float', { default: 0 })
0016 |   averageSpeed: number;
0017 | 
0018 |   @Column('int', { default: 0 })
0019 |   sampleCount: number;
0020 | 
0021 |   @CreateDateColumn()
0022 |   lastUpdated: Date;
0023 | }


------------------------------------------------------------
[57] اسم الملف: traffic-grid.service.ts
المسار: ./apps/api/src/maps/traffic-grid.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger, OnModuleInit } from '@nestjs/common';
0002 | import { DataSource } from 'typeorm';
0003 | 
0004 | /**
0005 |  * Traffic Grid Service - In-Memory GeoHash Grid
0006 |  * نظام شبكة التنبؤ المروري الذكي: يحول بيانات قاعدة البيانات إلى خارطة سرعة في الذاكرة
0007 |  */
0008 | @Injectable()
0009 | export class TrafficGridService implements OnModuleInit {
0010 |   private readonly logger = new Logger(TrafficGridService.name);
0011 | 
0012 |   // Key: "geohash:hr:dow", Value: trafficFactor
0013 |   private grid: Map<string, number> = new Map();
0014 |   private readonly GEOHASH_PRECISION = 6; // ~100m accuracy
0015 | 
0016 |   constructor(private dataSource: DataSource) {}
0017 | 
0018 |   async onModuleInit() {
0019 |     await this.refreshGrid();
0020 |   }
0021 | 
0022 |   /**
0023 |    * Rebuilds the in-memory lookup table from PostGIS
0024 |    * إعادة بناء الجدول المرجعي في الذاكرة من قاعدة البيانات
0025 |    */
0026 |   async refreshGrid() {
0027 |     this.logger.log('📡 Rebuilding Traffic Grid v3 (In-Memory Lookup)...');
0028 |     try {
0029 |       const startTime = Date.now();
0030 | 
0031 |       const data = await this.dataSource.query(`
0032 |         SELECT
0033 |           ST_X(ST_Centroid(geometry::geometry)) as lng,
0034 |           ST_Y(ST_Centroid(geometry::geometry)) as lat,
0035 |           p."hourOfDay", p."dayOfWeek", p."averageSpeed",
0036 |           s."averageSpeed" as base_speed
0037 |         FROM road_speed_profiles p
0038 |         JOIN road_segment_stats s ON p."segmentId" = s."segmentId"
0039 |         WHERE s.geometry IS NOT NULL
0040 |       `);
0041 | 
0042 |       this.grid.clear();
0043 |       let count = 0;
0044 | 
0045 |       for (const row of data) {
0046 |         const gh = this.encodeGeohash(row.lat, row.lng, this.GEOHASH_PRECISION);
0047 |         const factor = row.base_speed / Math.max(row.averageSpeed, 1);
0048 | 
0049 |         // Key includes time buckets to handle day/night variations
0050 |         const key = `${gh}:${row.hourOfDay}:${row.dayOfWeek}`;
0051 |         this.grid.set(key, factor);
0052 |         count++;
0053 |       }
0054 | 
0055 |       this.logger.log(`✅ Grid rebuilt in ${Date.now() - startTime}ms. Cached ${count} cells (${this.grid.size} unique keys).`);
0056 |     } catch (e) {
0057 |       this.logger.error('❌ Failed to refresh traffic grid:', e.message);
0058 |     }
0059 |   }
0060 | 
0061 |   /**
0062 |    * Fetches the average traffic factor for a decoded polyline
0063 |    * جلب معامل الازدحام المتوسط لمخطط الرحلة من الذاكرة
0064 |    */
0065 |   getTrafficFactor(coords: [number, number][], hr: number, dow: number): number {
0066 |     if (this.grid.size === 0) return 1.0;
0067 | 
0068 |     let totalFactor = 0;
0069 |     let matches = 0;
0070 | 
0071 |     // We sample points every ~100m to speed up (every 2nd or 3rd coord)
0072 |     for (let i = 0; i < coords.length; i += 2) {
0073 |       const [lng, lat] = coords[i];
0074 |       const gh = this.encodeGeohash(lat, lng, this.GEOHASH_PRECISION);
0075 |       const key = `${gh}:${hr}:${dow}`;
0076 | 
0077 |       const factor = this.grid.get(key);
0078 |       if (factor) {
0079 |         totalFactor += factor;
0080 |         matches++;
0081 |       }
0082 |     }
0083 | 
0084 |     if (matches === 0) return 1.0;
0085 | 
0086 |     // Average factor clipped to sane ranges (0.8 - 3.0)
0087 |     let finalFactor = totalFactor / matches;
0088 |     return Math.min(Math.max(finalFactor, 0.8), 3.0);
0089 |   }
0090 | 
0091 |   /**
0092 |    * Pure Math GeoHash implementation (No outside dependencies)
0093 |    */
0094 |   private encodeGeohash(lat: number, lng: number, precision: number): string {
0095 |     const BASE32 = "0123456789bcdefghjkmnpqrstuvwxyz";
0096 |     let minLat = -90, maxLat = 90;
0097 |     let minLng = -180, maxLng = 180;
0098 |     let result = "";
0099 |     let isEven = true;
0100 |     let bit = 0;
0101 |     let ch = 0;
0102 | 
0103 |     while (result.length < precision) {
0104 |       if (isEven) {
0105 |         let mid = (minLng + maxLng) / 2;
0106 |         if (lng > mid) { ch |= (1 << (4 - bit)); minLng = mid; }
0107 |         else { maxLng = mid; }
0108 |       } else {
0109 |         let mid = (minLat + maxLat) / 2;
0110 |         if (lat > mid) { ch |= (1 << (4 - bit)); minLat = mid; }
0111 |         else { maxLat = mid; }
0112 |       }
0113 | 
0114 |       isEven = !isEven;
0115 |       if (bit < 4) {
0116 |         bit++;
0117 |       } else {
0118 |         result += BASE32[ch];
0119 |         bit = 0;
0120 |         ch = 0;
0121 |       }
0122 |     }
0123 |     return result;
0124 |   }
0125 | }


------------------------------------------------------------
[58] اسم الملف: maps.controller.ts
المسار: ./apps/api/src/maps/maps.controller.ts
------------------------------------------------------------
0001 | import { Controller, Get, Query, UseGuards } from '@nestjs/common';
0002 | import { ApiTags, ApiOperation } from '@nestjs/swagger';
0003 | import { MapsService } from './maps.service';
0004 | import { ApiKeyGuard } from '../common/guards/api-key.guard';
0005 | 
0006 | @ApiTags('maps')
0007 | @Controller('maps')
0008 | @UseGuards(ApiKeyGuard)
0009 | export class MapsController {
0010 |   constructor(private readonly mapsService: MapsService) {}
0011 | 
0012 |   @Get('route')
0013 |   @ApiOperation({ summary: 'Calculate a route with dynamic waypoints 🚗' })
0014 |   async getRoute(@Query() query: any) {
0015 |     const waypoints: [number, number][] = [];
0016 | 
0017 |     // 1. Extract Origin (fromLat, fromLng)
0018 |     if (query.fromLat && query.fromLng) {
0019 |       waypoints.push([parseFloat(query.fromLat), parseFloat(query.fromLng)]);
0020 |     }
0021 | 
0022 |     // 2. Extract Intermediate Stops (stop1Lat, stop1Lng, stop2Lat, etc.)
0023 |     // We sort keys to ensure stops are in order: stop1, stop2, stop3...
0024 |     const stopKeys = Object.keys(query)
0025 |       .filter(key => key.startsWith('stop') && key.endsWith('Lat'))
0026 |       .sort((a, b) => {
0027 |         const numA = parseInt(a.replace('stop', '').replace('Lat', ''), 10);
0028 |         const numB = parseInt(b.replace('stop', '').replace('Lat', ''), 10);
0029 |         return numA - numB;
0030 |       });
0031 | 
0032 |     for (const latKey of stopKeys) {
0033 |       const prefix = latKey.replace('Lat', '');
0034 |       const lngKey = `${prefix}Lng`;
0035 |       if (query[latKey] && query[lngKey]) {
0036 |         waypoints.push([parseFloat(query[latKey]), parseFloat(query[lngKey])]);
0037 |       }
0038 |     }
0039 | 
0040 |     // 3. Extract Destination (toLat, toLng)
0041 |     if (query.toLat && query.toLng) {
0042 |       waypoints.push([parseFloat(query.toLat), parseFloat(query.toLng)]);
0043 |     }
0044 | 
0045 |     const profile = query.profile || 'car';
0046 |     return this.mapsService.getRoute(waypoints, profile);
0047 |   }
0048 | 
0049 |   @Get('config')
0050 |   @ApiOperation({ summary: 'Get map configuration for the region 🗺️' })
0051 |   async getConfig() {
0052 |     return this.mapsService.getMapConfig();
0053 |   }
0054 | }


------------------------------------------------------------
[59] اسم الملف: geocoding.module.ts
المسار: ./apps/api/src/geocoding/geocoding.module.ts
------------------------------------------------------------
0001 | import { Module } from '@nestjs/common';
0002 | import { TypeOrmModule } from '@nestjs/typeorm';
0003 | import { GeocodingService } from './geocoding.service';
0004 | import { GeocodingInitService } from './geocoding-init.service';
0005 | import { GeocodingController } from './geocoding.controller';
0006 | import { PlaceSyria } from './entities/place-syria.entity';
0007 | import { PlaceJordan } from './entities/place-jordan.entity';
0008 | import { PlaceEgypt } from './entities/place-egypt.entity';
0009 | import { OsmArea } from './entities/osm-area.entity';
0010 | import { OsmPointWithArea } from './entities/osm-point-with-area.entity';
0011 | import { AdminBoundary } from './entities/admin-boundary.entity';
0012 | import { AdminBoundariesService } from './admin-boundaries.service';
0013 | import { JordanResearchService } from './jordan-research.service';
0014 | import { AdministrativeLinkingService } from './administrative-linking.service';
0015 | import { NeighborhoodPoint } from './entities/neighborhood-point.entity';
0016 | import { NeighborhoodPolygon } from './entities/neighborhood-polygon.entity';
0017 | 
0018 | @Module({
0019 |   imports: [
0020 |     TypeOrmModule.forFeature([
0021 |       PlaceSyria,
0022 |       PlaceJordan,
0023 |       PlaceEgypt,
0024 |       OsmArea,
0025 |       OsmPointWithArea,
0026 |       AdminBoundary,
0027 |       NeighborhoodPoint,
0028 |       NeighborhoodPolygon
0029 |     ]),
0030 |   ],
0031 |   controllers: [GeocodingController],
0032 |   providers: [
0033 |     GeocodingService,
0034 |     GeocodingInitService,
0035 |     AdminBoundariesService,
0036 |     JordanResearchService,
0037 |     AdministrativeLinkingService
0038 |   ],
0039 | })
0040 | export class GeocodingModule {}


------------------------------------------------------------
[60] اسم الملف: jordan-research.service.ts
المسار: ./apps/api/src/geocoding/jordan-research.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository } from 'typeorm';
0004 | import { PlaceJordan } from './entities/place-jordan.entity';
0005 | import axios from 'axios';
0006 | import * as fs from 'fs';
0007 | import * as path from 'path';
0008 | 
0009 | @Injectable()
0010 | export class JordanResearchService {
0011 |   private readonly logger = new Logger(JordanResearchService.name);
0012 | 
0013 |   constructor(
0014 |     @InjectRepository(PlaceJordan)
0015 |     private readonly placeRepo: Repository<PlaceJordan>,
0016 |   ) {}
0017 | 
0018 |   private async fetchWithRetry(url: string, data?: string, method: 'get' | 'post' = 'get', retries = 2) {
0019 |     for (let i = 0; i <= retries; i++) {
0020 |             try {
0021 |                 const config = {
0022 |                     timeout: 20000,
0023 |                     headers: {
0024 |                         'User-Agent': 'Mozilla/5.0 (compatible; IntaleqMapBot/1.0; +https://intaleq.xyz)',
0025 |                         'Accept': 'application/json, application/sparql-results+json'
0026 |                     }
0027 |                 };
0028 |                 const response = method === 'post'
0029 |                     ? await axios.post(url, data, config)
0030 |                     : await axios.get(url, { ...config, params: data ? { query: data, format: 'json' } : {} });
0031 |                 return response.data;
0032 |             } catch (error) {
0033 |                 if (i === retries) {
0034 |                     this.logger.error(`Failed to fetch from ${url} after ${retries} retries: ${error.message}`);
0035 |                     throw error;
0036 |                 }
0037 |                 await new Promise(res => setTimeout(res, 2000));
0038 |             }
0039 |         }
0040 |   }
0041 | 
0042 |   /**
0043 |    * Source 1: OSM (Overpass API) with Geometries
0044 |    */
0045 |   async fetchOsmZarqa() {
0046 |     this.logger.log('Fetching Zarqa Geometries from OSM...');
0047 |     const query = `[out:json];(relation["boundary"="administrative"]["admin_level"~"6|8|10"](31.86,35.94,32.22,36.25);node["place"~"neighbourhood|suburb|town"](31.86,35.94,32.22,36.25););out geom;`;
0048 |     try {
0049 |       const data = await this.fetchWithRetry('https://overpass-api.de/api/interpreter', `data=${encodeURIComponent(query)}`, 'post');
0050 |       return data.elements.map(e => ({
0051 |         id: e.id,
0052 |         name_ar: e.tags['name:ar'] || e.tags['name'],
0053 |         type: e.tags['admin_level'] ? `admin_level_${e.tags['admin_level']}` : `place_${e.tags['place']}`,
0054 |         geometry: e.geometry ? e.geometry : (e.lat && e.lon ? { type: 'Point', coordinates: [e.lon, e.lat] } : null)
0055 |       }));
0056 |     } catch (e) { return { error: `OSM Fetch failed: ${e.message}` }; }
0057 |   }
0058 | 
0059 |   /**
0060 |    * Source 2: Overture (Local DB) - Corrected columns
0061 |    */
0062 |   async fetchOvertureZarqa() {
0063 |     try {
0064 |       const tableCheck = await this.placeRepo.query("SELECT count(*) FROM information_schema.tables WHERE table_name = 'overture_segment'");
0065 |       if (parseInt(tableCheck[0].count) === 0) return { error: 'table overture_segment does not exist in this database' };
0066 | 
0067 |       // Probe columns to avoid 'highway' error
0068 |       const columns = await this.placeRepo.query("SELECT column_name FROM information_schema.columns WHERE table_name = 'overture_segment'");
0069 |       const colList = columns.map(c => c.column_name);
0070 |       const roadClassCol = colList.includes('road_class') ? 'road_class' : (colList.includes('class') ? 'class' : 'NULL');
0071 | 
0072 |       return await this.placeRepo.query(`
0073 |         SELECT DISTINCT COALESCE(names->>'primary', names->>'common') as name_ar, ${roadClassCol} as road_class,
0074 |         ST_AsGeoJSON(ST_Centroid(location)) as centroid
0075 |         FROM overture_segment
0076 |         WHERE (names->>'primary' IS NOT NULL OR names->>'common' IS NOT NULL)
0077 |         AND ST_Within(location, ST_MakeEnvelope(35.94, 31.86, 36.25, 32.22, 4326))
0078 |         LIMIT 10
0079 |       `);
0080 |     } catch (e) { return { error: `Overture query failed: ${e.message}` }; }
0081 |   }
0082 | 
0083 |   /**
0084 |    * Source 3: Wikidata (SPARQL) with User-Agent
0085 |    */
0086 |   async fetchWikidataZarqa() {
0087 |     const sparql = `SELECT ?item ?itemLabel WHERE { ?item wdt:P131 wd:Q231710. SERVICE wikibase:label { bd:serviceParam wikibase:language "ar,en". } } LIMIT 20`;
0088 |     try {
0089 |       const data = await this.fetchWithRetry('https://query.wikidata.org/sparql', sparql, 'get');
0090 |       return data.results.bindings.map(b => ({ id: b.item.value.split('/').pop(), name_ar: b.itemLabel.value }));
0091 |     } catch (e) { return { error: `Wikidata Fetch failed: ${e.message}` }; }
0092 |   }
0093 | 
0094 |   /**
0095 |    * Source 4 & 5: Static Files (HDX & GADM)
0096 |    */
0097 |   async checkStaticFiles() {
0098 |     // Check various common paths from overture_ingest script or data directory
0099 |     const paths = ['/data/infrastructure/osm-data/', './data/', './infrastructure/osm-data/'];
0100 |     const files = ['jor_adm2_geoboundaries.geojson', 'gadm41_JOR_2.json'];
0101 |     const results = {};
0102 | 
0103 |     for (const file of files) {
0104 |         let found = false;
0105 |         for (const p of paths) {
0106 |             if (fs.existsSync(path.join(p, file))) {
0107 |                 results[file] = `Found at ${p}`;
0108 |                 found = true;
0109 |                 break;
0110 |             }
0111 |         }
0112 |         if (!found) results[file] = 'Not Found locally - Check if overture_ingest.sh was run for division_area';
0113 |     }
0114 |     return results;
0115 |   }
0116 | 
0117 |   async generateZarqaReport() {
0118 |     const [osm, overture, wikidata, staticFiles] = await Promise.all([
0119 |       this.fetchOsmZarqa(),
0120 |       this.fetchOvertureZarqa(),
0121 |       this.fetchWikidataZarqa(),
0122 |       this.checkStaticFiles()
0123 |     ]);
0124 | 
0125 |     return {
0126 |       area: 'Zarqa Governorate, Jordan',
0127 |       report_timestamp: new Date().toISOString(),
0128 |       sources: {
0129 |         osm,
0130 |         overture,
0131 |         wikidata,
0132 |         static_files: staticFiles,
0133 |         hdx: "Requires GeoBoundaries GeoJSON for Level 2 (Districts)",
0134 |         gadm: "Requires GADM v4.1 for Level 1-2"
0135 |       },
0136 |       comparison_summary: "Multi-source research enabled with geometries. OSM provides precise neighborhood centroids and boundaries where available. Use the provided centroids to visualize Zarqa subunits."
0137 |     };
0138 |   }
0139 | }


------------------------------------------------------------
[61] اسم الملف: geocoding.controller.ts
المسار: ./apps/api/src/geocoding/geocoding.controller.ts
------------------------------------------------------------
0001 | import { Controller, Get, Post, Delete, Body, Query, UseGuards, HttpException, HttpStatus } from '@nestjs/common';
0002 | import { ApiTags, ApiOperation, ApiQuery } from '@nestjs/swagger';
0003 | import { GeocodingService } from './geocoding.service';
0004 | import { AdminBoundariesService } from './admin-boundaries.service';
0005 | import { JordanResearchService } from './jordan-research.service';
0006 | import { AdministrativeLinkingService } from './administrative-linking.service';
0007 | import { ApiKeyGuard } from '../common/guards/api-key.guard';
0008 | 
0009 | @ApiTags('geocoding')
0010 | @Controller('geocoding')
0011 | export class GeocodingController {
0012 |   constructor(
0013 |     private readonly geocodingService: GeocodingService,
0014 |     private readonly adminBoundariesService: AdminBoundariesService,
0015 |     private readonly jordanResearchService: JordanResearchService,
0016 |     private readonly adminLinkingService: AdministrativeLinkingService,
0017 |   ) {}
0018 | 
0019 |   @Get('search')
0020 |   @ApiOperation({ summary: 'Search for locations (Forward Geocoding)' })
0021 |   @ApiQuery({ name: 'q', required: true })
0022 |   @ApiQuery({ name: 'lat', required: false, type: Number })
0023 |   @ApiQuery({ name: 'lng', required: false, type: Number })
0024 |   @ApiQuery({ name: 'radius', required: false, type: Number })
0025 |   @ApiQuery({ name: 'country', required: false, enum: ['jordan', 'syria', 'egypt'] })
0026 |   async search(
0027 |     @Query('q') query: string,
0028 |     @Query('lat') lat?: string,
0029 |     @Query('lng') lng?: string,
0030 |     @Query('radius') radius?: string,
0031 |     @Query('country') country?: string,
0032 |   ) {
0033 |     // NestJS @Query() always receives strings — must parse explicitly for numeric types
0034 |     const parsedLat = lat !== undefined ? parseFloat(lat) : Number.NaN;
0035 |     const parsedLng = lng !== undefined ? parseFloat(lng) : Number.NaN;
0036 |     const parsedRadius = radius !== undefined ? parseFloat(radius) : 20000;
0037 | 
0038 |     // Guard against malformed float values (NaN breaks PostGIS)
0039 |     const safeLat = !isNaN(parsedLat) ? parsedLat : undefined;
0040 |     const safeLng = !isNaN(parsedLng) ? parsedLng : undefined;
0041 | 
0042 |     return this.geocodingService.searchPlaces(query, safeLat, safeLng, parsedRadius, country);
0043 |   }
0044 | 
0045 |   @Get('reverse')
0046 |   @ApiOperation({ summary: 'Reverse Geocoding (Lat/Lng to Address)' })
0047 |   @ApiQuery({ name: 'lat', required: true })
0048 |   @ApiQuery({ name: 'lng', required: true })
0049 |   async reverse(
0050 |     @Query('lat') lat: string,
0051 |     @Query('lng') lng: string,
0052 |   ) {
0053 |     const parsedLat = parseFloat(lat);
0054 |     const parsedLng = parseFloat(lng);
0055 | 
0056 |     if (isNaN(parsedLat) || isNaN(parsedLng)) {
0057 |       throw new HttpException('Invalid lat/lng values', HttpStatus.BAD_REQUEST);
0058 |     }
0059 | 
0060 |     return this.geocodingService.reverseGeocode(parsedLat, parsedLng);
0061 |   }
0062 | 
0063 |   @Post('places')
0064 |   @UseGuards(ApiKeyGuard)
0065 |   @ApiOperation({ summary: 'Add a new location (User Submitted)' })
0066 |   async addPlace(@Body() placeData: any) {
0067 |     return this.geocodingService.addPlace(placeData);
0068 |   }
0069 | 
0070 |   @Delete('places')
0071 |   @UseGuards(ApiKeyGuard)
0072 |   @ApiOperation({ summary: 'Delete a place by name or ID' })
0073 |   @ApiQuery({ name: 'name', required: false })
0074 |   @ApiQuery({ name: 'id', required: false, type: Number })
0075 |   @ApiQuery({ name: 'country', required: true, enum: ['jordan', 'syria', 'egypt'] })
0076 |   async deletePlace(
0077 |     @Query('country') country: string,
0078 |     @Query('name') name?: string,
0079 |     @Query('id') id?: string,
0080 |   ) {
0081 |     if (id) {
0082 |       return this.geocodingService.deletePlaceById(Number(id), country);
0083 |     }
0084 |     if (name) {
0085 |       return this.geocodingService.deletePlacesByName(name, country);
0086 |     }
0087 |     throw new HttpException('Name or ID required', HttpStatus.BAD_REQUEST);
0088 |   }
0089 | 
0090 |   @Post('upsert-place')
0091 |   @UseGuards(ApiKeyGuard)
0092 |   @ApiOperation({ summary: 'Add or Update a location (Automated Scraper)' })
0093 |   async upsertPlace(@Body() placeData: any) {
0094 |     return this.geocodingService.upsertPlace(placeData);
0095 |   }
0096 | 
0097 |   @Post('upsert-batch')
0098 |   @UseGuards(ApiKeyGuard)
0099 |   @ApiOperation({ summary: 'Add or Update multiple locations in bulk' })
0100 |   async upsertBatch(@Body() body: { places: any[] }) {
0101 |     return this.geocodingService.upsertBatch(body.places);
0102 |   }
0103 | 
0104 |   @Get('places')
0105 |   @ApiOperation({ summary: 'Get recent user submitted places' })
0106 |   async getPlaces(@Query('limit') limit?: string) {
0107 |     return this.geocodingService.getRecentPlaces(limit ? parseInt(limit, 10) : 50);
0108 |   }
0109 | 
0110 |   @Get('geojson')
0111 |   @ApiOperation({ summary: 'Get all user submitted places as GeoJSON for Map Style' })
0112 |   async getGeoJSON() {
0113 |     return this.geocodingService.getAllPlacesGeoJSON();
0114 |   }
0115 | 
0116 |   @Post('import-boundaries')
0117 |   @UseGuards(ApiKeyGuard)
0118 |   @ApiOperation({ summary: 'Import administrative boundaries from a local GeoJSON file on the server' })
0119 |   @ApiQuery({ name: 'country', required: true })
0120 |   @ApiQuery({ name: 'filePath', required: true })
0121 |   async importBoundaries(
0122 |     @Query('country') country: string,
0123 |     @Query('filePath') filePath: string,
0124 |   ) {
0125 |     return this.adminBoundariesService.importFromFile(country, filePath);
0126 |   }
0127 | 
0128 |   @Get('research/zarqa')
0129 |   @ApiOperation({ summary: 'Generate a research report for Zarqa, Jordan (Sample Data)' })
0130 |   async zarqaResearch() {
0131 |     return this.jordanResearchService.generateZarqaReport();
0132 |   }
0133 | 
0134 |   @Post('admin/sync-neighborhoods')
0135 |   @UseGuards(ApiKeyGuard)
0136 |   @ApiOperation({ summary: 'Sync neighborhood points from OSM for a bbox' })
0137 |   @ApiQuery({ name: 'bbox', required: false })
0138 |   async syncNeighborhoods(@Query('bbox') bbox?: string) {
0139 |     return this.adminLinkingService.syncOsmNeighborhoodPoints(bbox);
0140 |   }
0141 | 
0142 |   @Post('admin/generate-voronoi')
0143 |   @UseGuards(ApiKeyGuard)
0144 |   @ApiOperation({ summary: 'Generate Voronoi polygons for neighborhoods' })
0145 |   async generateVoronoi() {
0146 |     return this.adminLinkingService.generateVoronoiNeighborhoods();
0147 |   }
0148 | 
0149 |   @Post('admin/link-places')
0150 |   @UseGuards(ApiKeyGuard)
0151 |   @ApiOperation({ summary: 'Link places to administrative hierarchy' })
0152 |   @ApiQuery({ name: 'country', required: true, enum: ['jordan', 'syria'] })
0153 |   async linkPlaces(@Query('country') country: 'jordan' | 'syria') {
0154 |     return this.adminLinkingService.linkPlaces(country);
0155 |   }
0156 | }


------------------------------------------------------------
[62] اسم الملف: geocoding-init.service.ts
المسار: ./apps/api/src/geocoding/geocoding-init.service.ts
------------------------------------------------------------
0001 | import { Injectable, OnModuleInit, Logger } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository } from 'typeorm';
0004 | import { PlaceSyria } from './entities/place-syria.entity';
0005 | 
0006 | @Injectable()
0007 | export class GeocodingInitService implements OnModuleInit {
0008 |   private readonly logger = new Logger(GeocodingInitService.name);
0009 | 
0010 |   constructor(
0011 |     @InjectRepository(PlaceSyria)
0012 |     private readonly repo: Repository<PlaceSyria>,
0013 |   ) {}
0014 | 
0015 |   async onModuleInit() {
0016 |     this.logger.log('Checking for PostGIS extensions and triggers...');
0017 |     try {
0018 |       // Ensure PostGIS and Trigram extensions are enabled
0019 |       await this.repo.query('CREATE EXTENSION IF NOT EXISTS postgis;');
0020 |       await this.repo.query('CREATE EXTENSION IF NOT EXISTS pg_trgm;');
0021 | 
0022 |       // Migration: Rename old admin_level columns to descriptive names if they exist
0023 |       const tables = ['places_jordan', 'places_syria', 'places_egypt'];
0024 |       const columnMapping = [
0025 |         { old: 'admin_level4_id', new: 'governorate_id' },
0026 |         { old: 'admin_level6_id', new: 'district_id' },
0027 |         { old: 'admin_level8_id', new: 'sub_district_id' },
0028 |         { old: 'admin_level10_id', new: 'neighborhood_id' }
0029 |       ];
0030 | 
0031 |       for (const table of tables) {
0032 |         for (const mapping of columnMapping) {
0033 |           await this.repo.query(`
0034 |             DO $$
0035 |             BEGIN
0036 |               IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = '${table}' AND column_name = '${mapping.old}') THEN
0037 |                 ALTER TABLE ${table} RENAME COLUMN ${mapping.old} TO ${mapping.new};
0038 |               END IF;
0039 |             END $$;
0040 |           `);
0041 |         }
0042 |       }
0043 | 
0044 |       // Cleanup: Create a trigger to automatically update 'location' when lat/lng changes
0045 |       await this.repo.query(`
0046 |         CREATE OR REPLACE FUNCTION sync_place_location() RETURNS trigger AS $$
0047 |         BEGIN
0048 |           IF NEW.latitude IS NOT NULL AND NEW.longitude IS NOT NULL THEN
0049 |             NEW.location := ST_SetSRID(ST_MakePoint(CAST(NEW.longitude AS FLOAT), CAST(NEW.latitude AS FLOAT)), 4326);
0050 | 
0051 |             NEW.governorate_id := (SELECT id FROM admin_boundaries WHERE admin_level = 4 AND ST_Contains(geom, NEW.location) LIMIT 1);
0052 |             NEW.district_id := (SELECT id FROM admin_boundaries WHERE admin_level = 6 AND ST_Contains(geom, NEW.location) LIMIT 1);
0053 |             NEW.sub_district_id := (SELECT id FROM admin_boundaries WHERE admin_level = 8 AND ST_Contains(geom, NEW.location) LIMIT 1);
0054 |             NEW.neighborhood_id := (SELECT id FROM admin_boundaries WHERE admin_level = 10 AND ST_Contains(geom, NEW.location) LIMIT 1);
0055 |           END IF;
0056 |           RETURN NEW;
0057 |         END;
0058 |         $$ LANGUAGE plpgsql;
0059 |       `);
0060 | 
0061 |       await this.repo.query(`
0062 |         DROP TRIGGER IF EXISTS trg_sync_place_location ON places_syria;
0063 |         CREATE TRIGGER trg_sync_place_location
0064 |         BEFORE INSERT OR UPDATE ON places_syria
0065 |         FOR EACH ROW EXECUTE FUNCTION sync_place_location();
0066 |       `);
0067 | 
0068 |       // 3. Triggers for Jordan and Egypt
0069 |       await this.repo.query(`
0070 |         DROP TRIGGER IF EXISTS trg_sync_place_location_jordan ON places_jordan;
0071 |         CREATE TRIGGER trg_sync_place_location_jordan
0072 |         BEFORE INSERT OR UPDATE ON places_jordan
0073 |         FOR EACH ROW EXECUTE FUNCTION sync_place_location();
0074 |       `);
0075 | 
0076 |       await this.repo.query(`
0077 |         DROP TRIGGER IF EXISTS trg_sync_place_location_egypt ON places_egypt;
0078 |         CREATE TRIGGER trg_sync_place_location_egypt
0079 |         BEFORE INSERT OR UPDATE ON places_egypt
0080 |         FOR EACH ROW EXECUTE FUNCTION sync_place_location();
0081 |       `);
0082 | 
0083 |       // 4. GIST Geometry Indexes for Jordan and Egypt
0084 |       await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_jordan_location ON places_jordan USING gist (location);');
0085 |       await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_egypt_location ON places_egypt USING gist (location);');
0086 | 
0087 |       // 5. GIST Trigram Indexes for Jordan and Egypt
0088 |       await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_jordan_names_trgm ON places_jordan USING gist (name_ar gist_trgm_ops, name_en gist_trgm_ops);');
0089 |       await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_egypt_names_trgm ON places_egypt USING gist (name_ar gist_trgm_ops, name_en gist_trgm_ops);');
0090 | 
0091 |       this.logger.log('Geocoding database triggers and optimized indexes initialized for Syria, Jordan, and Egypt.');
0092 |     } catch (err) {
0093 |       this.logger.error('Failed to initialize database geocoding triggers:', err);
0094 |     }
0095 |   }
0096 | }


------------------------------------------------------------
[63] اسم الملف: admin-boundaries.service.ts
المسار: ./apps/api/src/geocoding/admin-boundaries.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository } from 'typeorm';
0004 | import { AdminBoundary } from './entities/admin-boundary.entity';
0005 | 
0006 | @Injectable()
0007 | export class AdminBoundariesService {
0008 |   private readonly logger = new Logger(AdminBoundariesService.name);
0009 | 
0010 |   constructor(
0011 |     @InjectRepository(AdminBoundary)
0012 |     private adminBoundaryRepo: Repository<AdminBoundary>,
0013 |   ) {}
0014 | 
0015 |   /**
0016 |    * Import GeoJSON features into the admin_boundaries table.
0017 |    * Expects feature.properties to contain 'admin_level', 'name:ar'/'name', 'name:en'
0018 |    */
0019 |   async importGeoJSON(
0020 |     targetCountryCode: string,
0021 |     geoJson: any
0022 |   ): Promise<{ success: boolean; imported: number; errors: number; skipped: number }> {
0023 |     this.logger.log(`Importing admin boundaries for ${targetCountryCode}...`);
0024 | 
0025 |     let imported = 0;
0026 |     let errors = 0;
0027 |     let skipped = 0;
0028 | 
0029 |     if (!geoJson || !geoJson.features || !Array.isArray(geoJson.features)) {
0030 |       this.logger.error('Invalid GeoJSON format');
0031 |       return { success: false, imported: 0, errors: 1, skipped: 0 };
0032 |     }
0033 | 
0034 |     for (const feature of geoJson.features) {
0035 |       try {
0036 |         const props = feature.properties || {};
0037 |         const countryCode = props.country || props.iso_3166_1_alpha2;
0038 | 
0039 |         // 1. Filter by country code to avoid importing overlapping data (e.g. Hebrew names in Jordan)
0040 |         if (targetCountryCode && countryCode && countryCode.toUpperCase() !== targetCountryCode.toUpperCase()) {
0041 |             skipped++;
0042 |             continue;
0043 |         }
0044 | 
0045 |         // 2. Map Overture Subtype to our Admin Level
0046 |         // Overture: country, region, county, localadmin, locality, neighborhood
0047 |         const subtype = (props.subtype || '').toLowerCase();
0048 |         let adminLevel: number;
0049 | 
0050 |         switch (subtype) {
0051 |           case 'country': adminLevel = 2; break;
0052 |           case 'region': adminLevel = 4; break;      // Governorate (Muhafazah)
0053 |           case 'county': adminLevel = 6; break;      // District (Liwa)
0054 |           case 'localadmin': adminLevel = 8; break;  // Sub-district (Qada)
0055 |           case 'locality': adminLevel = 8; break;    // City/Town
0056 |           case 'neighborhood': adminLevel = 10; break;
0057 |           case 'macrohood': adminLevel = 9; break;   // Intermediate
0058 |           case 'microhood': adminLevel = 11; break;  // Sub-neighborhood
0059 |           default:
0060 |             adminLevel = parseInt(props.admin_level || props.adminLevel, 10);
0061 |         }
0062 | 
0063 |         if (isNaN(adminLevel)) {
0064 |           skipped++;
0065 |           continue;
0066 |         }
0067 | 
0068 |         // 3. Name Handling (Prioritize Arabic)
0069 |         const nameAr = props['names']?.['primary'] || props['names']?.['common'] || props['name_ar'] || props['name'];
0070 |         const nameEn = props['names']?.['en'] || props['name_en'];
0071 | 
0072 |         // Simple check to skip obviously non-Arabic primary names if the target is an Arabic country
0073 |         const isArabic = (text: string) => /[\u0600-\u06FF]/.test(text);
0074 |         if (['JO', 'SY', 'EG'].includes(targetCountryCode.toUpperCase()) && nameAr && !isArabic(nameAr)) {
0075 |             // If primary name isn't Arabic, try to find an Arabic variant in names map
0076 |             const alternativeAr = Object.values(props['names'] || {}).find(v => typeof v === 'string' && isArabic(v));
0077 |             if (!alternativeAr) {
0078 |                 skipped++;
0079 |                 continue;
0080 |             }
0081 |         }
0082 | 
0083 |         let geom = feature.geometry;
0084 |         if (geom.type === 'Polygon') {
0085 |           geom = { type: 'MultiPolygon', coordinates: [geom.coordinates] };
0086 |         } else if (geom.type !== 'MultiPolygon') {
0087 |           skipped++;
0088 |           continue;
0089 |         }
0090 | 
0091 |         const boundary = this.adminBoundaryRepo.create({
0092 |           country_code: targetCountryCode.toUpperCase(),
0093 |           admin_level: adminLevel,
0094 |           name_ar: nameAr,
0095 |           name_en: nameEn,
0096 |           geom: geom,
0097 |         });
0098 | 
0099 |         await this.adminBoundaryRepo.save(boundary);
0100 |         imported++;
0101 |       } catch (err) {
0102 |         this.logger.error(`Error importing feature: ${err.message}`);
0103 |         errors++;
0104 |       }
0105 |     }
0106 | 
0107 |     this.logger.log(`Import finished. Imported: ${imported}, Errors: ${errors}, Skipped: ${skipped}`);
0108 |     return { success: true, imported, errors, skipped };
0109 |   }
0110 | 
0111 |   /**
0112 |    * Import GeoJSON from a local file on the server.
0113 |    */
0114 |   async importFromFile(countryCode: string, filePath: string): Promise<{ success: boolean; imported: number; errors: number; skipped: number }> {
0115 |     const fs = require('fs');
0116 |     if (!fs.existsSync(filePath)) {
0117 |       this.logger.error(`File not found: ${filePath}`);
0118 |       return { success: false, imported: 0, errors: 1, skipped: 0 };
0119 |     }
0120 | 
0121 |     try {
0122 |       const data = fs.readFileSync(filePath, 'utf8');
0123 |       const geoJson = JSON.parse(data);
0124 |       return this.importGeoJSON(countryCode, geoJson);
0125 |     } catch (err) {
0126 |       this.logger.error(`Failed to read or parse GeoJSON file: ${err.message}`);
0127 |       return { success: false, imported: 0, errors: 1, skipped: 0 };
0128 |     }
0129 |   }
0130 | }


------------------------------------------------------------
[64] اسم الملف: administrative-linking.service.ts
المسار: ./apps/api/src/geocoding/administrative-linking.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository, DataSource } from 'typeorm';
0004 | import { NeighborhoodPoint } from './entities/neighborhood-point.entity';
0005 | import { NeighborhoodPolygon } from './entities/neighborhood-polygon.entity';
0006 | import { AdminBoundary } from './entities/admin-boundary.entity';
0007 | import { PlaceJordan } from './entities/place-jordan.entity';
0008 | import { PlaceSyria } from './entities/place-syria.entity';
0009 | import axios from 'axios';
0010 | 
0011 | @Injectable()
0012 | export class AdministrativeLinkingService {
0013 |   private readonly logger = new Logger(AdministrativeLinkingService.name);
0014 | 
0015 |   constructor(
0016 |     private dataSource: DataSource,
0017 |     @InjectRepository(NeighborhoodPoint)
0018 |     private readonly neighborhoodPointRepo: Repository<NeighborhoodPoint>,
0019 |     @InjectRepository(NeighborhoodPolygon)
0020 |     private readonly neighborhoodPolygonRepo: Repository<NeighborhoodPolygon>,
0021 |     @InjectRepository(AdminBoundary)
0022 |     private readonly adminBoundaryRepo: Repository<AdminBoundary>,
0023 |   ) {}
0024 | 
0025 |   private readonly overpassMirrors = [
0026 |     'https://overpass-api.de/api/interpreter',
0027 |     'https://overpass.kumi.systems/api/interpreter',
0028 |     'https://z.overpass-api.de/api/interpreter'
0029 |   ];
0030 | 
0031 |   private async fetchWithRetry(data: string, retries = 3): Promise<any> {
0032 |     for (let i = 0; i <= retries; i++) {
0033 |       const url = this.overpassMirrors[i % this.overpassMirrors.length];
0034 |       try {
0035 |         const response = await axios.post(url, data, {
0036 |           timeout: 45000,
0037 |           headers: {
0038 |             'User-Agent': 'IntaleqMapBot/1.0',
0039 |             'Content-Type': 'application/x-www-form-urlencoded'
0040 |           }
0041 |         });
0042 |         return response.data;
0043 |       } catch (error) {
0044 |         this.logger.warn(`Mirror ${url} failed: ${error.message}. Trying next mirror...`);
0045 |         if (i === retries) throw error;
0046 |         await new Promise(res => setTimeout(res, 2000));
0047 |       }
0048 |     }
0049 |   }
0050 | 
0051 |   /**
0052 |    * Step 1: Sync Neighborhood Points from OSM for a given BBox
0053 |    */
0054 |   async syncOsmNeighborhoodPoints(bbox: string = '31.86,35.94,32.22,36.25') {
0055 |     this.logger.log(`Syncing neighborhood points for bbox: ${bbox}`);
0056 |     const query = `[out:json][timeout:900];node["place"~"neighbourhood|suburb|town"](${bbox});out;`;
0057 | 
0058 |     try {
0059 |       const data = await this.fetchWithRetry(`data=${encodeURIComponent(query)}`);
0060 |       const elements = data.elements;
0061 |       this.logger.log(`Found ${elements.length} points in OSM.`);
0062 | 
0063 |       for (const e of elements) {
0064 |         const nameAr = e.tags['name:ar'] || e.tags['name'];
0065 |         const nameEn = e.tags['name:en'] || e.tags['name'];
0066 |         const geometry = { type: 'Point', coordinates: [e.lon, e.lat] };
0067 | 
0068 |         await this.dataSource.query(`
0069 |           INSERT INTO neighborhood_points (osm_id, name_ar, name_en, place_type, geometry)
0070 |           VALUES ($1, $2, $3, $4, ST_SetSRID(ST_GeomFromGeoJSON($5), 4326))
0071 |           ON CONFLICT (osm_id) DO UPDATE SET
0072 |             name_ar = EXCLUDED.name_ar,
0073 |             name_en = EXCLUDED.name_en,
0074 |             place_type = EXCLUDED.place_type,
0075 |             geometry = EXCLUDED.geometry;
0076 |         `, [e.id, nameAr, nameEn, e.tags['place'], JSON.stringify(geometry)]);
0077 |       }
0078 | 
0079 |       // Link points to parent districts using containment or nearest neighbor
0080 |       await this.dataSource.query(`
0081 |         UPDATE neighborhood_points np
0082 |         SET district_id = COALESCE(
0083 |           (
0084 |             SELECT id FROM admin_boundaries ab
0085 |             WHERE ab.admin_level IN (6, 8)
0086 |               AND ST_Contains(ab.geom::geometry, np.geometry::geometry)
0087 |             ORDER BY ab.admin_level DESC
0088 |             LIMIT 1
0089 |           ),
0090 |           (
0091 |             SELECT id FROM admin_boundaries ab
0092 |             WHERE ab.admin_level IN (6, 8)
0093 |             ORDER BY ab.geom::geometry <-> np.geometry::geometry
0094 |             LIMIT 1
0095 |           )
0096 |         )
0097 |         WHERE district_id IS NULL;
0098 |       `);
0099 | 
0100 |       // Diagnostics
0101 |       const totalPoints = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_points`);
0102 |       const linkedPoints = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_points WHERE district_id IS NOT NULL`);
0103 |       const unlinkedPoints = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_points WHERE district_id IS NULL`);
0104 |       const adminCount = await this.dataSource.query(`SELECT admin_level, count(*) as cnt FROM admin_boundaries GROUP BY admin_level ORDER BY admin_level`);
0105 | 
0106 |       const diagnostics = {
0107 |         osm_fetched: elements.length,
0108 |         total_points_in_db: parseInt(totalPoints[0].cnt),
0109 |         linked_to_district: parseInt(linkedPoints[0].cnt),
0110 |         unlinked: parseInt(unlinkedPoints[0].cnt),
0111 |         admin_boundaries: adminCount.map(r => ({ level: r.admin_level, count: parseInt(r.cnt) })),
0112 |       };
0113 |       this.logger.log(`Step 1 diagnostics: ${JSON.stringify(diagnostics)}`);
0114 |       return diagnostics;
0115 |     } catch (error) {
0116 |       this.logger.error(`Failed to sync OSM points: ${error.message}`, error.stack);
0117 |       throw error;
0118 |     }
0119 |   }
0120 | 
0121 |   /**
0122 |    * Step 2: Generate Voronoi Polygons for Neighborhoods
0123 |    */
0124 |   async generateVoronoiNeighborhoods() {
0125 |     this.logger.log('Generating Voronoi polygons for neighborhoods...');
0126 | 
0127 |     // Pre-flight diagnostics
0128 |     const prePoints = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_points WHERE district_id IS NOT NULL`);
0129 |     const preDistricts = await this.dataSource.query(`SELECT district_id, count(*) as cnt FROM neighborhood_points WHERE district_id IS NOT NULL GROUP BY district_id`);
0130 |     this.logger.log(`Pre-flight: ${prePoints[0].cnt} points across ${preDistricts.length} districts`);
0131 | 
0132 |     // Log a sample to verify geometry exists
0133 |     const samplePoints = await this.dataSource.query(`SELECT osm_id, name_ar, district_id, ST_AsText(geometry) as geom_text FROM neighborhood_points WHERE district_id IS NOT NULL LIMIT 3`);
0134 |     this.logger.log(`Sample points: ${JSON.stringify(samplePoints)}`);
0135 | 
0136 |     const sampleDistricts = await this.dataSource.query(`SELECT id, name_ar, admin_level, ST_AsText(ST_Centroid(geom)) as centroid FROM admin_boundaries WHERE admin_level IN (6, 8) LIMIT 3`);
0137 |     this.logger.log(`Sample districts: ${JSON.stringify(sampleDistricts)}`);
0138 | 
0139 |     // Delete old voronoi polygons
0140 |     await this.dataSource.query(`DELETE FROM neighborhood_polygons WHERE method = 'voronoi'`);
0141 |     this.logger.log('Deleted old voronoi polygons.');
0142 | 
0143 |     // Generate Voronoi per district - do it one district at a time to avoid silent failures
0144 |     let totalInserted = 0;
0145 |     for (const row of preDistricts) {
0146 |       const districtId = row.district_id;
0147 |       const pointCount = parseInt(row.cnt);
0148 | 
0149 |       try {
0150 |         if (pointCount >= 2) {
0151 |           // Normal Voronoi for 2+ points
0152 |           const result = await this.dataSource.query(`
0153 |             INSERT INTO neighborhood_polygons (osm_id, name_ar, name_en, place_type, parent_id, method, geometry)
0154 |             WITH voronoi_cells AS (
0155 |               SELECT (ST_Dump(ST_VoronoiPolygons(
0156 |                 ST_Collect(np.geometry::geometry),
0157 |                 0.00001,
0158 |                 d.geom::geometry
0159 |               ))).geom as cell
0160 |               FROM neighborhood_points np
0161 |               JOIN admin_boundaries d ON d.id = np.district_id
0162 |               WHERE np.district_id = $1
0163 |               GROUP BY d.geom
0164 |             ),
0165 |             matched AS (
0166 |               SELECT
0167 |                 np.osm_id, np.name_ar, np.name_en, np.place_type, np.district_id,
0168 |                 ST_Multi(ST_Intersection(vc.cell::geometry, d.geom::geometry)) as geometry
0169 |               FROM voronoi_cells vc
0170 |               CROSS JOIN LATERAL (
0171 |                 SELECT np2.*
0172 |                 FROM neighborhood_points np2
0173 |                 WHERE np2.district_id = $1
0174 |                 ORDER BY np2.geometry::geometry <-> vc.cell::geometry
0175 |                 LIMIT 1
0176 |               ) np
0177 |               JOIN admin_boundaries d ON d.id = $1
0178 |             )
0179 |             SELECT osm_id, name_ar, name_en, place_type, district_id, 'voronoi', geometry
0180 |             FROM matched
0181 |             WHERE ST_IsValid(geometry) AND NOT ST_IsEmpty(geometry)
0182 |           `, [districtId]);
0183 | 
0184 |           totalInserted += (result?.length || result?.[1] || 0);
0185 |           this.logger.log(`District ${districtId}: ${pointCount} points -> ${result?.length || result?.[1] || '?'} polygons`);
0186 |         } else if (pointCount === 1) {
0187 |           // Single point: assign entire district boundary
0188 |           const result = await this.dataSource.query(`
0189 |             INSERT INTO neighborhood_polygons (osm_id, name_ar, name_en, place_type, parent_id, method, geometry)
0190 |             SELECT np.osm_id, np.name_ar, np.name_en, np.place_type, np.district_id, 'voronoi', ST_Multi(d.geom::geometry)
0191 |             FROM neighborhood_points np
0192 |             JOIN admin_boundaries d ON d.id = np.district_id
0193 |             WHERE np.district_id = $1
0194 |           `, [districtId]);
0195 | 
0196 |           totalInserted += (result?.length || result?.[1] || 0);
0197 |           this.logger.log(`District ${districtId}: 1 point -> assigned district boundary`);
0198 |         }
0199 |       } catch (err) {
0200 |         this.logger.error(`Voronoi FAILED for district ${districtId} (${pointCount} points): ${err.message}`);
0201 |       }
0202 |     }
0203 | 
0204 |     // Post-flight count
0205 |     const postCount = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_polygons`);
0206 |     const finalCount = parseInt(postCount[0].cnt);
0207 |     this.logger.log(`Step 2 complete: ${finalCount} total polygons in neighborhood_polygons`);
0208 | 
0209 |     // Sample polygon names
0210 |     const samplePolygons = await this.dataSource.query(`SELECT id, osm_id, name_ar, parent_id, method FROM neighborhood_polygons LIMIT 5`);
0211 |     this.logger.log(`Sample polygons: ${JSON.stringify(samplePolygons)}`);
0212 | 
0213 |     return {
0214 |       status: finalCount > 0 ? 'success' : 'WARNING_EMPTY',
0215 |       total_polygons: finalCount,
0216 |       districts_processed: preDistricts.length,
0217 |       sample: samplePolygons
0218 |     };
0219 |   }
0220 | 
0221 |   /**
0222 |    * Step 3: Link all Places (Jordan & Syria) to the full administrative hierarchy
0223 |    */
0224 |   async linkPlaces(country: 'jordan' | 'syria') {
0225 |     const tableName = country === 'jordan' ? 'places_jordan' : 'places_syria';
0226 | 
0227 |     // Pre-flight diagnostics
0228 |     const polyCount = await this.dataSource.query(`SELECT count(*) as cnt FROM neighborhood_polygons`);
0229 |     const placeCount = await this.dataSource.query(`SELECT count(*) as cnt FROM ${tableName} WHERE location IS NOT NULL`);
0230 |     this.logger.log(`linkPlaces pre-flight: ${polyCount[0].cnt} polygons, ${placeCount[0].cnt} places with location in ${tableName}`);
0231 | 
0232 |     if (parseInt(polyCount[0].cnt) === 0) {
0233 |       this.logger.error('ABORT: neighborhood_polygons is EMPTY. Run generate-voronoi first!');
0234 |       return {
0235 |         status: 'FAILED',
0236 |         error: 'neighborhood_polygons table is empty. Run generate-voronoi first.',
0237 |         polygons: 0,
0238 |         places: parseInt(placeCount[0].cnt)
0239 |       };
0240 |     }
0241 | 
0242 |     this.logger.log(`Linking administrative hierarchy for ${tableName} using KNN...`);
0243 | 
0244 |     // Update in smaller batches to avoid timeout and track progress
0245 |     const updateResult = await this.dataSource.query(`
0246 |       UPDATE ${tableName} p
0247 |       SET
0248 |         neighborhood_id = (
0249 |           SELECT np.id FROM neighborhood_polygons np
0250 |           ORDER BY p.location::geometry <-> np.geometry::geometry
0251 |           LIMIT 1
0252 |         ),
0253 |         sub_district_id = (
0254 |           SELECT ab.id FROM admin_boundaries ab
0255 |           WHERE ab.admin_level = 8
0256 |             AND ST_Within(p.location::geometry, ab.geom::geometry)
0257 |           LIMIT 1
0258 |         ),
0259 |         district_id = (
0260 |           SELECT ab.id FROM admin_boundaries ab
0261 |           WHERE ab.admin_level = 6
0262 |             AND ST_Within(p.location::geometry, ab.geom::geometry)
0263 |           LIMIT 1
0264 |         ),
0265 |         governorate_id = (
0266 |           SELECT ab.id FROM admin_boundaries ab
0267 |           WHERE ab.admin_level = 4
0268 |             AND ST_Within(p.location::geometry, ab.geom::geometry)
0269 |           LIMIT 1
0270 |         )
0271 |       WHERE p.location IS NOT NULL;
0272 |     `);
0273 | 
0274 |     // Post-flight diagnostics
0275 |     const linkedNeighborhood = await this.dataSource.query(`SELECT count(*) as cnt FROM ${tableName} WHERE neighborhood_id IS NOT NULL`);
0276 |     const linkedDistrict = await this.dataSource.query(`SELECT count(*) as cnt FROM ${tableName} WHERE district_id IS NOT NULL`);
0277 |     const linkedGov = await this.dataSource.query(`SELECT count(*) as cnt FROM ${tableName} WHERE governorate_id IS NOT NULL`);
0278 |     const totalPlaces = await this.dataSource.query(`SELECT count(*) as cnt FROM ${tableName}`);
0279 | 
0280 |     // Sample a specific place to verify
0281 |     const samplePlace = await this.dataSource.query(`
0282 |       SELECT p.id, p.name_ar, p.neighborhood_id, p.district_id, p.governorate_id,
0283 |              n.name_ar as neighborhood_name
0284 |       FROM ${tableName} p
0285 |       LEFT JOIN neighborhood_polygons n ON p.neighborhood_id = n.id
0286 |       WHERE p.name_ar LIKE '%معصوم%'
0287 |       LIMIT 3
0288 |     `);
0289 | 
0290 |     const diagnostics = {
0291 |       status: 'completed',
0292 |       country,
0293 |       total_places: parseInt(totalPlaces[0].cnt),
0294 |       linked_neighborhood: parseInt(linkedNeighborhood[0].cnt),
0295 |       linked_district: parseInt(linkedDistrict[0].cnt),
0296 |       linked_governorate: parseInt(linkedGov[0].cnt),
0297 |       sample_masoum: samplePlace,
0298 |       rows_affected: updateResult?.[1] || 'unknown'
0299 |     };
0300 | 
0301 |     this.logger.log(`Step 3 diagnostics: ${JSON.stringify(diagnostics)}`);
0302 |     return diagnostics;
0303 |   }
0304 | }


------------------------------------------------------------
[65] اسم الملف: geocoding.service.ts
المسار: ./apps/api/src/geocoding/geocoding.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger, HttpException, HttpStatus } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository } from 'typeorm';
0004 | import { PlaceSyria } from './entities/place-syria.entity';
0005 | import { PlaceJordan } from './entities/place-jordan.entity';
0006 | import { PlaceEgypt } from './entities/place-egypt.entity';
0007 | import { BasePlace } from './entities/base-place.entity';
0008 | import { OsmArea } from './entities/osm-area.entity';
0009 | import { OsmPointWithArea } from './entities/osm-point-with-area.entity';
0010 | 
0011 | @Injectable()
0012 | export class GeocodingService {
0013 |   private readonly logger = new Logger(GeocodingService.name);
0014 | 
0015 |   constructor(
0016 |     @InjectRepository(PlaceSyria)
0017 |     private placesSyriaRepository: Repository<PlaceSyria>,
0018 |     @InjectRepository(PlaceJordan)
0019 |     private placesJordanRepository: Repository<PlaceJordan>,
0020 |     @InjectRepository(PlaceEgypt)
0021 |     private placesEgyptRepository: Repository<PlaceEgypt>,
0022 |     @InjectRepository(OsmArea)
0023 |     private osmAreasRepository: Repository<OsmArea>,
0024 |     @InjectRepository(OsmPointWithArea)
0025 |     private osmPointsRepository: Repository<OsmPointWithArea>,
0026 |   ) {}
0027 | 
0028 |   /**
0029 |    * تحديد المستودع المناسب بناءً على الإحداثيات الجغرافية
0030 |    */
0031 |   private getRepositoryForCoords(lat: number, lng: number): Repository<BasePlace> {
0032 |     if (lat >= 29 && lat <= 37.5 && lng >= 34.5 && lng <= 42.5) {
0033 |       if (lat > 32.5 && lng > 35.8) return (this.placesSyriaRepository as unknown) as Repository<BasePlace>;
0034 |       return (this.placesJordanRepository as unknown) as Repository<BasePlace>;
0035 |     }
0036 |     if (lat >= 22 && lat <= 32 && lng >= 24.5 && lng <= 37) {
0037 |       return (this.placesEgyptRepository as unknown) as Repository<BasePlace>;
0038 |     }
0039 |     return (this.placesSyriaRepository as unknown) as Repository<BasePlace>;
0040 |   }
0041 | 
0042 |   private getTableNameForRepo(repo: Repository<BasePlace>): string {
0043 |     if (repo === (this.placesJordanRepository as unknown)) return 'places_jordan';
0044 |     if (repo === (this.placesEgyptRepository as unknown)) return 'places_egypt';
0045 |     return 'places_syria';
0046 |   }
0047 | 
0048 |   async searchPlaces(query: string, lat?: number, lon?: number, radius: number = 20000, country?: string) {
0049 |     try {
0050 |       const cleanQuery = query.trim();
0051 |       const hasLocation = lat !== undefined && lon !== undefined;
0052 |       const ILikeQuery = `%${cleanQuery}%`;
0053 |       const allResults: any[] = [];
0054 |       const radiusInDegrees = radius / 111000;
0055 | 
0056 |       let targetRegion = country?.toLowerCase();
0057 |       if (!targetRegion && hasLocation) {
0058 |         const repo = this.getRepositoryForCoords(lat!, lon!);
0059 |         const tableName = this.getTableNameForRepo(repo);
0060 |         targetRegion = tableName.replace('places_', '');
0061 |       }
0062 | 
0063 |       const userTables = targetRegion
0064 |         ? (['syria', 'egypt', 'jordan'].includes(targetRegion) ? [`places_${targetRegion}`] : [])
0065 |         : ['places_syria', 'places_egypt', 'places_jordan'];
0066 | 
0067 |       for (const tableName of userTables) {
0068 |         let repo: Repository<any> = tableName === 'places_egypt' ? this.placesEgyptRepository : (tableName === 'places_jordan' ? this.placesJordanRepository : this.placesSyriaRepository);
0069 |         const userQuery = `
0070 |           SELECT
0071 |             p.id, p.name, p.name_ar, p.name_en, p.category,
0072 |             p.neighborhood_id as db_neighborhood_id,
0073 |             p.neighbourhood as original_neighbourhood,
0074 |             n.name_ar as neighbourhood,
0075 |             d.name_ar as district,
0076 |             g.name_ar as governorate,
0077 |             p.latitude, p.longitude, p.address, '${tableName.replace('places_', '')}' as region, p.source,
0078 |             CASE WHEN $2::float IS NOT NULL THEN ST_DistanceSphere(p.location, ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326)) ELSE 0 END as distance,
0079 |             similarity(COALESCE(p.name_ar, ''), $1) + similarity(COALESCE(p.name, ''), $1) + similarity(COALESCE(p.neighbourhood, ''), $1) as relevance
0080 |           FROM ${tableName} p
0081 |           LEFT JOIN neighborhood_polygons n ON p.neighborhood_id = n.id
0082 |           LEFT JOIN admin_boundaries d ON p.sub_district_id = d.id
0083 |           LEFT JOIN admin_boundaries g ON p.governorate_id = g.id
0084 |           WHERE (p.name_ar % $1 OR p.name % $1 OR p.neighbourhood % $1 OR p.name_ar ILIKE $4 OR p.name ILIKE $4 OR p.neighbourhood ILIKE $4)
0085 |           ${hasLocation ? `AND (p.location && ST_Expand(ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326), $5::float) OR ST_DistanceSphere(p.location, ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326)) <= $6::float)` : ''}
0086 |           ORDER BY relevance DESC, distance ASC LIMIT 15
0087 |         `;
0088 |         const results = await repo.query(userQuery, [cleanQuery, lat || null, lon || null, ILikeQuery, radiusInDegrees, radius]);
0089 |         allResults.push(...results);
0090 |       }
0091 | 
0092 |       let osmBoundFilter = '';
0093 |       if (targetRegion === 'jordan') osmBoundFilter = 'AND ST_Contains(ST_MakeEnvelope(34.5, 29.0, 39.5, 33.5, 4326), geom)';
0094 |       else if (targetRegion === 'syria') osmBoundFilter = 'AND ST_Contains(ST_MakeEnvelope(35.5, 32.3, 42.4, 37.5, 4326), geom)';
0095 |       else if (targetRegion === 'egypt') osmBoundFilter = 'AND ST_Contains(ST_MakeEnvelope(24.5, 22.0, 37.0, 31.8, 4326), geom)';
0096 | 
0097 |       const osmQuery = `
0098 |         SELECT osm_id as id, name, name_ar, name_en, COALESCE(amenity, shop, 'place') as category,
0099 |         latitude, longitude, addr_street as address, 'osm_global' as source,
0100 |         CASE WHEN $2::float IS NOT NULL THEN ST_DistanceSphere(geom, ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326)) ELSE 0 END as distance,
0101 |         similarity(COALESCE(name_ar, ''), $1) + similarity(COALESCE(name_en, ''), $1) as relevance
0102 |         FROM osm_points_with_area
0103 |         WHERE (name_ar % $1 OR name_en % $1 OR name % $1 OR name_ar ILIKE $4 OR name_en ILIKE $4)
0104 |         ${osmBoundFilter}
0105 |         ${hasLocation ? `AND (geom && ST_Expand(ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326), $5::float) OR ST_DistanceSphere(geom, ST_SetSRID(ST_MakePoint($3::float, $2::float), 4326)) <= $6::float)` : ''}
0106 |         ORDER BY relevance DESC, distance ASC LIMIT 20
0107 |       `;
0108 |       const osmResults = await this.osmPointsRepository.query(osmQuery, [cleanQuery, lat || null, lon || null, ILikeQuery, radiusInDegrees, radius]);
0109 |       allResults.push(...osmResults);
0110 | 
0111 |       // --- Consolidation: Overture Maps Integration (Now in primary DB) ---
0112 |       const overtureQuery = `
0113 |         (SELECT id::text,
0114 |           COALESCE(names->>'primary', names->>'common', 'Building') as name,
0115 |           COALESCE(names->>'primary', names->>'common', '') as name_ar,
0116 |           NULL as name_en,
0117 |           'building' as category,
0118 |           ST_Y(ST_Centroid(location)) as latitude,
0119 |           ST_X(ST_Centroid(location)) as longitude,
0120 |           '' as address,
0121 |           'overture_buildings' as source,
0122 |           CASE WHEN $1::float IS NOT NULL THEN ST_DistanceSphere(location, ST_SetSRID(ST_MakePoint($2::float, $1::float), 4326)) ELSE 0 END as distance,
0123 |           0.6 as relevance
0124 |           FROM overture_building
0125 |           WHERE (names->>'primary' ILIKE $3 OR names->>'common' ILIKE $3)
0126 |           LIMIT 15)
0127 |         UNION ALL
0128 |         (SELECT id::text,
0129 |           COALESCE(names->>'primary', names->>'common', 'Street') as name,
0130 |           COALESCE(names->>'primary', names->>'common', '') as name_ar,
0131 |           NULL as name_en,
0132 |           'transportation' as category,
0133 |           ST_Y(ST_Centroid(location)) as latitude,
0134 |           ST_X(ST_Centroid(location)) as longitude,
0135 |           '' as address,
0136 |           'overture_streets' as source,
0137 |           CASE WHEN $1::float IS NOT NULL THEN ST_DistanceSphere(location, ST_SetSRID(ST_MakePoint($2::float, $1::float), 4326)) ELSE 0 END as distance,
0138 |           0.6 as relevance
0139 |           FROM overture_segment
0140 |           WHERE (names->>'primary' ILIKE $3 OR names->>'common' ILIKE $3)
0141 |           LIMIT 15)
0142 |       `;
0143 |       try {
0144 |         const overtureResults = await this.osmPointsRepository.query(overtureQuery, [lat || null, lon || null, ILikeQuery]);
0145 |         allResults.push(...overtureResults);
0146 |       } catch (err) {
0147 |         this.logger.warn('Overture tables search failed, logging error.', err);
0148 |       }
0149 | 
0150 |       const sortedResults = allResults
0151 |         .sort((a, b) => hasLocation ? ((a.distance - b.distance) || (b.relevance - a.relevance)) : ((b.relevance - a.relevance) || (a.distance - b.distance)))
0152 |         .slice(0, 25)
0153 |         .map(r => {
0154 |           // Build full administrative address from admin_boundaries
0155 |           const addressParts = [r.neighbourhood, r.district, r.governorate].filter(Boolean);
0156 |           const full_address = addressParts.length > 0 ? addressParts.join('، ') : (r.address || '');
0157 |           return {
0158 |             ...r,
0159 |             latitude: parseFloat(r.latitude),
0160 |             longitude: parseFloat(r.longitude),
0161 |             distance_km: r.distance ? (Number(r.distance) / 1000).toFixed(2) : null,
0162 |             location: { lat: parseFloat(r.latitude), lng: parseFloat(r.longitude) },
0163 |             full_address,
0164 |           };
0165 |         });
0166 | 
0167 |       return { results: sortedResults };
0168 |     } catch (e) {
0169 |       this.logger.error('Search failed:', e);
0170 |       return { results: [] };
0171 |     }
0172 |   }
0173 | 
0174 |   async reverseGeocode(lat: number, lng: number) {
0175 |     try {
0176 |       const repo = this.getRepositoryForCoords(lat, lng);
0177 |       const tableName = this.getTableNameForRepo(repo);
0178 |       const query = `
0179 |         SELECT
0180 |           p.id, p.name, p.name_ar, p.category,
0181 |           n.name_ar as neighbourhood,
0182 |           d.name_ar as district,
0183 |           g.name_ar as governorate,
0184 |           p.latitude, p.longitude, p.address, 'user_place' as source,
0185 |           ST_DistanceSphere(p.location::geometry, ST_SetSRID(ST_MakePoint($1::float, $2::float), 4326)) as distance
0186 |         FROM ${tableName} p
0187 |         LEFT JOIN neighborhood_polygons n ON p.neighborhood_id = n.id
0188 |         LEFT JOIN admin_boundaries d ON p.sub_district_id = d.id
0189 |         LEFT JOIN admin_boundaries g ON p.governorate_id = g.id
0190 |         WHERE p.location IS NOT NULL
0191 |         ORDER BY p.location::geometry <-> ST_SetSRID(ST_MakePoint($1::float, $2::float), 4326) ASC LIMIT 3
0192 |       `;
0193 |       return await repo.query(query, [lng, lat]);
0194 |     } catch (error) {
0195 |       this.logger.error('Reverse geocoding error:', error);
0196 |       return [];
0197 |     }
0198 |   }
0199 | 
0200 |   async addPlace(data: Partial<BasePlace>) {
0201 |     try {
0202 |       const lat = Number(data.latitude), lng = Number(data.longitude);
0203 |       const repo = this.getRepositoryForCoords(lat, lng), tableName = this.getTableNameForRepo(repo);
0204 |       const newPlace = repo.create({ ...data, latitude: lat, longitude: lng, created_at: new Date(), location: { type: 'Point', coordinates: [lng, lat] } });
0205 |       const savedPlace = await repo.save(newPlace);
0206 |       await repo.query(`UPDATE ${tableName} SET location = ST_SetSRID(ST_MakePoint($1::float, $2::float), 4326) WHERE id = $3`, [lng, lat, savedPlace.id]);
0207 |       return { ...savedPlace, latitude: lat, longitude: lng, location: `POINT(${lng} ${lat})` };
0208 |     } catch (error) { throw new HttpException(error.message, HttpStatus.INTERNAL_SERVER_ERROR); }
0209 |   }
0210 | 
0211 |   async upsertPlace(data: Partial<BasePlace>) {
0212 |     try {
0213 |       const lat = Number(data.latitude), lng = Number(data.longitude);
0214 |       const repo = this.getRepositoryForCoords(lat, lng), tableName = this.getTableNameForRepo(repo);
0215 |       const existing = await repo.query(`SELECT id, name FROM ${tableName} WHERE ST_DistanceSphere(location, ST_SetSRID(ST_MakePoint($1::float, $2::float), 4326)) < 15 LIMIT 1`, [lng, lat]);
0216 |       if (existing && existing.length > 0) {
0217 |         await repo.update(existing[0].id, { name: data.name || undefined, name_ar: data.name_ar || undefined, category: data.category || undefined });
0218 |         return { id: existing[0].id, action: 'updated' };
0219 |       }
0220 |       const result = await this.addPlace(data);
0221 |       return { id: result.id, action: 'created' };
0222 |     } catch (error) { throw error; }
0223 |   }
0224 | 
0225 |   async upsertBatch(places: Partial<BasePlace>[]) {
0226 |     const results: any[] = [];
0227 |     for (const place of places) { try { const r = await this.addPlace(place); results.push({ id: r.id, action: 'created' }); } catch (e) {} }
0228 |     return { total: places.length, processed: results.length, created: results.length, updated: 0 };
0229 |   }
0230 | 
0231 |   async getRecentPlaces(limit: number = 50) {
0232 |     const s = await this.placesSyriaRepository.find({ order: { created_at: 'DESC' }, take: limit });
0233 |     const j = await this.placesJordanRepository.find({ order: { created_at: 'DESC' }, take: limit });
0234 |     const e = await this.placesEgyptRepository.find({ order: { created_at: 'DESC' }, take: limit });
0235 |     return [...s, ...j, ...e].sort((a, b) => b.created_at.getTime() - a.created_at.getTime()).slice(0, limit);
0236 |   }
0237 | 
0238 |   async getAllPlacesGeoJSON() {
0239 |     try {
0240 |       const q = `
0241 |         SELECT id::text, name_ar as name, category, latitude, longitude, address, 'user' as region FROM places_syria
0242 |         UNION ALL SELECT id::text, name_ar as name, category, latitude, longitude, address, 'user' as region FROM places_jordan
0243 |         UNION ALL SELECT id::text, name_ar as name, category, latitude, longitude, address, 'user' as region FROM places_egypt
0244 |         UNION ALL SELECT id::text, COALESCE(names->>'primary', names->>'common', 'Building') as name, 'building' as category, ST_Y(ST_Centroid(location)) as latitude, ST_X(ST_Centroid(location)) as longitude, '' as address, 'overture' as region FROM overture_building WHERE names->>'primary' IS NOT NULL LIMIT 500
0245 |         UNION ALL SELECT id::text, COALESCE(names->>'primary', names->>'common', 'Street') as name, 'street' as category, ST_Y(ST_Centroid(location)) as latitude, ST_X(ST_Centroid(location)) as longitude, '' as address, 'overture' as region FROM overture_segment WHERE names->>'primary' IS NOT NULL LIMIT 500
0246 |       `;
0247 |       const res = await this.placesSyriaRepository.query(q);
0248 |       const features = res.map(p => ({
0249 |         type: 'Feature',
0250 |         geometry: { type: 'Point', coordinates: [parseFloat(p.longitude), parseFloat(p.latitude)] },
0251 |         properties: { id: p.id, name: p.name, category: p.category, address: p.address, region: p.region }
0252 |       }));
0253 |       return { type: 'FeatureCollection', features };
0254 |     } catch (e) {
0255 |       return { type: 'FeatureCollection', features: [] };
0256 |     }
0257 |   }
0258 | 
0259 |   async deletePlacesByName(name: string, country: string) {
0260 |     const repo = this.getRepoByCountry(country);
0261 |     const r1 = await repo.delete({ name_ar: name }), r2 = await repo.delete({ name_en: name }), r3 = await repo.delete({ name: name });
0262 |     return { success: true, affected: (r1.affected || 0) + (r2.affected || 0) + (r3.affected || 0) };
0263 |   }
0264 | 
0265 |   async deletePlaceById(id: number, country: string) {
0266 |     const repo = this.getRepoByCountry(country);
0267 |     return { success: true, affected: (await repo.delete(id)).affected };
0268 |   }
0269 | 
0270 |   private getRepoByCountry(country: string) {
0271 |     switch (country?.toLowerCase()) {
0272 |       case 'syria': return this.placesSyriaRepository;
0273 |       case 'jordan': return this.placesJordanRepository;
0274 |       case 'egypt': return this.placesEgyptRepository;
0275 |       default: throw new HttpException('Invalid country: ' + country, HttpStatus.BAD_REQUEST);
0276 |     }
0277 |   }
0278 | }


------------------------------------------------------------
[66] اسم الملف: place-egypt.entity.ts
المسار: ./apps/api/src/geocoding/entities/place-egypt.entity.ts
------------------------------------------------------------
0001 | import { Entity } from 'typeorm';
0002 | import { BasePlace } from './base-place.entity';
0003 | 
0004 | @Entity('places_egypt')
0005 | export class PlaceEgypt extends BasePlace {}


------------------------------------------------------------
[67] اسم الملف: neighborhood-point.entity.ts
المسار: ./apps/api/src/geocoding/entities/neighborhood-point.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn, Index } from 'typeorm';
0002 | 
0003 | @Entity('neighborhood_points')
0004 | export class NeighborhoodPoint {
0005 |   @PrimaryGeneratedColumn()
0006 |   id: number;
0007 | 
0008 |   @Column({ type: 'bigint', unique: true, nullable: true })
0009 |   @Index()
0010 |   osm_id: number;
0011 | 
0012 |   @Column({ nullable: true })
0013 |   @Index()
0014 |   name_ar: string;
0015 | 
0016 |   @Column({ nullable: true })
0017 |   name_en: string;
0018 | 
0019 |   @Column({ nullable: true })
0020 |   place_type: string;
0021 | 
0022 |   @Column({ type: 'int', nullable: true })
0023 |   @Index()
0024 |   district_id: number;
0025 | 
0026 |   @Column({ type: 'geometry', spatialFeatureType: 'Point', srid: 4326 })
0027 |   @Index({ spatial: true })
0028 |   geometry: any;
0029 | }


------------------------------------------------------------
[68] اسم الملف: place-jordan.entity.ts
المسار: ./apps/api/src/geocoding/entities/place-jordan.entity.ts
------------------------------------------------------------
0001 | import { Entity } from 'typeorm';
0002 | import { BasePlace } from './base-place.entity';
0003 | 
0004 | @Entity('places_jordan')
0005 | export class PlaceJordan extends BasePlace {}


------------------------------------------------------------
[69] اسم الملف: neighborhood-polygon.entity.ts
المسار: ./apps/api/src/geocoding/entities/neighborhood-polygon.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn, Index } from 'typeorm';
0002 | 
0003 | @Entity('neighborhood_polygons')
0004 | export class NeighborhoodPolygon {
0005 |   @PrimaryGeneratedColumn()
0006 |   id: number;
0007 | 
0008 |   @Column({ type: 'bigint', nullable: true })
0009 |   @Index()
0010 |   osm_id: number;
0011 | 
0012 |   @Column({ nullable: true })
0013 |   @Index()
0014 |   name_ar: string;
0015 | 
0016 |   @Column({ nullable: true })
0017 |   name_en: string;
0018 | 
0019 |   @Column({ nullable: true })
0020 |   place_type: string;
0021 | 
0022 |   @Column({ type: 'int', nullable: true })
0023 |   @Index()
0024 |   parent_id: number; // Links to admin_boundaries (District/Sub-district)
0025 | 
0026 |   @Column({ default: 'voronoi' })
0027 |   method: string;
0028 | 
0029 |   @Column({ type: 'float', default: 0.7 })
0030 |   confidence: number;
0031 | 
0032 |   @Column({ type: 'geometry', spatialFeatureType: 'MultiPolygon', srid: 4326 })
0033 |   @Index({ spatial: true })
0034 |   geometry: any;
0035 | }


------------------------------------------------------------
[70] اسم الملف: place-syria.entity.ts
المسار: ./apps/api/src/geocoding/entities/place-syria.entity.ts
------------------------------------------------------------
0001 | import { Entity } from 'typeorm';
0002 | import { BasePlace } from './base-place.entity';
0003 | 
0004 | @Entity('places_syria')
0005 | export class PlaceSyria extends BasePlace {}


------------------------------------------------------------
[71] اسم الملف: osm-point-with-area.entity.ts
المسار: ./apps/api/src/geocoding/entities/osm-point-with-area.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryColumn } from 'typeorm';
0002 | 
0003 | @Entity('osm_points_with_area')
0004 | export class OsmPointWithArea {
0005 |   @PrimaryColumn({ type: 'bigint' })
0006 |   osm_id: number;
0007 | 
0008 |   @Column({ type: 'decimal', precision: 11, scale: 8, nullable: true })
0009 |   longitude: number;
0010 | 
0011 |   @Column({ type: 'decimal', precision: 10, scale: 8, nullable: true })
0012 |   latitude: number;
0013 | 
0014 |   @Column({ nullable: true })
0015 |   name: string;
0016 | 
0017 |   @Column({ nullable: true })
0018 |   name_ar: string;
0019 | 
0020 |   @Column({ nullable: true })
0021 |   name_en: string;
0022 | 
0023 |   @Column({ nullable: true })
0024 |   amenity: string;
0025 | 
0026 |   @Column({ nullable: true })
0027 |   shop: string;
0028 | 
0029 |   @Column({ nullable: true })
0030 |   addr_street: string;
0031 | 
0032 |   @Column({ nullable: true })
0033 |   neighbourhood_name: string;
0034 | 
0035 |   @Column({ nullable: true })
0036 |   city_name: string;
0037 | 
0038 |   @Column({ type: 'text', nullable: true })
0039 |   other_tags: string;
0040 | 
0041 |   @Column({ type: 'geometry', spatialFeatureType: 'Point', nullable: true })
0042 |   geom: any;
0043 | }


------------------------------------------------------------
[72] اسم الملف: admin-boundary.entity.ts
المسار: ./apps/api/src/geocoding/entities/admin-boundary.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn, Index } from 'typeorm';
0002 | 
0003 | @Entity('admin_boundaries')
0004 | export class AdminBoundary {
0005 |   @PrimaryGeneratedColumn()
0006 |   id: number;
0007 | 
0008 |   @Column({ length: 3 })
0009 |   @Index()
0010 |   country_code: string;
0011 | 
0012 |   @Column({ type: 'int' })
0013 |   @Index()
0014 |   admin_level: number;
0015 | 
0016 |   @Column({ nullable: true })
0017 |   @Index()
0018 |   name_ar: string;
0019 | 
0020 |   @Column({ nullable: true })
0021 |   name_en: string;
0022 | 
0023 |   @Column({ type: 'geometry', spatialFeatureType: 'MultiPolygon', srid: 4326, nullable: true })
0024 |   @Index({ spatial: true })
0025 |   geom: any;
0026 | }


------------------------------------------------------------
[73] اسم الملف: base-place.entity.ts
المسار: ./apps/api/src/geocoding/entities/base-place.entity.ts
------------------------------------------------------------
0001 | import { Column, PrimaryGeneratedColumn, CreateDateColumn, Index } from 'typeorm';
0002 | 
0003 | export abstract class BasePlace {
0004 |   @PrimaryGeneratedColumn()
0005 |   id: number;
0006 | 
0007 |   @Column({ type: 'decimal', precision: 10, scale: 8, nullable: true })
0008 |   latitude: number;
0009 | 
0010 |   @Column({ type: 'decimal', precision: 11, scale: 8, nullable: true })
0011 |   longitude: number;
0012 | 
0013 |   @Column({ nullable: true })
0014 |   @Index()
0015 |   name: string;
0016 | 
0017 |   @Column({ nullable: true })
0018 |   @Index()
0019 |   name_ar: string;
0020 | 
0021 |   @Column({ nullable: true })
0022 |   name_en: string;
0023 | 
0024 |   @Column({ nullable: true })
0025 |   address: string;
0026 | 
0027 |   @Column({ nullable: true })
0028 |   category: string;
0029 | 
0030 |   @Column({ nullable: true })
0031 |   neighbourhood: string;
0032 | 
0033 |   @Column({ nullable: true })
0034 |   city: string;
0035 | 
0036 |   @Column({ type: 'text', nullable: true })
0037 |   description: string;
0038 | 
0039 |   @CreateDateColumn()
0040 |   created_at: Date;
0041 | 
0042 |   @Column({ nullable: true })
0043 |   source: string;
0044 | 
0045 |   @Column({ type: 'geometry', spatialFeatureType: 'Point', srid: 4326, nullable: true })
0046 |   @Index({ spatial: true })
0047 |   location: any;
0048 | 
0049 |   @Column({ type: 'int', nullable: true })
0050 |   @Index()
0051 |   governorate_id: number;
0052 | 
0053 |   @Column({ type: 'int', nullable: true })
0054 |   @Index()
0055 |   district_id: number;
0056 | 
0057 |   @Column({ type: 'int', nullable: true })
0058 |   @Index()
0059 |   sub_district_id: number;
0060 | 
0061 |   @Column({ type: 'int', nullable: true })
0062 |   @Index()
0063 |   neighborhood_id: number;
0064 | }


------------------------------------------------------------
[74] اسم الملف: osm-area.entity.ts
المسار: ./apps/api/src/geocoding/entities/osm-area.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
0002 | 
0003 | @Entity('osm_areas')
0004 | export class OsmArea {
0005 |   @PrimaryGeneratedColumn()
0006 |   id: number;
0007 | 
0008 |   @Column({ type: 'bigint', nullable: true })
0009 |   osm_id: number;
0010 | 
0011 |   @Column({ type: 'decimal', precision: 11, scale: 8, nullable: true })
0012 |   longitude: number;
0013 | 
0014 |   @Column({ type: 'decimal', precision: 10, scale: 8, nullable: true })
0015 |   latitude: number;
0016 | 
0017 |   @Column({ nullable: true })
0018 |   name: string;
0019 | 
0020 |   @Column({ nullable: true })
0021 |   name_ar: string;
0022 | 
0023 |   @Column({ nullable: true })
0024 |   place_type: string;
0025 | 
0026 |   @Column({ type: 'geometry', nullable: true })
0027 |   geom: any;
0028 | 
0029 |   @Column({ type: 'text', nullable: true })
0030 |   other_tags: string;
0031 | }


------------------------------------------------------------
[75] اسم الملف: redis.module.ts
المسار: ./apps/api/src/common/redis.module.ts
------------------------------------------------------------
0001 | import { Module, Global } from '@nestjs/common';
0002 | import { ConfigService } from '@nestjs/config';
0003 | import { createClient } from 'redis';
0004 | import { RedisService } from './redis.service';
0005 | 
0006 | /**
0007 |  * Global Redis Module - موديول Redis العالمي
0008 |  *
0009 |  * Provides a high-performance in-memory key-value store connection.
0010 |  */
0011 | @Global()
0012 | @Module({
0013 |   providers: [
0014 |     {
0015 |       provide: 'REDIS_CLIENT',
0016 |       useFactory: async (configService: ConfigService) => {
0017 |         const url = configService.get<string>('REDIS_URL', 'redis://redis:6379');
0018 |         const client = createClient({ url });
0019 |         await client.connect();
0020 |         return client;
0021 |       },
0022 |       inject: [ConfigService],
0023 |     },
0024 |     RedisService,
0025 |   ],
0026 |   exports: ['REDIS_CLIENT', RedisService],
0027 | })
0028 | export class RedisModule {}


------------------------------------------------------------
[76] اسم الملف: telegram.service.ts
المسار: ./apps/api/src/common/telegram.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { ConfigService } from '@nestjs/config';
0003 | import axios from 'axios';
0004 | 
0005 | @Injectable()
0006 | export class TelegramService {
0007 |   private readonly logger = new Logger(TelegramService.name);
0008 |   private readonly botToken: string;
0009 |   private readonly chatId: string;
0010 | 
0011 |   constructor(private configService: ConfigService) {
0012 |     this.botToken = this.configService.get<string>('TELEGRAM_BOT_TOKEN') || '';
0013 |     this.chatId = this.configService.get<string>('TELEGRAM_CHAT_ID') || '';
0014 |   }
0015 | 
0016 |   /**
0017 |    * Send a message to the configured Telegram chat.
0018 |    * إرسال رسالة إلى دردشة تيليجرام المحددة.
0019 |    */
0020 |   async sendMessage(text: string): Promise<boolean> {
0021 |     if (!this.botToken || !this.chatId || this.botToken.includes('YOUR_BOT_TOKEN')) {
0022 |       this.logger.warn('Telegram Bot Token or Chat ID not configured. Skipping notification.');
0023 |       return false;
0024 |     }
0025 | 
0026 |     try {
0027 |       this.logger.log('Sending report to Telegram...');
0028 |       const url = `https://api.telegram.org/bot${this.botToken}/sendMessage`;
0029 |       await axios.post(url, {
0030 |         chat_id: this.chatId,
0031 |         text: text,
0032 |         parse_mode: 'HTML',
0033 |       });
0034 |       this.logger.log('✅ Telegram notification sent successfully.');
0035 |       return true;
0036 |     } catch (error) {
0037 |       this.logger.error(`❌ Failed to send Telegram message: ${error.message}`);
0038 |       if (error.response) {
0039 |         this.logger.error(`Status: ${error.response.status}, Data: ${JSON.stringify(error.response.data)}`);
0040 |       }
0041 |       return false;
0042 |     }
0043 |   }
0044 | 
0045 |   /**
0046 |    * Formats a summary report for the Inteligence Process.
0047 |    */
0048 |   async sendIntelligenceReport(stats: {
0049 |     syncResult: number;
0050 |     updatedSegments: number;
0051 |     discoveredRoads: number;
0052 |     totalPoints: number;
0053 |     days: number;
0054 |     timeProfiles?: number;
0055 |   }) {
0056 |     const message = `
0057 | 🚀 <b>Intaleq Map Intelligence Report</b>
0058 | ━━━━━━━━━━━━━━━━━━
0059 | 📅 <b>Window:</b> Last ${stats.days} days
0060 | 📥 <b>Tracks Imported:</b> ${stats.syncResult} points
0061 | 🛣️ <b>Roads Updated:</b> ${stats.updatedSegments} segments
0062 | ✨ <b>New Roads Found:</b> ${stats.discoveredRoads} candidates
0063 | 🕒 <b>Time Profiles:</b> ${stats.timeProfiles || 0} buckets
0064 | 📍 <b>Database Total:</b> ${stats.totalPoints} points
0065 | ━━━━━━━━━━━━━━━━━━
0066 | ✅ <i>Deep Sync and Analysis Complete.</i>
0067 |     `;
0068 |     return this.sendMessage(message);
0069 |   }
0070 | }


------------------------------------------------------------
[77] اسم الملف: gis.utils.ts
المسار: ./apps/api/src/common/gis.utils.ts
------------------------------------------------------------
0001 | /**
0002 |  * GIS Utilities for Jordan Map Platform
0003 |  * أدوات مساعدة للتعامل مع البيانات الجغرافية
0004 |  */
0005 | 
0006 | export const JORDAN_BOUNDS = {
0007 |   minLat: 29.1,
0008 |   maxLat: 33.4,
0009 |   minLng: 34.9,
0010 |   maxLng: 39.3,
0011 | };
0012 | 
0013 | export function isWithinJordan(lat: number, lng: number): boolean {
0014 |   return (
0015 |     lat >= JORDAN_BOUNDS.minLat &&
0016 |     lat <= JORDAN_BOUNDS.maxLat &&
0017 |     lng >= JORDAN_BOUNDS.minLng &&
0018 |     lng <= JORDAN_BOUNDS.maxLng
0019 |   );
0020 | }
0021 | 
0022 | /**
0023 |  * Snap a point to the nearest road segment (Placeholder for Map Matching logic)
0024 |  * ربط نقطة جغرافية بأقرب مقطع طريق (تمهيد لمنطق مطابقة الخرائط)
0025 |  */
0026 | export function mockMapMatch(lat: number, lng: number) {
0027 |   // In Phase 2, this would call GraphHopper Map Matching API
0028 |   return `osm_way_${Math.floor(Math.random() * 1000000)}`;
0029 | }


------------------------------------------------------------
[78] اسم الملف: redis.service.ts
المسار: ./apps/api/src/common/redis.service.ts
------------------------------------------------------------
0001 | import { Injectable, Inject, OnModuleDestroy } from '@nestjs/common';
0002 | import type { RedisClientType } from 'redis';
0003 | 
0004 | /**
0005 |  * Redis Service - خدمة التعامل مع الذاكرة العشوائية (Redis)
0006 |  *
0007 |  * Used for caching traffic snapshots and common routes.
0008 |  */
0009 | @Injectable()
0010 | export class RedisService implements OnModuleDestroy {
0011 |   constructor(
0012 |     @Inject('REDIS_CLIENT') private readonly redisClient: RedisClientType,
0013 |   ) {}
0014 | 
0015 |   /**
0016 |    * Set a value in Redis with optional TTL (Time To Live).
0017 |    * حفظ قيمة في ذاكرة Redis مع وقت انتهاء اختياري
0018 |    */
0019 |   async set(key: string, value: any, ttlSeconds?: number): Promise<void> {
0020 |     const stringValue = typeof value === 'string' ? value : JSON.stringify(value);
0021 |     if (ttlSeconds) {
0022 |       await this.redisClient.set(key, stringValue, { EX: ttlSeconds });
0023 |     } else {
0024 |       await this.redisClient.set(key, stringValue);
0025 |     }
0026 |   }
0027 | 
0028 |   /**
0029 |    * Get a value from Redis and parse it as JSON if possible.
0030 |    * جلب قيمة من ذاكرة Redis وتحويلها إلى JSON إذا لزم الأمر
0031 |    */
0032 |   async get<T>(key: string): Promise<T | null> {
0033 |     const value = await this.redisClient.get(key);
0034 |     if (!value) return null;
0035 | 
0036 |     try {
0037 |       return JSON.parse(value) as T;
0038 |     } catch {
0039 |       return value as unknown as T;
0040 |     }
0041 |   }
0042 | 
0043 |   /**
0044 |    * Delete a key from Redis.
0045 |    * حذف مفتاح من ذاكرة Redis
0046 |    */
0047 |   async del(key: string): Promise<void> {
0048 |     await this.redisClient.del(key);
0049 |   }
0050 | 
0051 |   async onModuleDestroy() {
0052 |     await this.redisClient.quit();
0053 |   }
0054 | }


------------------------------------------------------------
[79] اسم الملف: cache.service.ts
المسار: ./apps/api/src/common/cache.service.ts
------------------------------------------------------------
0001 | import { Injectable, Inject } from '@nestjs/common';
0002 | import { createClient } from 'redis';
0003 | import { ConfigService } from '@nestjs/config';
0004 | 
0005 | @Injectable()
0006 | export class CacheService {
0007 |   private client;
0008 | 
0009 |   constructor(private configService: ConfigService) {
0010 |     const redisUrl = this.configService.get('REDIS_URL', 'redis://redis:6379');
0011 |     this.client = createClient({ url: redisUrl });
0012 |     this.client.connect().catch(console.error);
0013 |   }
0014 | 
0015 |   async set(key: string, value: any, ttlSeconds: number = 3600) {
0016 |     // Cache data in Redis with TTL
0017 |     // تخزين البيانات في Redis مع تحديد وقت انتهاء
0018 |     await this.client.set(key, JSON.stringify(value), {
0019 |       EX: ttlSeconds,
0020 |     });
0021 |   }
0022 | 
0023 |   async get(key: string) {
0024 |     // Retrieve cached data
0025 |     // استرجاع البيانات المخزنة
0026 |     const data = await this.client.get(key);
0027 |     return data ? JSON.parse(data) : null;
0028 |   }
0029 | 
0030 |   async del(key: string) {
0031 |     await this.client.del(key);
0032 |   }
0033 | }


------------------------------------------------------------
[80] اسم الملف: api-key.guard.ts
المسار: ./apps/api/src/common/guards/api-key.guard.ts
------------------------------------------------------------
0001 | import {
0002 |   CanActivate,
0003 |   ExecutionContext,
0004 |   Injectable,
0005 |   UnauthorizedException,
0006 | } from '@nestjs/common';
0007 | import { ConfigService } from '@nestjs/config';
0008 | 
0009 | @Injectable()
0010 | export class ApiKeyGuard implements CanActivate {
0011 |   constructor(private configService: ConfigService) {}
0012 | 
0013 |   canActivate(context: ExecutionContext): boolean {
0014 |     const request = context.switchToHttp().getRequest();
0015 |     const apiKeyHeader = request.headers['x-api-key'];
0016 |     const validApiKey = this.configService.get<string>('MAP_API_KEY') || 'intaleq_premium_saas_2026_secure_key_x';
0017 | 
0018 |     // Enforce API key match
0019 |     if (apiKeyHeader !== validApiKey) {
0020 |       console.error(`[ApiKeyGuard] Unauthorized. Expected: ${validApiKey}, Received: ${apiKeyHeader}`);
0021 |       throw new UnauthorizedException('Invalid or missing API Key');
0022 |     }
0023 | 
0024 |     return true;
0025 |   }
0026 | }


------------------------------------------------------------
[81] اسم الملف: telemetry.module.ts
المسار: ./apps/api/src/telemetry/telemetry.module.ts
------------------------------------------------------------
0001 | import { Module } from '@nestjs/common';
0002 | import { TypeOrmModule } from '@nestjs/typeorm';
0003 | import { TelemetryLog } from './telemetry.entity';
0004 | import { TelemetryService } from './telemetry.service';
0005 | import { TelemetryController } from './telemetry.controller';
0006 | import { TelemetryAnalyzerService } from './telemetry-analyzer.service';
0007 | import { MapRefinementController } from './map-refinement.controller';
0008 | import { RoadSegmentStat } from '../maps/road-stat.entity';
0009 | import { CandidateRoad } from '../maps/candidate-road.entity';
0010 | import { RedisModule } from '../common/redis.module';
0011 | import { RedisService } from '../common/redis.service';
0012 | import { MapsModule } from '../maps/maps.module';
0013 | 
0014 | import { ExternalTelemetryService } from './external-telemetry.service';
0015 | import { TelegramService } from '../common/telegram.service';
0016 | 
0017 | @Module({
0018 |   imports: [
0019 |     TypeOrmModule.forFeature([TelemetryLog, RoadSegmentStat, CandidateRoad]),
0020 |     RedisModule,
0021 |     MapsModule,
0022 |   ],
0023 |   controllers: [TelemetryController, MapRefinementController],
0024 |   providers: [
0025 |     TelemetryService,
0026 |     TelemetryAnalyzerService,
0027 |     ExternalTelemetryService,
0028 |     TelegramService
0029 |   ],
0030 |   exports: [
0031 |     TelemetryService,
0032 |     TelemetryAnalyzerService,
0033 |     ExternalTelemetryService,
0034 |     TelegramService
0035 |   ],
0036 | })
0037 | export class TelemetryModule {}
0038 | 


------------------------------------------------------------
[82] اسم الملف: external-telemetry.service.ts
المسار: ./apps/api/src/telemetry/external-telemetry.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { ConfigService } from '@nestjs/config';
0003 | import axios from 'axios';
0004 | 
0005 | /**
0006 |  * External Telemetry Service - خدمة جلب بيانات التتبع الخارجية
0007 |  *
0008 |  * Responsible for calling the user's location server to fetch car tracks.
0009 |  * يتولى مسؤولية الاتصال بسيرفر المواقع الخارجي لجلب بيانات تتبع المركبات.
0010 |  */
0011 | @Injectable()
0012 | export class ExternalTelemetryService {
0013 |   private readonly logger = new Logger(ExternalTelemetryService.name);
0014 |   private readonly baseUrl: string;
0015 |   private readonly apiKey: string;
0016 | 
0017 |   constructor(private configService: ConfigService) {
0018 |     this.baseUrl = this.configService.get<string>('LOCATION_SERVER_URL', '');
0019 |     this.apiKey = this.configService.get<string>('LOCATION_SERVER_API_KEY', '');
0020 |   }
0021 | 
0022 |   /**
0023 |    * Fetch car track data for a specific window of days.
0024 |    * جلب بيانات تتبع المركبات لنافذة زمنية محددة بالأيام
0025 |    */
0026 |   async fetchCarTracks(days: number = 1): Promise<any[]> {
0027 |     if (!this.baseUrl || !this.apiKey) {
0028 |       this.logger.error('LOCATION_SERVER_URL or API_KEY not configured in .env');
0029 |       return [];
0030 |     }
0031 | 
0032 |     try {
0033 |       this.logger.log(`📡 Fetching car tracks from ${this.baseUrl} (Scanning: ${days} days)`);
0034 | 
0035 |       const response = await axios.get(`${this.baseUrl}/intaleq/ride/location/getDrirversLocationsTrack.php`, {
0036 |         params: { days },
0037 |         headers: {
0038 |           'X-API-KEY': this.apiKey,
0039 |         },
0040 |         timeout: 30000,
0041 |       });
0042 | 
0043 |       if (response.data && response.data.success && Array.isArray(response.data.data)) {
0044 |         this.logger.log(`✅ Successfully fetched ${response.data.data.length} telemetry points.`);
0045 |         return response.data.data;
0046 |       } else {
0047 |         this.logger.warn('⚠️ Received invalid data structure from location server.');
0048 |         return [];
0049 |       }
0050 |     } catch (error) {
0051 |       if (error.response) {
0052 |         this.logger.error(`❌ Failed to fetch car tracks. Server returned Status ${error.response.status}: ${JSON.stringify(error.response.data)}`);
0053 |       } else {
0054 |         this.logger.error(`❌ Failed to fetch car tracks: ${error.message}`);
0055 |       }
0056 |       return [];
0057 |     }
0058 |   }
0059 | }


------------------------------------------------------------
[83] اسم الملف: telemetry.entity.ts
المسار: ./apps/api/src/telemetry/telemetry.entity.ts
------------------------------------------------------------
0001 | import { Entity, Column, PrimaryGeneratedColumn, Index, CreateDateColumn } from 'typeorm';
0002 | 
0003 | @Entity('telemetry_logs')
0004 | @Index(['driverId', 'timestamp'], { unique: true })
0005 | export class TelemetryLog {
0006 |   @PrimaryGeneratedColumn()
0007 |   id: number;
0008 | 
0009 |   @Column()
0010 |   @Index()
0011 |   driverId: string;
0012 | 
0013 |   @Column('decimal', { precision: 10, scale: 7 })
0014 |   latitude: number;
0015 | 
0016 |   @Column('decimal', { precision: 10, scale: 7 })
0017 |   longitude: number;
0018 | 
0019 |   @Column('float')
0020 |   speed: number;
0021 | 
0022 |   @Column('float')
0023 |   heading: number;
0024 | 
0025 |   @CreateDateColumn()
0026 |   @Index()
0027 |   timestamp: Date;
0028 | 
0029 |   // PostGIS spatial point for efficient queries
0030 |   // نقطة جغرافية للبحث المكاني السريع
0031 |   @Column({
0032 |     type: 'geography',
0033 |     spatialFeatureType: 'Point',
0034 |     srid: 4326,
0035 |     nullable: true,
0036 |   })
0037 |   @Index({ spatial: true })
0038 |   location: any;
0039 | }


------------------------------------------------------------
[84] اسم الملف: telemetry-analyzer.service.ts
المسار: ./apps/api/src/telemetry/telemetry-analyzer.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { Cron } from '@nestjs/schedule';
0003 | import { InjectRepository } from '@nestjs/typeorm';
0004 | import { Repository, DataSource } from 'typeorm';
0005 | import { TelemetryLog } from './telemetry.entity';
0006 | import { RoadSegmentStat } from '../maps/road-stat.entity';
0007 | import { CandidateRoad } from '../maps/candidate-road.entity';
0008 | import { ExternalTelemetryService } from './external-telemetry.service';
0009 | import { RedisService } from '../common/redis.service';
0010 | import { TelegramService } from '../common/telegram.service';
0011 | import { TrafficGridService } from '../maps/traffic-grid.service';
0012 | 
0013 | @Injectable()
0014 | export class TelemetryAnalyzerService {
0015 |   private readonly logger = new Logger(TelemetryAnalyzerService.name);
0016 |   private readonly TRAFFIC_CACHE_KEY = 'live_traffic_congested';
0017 | 
0018 |   constructor(
0019 |     @InjectRepository(TelemetryLog)
0020 |     private telemetryRepo: Repository<TelemetryLog>,
0021 |     @InjectRepository(RoadSegmentStat)
0022 |     private roadStatRepo: Repository<RoadSegmentStat>,
0023 |     @InjectRepository(CandidateRoad)
0024 |     private candidateRoadRepo: Repository<CandidateRoad>,
0025 |     private externalTelemetry: ExternalTelemetryService,
0026 |     private redisService: RedisService,
0027 |     private telegramService: TelegramService,
0028 |     private trafficGrid: TrafficGridService,
0029 |     private dataSource: DataSource,
0030 |   ) {}
0031 | 
0032 |   /**
0033 |    * Orchestrates the deep mapping intelligence process.
0034 |    * Steps: Sync -> Analyze Speed -> Discover New Roads -> Refresh Live Cache
0035 |    */
0036 |   async runDeepIntelligence(hours: number = 48) {
0037 |     this.logger.log(`🚀 Starting Full Intelligence Pipeline (Window: ${hours}h)...`);
0038 | 
0039 |     await this.syncExternalData(Math.ceil(hours / 24));
0040 |     const speedResult = await this.analyzeRoadSpeeds(hours);
0041 |     const temporalResult = await this.analyzeTimeProfiles(hours);
0042 |     const discoveryResult = await this.discoverNewRoads(hours);
0043 |     await this.refreshTrafficCache();
0044 |     await this.trafficGrid.refreshGrid();
0045 | 
0046 |     // 🏆 Final Notification & Summary
0047 |     const summary = await this.getAnalysisSummary();
0048 |     await this.telegramService.sendIntelligenceReport({
0049 |       syncResult: speedResult.totalPointsProcessed || 0,
0050 |       updatedSegments: speedResult.segmentsUpdated || 0,
0051 |       discoveredRoads: discoveryResult.candidatesFound || 0,
0052 |       timeProfiles: temporalResult.bucketsUpdated || 0,
0053 |       totalPoints: summary.telemetry.total,
0054 |       days: Math.ceil(hours / 24),
0055 |     });
0056 | 
0057 |     this.logger.log('🏁 Intelligence Pipeline Finished Successfully.');
0058 | 
0059 |     return {
0060 |       success: true,
0061 |       timestamp: new Date().toISOString(),
0062 |       speedAnalysis: speedResult,
0063 |       temporalAnalysis: temporalResult,
0064 |       roadDiscovery: discoveryResult,
0065 |     };
0066 |   }
0067 | 
0068 |   @Cron('0 4 */10 * *')
0069 |   handleDeepIntelligence() {
0070 |     this.runDeepIntelligence(240);
0071 |   }
0072 | 
0073 |   async syncExternalData(days: number = 7) {
0074 |     this.logger.log(`📡 Starting batch sync (Window: ${days} days)...`);
0075 |     try {
0076 |       const tracks = await this.externalTelemetry.fetchCarTracks(days);
0077 |       if (tracks.length === 0) return;
0078 | 
0079 |       this.logger.log(`📥 Saving ${tracks.length} points to database...`);
0080 |       const values = tracks
0081 |         .filter(t => t.driver_id && t.longitude && t.latitude)
0082 |         .map(t =>
0083 |           `('${t.driver_id}', ST_SetSRID(ST_Point(${t.longitude}, ${t.latitude}), 4326), ${t.latitude}, ${t.longitude}, ${t.speed || 0}, ${t.heading || 0}, '${t.created_at}')`
0084 |         ).join(',');
0085 | 
0086 |       await this.dataSource.query(`
0087 |         INSERT INTO telemetry_logs ("driverId", location, latitude, longitude, speed, heading, timestamp)
0088 |         VALUES ${values}
0089 |         ON CONFLICT DO NOTHING
0090 |       `);
0091 |       this.logger.log(`✅ Batch sync complete.`);
0092 |     } catch (error) {
0093 |       this.logger.error(`❌ Sync failed: ${error.message}`);
0094 |       throw error;
0095 |     }
0096 |   }
0097 | 
0098 |   async refreshTrafficCache() {
0099 |     this.logger.log('🚀 Refreshing Redis traffic snapshot (v2.5.2 Optimized)...');
0100 |     const congested = await this.roadStatRepo.query(`
0101 |       SELECT "segmentId", "congestionFactor", ST_AsGeoJSON(geometry, 5) as geojson
0102 |       FROM road_segment_stats
0103 |       WHERE "congestionFactor" > 1.1
0104 |       ORDER BY "congestionFactor" DESC
0105 |       LIMIT 2000
0106 |     `);
0107 | 
0108 |     if (congested.length === 0) {
0109 |       await this.redisService.del(this.TRAFFIC_CACHE_KEY);
0110 |       return { cachedCount: 0 };
0111 |     }
0112 | 
0113 |     // Map to a slightly more compact format before stringifying
0114 |     const snapshot = congested.map(row => ({
0115 |       sid: row.segmentId,
0116 |       cf: parseFloat(row.congestionFactor),
0117 |       geo: JSON.parse(row.geojson)
0118 |     }));
0119 | 
0120 |     // Diagnostic logging for visibility
0121 |     const sampleSize = Math.min(congested.length, 3);
0122 |     const topSegments = congested.slice(0, sampleSize).map(s => `${s.segmentId} (F: ${s.congestionFactor})`).join(', ');
0123 |     const totalSizeKB = Math.round(JSON.stringify(snapshot).length / 1024);
0124 | 
0125 |     this.logger.log(`📊 Traffic Snapshot Sample (Top ${sampleSize}): ${topSegments}`);
0126 |     this.logger.log(`📦 Redis Payload Size: ~${totalSizeKB} KB`);
0127 | 
0128 |     await this.redisService.set(this.TRAFFIC_CACHE_KEY, snapshot);
0129 |     this.logger.log(`✅ Redis traffic snapshot updated with ${congested.length} segments.`);
0130 |     return { cachedCount: congested.length };
0131 |   }
0132 | 
0133 |   // 1. ROAD SPEED ANALYSIS (v2.5 optimized - Bulk Spatial Join)
0134 |   async analyzeRoadSpeeds(sinceHours: number = 24): Promise<any> {
0135 |     this.logger.log(`🔍 Starting road speed analysis v2.5 for last ${sinceHours}h...`);
0136 |     const query = `
0137 |       WITH grid_points AS (
0138 |         -- Group by 5m grid cell first to reduce spatial join volume (v2.5.1 WoW Performance)
0139 |         SELECT ST_SnapToGrid(ST_Transform(location::geometry, 3857), 5) AS loc,
0140 |                AVG(speed) as speed
0141 |         FROM telemetry_logs
0142 |         WHERE timestamp >= NOW() - INTERVAL '${sinceHours} hours' AND speed > 2
0143 |         GROUP BY loc
0144 |       ),
0145 |       matches AS (
0146 |         -- Bulk Spatial Join (20m radius) with GIST optimization
0147 |         SELECT l.osm_id::text as id, l.name, l.highway, g.speed, l.way
0148 |         FROM grid_points g
0149 |         INNER JOIN planet_osm_line l ON
0150 |           l.highway IS NOT NULL AND
0151 |           l.way && ST_Expand(g.loc, 20) AND
0152 |           ST_DWithin(l.way, g.loc, 20)
0153 |       ),
0154 |       stats AS (
0155 |         -- Calculate median speed and aggregate samples
0156 |         SELECT id, name, highway,
0157 |                PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY speed) as avg_speed,
0158 |                COUNT(*) as samples,
0159 |                ST_Transform(MIN(way), 4326) as way4326
0160 |         FROM matches
0161 |         GROUP BY id, name, highway
0162 |         HAVING COUNT(*) >= 3
0163 |       )
0164 |       INSERT INTO road_segment_stats ("segmentId", "averageSpeed", "sampleCount", "lastUpdated", geometry, "congestionFactor")
0165 |       SELECT id, avg_speed, samples, NOW(), way4326,
0166 |              CASE WHEN highway IN ('primary','secondary','trunk','motorway') AND avg_speed < 30
0167 |                   THEN 30/GREATEST(avg_speed,1) ELSE 1.0 END
0168 |       FROM stats
0169 |       ON CONFLICT ("segmentId") DO UPDATE SET
0170 |         "averageSpeed"=EXCLUDED."averageSpeed",
0171 |         "sampleCount"=EXCLUDED."sampleCount",
0172 |         "lastUpdated"=NOW(),
0173 |         "geometry"=EXCLUDED."geometry",
0174 |         "congestionFactor"=EXCLUDED."congestionFactor"
0175 |       RETURNING "segmentId";
0176 |     `;
0177 |     const result = await this.dataSource.query(query);
0178 |     return { segmentsUpdated: result.length };
0179 |   }
0180 | 
0181 |   // 1.1 TEMPORAL SPEED PROFILING (Phase 2 - Time-Aware Buckets)
0182 |   async analyzeTimeProfiles(sinceHours: number = 720): Promise<any> {
0183 |     this.logger.log(`🕒 Starting temporal profiling (Phase 2) for last ${sinceHours}h...`);
0184 | 
0185 |     const query = `
0186 |       WITH grid_points AS (
0187 |         -- Bucket by 10m grid and Time (Hour + DOW)
0188 |         SELECT
0189 |           ST_SnapToGrid(ST_Transform(location::geometry, 3857), 10) AS loc,
0190 |           EXTRACT(HOUR FROM timestamp)::int as hr,
0191 |           EXTRACT(DOW FROM timestamp)::int as dow,
0192 |           AVG(speed) as speed
0193 |         FROM telemetry_logs
0194 |         WHERE timestamp >= NOW() - INTERVAL '${sinceHours} hours' AND speed > 2
0195 |         GROUP BY loc, hr, dow
0196 |       ),
0197 |       matches AS (
0198 |         -- Map to OSM segments
0199 |         SELECT l.osm_id::text as sid, g.hr, g.dow, g.speed
0200 |         FROM grid_points g
0201 |         INNER JOIN planet_osm_line l ON
0202 |           l.highway IS NOT NULL AND
0203 |           l.way && ST_Expand(g.loc, 20) AND
0204 |           ST_DWithin(l.way, g.loc, 20)
0205 |       ),
0206 |       temporal_stats AS (
0207 |         -- Aggregate by segment + time bucket
0208 |         SELECT sid, hr, dow,
0209 |                PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY speed) as avg_spd,
0210 |                COUNT(*) as smp
0211 |         FROM matches
0212 |         GROUP BY sid, hr, dow
0213 |         HAVING COUNT(*) >= 2 -- Require minimum samples per bucket
0214 |       )
0215 |       INSERT INTO road_speed_profiles ("segmentId", "hourOfDay", "dayOfWeek", "averageSpeed", "sampleCount", "lastUpdated")
0216 |       SELECT sid, hr, dow, avg_spd, smp, NOW()
0217 |       FROM temporal_stats
0218 |       ON CONFLICT ("segmentId", "hourOfDay", "dayOfWeek") DO UPDATE SET
0219 |         "averageSpeed" = EXCLUDED."averageSpeed",
0220 |         "sampleCount" = EXCLUDED."sampleCount",
0221 |         "lastUpdated" = NOW()
0222 |       RETURNING "segmentId";
0223 |     `;
0224 | 
0225 |     const result = await this.dataSource.query(query);
0226 |     this.logger.log(`📊 Time-aware profiling complete: ${result.length} buckets updated.`);
0227 |     return { bucketsUpdated: result.length };
0228 |   }
0229 | 
0230 |   // 2. ROAD DISCOVERY (v2.5 optimized - Spatial Anti-Join & Bulk Scoring)
0231 |   async discoverNewRoads(sinceHours: number = 168): Promise<any> {
0232 |     this.logger.log(`🛣️ Starting road discovery v2.5 for last ${sinceHours}h...`);
0233 | 
0234 |     // Unified SQL for Discovery, Confidence Scoring, and Insertion
0235 |     const query = `
0236 |       WITH grid_points AS (
0237 |         -- Group by cell and driver to reduce volume for clustering and anti-join (v2.5.1 WoW Performance)
0238 |         SELECT "driverId", ST_SnapToGrid(ST_Transform(location::geometry, 3857), 10) as loc,
0239 |                AVG(speed) as speed,
0240 |                MIN(timestamp) as timestamp
0241 |         FROM telemetry_logs
0242 |         WHERE timestamp >= NOW() - INTERVAL '${sinceHours} hours' AND speed > 5
0243 |         GROUP BY loc, "driverId"
0244 |       ),
0245 |       off_road AS (
0246 |         -- Spatial Anti-Join: Only points further than 35m from any existing highway
0247 |         SELECT g.* FROM grid_points g
0248 |         LEFT JOIN planet_osm_line l ON
0249 |           l.highway IS NOT NULL AND
0250 |           l.way && ST_Expand(g.loc, 35) AND
0251 |           ST_DWithin(l.way, g.loc, 35)
0252 |         WHERE l.osm_id IS NULL
0253 |       ),
0254 |       clustered AS (
0255 |         -- Density-based clustering to find linear paths
0256 |         SELECT *, ST_ClusterDBSCAN(loc, eps := 30, minpoints := 3) OVER () as cid FROM off_road
0257 |       ),
0258 |       cluster_stats AS (
0259 |         -- 1. Calculate cluster-wide quality metrics
0260 |         SELECT cid,
0261 |                COUNT(DISTINCT "driverId") as drv_count,
0262 |                COUNT(*) as pt_count,
0263 |                AVG(speed) as avg_spd
0264 |         FROM clustered
0265 |         WHERE cid IS NOT NULL
0266 |         GROUP BY cid
0267 |         HAVING COUNT(DISTINCT "driverId") >= 3 AND COUNT(*) >= 15
0268 |       ),
0269 |       cluster_path AS (
0270 |         -- 2. Extract unique grid cells per cluster in chronological order
0271 |         SELECT cid, loc, MIN(timestamp) as ts
0272 |         FROM clustered
0273 |         WHERE cid IN (SELECT cid FROM cluster_stats)
0274 |         GROUP BY cid, loc
0275 |       ),
0276 |       final_candidates AS (
0277 |         -- 3. Build geometry and calculate final scoring
0278 |         SELECT
0279 |           s.cid,
0280 |           ST_Transform(ST_MakeLine(p.loc ORDER BY p.ts), 4326) as geom,
0281 |           s.drv_count,
0282 |           s.pt_count,
0283 |           s.avg_spd,
0284 |           ST_Length(ST_Transform(ST_MakeLine(p.loc ORDER BY p.ts), 4326)::geography) as len
0285 |         FROM cluster_stats s
0286 |         JOIN cluster_path p ON s.cid = p.cid
0287 |         GROUP BY s.cid, s.drv_count, s.pt_count, s.avg_spd
0288 |       )
0289 |       INSERT INTO candidate_roads (geometry, "uniqueDriverCount", "totalPoints", "averageSpeed", "lengthMeters", confidence, status)
0290 |       SELECT geom, drv_count, pt_count, avg_spd, len,
0291 |              -- SQL port of calculateConfidence logic
0292 |              ROUND((
0293 |                LEAST(drv_count::float / 5, 1.0) * 0.4 +
0294 |                LEAST(pt_count::float / 50, 1.0) * 0.3 +
0295 |                CASE WHEN len BETWEEN 50 AND 2000 THEN 0.3 ELSE 0.1 END
0296 |              )::numeric, 2) as conf,
0297 |              'pending'
0298 |       FROM final_candidates
0299 |       RETURNING id;
0300 |     `;
0301 | 
0302 |     const result = await this.dataSource.query(query);
0303 |     return { candidatesFound: result.length };
0304 |   }
0305 | 
0306 |   async getCongestionData(bounds: any) {
0307 |     return this.dataSource.query(`
0308 |       SELECT rs."segmentId", rs."averageSpeed", rs."congestionFactor", rs."sampleCount", ST_AsGeoJSON(rs.geometry) as geojson
0309 |       FROM road_segment_stats rs
0310 |       WHERE rs.geometry IS NOT NULL AND ST_Intersects(rs.geometry::geometry, ST_MakeEnvelope($1, $2, $3, $4, 4326))
0311 |       ORDER BY rs."congestionFactor" DESC
0312 |     `, [bounds.west, bounds.south, bounds.east, bounds.north]);
0313 |   }
0314 | 
0315 |   async getAnalysisSummary() {
0316 |     const [tCount] = await this.dataSource.query('SELECT COUNT(*) as count FROM telemetry_logs');
0317 |     const [rCount] = await this.dataSource.query('SELECT COUNT(*) as count FROM road_segment_stats');
0318 |     const [cCount] = await this.dataSource.query('SELECT COUNT(*) as count, COUNT(*) FILTER (WHERE status=\'pending\') as p FROM candidate_roads');
0319 |     const [clCount] = await this.dataSource.query('SELECT COUNT(*) as count FROM road_segment_stats WHERE "isClosed" = true');
0320 |     return {
0321 |       telemetry: { total: tCount.count },
0322 |       roads: { analyzed: rCount.count, closed: clCount.count },
0323 |       candidates: { total: cCount.count, pending: cCount.p }
0324 |     };
0325 |   }
0326 | 
0327 |   // --- ROAD MANAGEMENT API ---
0328 | 
0329 |   async getCandidates(status: string = 'pending', limit: number = 50) {
0330 |     return this.candidateRoadRepo.find({
0331 |       where: { status },
0332 |       order: { confidence: 'DESC' },
0333 |       take: limit
0334 |     });
0335 |   }
0336 | 
0337 |   async updateCandidateStatus(id: string, status: string) {
0338 |     await this.candidateRoadRepo.update(id, {
0339 |       status,
0340 |       reviewedAt: new Date()
0341 |     });
0342 |     return { success: true, id, status };
0343 |   }
0344 | 
0345 |   // --- ROAD CLOSURE DETECTION ---
0346 | 
0347 |   async discoverRoadClosures(sinceHours: number = 48) {
0348 |     this.logger.log(`🚧 Analyzing road closures for last ${sinceHours}h...`);
0349 | 
0350 |     // First, clear existing closure flags (dynamic re-evaluation)
0351 |     await this.roadStatRepo.update({ isClosed: true }, { isClosed: false });
0352 | 
0353 |     // Logical closure detection:
0354 |     // 1. Historically busy road (sampleCount > 50)
0355 |     // 2. NO telemetry matches within 35m in the last X hours
0356 |     // 3. BUT telemetry exists in the wider area (proving drivers are active)
0357 |     const query = `
0358 |       WITH active_area AS (
0359 |         -- Bounding box of some recent activity to prove drivers are on the map
0360 |         SELECT ST_Expand(ST_Extent(location::geometry), 0.01) as bbox
0361 |         FROM telemetry_logs
0362 |         WHERE timestamp >= NOW() - INTERVAL '${sinceHours} hours'
0363 |       ),
0364 |       possible_closures AS (
0365 |         SELECT rs."segmentId"
0366 |         FROM road_segment_stats rs
0367 |         WHERE rs."sampleCount" > 50
0368 |         AND rs.geometry && (SELECT bbox FROM active_area)
0369 |         AND NOT EXISTS (
0370 |           SELECT 1 FROM telemetry_logs t
0371 |           WHERE t.timestamp >= NOW() - INTERVAL '${sinceHours} hours'
0372 |           AND ST_DWithin(rs.geometry::geometry, t.location::geometry, 35)
0373 |         )
0374 |       )
0375 |       UPDATE road_segment_stats
0376 |       SET "isClosed" = true
0377 |       WHERE "segmentId" IN (SELECT "segmentId" FROM possible_closures)
0378 |       RETURNING "segmentId";
0379 |     `;
0380 | 
0381 |     const result = await this.dataSource.query(query);
0382 |     this.logger.log(`✅ Road closure detection complete: ${result.length} roads flagged as closed.`);
0383 |     return { roadsClosed: result.length };
0384 |   }
0385 | 
0386 |   async getClosures() {
0387 |     return this.roadStatRepo.find({
0388 |       where: { isClosed: true },
0389 |       order: { sampleCount: 'DESC' }
0390 |     });
0391 |   }
0392 | 
0393 |   private calculateConfidence(drivers: number, points: number, len: number): number {
0394 |     const dScore = Math.min(drivers / 5, 1.0) * 0.4;
0395 |     const pScore = Math.min(points / 50, 1.0) * 0.3;
0396 |     const lScore = (len >= 50 && len <= 2000) ? 0.3 : 0.1;
0397 |     return Math.round((dScore + pScore + lScore) * 100) / 100;
0398 |   }
0399 | }


------------------------------------------------------------
[85] اسم الملف: map-refinement.controller.ts
المسار: ./apps/api/src/telemetry/map-refinement.controller.ts
------------------------------------------------------------
0001 | import { Controller, Post, Get, Patch, Param, Query, Body, HttpException, HttpStatus } from '@nestjs/common';
0002 | import { ApiTags, ApiOperation, ApiQuery } from '@nestjs/swagger';
0003 | import { TelemetryAnalyzerService } from './telemetry-analyzer.service';
0004 | 
0005 | /**
0006 |  * Map Refinement Controller - واجهة تحليل وتحسين الخرائط
0007 |  *
0008 |  * Exposes endpoints for:
0009 |  * - Running road speed analysis / تحليل سرعات الطرق
0010 |  * - Discovering new roads / اكتشاف طرق جديدة
0011 |  * - Viewing congestion data / عرض بيانات الازدحام
0012 |  * - Reviewing candidate roads / مراجعة الطرق المرشحة
0013 |  */
0014 | @ApiTags('map-refinement')
0015 | @Controller('map-refinement')
0016 | export class MapRefinementController {
0017 |   constructor(private readonly analyzerService: TelemetryAnalyzerService) {}
0018 | 
0019 |   // ─────────────────────────────────────────────────────────
0020 |   // Analysis Summary / ملخص التحليل
0021 |   // ─────────────────────────────────────────────────────────
0022 | 
0023 |   @Get('summary')
0024 |   @ApiOperation({ summary: 'Get analysis summary 📊 / ملخص التحليل' })
0025 |   async getSummary() {
0026 |     return this.analyzerService.getAnalysisSummary();
0027 |   }
0028 | 
0029 |   // ─────────────────────────────────────────────────────────
0030 |   // Sync & Cache / المزامنة والتخزين
0031 |   // ─────────────────────────────────────────────────────────
0032 | 
0033 |   @Post('sync-external')
0034 |   @ApiOperation({ summary: 'Sync telemetry from external server 📡 / مزامنة البيانات الخارجية' })
0035 |   async syncExternal() {
0036 |     return this.analyzerService.syncExternalData();
0037 |   }
0038 | 
0039 |   @Post('refresh-cache')
0040 |   @ApiOperation({ summary: 'Refresh Redis traffic snapshot 🚀 / تحديث ذاكرة التخزين' })
0041 |   async refreshCache() {
0042 |     return this.analyzerService.refreshTrafficCache();
0043 |   }
0044 | 
0045 |   // ─────────────────────────────────────────────────────────
0046 |   // Road Speed Analysis / تحليل سرعات الطرق
0047 |   // ─────────────────────────────────────────────────────────
0048 | 
0049 | 
0050 |   @Post('analyze-speeds')
0051 |   @ApiOperation({ summary: 'Run road speed analysis 🚗 / تشغيل تحليل سرعات الطرق' })
0052 |   @ApiQuery({ name: 'hours', required: false, description: 'Hours to look back (default: 24)' })
0053 |   async analyzeRoadSpeeds(@Query('hours') hours?: number) {
0054 |     const sinceHours = hours ? Number(hours) : 24;
0055 |     return this.analyzerService.analyzeRoadSpeeds(sinceHours);
0056 |   }
0057 | 
0058 |   // ─────────────────────────────────────────────────────────
0059 |   // Road Discovery / اكتشاف الطرق الجديدة
0060 |   // ─────────────────────────────────────────────────────────
0061 | 
0062 |   @Post('discover-roads')
0063 |   @ApiOperation({ summary: 'Discover new roads from telemetry 🛣️ / اكتشاف طرق جديدة' })
0064 |   @ApiQuery({ name: 'hours', required: false, description: 'Hours to look back (default: 168 = 1 week)' })
0065 |   async discoverNewRoads(@Query('hours') hours?: number) {
0066 |     const sinceHours = hours ? Number(hours) : 168;
0067 |     return this.analyzerService.discoverNewRoads(sinceHours);
0068 |   }
0069 | 
0070 |   @Get('candidates')
0071 |   @ApiOperation({ summary: 'Get list of candidate roads / جلب الطرق المرشحة' })
0072 |   @ApiQuery({ name: 'status', required: false, enum: ['pending', 'approved', 'rejected'] })
0073 |   async getCandidates(@Query('status') status?: string) {
0074 |     return this.analyzerService.getCandidates(status || 'pending');
0075 |   }
0076 | 
0077 |   // ─────────────────────────────────────────────────────────
0078 |   // Road Closures / إغلاقات الطرق
0079 |   // ─────────────────────────────────────────────────────────
0080 | 
0081 |   @Post('discover-closures')
0082 |   @ApiOperation({ summary: 'Run road closure detection 🚧 / تشغيل كشف الإغلاقات' })
0083 |   @ApiQuery({ name: 'hours', required: false, description: 'Hours to look back (default: 48)' })
0084 |   async discoverClosures(@Query('hours') hours?: number) {
0085 |     return this.analyzerService.discoverRoadClosures(hours || 48);
0086 |   }
0087 | 
0088 |   @Get('closures')
0089 |   @ApiOperation({ summary: 'Get currently detected closures / جلب الإغلاقات المكتشفة' })
0090 |   async getClosures() {
0091 |     return this.analyzerService.getClosures();
0092 |   }
0093 | 
0094 |   // ─────────────────────────────────────────────────────────
0095 |   // Congestion Heatmap / خريطة حرارية للازدحام
0096 |   // ─────────────────────────────────────────────────────────
0097 | 
0098 |   @Get('congestion')
0099 |   @ApiOperation({ summary: 'Get congestion data for heatmap 🗺️ / بيانات الازدحام' })
0100 |   @ApiQuery({ name: 'north', required: true })
0101 |   @ApiQuery({ name: 'south', required: true })
0102 |   @ApiQuery({ name: 'east', required: true })
0103 |   @ApiQuery({ name: 'west', required: true })
0104 |   async getCongestionData(
0105 |     @Query('north') north: number,
0106 |     @Query('south') south: number,
0107 |     @Query('east') east: number,
0108 |     @Query('west') west: number,
0109 |   ) {
0110 |     if (!north || !south || !east || !west) {
0111 |       throw new HttpException(
0112 |         'Bounds required: north, south, east, west / يجب تحديد الحدود الجغرافية',
0113 |         HttpStatus.BAD_REQUEST,
0114 |       );
0115 |     }
0116 |     return this.analyzerService.getCongestionData({
0117 |       north: Number(north),
0118 |       south: Number(south),
0119 |       east: Number(east),
0120 |       west: Number(west),
0121 |     });
0122 |   }
0123 | 
0124 |   // ─────────────────────────────────────────────────────────
0125 |   // Candidate Road Review / مراجعة الطرق المرشحة
0126 |   // ─────────────────────────────────────────────────────────
0127 | 
0128 |   @Patch('candidates/:id/approve')
0129 |   @ApiOperation({ summary: 'Approve a candidate road ✅ / الموافقة على طريق مرشح' })
0130 |   async approveCandidate(@Param('id') id: string) {
0131 |     return this.analyzerService.updateCandidateStatus(id, 'approved');
0132 |   }
0133 | 
0134 |   @Patch('candidates/:id/reject')
0135 |   @ApiOperation({ summary: 'Reject a candidate road ❌ / رفض طريق مرشح' })
0136 |   async rejectCandidate(@Param('id') id: string) {
0137 |     return this.analyzerService.updateCandidateStatus(id, 'rejected');
0138 |   }
0139 | }


------------------------------------------------------------
[86] اسم الملف: telemetry.service.ts
المسار: ./apps/api/src/telemetry/telemetry.service.ts
------------------------------------------------------------
0001 | import { Injectable, Logger } from '@nestjs/common';
0002 | import { InjectRepository } from '@nestjs/typeorm';
0003 | import { Repository } from 'typeorm';
0004 | import { TelemetryLog } from './telemetry.entity';
0005 | 
0006 | export interface DriverTelemetryDto {
0007 |   driver_id: string;
0008 |   latitude: number;
0009 |   longitude: number;
0010 |   speed: number;
0011 |   heading: number;
0012 | }
0013 | 
0014 | @Injectable()
0015 | export class TelemetryService {
0016 |   private readonly logger = new Logger(TelemetryService.name);
0017 | 
0018 |   constructor(
0019 |     @InjectRepository(TelemetryLog)
0020 |     private telemetryRepository: Repository<TelemetryLog>,
0021 |   ) {}
0022 | 
0023 |   async ingest(data: DriverTelemetryDto) {
0024 |     // Ingest driver telemetry every 3 seconds
0025 |     // استقبال وفهرسة بيانات السائق كل 3 ثواني
0026 |     const log = this.telemetryRepository.create({
0027 |       driverId: data.driver_id,
0028 |       latitude: data.latitude,
0029 |       longitude: data.longitude,
0030 |       speed: data.speed,
0031 |       heading: data.heading,
0032 |       location: {
0033 |         type: 'Point',
0034 |         coordinates: [data.longitude, data.latitude],
0035 |       },
0036 |     });
0037 | 
0038 |     await this.telemetryRepository.save(log);
0039 | 
0040 |     // In a production scenario, we'd also update Redis here to track current hotspots
0041 |     // في بيئة الإنتاج، نقوم بتحديث Redis هنا لتتبع المواقع الحالية
0042 |     this.logger.debug(`Ingested telemetry for driver ${data.driver_id}`);
0043 |     return { success: true, timestamp: new Date() };
0044 |   }
0045 | 
0046 |   async getRecentDrivers(lat: number, lng: number, radiusMeters: number = 5000) {
0047 |     // Search nearby drivers using PostGIS spatial index
0048 |     // البحث عن السائقين القريبين باستخدام الفهرسة المكانية
0049 |     return this.telemetryRepository
0050 |       .createQueryBuilder('log')
0051 |       .where('ST_DWithin(log.location, ST_MakePoint(:lng, :lat)::geography, :radius)')
0052 |       .setParameters({ lat, lng, radius: radiusMeters })
0053 |       .orderBy('log.timestamp', 'DESC')
0054 |       .limit(50)
0055 |       .getMany();
0056 |   }
0057 | }


------------------------------------------------------------
[87] اسم الملف: telemetry.controller.ts
المسار: ./apps/api/src/telemetry/telemetry.controller.ts
------------------------------------------------------------
0001 | import { Controller, Post, Body, Get, Query } from '@nestjs/common';
0002 | import { ApiTags, ApiOperation } from '@nestjs/swagger';
0003 | import { TelemetryService, type DriverTelemetryDto } from './telemetry.service';
0004 | import { TelemetryAnalyzerService } from './telemetry-analyzer.service';
0005 | 
0006 | @ApiTags('telemetry')
0007 | @Controller('telemetry')
0008 | export class TelemetryController {
0009 |   constructor(
0010 |     private readonly telemetryService: TelemetryService,
0011 |     private readonly analyzerService: TelemetryAnalyzerService,
0012 |   ) {}
0013 | 
0014 |   @Post()
0015 |   @ApiOperation({ summary: 'Ingest driver telemetry 📡' })
0016 |   async ingest(@Body() data: DriverTelemetryDto) {
0017 |     return this.telemetryService.ingest(data);
0018 |   }
0019 | 
0020 |   @Post('sync')
0021 |   @ApiOperation({ summary: 'Sync data from external server 📡' })
0022 |   async sync() {
0023 |     return this.analyzerService.syncExternalData();
0024 |   }
0025 | 
0026 |   @Post('analyze')
0027 |   @ApiOperation({ summary: 'Trigger road and speed analysis 🧠' })
0028 |   async analyze(@Query('hours') hours?: number) {
0029 |     const roadResults = await this.analyzerService.analyzeRoadSpeeds(hours || 24);
0030 |     const discoveryResults = await this.analyzerService.discoverNewRoads(hours || 168);
0031 |     return {
0032 |       success: true,
0033 |       roadAnalysis: roadResults,
0034 |       roadDiscovery: discoveryResults,
0035 |     };
0036 |   }
0037 | 
0038 |   @Post('process-intelligence')
0039 |   @ApiOperation({ summary: 'Automated One-Click Sync & Analyze 🚀' })
0040 |   async processIntelligence(
0041 |     @Query('hours') hours?: string,
0042 |     @Query('days') days?: string,
0043 |   ) {
0044 |     const parsedDays = days ? parseInt(days, 10) : 1;
0045 |     const parsedHours = hours ? parseInt(hours, 10) : (parsedDays * 24);
0046 | 
0047 |     // Trigger the process in the background (دون انتظار لزيادة الأداء وتجنب انتهاء الوقت)
0048 |     this.analyzerService.runDeepIntelligence(parsedHours);
0049 | 
0050 |     return {
0051 |       success: true,
0052 |       message: `Intelligence sync and analysis started for the last ${parsedDays} days. You will receive a summary on Telegram once complete! 🚀`,
0053 |       timestamp: new Date(),
0054 |       window: { days: parsedDays, hours: parsedHours },
0055 |     };
0056 |   }
0057 | 
0058 |   @Get('summary')
0059 |   @ApiOperation({ summary: 'Get analysis summary 📊' })
0060 |   async getSummary() {
0061 |     return this.analyzerService.getAnalysisSummary();
0062 |   }
0063 | 
0064 |   @Get('nearby')
0065 |   @ApiOperation({ summary: 'Find nearby drivers 📍' })
0066 |   async getNearby(
0067 |     @Query('lat') lat: number,
0068 |     @Query('lng') lng: number,
0069 |     @Query('radius') radius: number,
0070 |   ) {
0071 |     return this.telemetryService.getRecentDrivers(Number(lat), Number(lng), Number(radius));
0072 |   }
0073 | }


