chromedeveloperprotocol-client 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdp/__init__.py +4 -0
- cdp/domains.py +582 -0
- cdp/generator/__init__.py +3 -0
- cdp/generator/client_generator.py +246 -0
- cdp/generator/constant.py +4 -0
- cdp/generator/domain_generator.py +149 -0
- cdp/generator/event_generator.py +202 -0
- cdp/generator/method_generator.py +215 -0
- cdp/generator/service.py +153 -0
- cdp/generator/type_generator.py +231 -0
- cdp/protocol/__init__.py +0 -0
- cdp/protocol/accessibility/__init__.py +0 -0
- cdp/protocol/accessibility/events/__init__.py +0 -0
- cdp/protocol/accessibility/events/service.py +37 -0
- cdp/protocol/accessibility/events/types.py +14 -0
- cdp/protocol/accessibility/methods/__init__.py +0 -0
- cdp/protocol/accessibility/methods/service.py +109 -0
- cdp/protocol/accessibility/methods/types.py +70 -0
- cdp/protocol/accessibility/service.py +21 -0
- cdp/protocol/accessibility/types.py +89 -0
- cdp/protocol/animation/__init__.py +0 -0
- cdp/protocol/animation/events/__init__.py +0 -0
- cdp/protocol/animation/events/service.py +53 -0
- cdp/protocol/animation/events/types.py +20 -0
- cdp/protocol/animation/methods/__init__.py +0 -0
- cdp/protocol/animation/methods/service.py +131 -0
- cdp/protocol/animation/methods/types.py +52 -0
- cdp/protocol/animation/service.py +21 -0
- cdp/protocol/animation/types.py +79 -0
- cdp/protocol/audits/__init__.py +0 -0
- cdp/protocol/audits/events/__init__.py +0 -0
- cdp/protocol/audits/events/service.py +29 -0
- cdp/protocol/audits/events/types.py +10 -0
- cdp/protocol/audits/methods/__init__.py +0 -0
- cdp/protocol/audits/methods/service.py +76 -0
- cdp/protocol/audits/methods/types.py +36 -0
- cdp/protocol/audits/service.py +21 -0
- cdp/protocol/audits/types.py +293 -0
- cdp/protocol/autofill/__init__.py +0 -0
- cdp/protocol/autofill/events/__init__.py +0 -0
- cdp/protocol/autofill/events/service.py +29 -0
- cdp/protocol/autofill/events/types.py +14 -0
- cdp/protocol/autofill/methods/__init__.py +0 -0
- cdp/protocol/autofill/methods/service.py +65 -0
- cdp/protocol/autofill/methods/types.py +22 -0
- cdp/protocol/autofill/service.py +21 -0
- cdp/protocol/autofill/types.py +54 -0
- cdp/protocol/background_service/__init__.py +0 -0
- cdp/protocol/background_service/events/__init__.py +0 -0
- cdp/protocol/background_service/events/service.py +37 -0
- cdp/protocol/background_service/events/types.py +14 -0
- cdp/protocol/background_service/methods/__init__.py +0 -0
- cdp/protocol/background_service/methods/service.py +65 -0
- cdp/protocol/background_service/methods/types.py +17 -0
- cdp/protocol/background_service/service.py +21 -0
- cdp/protocol/background_service/types.py +32 -0
- cdp/protocol/bluetooth_emulation/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/events/service.py +45 -0
- cdp/protocol/bluetooth_emulation/events/types.py +23 -0
- cdp/protocol/bluetooth_emulation/methods/__init__.py +0 -0
- cdp/protocol/bluetooth_emulation/methods/service.py +186 -0
- cdp/protocol/bluetooth_emulation/methods/types.py +81 -0
- cdp/protocol/bluetooth_emulation/service.py +21 -0
- cdp/protocol/bluetooth_emulation/types.py +45 -0
- cdp/protocol/browser/__init__.py +0 -0
- cdp/protocol/browser/events/__init__.py +0 -0
- cdp/protocol/browser/events/service.py +37 -0
- cdp/protocol/browser/events/types.py +28 -0
- cdp/protocol/browser/methods/__init__.py +0 -0
- cdp/protocol/browser/methods/service.py +230 -0
- cdp/protocol/browser/methods/types.py +126 -0
- cdp/protocol/browser/service.py +21 -0
- cdp/protocol/browser/types.py +57 -0
- cdp/protocol/cache_storage/__init__.py +0 -0
- cdp/protocol/cache_storage/events/__init__.py +0 -0
- cdp/protocol/cache_storage/events/service.py +20 -0
- cdp/protocol/cache_storage/events/types.py +3 -0
- cdp/protocol/cache_storage/methods/__init__.py +0 -0
- cdp/protocol/cache_storage/methods/service.py +76 -0
- cdp/protocol/cache_storage/methods/types.py +57 -0
- cdp/protocol/cache_storage/service.py +21 -0
- cdp/protocol/cache_storage/types.py +49 -0
- cdp/protocol/cast/__init__.py +0 -0
- cdp/protocol/cast/events/__init__.py +0 -0
- cdp/protocol/cast/events/service.py +37 -0
- cdp/protocol/cast/events/types.py +12 -0
- cdp/protocol/cast/methods/__init__.py +0 -0
- cdp/protocol/cast/methods/service.py +87 -0
- cdp/protocol/cast/methods/types.py +15 -0
- cdp/protocol/cast/service.py +21 -0
- cdp/protocol/cast/types.py +9 -0
- cdp/protocol/css/__init__.py +0 -0
- cdp/protocol/css/events/__init__.py +0 -0
- cdp/protocol/css/events/service.py +69 -0
- cdp/protocol/css/events/types.py +27 -0
- cdp/protocol/css/methods/__init__.py +0 -0
- cdp/protocol/css/methods/service.py +428 -0
- cdp/protocol/css/methods/types.py +278 -0
- cdp/protocol/css/service.py +21 -0
- cdp/protocol/css/types.py +451 -0
- cdp/protocol/debugger/__init__.py +0 -0
- cdp/protocol/debugger/events/__init__.py +0 -0
- cdp/protocol/debugger/events/service.py +53 -0
- cdp/protocol/debugger/events/types.py +112 -0
- cdp/protocol/debugger/methods/__init__.py +0 -0
- cdp/protocol/debugger/methods/service.py +362 -0
- cdp/protocol/debugger/methods/types.py +250 -0
- cdp/protocol/debugger/service.py +21 -0
- cdp/protocol/debugger/types.py +91 -0
- cdp/protocol/device_access/__init__.py +0 -0
- cdp/protocol/device_access/events/__init__.py +0 -0
- cdp/protocol/device_access/events/service.py +29 -0
- cdp/protocol/device_access/events/types.py +12 -0
- cdp/protocol/device_access/methods/__init__.py +0 -0
- cdp/protocol/device_access/methods/service.py +65 -0
- cdp/protocol/device_access/methods/types.py +16 -0
- cdp/protocol/device_access/service.py +21 -0
- cdp/protocol/device_access/types.py +13 -0
- cdp/protocol/device_orientation/__init__.py +0 -0
- cdp/protocol/device_orientation/events/__init__.py +0 -0
- cdp/protocol/device_orientation/events/service.py +20 -0
- cdp/protocol/device_orientation/events/types.py +3 -0
- cdp/protocol/device_orientation/methods/__init__.py +0 -0
- cdp/protocol/device_orientation/methods/service.py +43 -0
- cdp/protocol/device_orientation/methods/types.py +12 -0
- cdp/protocol/device_orientation/service.py +21 -0
- cdp/protocol/device_orientation/types.py +3 -0
- cdp/protocol/dom/__init__.py +0 -0
- cdp/protocol/dom/events/__init__.py +0 -0
- cdp/protocol/dom/events/service.py +165 -0
- cdp/protocol/dom/events/types.py +97 -0
- cdp/protocol/dom/methods/__init__.py +0 -0
- cdp/protocol/dom/methods/service.py +593 -0
- cdp/protocol/dom/methods/types.py +384 -0
- cdp/protocol/dom/service.py +21 -0
- cdp/protocol/dom/types.py +151 -0
- cdp/protocol/dom_debugger/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/__init__.py +0 -0
- cdp/protocol/dom_debugger/events/service.py +20 -0
- cdp/protocol/dom_debugger/events/types.py +3 -0
- cdp/protocol/dom_debugger/methods/__init__.py +0 -0
- cdp/protocol/dom_debugger/methods/service.py +109 -0
- cdp/protocol/dom_debugger/methods/types.py +51 -0
- cdp/protocol/dom_debugger/service.py +21 -0
- cdp/protocol/dom_debugger/types.py +36 -0
- cdp/protocol/dom_snapshot/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/__init__.py +0 -0
- cdp/protocol/dom_snapshot/events/service.py +20 -0
- cdp/protocol/dom_snapshot/events/types.py +3 -0
- cdp/protocol/dom_snapshot/methods/__init__.py +0 -0
- cdp/protocol/dom_snapshot/methods/service.py +54 -0
- cdp/protocol/dom_snapshot/methods/types.py +28 -0
- cdp/protocol/dom_snapshot/service.py +21 -0
- cdp/protocol/dom_snapshot/types.py +220 -0
- cdp/protocol/dom_storage/__init__.py +0 -0
- cdp/protocol/dom_storage/events/__init__.py +0 -0
- cdp/protocol/dom_storage/events/service.py +53 -0
- cdp/protocol/dom_storage/events/types.py +22 -0
- cdp/protocol/dom_storage/methods/__init__.py +0 -0
- cdp/protocol/dom_storage/methods/service.py +87 -0
- cdp/protocol/dom_storage/methods/types.py +27 -0
- cdp/protocol/dom_storage/service.py +21 -0
- cdp/protocol/dom_storage/types.py +15 -0
- cdp/protocol/emulation/__init__.py +0 -0
- cdp/protocol/emulation/events/__init__.py +0 -0
- cdp/protocol/emulation/events/service.py +29 -0
- cdp/protocol/emulation/events/types.py +6 -0
- cdp/protocol/emulation/methods/__init__.py +0 -0
- cdp/protocol/emulation/methods/service.py +494 -0
- cdp/protocol/emulation/methods/types.py +261 -0
- cdp/protocol/emulation/service.py +21 -0
- cdp/protocol/emulation/types.py +132 -0
- cdp/protocol/event_breakpoints/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/__init__.py +0 -0
- cdp/protocol/event_breakpoints/events/service.py +20 -0
- cdp/protocol/event_breakpoints/events/types.py +3 -0
- cdp/protocol/event_breakpoints/methods/__init__.py +0 -0
- cdp/protocol/event_breakpoints/methods/service.py +54 -0
- cdp/protocol/event_breakpoints/methods/types.py +10 -0
- cdp/protocol/event_breakpoints/service.py +21 -0
- cdp/protocol/event_breakpoints/types.py +3 -0
- cdp/protocol/extensions/__init__.py +0 -0
- cdp/protocol/extensions/events/__init__.py +0 -0
- cdp/protocol/extensions/events/service.py +20 -0
- cdp/protocol/extensions/events/types.py +3 -0
- cdp/protocol/extensions/methods/__init__.py +0 -0
- cdp/protocol/extensions/methods/service.py +87 -0
- cdp/protocol/extensions/methods/types.py +46 -0
- cdp/protocol/extensions/service.py +21 -0
- cdp/protocol/extensions/types.py +6 -0
- cdp/protocol/fed_cm/__init__.py +0 -0
- cdp/protocol/fed_cm/events/__init__.py +0 -0
- cdp/protocol/fed_cm/events/service.py +37 -0
- cdp/protocol/fed_cm/events/types.py +18 -0
- cdp/protocol/fed_cm/methods/__init__.py +0 -0
- cdp/protocol/fed_cm/methods/service.py +98 -0
- cdp/protocol/fed_cm/methods/types.py +26 -0
- cdp/protocol/fed_cm/service.py +21 -0
- cdp/protocol/fed_cm/types.py +25 -0
- cdp/protocol/fetch/__init__.py +0 -0
- cdp/protocol/fetch/events/__init__.py +0 -0
- cdp/protocol/fetch/events/service.py +37 -0
- cdp/protocol/fetch/events/types.py +47 -0
- cdp/protocol/fetch/methods/__init__.py +0 -0
- cdp/protocol/fetch/methods/service.py +120 -0
- cdp/protocol/fetch/methods/types.py +85 -0
- cdp/protocol/fetch/service.py +21 -0
- cdp/protocol/fetch/types.py +41 -0
- cdp/protocol/file_system/__init__.py +0 -0
- cdp/protocol/file_system/events/__init__.py +0 -0
- cdp/protocol/file_system/events/service.py +20 -0
- cdp/protocol/file_system/events/types.py +3 -0
- cdp/protocol/file_system/methods/__init__.py +0 -0
- cdp/protocol/file_system/methods/service.py +32 -0
- cdp/protocol/file_system/methods/types.py +14 -0
- cdp/protocol/file_system/service.py +21 -0
- cdp/protocol/file_system/types.py +28 -0
- cdp/protocol/headless_experimental/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/__init__.py +0 -0
- cdp/protocol/headless_experimental/events/service.py +20 -0
- cdp/protocol/headless_experimental/events/types.py +3 -0
- cdp/protocol/headless_experimental/methods/__init__.py +0 -0
- cdp/protocol/headless_experimental/methods/service.py +32 -0
- cdp/protocol/headless_experimental/methods/types.py +22 -0
- cdp/protocol/headless_experimental/service.py +21 -0
- cdp/protocol/headless_experimental/types.py +12 -0
- cdp/protocol/heap_profiler/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/__init__.py +0 -0
- cdp/protocol/heap_profiler/events/service.py +61 -0
- cdp/protocol/heap_profiler/events/types.py +18 -0
- cdp/protocol/heap_profiler/methods/__init__.py +0 -0
- cdp/protocol/heap_profiler/methods/service.py +153 -0
- cdp/protocol/heap_profiler/methods/types.py +73 -0
- cdp/protocol/heap_profiler/service.py +21 -0
- cdp/protocol/heap_profiler/types.py +32 -0
- cdp/protocol/indexed_db/__init__.py +0 -0
- cdp/protocol/indexed_db/events/__init__.py +0 -0
- cdp/protocol/indexed_db/events/service.py +20 -0
- cdp/protocol/indexed_db/events/types.py +3 -0
- cdp/protocol/indexed_db/methods/__init__.py +0 -0
- cdp/protocol/indexed_db/methods/service.py +120 -0
- cdp/protocol/indexed_db/methods/types.py +111 -0
- cdp/protocol/indexed_db/service.py +21 -0
- cdp/protocol/indexed_db/types.py +74 -0
- cdp/protocol/input/__init__.py +0 -0
- cdp/protocol/input/events/__init__.py +0 -0
- cdp/protocol/input/events/service.py +29 -0
- cdp/protocol/input/events/types.py +10 -0
- cdp/protocol/input/methods/__init__.py +0 -0
- cdp/protocol/input/methods/service.py +164 -0
- cdp/protocol/input/methods/types.py +181 -0
- cdp/protocol/input/service.py +21 -0
- cdp/protocol/input/types.py +46 -0
- cdp/protocol/inspector/__init__.py +0 -0
- cdp/protocol/inspector/events/__init__.py +0 -0
- cdp/protocol/inspector/events/service.py +53 -0
- cdp/protocol/inspector/events/types.py +13 -0
- cdp/protocol/inspector/methods/__init__.py +0 -0
- cdp/protocol/inspector/methods/service.py +43 -0
- cdp/protocol/inspector/methods/types.py +3 -0
- cdp/protocol/inspector/service.py +21 -0
- cdp/protocol/inspector/types.py +3 -0
- cdp/protocol/io/__init__.py +0 -0
- cdp/protocol/io/events/__init__.py +0 -0
- cdp/protocol/io/events/service.py +20 -0
- cdp/protocol/io/events/types.py +3 -0
- cdp/protocol/io/methods/__init__.py +0 -0
- cdp/protocol/io/methods/service.py +54 -0
- cdp/protocol/io/methods/types.py +33 -0
- cdp/protocol/io/service.py +21 -0
- cdp/protocol/io/types.py +6 -0
- cdp/protocol/layer_tree/__init__.py +0 -0
- cdp/protocol/layer_tree/events/__init__.py +0 -0
- cdp/protocol/layer_tree/events/service.py +37 -0
- cdp/protocol/layer_tree/events/types.py +18 -0
- cdp/protocol/layer_tree/methods/__init__.py +0 -0
- cdp/protocol/layer_tree/methods/service.py +120 -0
- cdp/protocol/layer_tree/methods/types.py +70 -0
- cdp/protocol/layer_tree/service.py +21 -0
- cdp/protocol/layer_tree/types.py +73 -0
- cdp/protocol/log/__init__.py +0 -0
- cdp/protocol/log/events/__init__.py +0 -0
- cdp/protocol/log/events/service.py +29 -0
- cdp/protocol/log/events/types.py +11 -0
- cdp/protocol/log/methods/__init__.py +0 -0
- cdp/protocol/log/methods/service.py +76 -0
- cdp/protocol/log/methods/types.py +14 -0
- cdp/protocol/log/service.py +21 -0
- cdp/protocol/log/types.py +40 -0
- cdp/protocol/media/__init__.py +0 -0
- cdp/protocol/media/events/__init__.py +0 -0
- cdp/protocol/media/events/service.py +61 -0
- cdp/protocol/media/events/types.py +27 -0
- cdp/protocol/media/methods/__init__.py +0 -0
- cdp/protocol/media/methods/service.py +43 -0
- cdp/protocol/media/methods/types.py +3 -0
- cdp/protocol/media/service.py +21 -0
- cdp/protocol/media/types.py +42 -0
- cdp/protocol/memory/__init__.py +0 -0
- cdp/protocol/memory/events/__init__.py +0 -0
- cdp/protocol/memory/events/service.py +20 -0
- cdp/protocol/memory/events/types.py +3 -0
- cdp/protocol/memory/methods/__init__.py +0 -0
- cdp/protocol/memory/methods/service.py +142 -0
- cdp/protocol/memory/methods/types.py +48 -0
- cdp/protocol/memory/service.py +21 -0
- cdp/protocol/memory/types.py +34 -0
- cdp/protocol/network/__init__.py +0 -0
- cdp/protocol/network/events/__init__.py +0 -0
- cdp/protocol/network/events/service.py +365 -0
- cdp/protocol/network/events/types.py +360 -0
- cdp/protocol/network/methods/__init__.py +0 -0
- cdp/protocol/network/methods/service.py +384 -0
- cdp/protocol/network/methods/types.py +252 -0
- cdp/protocol/network/service.py +21 -0
- cdp/protocol/network/types.py +691 -0
- cdp/protocol/overlay/__init__.py +0 -0
- cdp/protocol/overlay/events/__init__.py +0 -0
- cdp/protocol/overlay/events/service.py +53 -0
- cdp/protocol/overlay/events/types.py +20 -0
- cdp/protocol/overlay/methods/__init__.py +0 -0
- cdp/protocol/overlay/methods/service.py +307 -0
- cdp/protocol/overlay/methods/types.py +144 -0
- cdp/protocol/overlay/service.py +21 -0
- cdp/protocol/overlay/types.py +198 -0
- cdp/protocol/page/__init__.py +0 -0
- cdp/protocol/page/events/__init__.py +0 -0
- cdp/protocol/page/events/service.py +213 -0
- cdp/protocol/page/events/types.py +147 -0
- cdp/protocol/page/methods/__init__.py +0 -0
- cdp/protocol/page/methods/service.py +560 -0
- cdp/protocol/page/methods/types.py +346 -0
- cdp/protocol/page/service.py +21 -0
- cdp/protocol/page/types.py +379 -0
- cdp/protocol/performance/__init__.py +0 -0
- cdp/protocol/performance/events/__init__.py +0 -0
- cdp/protocol/performance/events/service.py +29 -0
- cdp/protocol/performance/events/types.py +13 -0
- cdp/protocol/performance/methods/__init__.py +0 -0
- cdp/protocol/performance/methods/service.py +54 -0
- cdp/protocol/performance/methods/types.py +18 -0
- cdp/protocol/performance/service.py +21 -0
- cdp/protocol/performance/types.py +10 -0
- cdp/protocol/performance_timeline/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/__init__.py +0 -0
- cdp/protocol/performance_timeline/events/service.py +29 -0
- cdp/protocol/performance_timeline/events/types.py +10 -0
- cdp/protocol/performance_timeline/methods/__init__.py +0 -0
- cdp/protocol/performance_timeline/methods/service.py +32 -0
- cdp/protocol/performance_timeline/methods/types.py +7 -0
- cdp/protocol/performance_timeline/service.py +21 -0
- cdp/protocol/performance_timeline/types.py +46 -0
- cdp/protocol/preload/__init__.py +0 -0
- cdp/protocol/preload/events/__init__.py +0 -0
- cdp/protocol/preload/events/service.py +69 -0
- cdp/protocol/preload/events/types.py +49 -0
- cdp/protocol/preload/methods/__init__.py +0 -0
- cdp/protocol/preload/methods/service.py +43 -0
- cdp/protocol/preload/methods/types.py +3 -0
- cdp/protocol/preload/service.py +21 -0
- cdp/protocol/preload/types.py +56 -0
- cdp/protocol/profiler/__init__.py +0 -0
- cdp/protocol/profiler/events/__init__.py +0 -0
- cdp/protocol/profiler/events/service.py +45 -0
- cdp/protocol/profiler/events/types.py +30 -0
- cdp/protocol/profiler/methods/__init__.py +0 -0
- cdp/protocol/profiler/methods/service.py +120 -0
- cdp/protocol/profiler/methods/types.py +45 -0
- cdp/protocol/profiler/service.py +21 -0
- cdp/protocol/profiler/types.py +65 -0
- cdp/protocol/pwa/__init__.py +0 -0
- cdp/protocol/pwa/events/__init__.py +0 -0
- cdp/protocol/pwa/events/service.py +20 -0
- cdp/protocol/pwa/events/types.py +3 -0
- cdp/protocol/pwa/methods/__init__.py +0 -0
- cdp/protocol/pwa/methods/service.py +98 -0
- cdp/protocol/pwa/methods/types.py +43 -0
- cdp/protocol/pwa/service.py +21 -0
- cdp/protocol/pwa/types.py +15 -0
- cdp/protocol/py.typed +0 -0
- cdp/protocol/runtime/__init__.py +0 -0
- cdp/protocol/runtime/events/__init__.py +0 -0
- cdp/protocol/runtime/events/service.py +85 -0
- cdp/protocol/runtime/events/types.py +55 -0
- cdp/protocol/runtime/methods/__init__.py +0 -0
- cdp/protocol/runtime/methods/service.py +274 -0
- cdp/protocol/runtime/methods/types.py +226 -0
- cdp/protocol/runtime/service.py +21 -0
- cdp/protocol/runtime/types.py +194 -0
- cdp/protocol/security/__init__.py +0 -0
- cdp/protocol/security/events/__init__.py +0 -0
- cdp/protocol/security/events/service.py +29 -0
- cdp/protocol/security/events/types.py +11 -0
- cdp/protocol/security/methods/__init__.py +0 -0
- cdp/protocol/security/methods/service.py +54 -0
- cdp/protocol/security/methods/types.py +9 -0
- cdp/protocol/security/service.py +21 -0
- cdp/protocol/security/types.py +102 -0
- cdp/protocol/service_worker/__init__.py +0 -0
- cdp/protocol/service_worker/events/__init__.py +0 -0
- cdp/protocol/service_worker/events/service.py +45 -0
- cdp/protocol/service_worker/events/types.py +16 -0
- cdp/protocol/service_worker/methods/__init__.py +0 -0
- cdp/protocol/service_worker/methods/service.py +153 -0
- cdp/protocol/service_worker/methods/types.py +36 -0
- cdp/protocol/service_worker/service.py +21 -0
- cdp/protocol/service_worker/types.py +38 -0
- cdp/protocol/storage/__init__.py +0 -0
- cdp/protocol/storage/events/__init__.py +0 -0
- cdp/protocol/storage/events/service.py +141 -0
- cdp/protocol/storage/events/types.py +139 -0
- cdp/protocol/storage/methods/__init__.py +0 -0
- cdp/protocol/storage/methods/service.py +428 -0
- cdp/protocol/storage/methods/types.py +184 -0
- cdp/protocol/storage/service.py +21 -0
- cdp/protocol/storage/types.py +236 -0
- cdp/protocol/system_info/__init__.py +0 -0
- cdp/protocol/system_info/events/__init__.py +0 -0
- cdp/protocol/system_info/events/service.py +20 -0
- cdp/protocol/system_info/events/types.py +3 -0
- cdp/protocol/system_info/methods/__init__.py +0 -0
- cdp/protocol/system_info/methods/service.py +54 -0
- cdp/protocol/system_info/methods/types.py +27 -0
- cdp/protocol/system_info/service.py +21 -0
- cdp/protocol/system_info/types.py +71 -0
- cdp/protocol/target/__init__.py +0 -0
- cdp/protocol/target/events/__init__.py +0 -0
- cdp/protocol/target/events/service.py +77 -0
- cdp/protocol/target/events/types.py +38 -0
- cdp/protocol/target/methods/__init__.py +0 -0
- cdp/protocol/target/methods/service.py +219 -0
- cdp/protocol/target/methods/types.py +148 -0
- cdp/protocol/target/service.py +21 -0
- cdp/protocol/target/types.py +44 -0
- cdp/protocol/tethering/__init__.py +0 -0
- cdp/protocol/tethering/events/__init__.py +0 -0
- cdp/protocol/tethering/events/service.py +29 -0
- cdp/protocol/tethering/events/types.py +9 -0
- cdp/protocol/tethering/methods/__init__.py +0 -0
- cdp/protocol/tethering/methods/service.py +43 -0
- cdp/protocol/tethering/methods/types.py +10 -0
- cdp/protocol/tethering/service.py +21 -0
- cdp/protocol/tethering/types.py +3 -0
- cdp/protocol/tracing/__init__.py +0 -0
- cdp/protocol/tracing/events/__init__.py +0 -0
- cdp/protocol/tracing/events/service.py +45 -0
- cdp/protocol/tracing/events/types.py +28 -0
- cdp/protocol/tracing/methods/__init__.py +0 -0
- cdp/protocol/tracing/methods/service.py +87 -0
- cdp/protocol/tracing/methods/types.py +54 -0
- cdp/protocol/tracing/service.py +21 -0
- cdp/protocol/tracing/types.py +34 -0
- cdp/protocol/web_audio/__init__.py +0 -0
- cdp/protocol/web_audio/events/__init__.py +0 -0
- cdp/protocol/web_audio/events/service.py +125 -0
- cdp/protocol/web_audio/events/types.py +56 -0
- cdp/protocol/web_audio/methods/__init__.py +0 -0
- cdp/protocol/web_audio/methods/service.py +54 -0
- cdp/protocol/web_audio/methods/types.py +17 -0
- cdp/protocol/web_audio/service.py +21 -0
- cdp/protocol/web_audio/types.py +66 -0
- cdp/protocol/web_authn/__init__.py +0 -0
- cdp/protocol/web_authn/events/__init__.py +0 -0
- cdp/protocol/web_authn/events/service.py +53 -0
- cdp/protocol/web_authn/events/types.py +21 -0
- cdp/protocol/web_authn/methods/__init__.py +0 -0
- cdp/protocol/web_authn/methods/service.py +164 -0
- cdp/protocol/web_authn/methods/types.py +61 -0
- cdp/protocol/web_authn/service.py +21 -0
- cdp/protocol/web_authn/types.py +54 -0
- cdp/py.typed +0 -0
- cdp/service.py +184 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/METADATA +15 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/RECORD +476 -0
- chromedeveloperprotocol_client-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP PerformanceTimeline Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import PerformanceTimelineMethods
|
|
4
|
+
from .events.service import PerformanceTimelineEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class PerformanceTimeline(PerformanceTimelineMethods, PerformanceTimelineEvents):
|
|
10
|
+
"""
|
|
11
|
+
Reporting of performance timeline events, as specified in https://w3c.github.io/performance-timeline/#dom-performanceobserver.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the PerformanceTimeline domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
PerformanceTimelineMethods.__init__(self, client)
|
|
21
|
+
PerformanceTimelineEvents.__init__(self, client)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""CDP PerformanceTimeline Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.dom.types import BackendNodeId
|
|
8
|
+
from cdp.protocol.dom.types import Rect
|
|
9
|
+
from cdp.protocol.network.types import TimeSinceEpoch
|
|
10
|
+
from cdp.protocol.page.types import FrameId
|
|
11
|
+
|
|
12
|
+
class LargestContentfulPaint(TypedDict, total=True):
|
|
13
|
+
"""See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl"""
|
|
14
|
+
renderTime: 'TimeSinceEpoch'
|
|
15
|
+
loadTime: 'TimeSinceEpoch'
|
|
16
|
+
size: 'float'
|
|
17
|
+
"""The number of pixels being painted."""
|
|
18
|
+
elementId: NotRequired['str']
|
|
19
|
+
"""The id attribute of the element, if available."""
|
|
20
|
+
url: NotRequired['str']
|
|
21
|
+
"""The URL of the image (may be trimmed)."""
|
|
22
|
+
nodeId: NotRequired['BackendNodeId']
|
|
23
|
+
class LayoutShiftAttribution(TypedDict, total=True):
|
|
24
|
+
previousRect: 'Rect'
|
|
25
|
+
currentRect: 'Rect'
|
|
26
|
+
nodeId: NotRequired['BackendNodeId']
|
|
27
|
+
class LayoutShift(TypedDict, total=True):
|
|
28
|
+
"""See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl"""
|
|
29
|
+
value: 'float'
|
|
30
|
+
"""Score increment produced by this event."""
|
|
31
|
+
hadRecentInput: 'bool'
|
|
32
|
+
lastInputTime: 'TimeSinceEpoch'
|
|
33
|
+
sources: 'List[LayoutShiftAttribution]'
|
|
34
|
+
class TimelineEvent(TypedDict, total=True):
|
|
35
|
+
frameId: 'FrameId'
|
|
36
|
+
"""Identifies the frame that this event is related to. Empty for non-frame targets."""
|
|
37
|
+
type: 'str'
|
|
38
|
+
"""The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional details fields is present."""
|
|
39
|
+
name: 'str'
|
|
40
|
+
"""Name may be empty depending on the type."""
|
|
41
|
+
time: 'TimeSinceEpoch'
|
|
42
|
+
"""Time in seconds since Epoch, monotonically increasing within document lifetime."""
|
|
43
|
+
duration: NotRequired['float']
|
|
44
|
+
"""Event duration, if applicable."""
|
|
45
|
+
lcpDetails: NotRequired['LargestContentfulPaint']
|
|
46
|
+
layoutShiftDetails: NotRequired['LayoutShift']
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""CDP Preload Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class PreloadEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Preload domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Preload events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_rule_set_updated(self, callback: Callable[[ruleSetUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
Upsert. Currently, it is only emitted when a rule set added.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: ruleSetUpdatedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Preload.ruleSetUpdated', callback)
|
|
30
|
+
def on_rule_set_removed(self, callback: Callable[[ruleSetRemovedEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
No description available for ruleSetRemoved.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: ruleSetRemovedEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('Preload.ruleSetRemoved', callback)
|
|
38
|
+
def on_preload_enabled_state_updated(self, callback: Callable[[preloadEnabledStateUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Fired when a preload enabled state is updated.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: preloadEnabledStateUpdatedEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('Preload.preloadEnabledStateUpdated', callback)
|
|
46
|
+
def on_prefetch_status_updated(self, callback: Callable[[prefetchStatusUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
47
|
+
"""
|
|
48
|
+
Fired when a prefetch attempt is updated.
|
|
49
|
+
Args:
|
|
50
|
+
callback (callable, optional): Function called when the event is fired.
|
|
51
|
+
The callback receives (params: prefetchStatusUpdatedEvent, session_id: Optional[str]).
|
|
52
|
+
"""
|
|
53
|
+
self.client.on('Preload.prefetchStatusUpdated', callback)
|
|
54
|
+
def on_prerender_status_updated(self, callback: Callable[[prerenderStatusUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Fired when a prerender attempt is updated.
|
|
57
|
+
Args:
|
|
58
|
+
callback (callable, optional): Function called when the event is fired.
|
|
59
|
+
The callback receives (params: prerenderStatusUpdatedEvent, session_id: Optional[str]).
|
|
60
|
+
"""
|
|
61
|
+
self.client.on('Preload.prerenderStatusUpdated', callback)
|
|
62
|
+
def on_preloading_attempt_sources_updated(self, callback: Callable[[preloadingAttemptSourcesUpdatedEvent,Optional[str]], None]=None) -> None:
|
|
63
|
+
"""
|
|
64
|
+
Send a list of sources for all preloading attempts in a document.
|
|
65
|
+
Args:
|
|
66
|
+
callback (callable, optional): Function called when the event is fired.
|
|
67
|
+
The callback receives (params: preloadingAttemptSourcesUpdatedEvent, session_id: Optional[str]).
|
|
68
|
+
"""
|
|
69
|
+
self.client.on('Preload.preloadingAttemptSourcesUpdated', callback)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""CDP Preload Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.network.types import LoaderId
|
|
8
|
+
from cdp.protocol.network.types import RequestId
|
|
9
|
+
from cdp.protocol.page.types import FrameId
|
|
10
|
+
from cdp.protocol.preload.types import PrefetchStatus
|
|
11
|
+
from cdp.protocol.preload.types import PreloadPipelineId
|
|
12
|
+
from cdp.protocol.preload.types import PreloadingAttemptKey
|
|
13
|
+
from cdp.protocol.preload.types import PreloadingAttemptSource
|
|
14
|
+
from cdp.protocol.preload.types import PreloadingStatus
|
|
15
|
+
from cdp.protocol.preload.types import PrerenderFinalStatus
|
|
16
|
+
from cdp.protocol.preload.types import PrerenderMismatchedHeaders
|
|
17
|
+
from cdp.protocol.preload.types import RuleSet
|
|
18
|
+
from cdp.protocol.preload.types import RuleSetId
|
|
19
|
+
|
|
20
|
+
class ruleSetUpdatedEvent(TypedDict, total=True):
|
|
21
|
+
ruleSet: 'RuleSet'
|
|
22
|
+
class ruleSetRemovedEvent(TypedDict, total=True):
|
|
23
|
+
id: 'RuleSetId'
|
|
24
|
+
class preloadEnabledStateUpdatedEvent(TypedDict, total=True):
|
|
25
|
+
disabledByPreference: 'bool'
|
|
26
|
+
disabledByDataSaver: 'bool'
|
|
27
|
+
disabledByBatterySaver: 'bool'
|
|
28
|
+
disabledByHoldbackPrefetchSpeculationRules: 'bool'
|
|
29
|
+
disabledByHoldbackPrerenderSpeculationRules: 'bool'
|
|
30
|
+
class prefetchStatusUpdatedEvent(TypedDict, total=True):
|
|
31
|
+
key: 'PreloadingAttemptKey'
|
|
32
|
+
pipelineId: 'PreloadPipelineId'
|
|
33
|
+
initiatingFrameId: 'FrameId'
|
|
34
|
+
"""The frame id of the frame initiating prefetch."""
|
|
35
|
+
prefetchUrl: 'str'
|
|
36
|
+
status: 'PreloadingStatus'
|
|
37
|
+
prefetchStatus: 'PrefetchStatus'
|
|
38
|
+
requestId: 'RequestId'
|
|
39
|
+
class prerenderStatusUpdatedEvent(TypedDict, total=True):
|
|
40
|
+
key: 'PreloadingAttemptKey'
|
|
41
|
+
pipelineId: 'PreloadPipelineId'
|
|
42
|
+
status: 'PreloadingStatus'
|
|
43
|
+
prerenderStatus: NotRequired['PrerenderFinalStatus']
|
|
44
|
+
disallowedMojoInterface: NotRequired['str']
|
|
45
|
+
"""This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt."""
|
|
46
|
+
mismatchedHeaders: NotRequired['List[PrerenderMismatchedHeaders]']
|
|
47
|
+
class preloadingAttemptSourcesUpdatedEvent(TypedDict, total=True):
|
|
48
|
+
loaderId: 'LoaderId'
|
|
49
|
+
preloadingAttemptSources: 'List[PreloadingAttemptSource]'
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""CDP Preload Domain Methods"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class PreloadMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Preload domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Preload methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def enable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
No description available for enable.
|
|
25
|
+
Args:
|
|
26
|
+
params (None, optional): Parameters for the enable method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the enable call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Preload.enable", params=params,session_id=session_id)
|
|
33
|
+
async def disable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
No description available for disable.
|
|
36
|
+
Args:
|
|
37
|
+
params (None, optional): Parameters for the disable method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the disable call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Preload.disable", params=params,session_id=session_id)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Preload Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import PreloadMethods
|
|
4
|
+
from .events.service import PreloadEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Preload(PreloadMethods, PreloadEvents):
|
|
10
|
+
"""
|
|
11
|
+
Access the Preload domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Preload domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
PreloadMethods.__init__(self, client)
|
|
21
|
+
PreloadEvents.__init__(self, client)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""CDP Preload Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.dom.types import BackendNodeId
|
|
8
|
+
from cdp.protocol.network.types import LoaderId
|
|
9
|
+
from cdp.protocol.network.types import RequestId
|
|
10
|
+
|
|
11
|
+
RuleSetId = str
|
|
12
|
+
"""Unique id"""
|
|
13
|
+
class RuleSet(TypedDict, total=True):
|
|
14
|
+
"""Corresponds to SpeculationRuleSet"""
|
|
15
|
+
id: 'RuleSetId'
|
|
16
|
+
loaderId: 'LoaderId'
|
|
17
|
+
"""Identifies a document which the rule set is associated with."""
|
|
18
|
+
sourceText: 'str'
|
|
19
|
+
"""Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md"""
|
|
20
|
+
backendNodeId: NotRequired['BackendNodeId']
|
|
21
|
+
"""A speculation rule set is either added through an inline <script> tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant <script> tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header"""
|
|
22
|
+
url: NotRequired['str']
|
|
23
|
+
requestId: NotRequired['RequestId']
|
|
24
|
+
errorType: NotRequired['RuleSetErrorType']
|
|
25
|
+
"""Error information errorMessage is null iff errorType is null."""
|
|
26
|
+
tag: NotRequired['str']
|
|
27
|
+
"""For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md"""
|
|
28
|
+
RuleSetErrorType = Literal['SourceIsNotJsonObject','InvalidRulesSkipped','InvalidRulesetLevelTag']
|
|
29
|
+
SpeculationAction = Literal['Prefetch','Prerender','PrerenderUntilScript']
|
|
30
|
+
"""The type of preloading attempted. It corresponds to mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it isn't being used by clients)."""
|
|
31
|
+
SpeculationTargetHint = Literal['Blank','Self']
|
|
32
|
+
"""Corresponds to mojom::SpeculationTargetHint. See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints"""
|
|
33
|
+
class PreloadingAttemptKey(TypedDict, total=True):
|
|
34
|
+
"""A key that identifies a preloading attempt. The url used is the url specified by the trigger (i.e. the initial URL), and not the final url that is navigated to. For example, prerendering allows same-origin main frame navigations during the attempt, but the attempt is still keyed with the initial URL."""
|
|
35
|
+
loaderId: 'LoaderId'
|
|
36
|
+
action: 'SpeculationAction'
|
|
37
|
+
url: 'str'
|
|
38
|
+
targetHint: NotRequired['SpeculationTargetHint']
|
|
39
|
+
class PreloadingAttemptSource(TypedDict, total=True):
|
|
40
|
+
"""Lists sources for a preloading attempt, specifically the ids of rule sets that had a speculation rule that triggered the attempt, and the BackendNodeIds of <a href> or <area href> elements that triggered the attempt (in the case of attempts triggered by a document rule). It is possible for multiple rule sets and links to trigger a single attempt."""
|
|
41
|
+
key: 'PreloadingAttemptKey'
|
|
42
|
+
ruleSetIds: 'List[RuleSetId]'
|
|
43
|
+
nodeIds: 'List[BackendNodeId]'
|
|
44
|
+
PreloadPipelineId = str
|
|
45
|
+
"""Chrome manages different types of preloads together using a concept of preloading pipeline. For example, if a site uses a SpeculationRules for prerender, Chrome first starts a prefetch and then upgrades it to prerender. CDP events for them are emitted separately but they share PreloadPipelineId."""
|
|
46
|
+
PrerenderFinalStatus = Literal['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']
|
|
47
|
+
"""List of FinalStatus reasons for Prerender2."""
|
|
48
|
+
PreloadingStatus = Literal['Pending','Running','Ready','Success','Failure','NotSupported']
|
|
49
|
+
"""Preloading status values, see also PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated and prerenderStatusUpdated."""
|
|
50
|
+
PrefetchStatus = Literal['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']
|
|
51
|
+
"""TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and filter out the ones that aren't necessary to the developers."""
|
|
52
|
+
class PrerenderMismatchedHeaders(TypedDict, total=True):
|
|
53
|
+
"""Information of headers to be displayed when the header mismatch occurred."""
|
|
54
|
+
headerName: 'str'
|
|
55
|
+
initialValue: NotRequired['str']
|
|
56
|
+
activationValue: NotRequired['str']
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""CDP Profiler Domain Events"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class ProfilerEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Profiler domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Profiler events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_console_profile_finished(self, callback: Callable[[consoleProfileFinishedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
No description available for consoleProfileFinished.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: consoleProfileFinishedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Profiler.consoleProfileFinished', callback)
|
|
30
|
+
def on_console_profile_started(self, callback: Callable[[consoleProfileStartedEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
Sent when new profile recording is started using console.profile() call.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: consoleProfileStartedEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('Profiler.consoleProfileStarted', callback)
|
|
38
|
+
def on_precise_coverage_delta_update(self, callback: Callable[[preciseCoverageDeltaUpdateEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Reports coverage delta since the last poll (either from an event like this, or from `takePreciseCoverage` for the current isolate. May only be sent if precise code coverage has been started. This event can be trigged by the embedder to, for example, trigger collection of coverage data immediately at a certain point in time.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: preciseCoverageDeltaUpdateEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('Profiler.preciseCoverageDeltaUpdate', callback)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""CDP Profiler Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.debugger.types import Location
|
|
8
|
+
from cdp.protocol.profiler.types import Profile
|
|
9
|
+
from cdp.protocol.profiler.types import ScriptCoverage
|
|
10
|
+
|
|
11
|
+
class consoleProfileFinishedEvent(TypedDict, total=True):
|
|
12
|
+
id: 'str'
|
|
13
|
+
location: 'Location'
|
|
14
|
+
"""Location of console.profileEnd()."""
|
|
15
|
+
profile: 'Profile'
|
|
16
|
+
title: NotRequired['str']
|
|
17
|
+
"""Profile title passed as an argument to console.profile()."""
|
|
18
|
+
class consoleProfileStartedEvent(TypedDict, total=True):
|
|
19
|
+
id: 'str'
|
|
20
|
+
location: 'Location'
|
|
21
|
+
"""Location of console.profile()."""
|
|
22
|
+
title: NotRequired['str']
|
|
23
|
+
"""Profile title passed as an argument to console.profile()."""
|
|
24
|
+
class preciseCoverageDeltaUpdateEvent(TypedDict, total=True):
|
|
25
|
+
timestamp: 'float'
|
|
26
|
+
"""Monotonically increasing time (in seconds) when the coverage update was taken in the backend."""
|
|
27
|
+
occasion: 'str'
|
|
28
|
+
"""Identifier for distinguishing coverage events."""
|
|
29
|
+
result: 'List[ScriptCoverage]'
|
|
30
|
+
"""Coverage data for the current isolate."""
|
|
File without changes
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""CDP Profiler Domain Methods"""
|
|
2
|
+
from ..types import *
|
|
3
|
+
from .types import *
|
|
4
|
+
from typing import Optional, Dict, Any, Callable, TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ....service import Client
|
|
8
|
+
|
|
9
|
+
class ProfilerMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Profiler domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Profiler methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def disable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
No description available for disable.
|
|
25
|
+
Args:
|
|
26
|
+
params (None, optional): Parameters for the disable method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the disable call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Profiler.disable", params=params,session_id=session_id)
|
|
33
|
+
async def enable(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
No description available for enable.
|
|
36
|
+
Args:
|
|
37
|
+
params (None, optional): Parameters for the enable method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the enable call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Profiler.enable", params=params,session_id=session_id)
|
|
44
|
+
async def get_best_effort_coverage(self, params: None=None,session_id: Optional[str] = None) -> getBestEffortCoverageReturns:
|
|
45
|
+
"""
|
|
46
|
+
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
|
|
47
|
+
Args:
|
|
48
|
+
params (None, optional): Parameters for the getBestEffortCoverage method.
|
|
49
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
getBestEffortCoverageReturns: The result of the getBestEffortCoverage call.
|
|
53
|
+
"""
|
|
54
|
+
return await self.client.send(method="Profiler.getBestEffortCoverage", params=params,session_id=session_id)
|
|
55
|
+
async def set_sampling_interval(self, params: Optional[setSamplingIntervalParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
56
|
+
"""
|
|
57
|
+
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
|
|
58
|
+
Args:
|
|
59
|
+
params (setSamplingIntervalParameters, optional): Parameters for the setSamplingInterval method.
|
|
60
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Dict[str, Any]: The result of the setSamplingInterval call.
|
|
64
|
+
"""
|
|
65
|
+
return await self.client.send(method="Profiler.setSamplingInterval", params=params,session_id=session_id)
|
|
66
|
+
async def start(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
67
|
+
"""
|
|
68
|
+
No description available for start.
|
|
69
|
+
Args:
|
|
70
|
+
params (None, optional): Parameters for the start method.
|
|
71
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Dict[str, Any]: The result of the start call.
|
|
75
|
+
"""
|
|
76
|
+
return await self.client.send(method="Profiler.start", params=params,session_id=session_id)
|
|
77
|
+
async def start_precise_coverage(self, params: Optional[startPreciseCoverageParameters]=None,session_id: Optional[str] = None) -> startPreciseCoverageReturns:
|
|
78
|
+
"""
|
|
79
|
+
Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
|
|
80
|
+
Args:
|
|
81
|
+
params (startPreciseCoverageParameters, optional): Parameters for the startPreciseCoverage method.
|
|
82
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
startPreciseCoverageReturns: The result of the startPreciseCoverage call.
|
|
86
|
+
"""
|
|
87
|
+
return await self.client.send(method="Profiler.startPreciseCoverage", params=params,session_id=session_id)
|
|
88
|
+
async def stop(self, params: None=None,session_id: Optional[str] = None) -> stopReturns:
|
|
89
|
+
"""
|
|
90
|
+
No description available for stop.
|
|
91
|
+
Args:
|
|
92
|
+
params (None, optional): Parameters for the stop method.
|
|
93
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
stopReturns: The result of the stop call.
|
|
97
|
+
"""
|
|
98
|
+
return await self.client.send(method="Profiler.stop", params=params,session_id=session_id)
|
|
99
|
+
async def stop_precise_coverage(self, params: None=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
100
|
+
"""
|
|
101
|
+
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
|
|
102
|
+
Args:
|
|
103
|
+
params (None, optional): Parameters for the stopPreciseCoverage method.
|
|
104
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Dict[str, Any]: The result of the stopPreciseCoverage call.
|
|
108
|
+
"""
|
|
109
|
+
return await self.client.send(method="Profiler.stopPreciseCoverage", params=params,session_id=session_id)
|
|
110
|
+
async def take_precise_coverage(self, params: None=None,session_id: Optional[str] = None) -> takePreciseCoverageReturns:
|
|
111
|
+
"""
|
|
112
|
+
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
|
|
113
|
+
Args:
|
|
114
|
+
params (None, optional): Parameters for the takePreciseCoverage method.
|
|
115
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
takePreciseCoverageReturns: The result of the takePreciseCoverage call.
|
|
119
|
+
"""
|
|
120
|
+
return await self.client.send(method="Profiler.takePreciseCoverage", params=params,session_id=session_id)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""CDP Profiler Methods Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from cdp.protocol.profiler.types import Profile
|
|
8
|
+
from cdp.protocol.profiler.types import ScriptCoverage
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class setSamplingIntervalParameters(TypedDict, total=True):
|
|
14
|
+
interval: 'int'
|
|
15
|
+
"""New sampling interval in microseconds."""
|
|
16
|
+
|
|
17
|
+
class startPreciseCoverageParameters(TypedDict, total=False):
|
|
18
|
+
callCount: NotRequired['bool']
|
|
19
|
+
"""Collect accurate call counts beyond simple 'covered' or 'not covered'."""
|
|
20
|
+
detailed: NotRequired['bool']
|
|
21
|
+
"""Collect block-based coverage."""
|
|
22
|
+
allowTriggeredUpdates: NotRequired['bool']
|
|
23
|
+
"""Allow the backend to send updates on its own initiative"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class getBestEffortCoverageReturns(TypedDict):
|
|
30
|
+
result: 'List[ScriptCoverage]'
|
|
31
|
+
"""Coverage data for the current isolate."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class startPreciseCoverageReturns(TypedDict):
|
|
35
|
+
timestamp: 'float'
|
|
36
|
+
"""Monotonically increasing time (in seconds) when the coverage update was taken in the backend."""
|
|
37
|
+
class stopReturns(TypedDict):
|
|
38
|
+
profile: 'Profile'
|
|
39
|
+
"""Recorded profile."""
|
|
40
|
+
|
|
41
|
+
class takePreciseCoverageReturns(TypedDict):
|
|
42
|
+
result: 'List[ScriptCoverage]'
|
|
43
|
+
"""Coverage data for the current isolate."""
|
|
44
|
+
timestamp: 'float'
|
|
45
|
+
"""Monotonically increasing time (in seconds) when the coverage update was taken in the backend."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Profiler Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import ProfilerMethods
|
|
4
|
+
from .events.service import ProfilerEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Profiler(ProfilerMethods, ProfilerEvents):
|
|
10
|
+
"""
|
|
11
|
+
Access the Profiler domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Profiler domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
ProfilerMethods.__init__(self, client)
|
|
21
|
+
ProfilerEvents.__init__(self, client)
|