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,65 @@
|
|
|
1
|
+
"""CDP Profiler 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.runtime.types import CallFrame
|
|
8
|
+
from cdp.protocol.runtime.types import ScriptId
|
|
9
|
+
|
|
10
|
+
class ProfileNode(TypedDict, total=True):
|
|
11
|
+
"""Profile node. Holds callsite information, execution statistics and child nodes."""
|
|
12
|
+
id: 'int'
|
|
13
|
+
"""Unique id of the node."""
|
|
14
|
+
callFrame: 'CallFrame'
|
|
15
|
+
"""Function location."""
|
|
16
|
+
hitCount: NotRequired['int']
|
|
17
|
+
"""Number of samples where this node was on top of the call stack."""
|
|
18
|
+
children: NotRequired['List[int]']
|
|
19
|
+
"""Child node ids."""
|
|
20
|
+
deoptReason: NotRequired['str']
|
|
21
|
+
"""The reason of being not optimized. The function may be deoptimized or marked as don't optimize."""
|
|
22
|
+
positionTicks: NotRequired['List[PositionTickInfo]']
|
|
23
|
+
"""An array of source position ticks."""
|
|
24
|
+
class Profile(TypedDict, total=True):
|
|
25
|
+
"""Profile."""
|
|
26
|
+
nodes: 'List[ProfileNode]'
|
|
27
|
+
"""The list of profile nodes. First item is the root node."""
|
|
28
|
+
startTime: 'float'
|
|
29
|
+
"""Profiling start timestamp in microseconds."""
|
|
30
|
+
endTime: 'float'
|
|
31
|
+
"""Profiling end timestamp in microseconds."""
|
|
32
|
+
samples: NotRequired['List[int]']
|
|
33
|
+
"""Ids of samples top nodes."""
|
|
34
|
+
timeDeltas: NotRequired['List[int]']
|
|
35
|
+
"""Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime."""
|
|
36
|
+
class PositionTickInfo(TypedDict, total=True):
|
|
37
|
+
"""Specifies a number of samples attributed to a certain source position."""
|
|
38
|
+
line: 'int'
|
|
39
|
+
"""Source line number (1-based)."""
|
|
40
|
+
ticks: 'int'
|
|
41
|
+
"""Number of samples attributed to the source line."""
|
|
42
|
+
class CoverageRange(TypedDict, total=True):
|
|
43
|
+
"""Coverage data for a source range."""
|
|
44
|
+
startOffset: 'int'
|
|
45
|
+
"""JavaScript script source offset for the range start."""
|
|
46
|
+
endOffset: 'int'
|
|
47
|
+
"""JavaScript script source offset for the range end."""
|
|
48
|
+
count: 'int'
|
|
49
|
+
"""Collected execution count of the source range."""
|
|
50
|
+
class FunctionCoverage(TypedDict, total=True):
|
|
51
|
+
"""Coverage data for a JavaScript function."""
|
|
52
|
+
functionName: 'str'
|
|
53
|
+
"""JavaScript function name."""
|
|
54
|
+
ranges: 'List[CoverageRange]'
|
|
55
|
+
"""Source ranges inside the function with coverage data."""
|
|
56
|
+
isBlockCoverage: 'bool'
|
|
57
|
+
"""Whether coverage data for this function has block granularity."""
|
|
58
|
+
class ScriptCoverage(TypedDict, total=True):
|
|
59
|
+
"""Coverage data for a JavaScript script."""
|
|
60
|
+
scriptId: 'ScriptId'
|
|
61
|
+
"""JavaScript script id."""
|
|
62
|
+
url: 'str'
|
|
63
|
+
"""JavaScript script name or url."""
|
|
64
|
+
functions: 'List[FunctionCoverage]'
|
|
65
|
+
"""Functions contained in the script that has coverage data."""
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""CDP PWA 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 PWAEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the PWA domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the PWA events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
File without changes
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""CDP PWA 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 PWAMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the PWA domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the PWA methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def get_os_app_state(self, params: Optional[getOsAppStateParameters]=None,session_id: Optional[str] = None) -> getOsAppStateReturns:
|
|
23
|
+
"""
|
|
24
|
+
Returns the following OS state for the given manifest id.
|
|
25
|
+
Args:
|
|
26
|
+
params (getOsAppStateParameters, optional): Parameters for the getOsAppState method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
getOsAppStateReturns: The result of the getOsAppState call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="PWA.getOsAppState", params=params,session_id=session_id)
|
|
33
|
+
async def install(self, params: Optional[installParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
Installs the given manifest identity, optionally using the given installUrlOrBundleUrl IWA-specific install description: manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId File installation mode: The installUrlOrBundleUrl can be either file:// or http(s):// pointing to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to The .swbn file's signing key. Dev proxy installation mode: installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. web_package::SignedWebBundleId must be of type dev proxy. The advantage of dev proxy mode is that all changes to IWA automatically will be reflected in the running app without reinstallation. To generate bundle id for proxy mode: 1. Generate 32 random bytes. 2. Add a specific suffix at the end following the documentation https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix 3. Encode the entire sequence using Base32 without padding. If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist.
|
|
36
|
+
Args:
|
|
37
|
+
params (installParameters, optional): Parameters for the install method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the install call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="PWA.install", params=params,session_id=session_id)
|
|
44
|
+
async def uninstall(self, params: Optional[uninstallParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
45
|
+
"""
|
|
46
|
+
Uninstalls the given manifest_id and closes any opened app windows.
|
|
47
|
+
Args:
|
|
48
|
+
params (uninstallParameters, optional): Parameters for the uninstall method.
|
|
49
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Dict[str, Any]: The result of the uninstall call.
|
|
53
|
+
"""
|
|
54
|
+
return await self.client.send(method="PWA.uninstall", params=params,session_id=session_id)
|
|
55
|
+
async def launch(self, params: Optional[launchParameters]=None,session_id: Optional[str] = None) -> launchReturns:
|
|
56
|
+
"""
|
|
57
|
+
Launches the installed web app, or an url in the same web app instead of the default start url if it is provided. Returns a page Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs.
|
|
58
|
+
Args:
|
|
59
|
+
params (launchParameters, optional): Parameters for the launch method.
|
|
60
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
launchReturns: The result of the launch call.
|
|
64
|
+
"""
|
|
65
|
+
return await self.client.send(method="PWA.launch", params=params,session_id=session_id)
|
|
66
|
+
async def launch_files_in_app(self, params: Optional[launchFilesInAppParameters]=None,session_id: Optional[str] = None) -> launchFilesInAppReturns:
|
|
67
|
+
"""
|
|
68
|
+
Opens one or more local files from an installed web app identified by its manifestId. The web app needs to have file handlers registered to process the files. The API returns one or more page Target.TargetIDs which can be used to attach to via Target.attachToTarget or similar APIs. If some files in the parameters cannot be handled by the web app, they will be ignored. If none of the files can be handled, this API returns an error. If no files are provided as the parameter, this API also returns an error. According to the definition of the file handlers in the manifest file, one Target.TargetID may represent a page handling one or more files. The order of the returned Target.TargetIDs is not guaranteed. TODO(crbug.com/339454034): Check the existences of the input files.
|
|
69
|
+
Args:
|
|
70
|
+
params (launchFilesInAppParameters, optional): Parameters for the launchFilesInApp method.
|
|
71
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
launchFilesInAppReturns: The result of the launchFilesInApp call.
|
|
75
|
+
"""
|
|
76
|
+
return await self.client.send(method="PWA.launchFilesInApp", params=params,session_id=session_id)
|
|
77
|
+
async def open_current_page_in_app(self, params: Optional[openCurrentPageInAppParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
78
|
+
"""
|
|
79
|
+
Opens the current page in its web app identified by the manifest id, needs to be called on a page target. This function returns immediately without waiting for the app to finish loading.
|
|
80
|
+
Args:
|
|
81
|
+
params (openCurrentPageInAppParameters, optional): Parameters for the openCurrentPageInApp method.
|
|
82
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
Dict[str, Any]: The result of the openCurrentPageInApp call.
|
|
86
|
+
"""
|
|
87
|
+
return await self.client.send(method="PWA.openCurrentPageInApp", params=params,session_id=session_id)
|
|
88
|
+
async def change_app_user_settings(self, params: Optional[changeAppUserSettingsParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
89
|
+
"""
|
|
90
|
+
Changes user settings of the web app identified by its manifestId. If the app was not installed, this command returns an error. Unset parameters will be ignored; unrecognized values will cause an error. Unlike the ones defined in the manifest files of the web apps, these settings are provided by the browser and controlled by the users, they impact the way the browser handling the web apps. See the comment of each parameter.
|
|
91
|
+
Args:
|
|
92
|
+
params (changeAppUserSettingsParameters, optional): Parameters for the changeAppUserSettings method.
|
|
93
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
Dict[str, Any]: The result of the changeAppUserSettings call.
|
|
97
|
+
"""
|
|
98
|
+
return await self.client.send(method="PWA.changeAppUserSettings", params=params,session_id=session_id)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""CDP PWA 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.pwa.types import DisplayMode
|
|
8
|
+
from cdp.protocol.pwa.types import FileHandler
|
|
9
|
+
from cdp.protocol.target.types import TargetID
|
|
10
|
+
|
|
11
|
+
class getOsAppStateParameters(TypedDict, total=True):
|
|
12
|
+
manifestId: 'str'
|
|
13
|
+
"""The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest."""
|
|
14
|
+
class installParameters(TypedDict, total=True):
|
|
15
|
+
manifestId: 'str'
|
|
16
|
+
installUrlOrBundleUrl: NotRequired['str']
|
|
17
|
+
"""The location of the app or bundle overriding the one derived from the manifestId."""
|
|
18
|
+
class uninstallParameters(TypedDict, total=True):
|
|
19
|
+
manifestId: 'str'
|
|
20
|
+
class launchParameters(TypedDict, total=True):
|
|
21
|
+
manifestId: 'str'
|
|
22
|
+
url: NotRequired['str']
|
|
23
|
+
class launchFilesInAppParameters(TypedDict, total=True):
|
|
24
|
+
manifestId: 'str'
|
|
25
|
+
files: 'List[str]'
|
|
26
|
+
class openCurrentPageInAppParameters(TypedDict, total=True):
|
|
27
|
+
manifestId: 'str'
|
|
28
|
+
class changeAppUserSettingsParameters(TypedDict, total=True):
|
|
29
|
+
manifestId: 'str'
|
|
30
|
+
linkCapturing: NotRequired['bool']
|
|
31
|
+
"""If user allows the links clicked on by the user in the app's scope, or extended scope if the manifest has scope extensions and the flags DesktopPWAsLinkCapturingWithScopeExtensions and WebAppEnableScopeExtensions are enabled. Note, the API does not support resetting the linkCapturing to the initial value, uninstalling and installing the web app again will reset it. TODO(crbug.com/339453269): Setting this value on ChromeOS is not supported yet."""
|
|
32
|
+
displayMode: NotRequired['DisplayMode']
|
|
33
|
+
class getOsAppStateReturns(TypedDict):
|
|
34
|
+
badgeCount: 'int'
|
|
35
|
+
fileHandlers: 'List[FileHandler]'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class launchReturns(TypedDict):
|
|
39
|
+
targetId: 'TargetID'
|
|
40
|
+
"""ID of the tab target created as a result."""
|
|
41
|
+
class launchFilesInAppReturns(TypedDict):
|
|
42
|
+
targetIds: 'List[TargetID]'
|
|
43
|
+
"""IDs of the tab targets created as the result."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP PWA Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import PWAMethods
|
|
4
|
+
from .events.service import PWAEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class PWA(PWAMethods, PWAEvents):
|
|
10
|
+
"""
|
|
11
|
+
This domain allows interacting with the browser to control PWAs.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the PWA domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
PWAMethods.__init__(self, client)
|
|
21
|
+
PWAEvents.__init__(self, client)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""CDP PWA Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
class FileHandlerAccept(TypedDict, total=True):
|
|
6
|
+
"""The following types are the replica of https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67"""
|
|
7
|
+
mediaType: 'str'
|
|
8
|
+
"""New name of the mimetype according to https://www.iana.org/assignments/media-types/media-types.xhtml"""
|
|
9
|
+
fileExtensions: 'List[str]'
|
|
10
|
+
class FileHandler(TypedDict, total=True):
|
|
11
|
+
action: 'str'
|
|
12
|
+
accepts: 'List[FileHandlerAccept]'
|
|
13
|
+
displayName: 'str'
|
|
14
|
+
DisplayMode = Literal['standalone','browser']
|
|
15
|
+
"""If user prefers opening the app in browser or an app window."""
|
cdp/protocol/py.typed
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""CDP Runtime 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 RuntimeEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Runtime domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Runtime events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_binding_called(self, callback: Callable[[bindingCalledEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
Notification is issued every time when binding is called.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: bindingCalledEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Runtime.bindingCalled', callback)
|
|
30
|
+
def on_console_api_called(self, callback: Callable[[consoleAPICalledEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
Issued when console API was called.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: consoleAPICalledEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('Runtime.consoleAPICalled', callback)
|
|
38
|
+
def on_exception_revoked(self, callback: Callable[[exceptionRevokedEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Issued when unhandled exception was revoked.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: exceptionRevokedEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('Runtime.exceptionRevoked', callback)
|
|
46
|
+
def on_exception_thrown(self, callback: Callable[[exceptionThrownEvent,Optional[str]], None]=None) -> None:
|
|
47
|
+
"""
|
|
48
|
+
Issued when exception was thrown and unhandled.
|
|
49
|
+
Args:
|
|
50
|
+
callback (callable, optional): Function called when the event is fired.
|
|
51
|
+
The callback receives (params: exceptionThrownEvent, session_id: Optional[str]).
|
|
52
|
+
"""
|
|
53
|
+
self.client.on('Runtime.exceptionThrown', callback)
|
|
54
|
+
def on_execution_context_created(self, callback: Callable[[executionContextCreatedEvent,Optional[str]], None]=None) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Issued when new execution context is created.
|
|
57
|
+
Args:
|
|
58
|
+
callback (callable, optional): Function called when the event is fired.
|
|
59
|
+
The callback receives (params: executionContextCreatedEvent, session_id: Optional[str]).
|
|
60
|
+
"""
|
|
61
|
+
self.client.on('Runtime.executionContextCreated', callback)
|
|
62
|
+
def on_execution_context_destroyed(self, callback: Callable[[executionContextDestroyedEvent,Optional[str]], None]=None) -> None:
|
|
63
|
+
"""
|
|
64
|
+
Issued when execution context is destroyed.
|
|
65
|
+
Args:
|
|
66
|
+
callback (callable, optional): Function called when the event is fired.
|
|
67
|
+
The callback receives (params: executionContextDestroyedEvent, session_id: Optional[str]).
|
|
68
|
+
"""
|
|
69
|
+
self.client.on('Runtime.executionContextDestroyed', callback)
|
|
70
|
+
def on_execution_contexts_cleared(self, callback: Callable[[executionContextsClearedEvent,Optional[str]], None]=None) -> None:
|
|
71
|
+
"""
|
|
72
|
+
Issued when all executionContexts were cleared in browser
|
|
73
|
+
Args:
|
|
74
|
+
callback (callable, optional): Function called when the event is fired.
|
|
75
|
+
The callback receives (params: executionContextsClearedEvent, session_id: Optional[str]).
|
|
76
|
+
"""
|
|
77
|
+
self.client.on('Runtime.executionContextsCleared', callback)
|
|
78
|
+
def on_inspect_requested(self, callback: Callable[[inspectRequestedEvent,Optional[str]], None]=None) -> None:
|
|
79
|
+
"""
|
|
80
|
+
Issued when object should be inspected (for example, as a result of inspect() command line API call).
|
|
81
|
+
Args:
|
|
82
|
+
callback (callable, optional): Function called when the event is fired.
|
|
83
|
+
The callback receives (params: inspectRequestedEvent, session_id: Optional[str]).
|
|
84
|
+
"""
|
|
85
|
+
self.client.on('Runtime.inspectRequested', callback)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""CDP Runtime 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.runtime.types import ExceptionDetails
|
|
8
|
+
from cdp.protocol.runtime.types import ExecutionContextDescription
|
|
9
|
+
from cdp.protocol.runtime.types import ExecutionContextId
|
|
10
|
+
from cdp.protocol.runtime.types import RemoteObject
|
|
11
|
+
from cdp.protocol.runtime.types import StackTrace
|
|
12
|
+
from cdp.protocol.runtime.types import Timestamp
|
|
13
|
+
|
|
14
|
+
class bindingCalledEvent(TypedDict, total=True):
|
|
15
|
+
name: 'str'
|
|
16
|
+
payload: 'str'
|
|
17
|
+
executionContextId: 'ExecutionContextId'
|
|
18
|
+
"""Identifier of the context where the call was made."""
|
|
19
|
+
class consoleAPICalledEvent(TypedDict, total=True):
|
|
20
|
+
type: 'Literal["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"]'
|
|
21
|
+
"""Type of the call."""
|
|
22
|
+
args: 'List[RemoteObject]'
|
|
23
|
+
"""Call arguments."""
|
|
24
|
+
executionContextId: 'ExecutionContextId'
|
|
25
|
+
"""Identifier of the context where the call was made."""
|
|
26
|
+
timestamp: 'Timestamp'
|
|
27
|
+
"""Call timestamp."""
|
|
28
|
+
stackTrace: NotRequired['StackTrace']
|
|
29
|
+
"""Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: assert, error, trace, warning. For other types the async call chain can be retrieved using Debugger.getStackTrace and stackTrace.parentId field."""
|
|
30
|
+
context: NotRequired['str']
|
|
31
|
+
"""Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context."""
|
|
32
|
+
class exceptionRevokedEvent(TypedDict, total=True):
|
|
33
|
+
reason: 'str'
|
|
34
|
+
"""Reason describing why exception was revoked."""
|
|
35
|
+
exceptionId: 'int'
|
|
36
|
+
"""The id of revoked exception, as reported in exceptionThrown."""
|
|
37
|
+
class exceptionThrownEvent(TypedDict, total=True):
|
|
38
|
+
timestamp: 'Timestamp'
|
|
39
|
+
"""Timestamp of the exception."""
|
|
40
|
+
exceptionDetails: 'ExceptionDetails'
|
|
41
|
+
class executionContextCreatedEvent(TypedDict, total=True):
|
|
42
|
+
context: 'ExecutionContextDescription'
|
|
43
|
+
"""A newly created execution context."""
|
|
44
|
+
class executionContextDestroyedEvent(TypedDict, total=True):
|
|
45
|
+
executionContextId: 'ExecutionContextId'
|
|
46
|
+
"""Id of the destroyed context"""
|
|
47
|
+
executionContextUniqueId: 'str'
|
|
48
|
+
"""Unique Id of the destroyed context"""
|
|
49
|
+
class executionContextsClearedEvent(TypedDict, total=True):
|
|
50
|
+
pass
|
|
51
|
+
class inspectRequestedEvent(TypedDict, total=True):
|
|
52
|
+
object: 'RemoteObject'
|
|
53
|
+
hints: 'Dict[str, Any]'
|
|
54
|
+
executionContextId: NotRequired['ExecutionContextId']
|
|
55
|
+
"""Identifier of the context where the call was made."""
|
|
File without changes
|