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,219 @@
|
|
|
1
|
+
"""CDP Target 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 TargetMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Target domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Target methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def activate_target(self, params: Optional[activateTargetParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
Activates (focuses) the target.
|
|
25
|
+
Args:
|
|
26
|
+
params (activateTargetParameters, optional): Parameters for the activateTarget method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the activateTarget call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Target.activateTarget", params=params,session_id=session_id)
|
|
33
|
+
async def attach_to_target(self, params: Optional[attachToTargetParameters]=None,session_id: Optional[str] = None) -> attachToTargetReturns:
|
|
34
|
+
"""
|
|
35
|
+
Attaches to the target with given id.
|
|
36
|
+
Args:
|
|
37
|
+
params (attachToTargetParameters, optional): Parameters for the attachToTarget method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
attachToTargetReturns: The result of the attachToTarget call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Target.attachToTarget", params=params,session_id=session_id)
|
|
44
|
+
async def attach_to_browser_target(self, params: None=None,session_id: Optional[str] = None) -> attachToBrowserTargetReturns:
|
|
45
|
+
"""
|
|
46
|
+
Attaches to the browser target, only uses flat sessionId mode.
|
|
47
|
+
Args:
|
|
48
|
+
params (None, optional): Parameters for the attachToBrowserTarget method.
|
|
49
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
attachToBrowserTargetReturns: The result of the attachToBrowserTarget call.
|
|
53
|
+
"""
|
|
54
|
+
return await self.client.send(method="Target.attachToBrowserTarget", params=params,session_id=session_id)
|
|
55
|
+
async def close_target(self, params: Optional[closeTargetParameters]=None,session_id: Optional[str] = None) -> closeTargetReturns:
|
|
56
|
+
"""
|
|
57
|
+
Closes the target. If the target is a page that gets closed too.
|
|
58
|
+
Args:
|
|
59
|
+
params (closeTargetParameters, optional): Parameters for the closeTarget method.
|
|
60
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
closeTargetReturns: The result of the closeTarget call.
|
|
64
|
+
"""
|
|
65
|
+
return await self.client.send(method="Target.closeTarget", params=params,session_id=session_id)
|
|
66
|
+
async def expose_dev_tools_protocol(self, params: Optional[exposeDevToolsProtocolParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
67
|
+
"""
|
|
68
|
+
Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the following API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
|
|
69
|
+
Args:
|
|
70
|
+
params (exposeDevToolsProtocolParameters, optional): Parameters for the exposeDevToolsProtocol method.
|
|
71
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Dict[str, Any]: The result of the exposeDevToolsProtocol call.
|
|
75
|
+
"""
|
|
76
|
+
return await self.client.send(method="Target.exposeDevToolsProtocol", params=params,session_id=session_id)
|
|
77
|
+
async def create_browser_context(self, params: Optional[createBrowserContextParameters]=None,session_id: Optional[str] = None) -> createBrowserContextReturns:
|
|
78
|
+
"""
|
|
79
|
+
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
|
|
80
|
+
Args:
|
|
81
|
+
params (createBrowserContextParameters, optional): Parameters for the createBrowserContext method.
|
|
82
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
createBrowserContextReturns: The result of the createBrowserContext call.
|
|
86
|
+
"""
|
|
87
|
+
return await self.client.send(method="Target.createBrowserContext", params=params,session_id=session_id)
|
|
88
|
+
async def get_browser_contexts(self, params: None=None,session_id: Optional[str] = None) -> getBrowserContextsReturns:
|
|
89
|
+
"""
|
|
90
|
+
Returns all browser contexts created with `Target.createBrowserContext` method.
|
|
91
|
+
Args:
|
|
92
|
+
params (None, optional): Parameters for the getBrowserContexts method.
|
|
93
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
getBrowserContextsReturns: The result of the getBrowserContexts call.
|
|
97
|
+
"""
|
|
98
|
+
return await self.client.send(method="Target.getBrowserContexts", params=params,session_id=session_id)
|
|
99
|
+
async def create_target(self, params: Optional[createTargetParameters]=None,session_id: Optional[str] = None) -> createTargetReturns:
|
|
100
|
+
"""
|
|
101
|
+
Creates a new page.
|
|
102
|
+
Args:
|
|
103
|
+
params (createTargetParameters, optional): Parameters for the createTarget method.
|
|
104
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
createTargetReturns: The result of the createTarget call.
|
|
108
|
+
"""
|
|
109
|
+
return await self.client.send(method="Target.createTarget", params=params,session_id=session_id)
|
|
110
|
+
async def detach_from_target(self, params: Optional[detachFromTargetParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
111
|
+
"""
|
|
112
|
+
Detaches session with given id.
|
|
113
|
+
Args:
|
|
114
|
+
params (detachFromTargetParameters, optional): Parameters for the detachFromTarget method.
|
|
115
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
Dict[str, Any]: The result of the detachFromTarget call.
|
|
119
|
+
"""
|
|
120
|
+
return await self.client.send(method="Target.detachFromTarget", params=params,session_id=session_id)
|
|
121
|
+
async def dispose_browser_context(self, params: Optional[disposeBrowserContextParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
122
|
+
"""
|
|
123
|
+
Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.
|
|
124
|
+
Args:
|
|
125
|
+
params (disposeBrowserContextParameters, optional): Parameters for the disposeBrowserContext method.
|
|
126
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Dict[str, Any]: The result of the disposeBrowserContext call.
|
|
130
|
+
"""
|
|
131
|
+
return await self.client.send(method="Target.disposeBrowserContext", params=params,session_id=session_id)
|
|
132
|
+
async def get_target_info(self, params: Optional[getTargetInfoParameters]=None,session_id: Optional[str] = None) -> getTargetInfoReturns:
|
|
133
|
+
"""
|
|
134
|
+
Returns information about a target.
|
|
135
|
+
Args:
|
|
136
|
+
params (getTargetInfoParameters, optional): Parameters for the getTargetInfo method.
|
|
137
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
getTargetInfoReturns: The result of the getTargetInfo call.
|
|
141
|
+
"""
|
|
142
|
+
return await self.client.send(method="Target.getTargetInfo", params=params,session_id=session_id)
|
|
143
|
+
async def get_targets(self, params: Optional[getTargetsParameters]=None,session_id: Optional[str] = None) -> getTargetsReturns:
|
|
144
|
+
"""
|
|
145
|
+
Retrieves a list of available targets.
|
|
146
|
+
Args:
|
|
147
|
+
params (getTargetsParameters, optional): Parameters for the getTargets method.
|
|
148
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
getTargetsReturns: The result of the getTargets call.
|
|
152
|
+
"""
|
|
153
|
+
return await self.client.send(method="Target.getTargets", params=params,session_id=session_id)
|
|
154
|
+
async def set_auto_attach(self, params: Optional[setAutoAttachParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
155
|
+
"""
|
|
156
|
+
Controls whether to automatically attach to new targets which are considered to be directly related to this one (for example, iframes or workers). When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets. You might want to call this recursively for auto-attached targets to attach to all available targets.
|
|
157
|
+
Args:
|
|
158
|
+
params (setAutoAttachParameters, optional): Parameters for the setAutoAttach method.
|
|
159
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Dict[str, Any]: The result of the setAutoAttach call.
|
|
163
|
+
"""
|
|
164
|
+
return await self.client.send(method="Target.setAutoAttach", params=params,session_id=session_id)
|
|
165
|
+
async def auto_attach_related(self, params: Optional[autoAttachRelatedParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
166
|
+
"""
|
|
167
|
+
Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.
|
|
168
|
+
Args:
|
|
169
|
+
params (autoAttachRelatedParameters, optional): Parameters for the autoAttachRelated method.
|
|
170
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
Dict[str, Any]: The result of the autoAttachRelated call.
|
|
174
|
+
"""
|
|
175
|
+
return await self.client.send(method="Target.autoAttachRelated", params=params,session_id=session_id)
|
|
176
|
+
async def set_discover_targets(self, params: Optional[setDiscoverTargetsParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
177
|
+
"""
|
|
178
|
+
Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.
|
|
179
|
+
Args:
|
|
180
|
+
params (setDiscoverTargetsParameters, optional): Parameters for the setDiscoverTargets method.
|
|
181
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
Dict[str, Any]: The result of the setDiscoverTargets call.
|
|
185
|
+
"""
|
|
186
|
+
return await self.client.send(method="Target.setDiscoverTargets", params=params,session_id=session_id)
|
|
187
|
+
async def set_remote_locations(self, params: Optional[setRemoteLocationsParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
188
|
+
"""
|
|
189
|
+
Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.
|
|
190
|
+
Args:
|
|
191
|
+
params (setRemoteLocationsParameters, optional): Parameters for the setRemoteLocations method.
|
|
192
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
Dict[str, Any]: The result of the setRemoteLocations call.
|
|
196
|
+
"""
|
|
197
|
+
return await self.client.send(method="Target.setRemoteLocations", params=params,session_id=session_id)
|
|
198
|
+
async def get_dev_tools_target(self, params: Optional[getDevToolsTargetParameters]=None,session_id: Optional[str] = None) -> getDevToolsTargetReturns:
|
|
199
|
+
"""
|
|
200
|
+
Gets the targetId of the DevTools page target opened for the given target (if any).
|
|
201
|
+
Args:
|
|
202
|
+
params (getDevToolsTargetParameters, optional): Parameters for the getDevToolsTarget method.
|
|
203
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
204
|
+
|
|
205
|
+
Returns:
|
|
206
|
+
getDevToolsTargetReturns: The result of the getDevToolsTarget call.
|
|
207
|
+
"""
|
|
208
|
+
return await self.client.send(method="Target.getDevToolsTarget", params=params,session_id=session_id)
|
|
209
|
+
async def open_dev_tools(self, params: Optional[openDevToolsParameters]=None,session_id: Optional[str] = None) -> openDevToolsReturns:
|
|
210
|
+
"""
|
|
211
|
+
Opens a DevTools window for the target.
|
|
212
|
+
Args:
|
|
213
|
+
params (openDevToolsParameters, optional): Parameters for the openDevTools method.
|
|
214
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
215
|
+
|
|
216
|
+
Returns:
|
|
217
|
+
openDevToolsReturns: The result of the openDevTools call.
|
|
218
|
+
"""
|
|
219
|
+
return await self.client.send(method="Target.openDevTools", params=params,session_id=session_id)
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"""CDP Target 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.browser.types import BrowserContextID
|
|
8
|
+
from cdp.protocol.target.types import RemoteLocation
|
|
9
|
+
from cdp.protocol.target.types import SessionID
|
|
10
|
+
from cdp.protocol.target.types import TargetFilter
|
|
11
|
+
from cdp.protocol.target.types import TargetID
|
|
12
|
+
from cdp.protocol.target.types import TargetInfo
|
|
13
|
+
from cdp.protocol.target.types import WindowState
|
|
14
|
+
|
|
15
|
+
class activateTargetParameters(TypedDict, total=True):
|
|
16
|
+
targetId: 'TargetID'
|
|
17
|
+
class attachToTargetParameters(TypedDict, total=True):
|
|
18
|
+
targetId: 'TargetID'
|
|
19
|
+
flatten: NotRequired['bool']
|
|
20
|
+
"""Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325."""
|
|
21
|
+
|
|
22
|
+
class closeTargetParameters(TypedDict, total=True):
|
|
23
|
+
targetId: 'TargetID'
|
|
24
|
+
class exposeDevToolsProtocolParameters(TypedDict, total=True):
|
|
25
|
+
targetId: 'TargetID'
|
|
26
|
+
bindingName: NotRequired['str']
|
|
27
|
+
"""Binding name, 'cdp' if not specified."""
|
|
28
|
+
inheritPermissions: NotRequired['bool']
|
|
29
|
+
"""If true, inherits the current root session's permissions (default: false)."""
|
|
30
|
+
class createBrowserContextParameters(TypedDict, total=False):
|
|
31
|
+
disposeOnDetach: NotRequired['bool']
|
|
32
|
+
"""If specified, disposes this context when debugging session disconnects."""
|
|
33
|
+
proxyServer: NotRequired['str']
|
|
34
|
+
"""Proxy server, similar to the one passed to --proxy-server"""
|
|
35
|
+
proxyBypassList: NotRequired['str']
|
|
36
|
+
"""Proxy bypass list, similar to the one passed to --proxy-bypass-list"""
|
|
37
|
+
originsWithUniversalNetworkAccess: NotRequired['List[str]']
|
|
38
|
+
"""An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored."""
|
|
39
|
+
|
|
40
|
+
class createTargetParameters(TypedDict, total=True):
|
|
41
|
+
url: 'str'
|
|
42
|
+
"""The initial URL the page will be navigated to. An empty string indicates about:blank."""
|
|
43
|
+
left: NotRequired['int']
|
|
44
|
+
"""Frame left origin in DIP (requires newWindow to be true or headless shell)."""
|
|
45
|
+
top: NotRequired['int']
|
|
46
|
+
"""Frame top origin in DIP (requires newWindow to be true or headless shell)."""
|
|
47
|
+
width: NotRequired['int']
|
|
48
|
+
"""Frame width in DIP (requires newWindow to be true or headless shell)."""
|
|
49
|
+
height: NotRequired['int']
|
|
50
|
+
"""Frame height in DIP (requires newWindow to be true or headless shell)."""
|
|
51
|
+
windowState: NotRequired['WindowState']
|
|
52
|
+
"""Frame window state (requires newWindow to be true or headless shell). Default is normal."""
|
|
53
|
+
browserContextId: NotRequired['BrowserContextID']
|
|
54
|
+
"""The browser context to create the page in."""
|
|
55
|
+
enableBeginFrameControl: NotRequired['bool']
|
|
56
|
+
"""Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default)."""
|
|
57
|
+
newWindow: NotRequired['bool']
|
|
58
|
+
"""Whether to create a new Window or Tab (false by default, not supported by headless shell)."""
|
|
59
|
+
background: NotRequired['bool']
|
|
60
|
+
"""Whether to create the target in background or foreground (false by default, not supported by headless shell)."""
|
|
61
|
+
forTab: NotRequired['bool']
|
|
62
|
+
"""Whether to create the target of type "tab"."""
|
|
63
|
+
hidden: NotRequired['bool']
|
|
64
|
+
"""Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with forTab: true, newWindow: true or background: false. The life-time of the tab is limited to the life-time of the session."""
|
|
65
|
+
focus: NotRequired['bool']
|
|
66
|
+
"""If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error."""
|
|
67
|
+
class detachFromTargetParameters(TypedDict, total=False):
|
|
68
|
+
sessionId: NotRequired['SessionID']
|
|
69
|
+
"""Session to detach."""
|
|
70
|
+
targetId: NotRequired['TargetID']
|
|
71
|
+
"""Deprecated."""
|
|
72
|
+
class disposeBrowserContextParameters(TypedDict, total=True):
|
|
73
|
+
browserContextId: 'BrowserContextID'
|
|
74
|
+
class getTargetInfoParameters(TypedDict, total=False):
|
|
75
|
+
targetId: NotRequired['TargetID']
|
|
76
|
+
class getTargetsParameters(TypedDict, total=False):
|
|
77
|
+
filter: NotRequired['TargetFilter']
|
|
78
|
+
"""Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency."""
|
|
79
|
+
class setAutoAttachParameters(TypedDict, total=True):
|
|
80
|
+
autoAttach: 'bool'
|
|
81
|
+
"""Whether to auto-attach to related targets."""
|
|
82
|
+
waitForDebuggerOnStart: 'bool'
|
|
83
|
+
"""Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets."""
|
|
84
|
+
flatten: NotRequired['bool']
|
|
85
|
+
"""Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325."""
|
|
86
|
+
filter: NotRequired['TargetFilter']
|
|
87
|
+
"""Only targets matching filter will be attached."""
|
|
88
|
+
class autoAttachRelatedParameters(TypedDict, total=True):
|
|
89
|
+
targetId: 'TargetID'
|
|
90
|
+
waitForDebuggerOnStart: 'bool'
|
|
91
|
+
"""Whether to pause new targets when attaching to them. Use Runtime.runIfWaitingForDebugger to run paused targets."""
|
|
92
|
+
filter: NotRequired['TargetFilter']
|
|
93
|
+
"""Only targets matching filter will be attached."""
|
|
94
|
+
class setDiscoverTargetsParameters(TypedDict, total=True):
|
|
95
|
+
discover: 'bool'
|
|
96
|
+
"""Whether to discover available targets."""
|
|
97
|
+
filter: NotRequired['TargetFilter']
|
|
98
|
+
"""Only targets matching filter will be attached. If discover is false, filter must be omitted or empty."""
|
|
99
|
+
class setRemoteLocationsParameters(TypedDict, total=True):
|
|
100
|
+
locations: 'List[RemoteLocation]'
|
|
101
|
+
"""List of remote locations."""
|
|
102
|
+
class getDevToolsTargetParameters(TypedDict, total=True):
|
|
103
|
+
targetId: 'TargetID'
|
|
104
|
+
"""Page or tab target ID."""
|
|
105
|
+
class openDevToolsParameters(TypedDict, total=True):
|
|
106
|
+
targetId: 'TargetID'
|
|
107
|
+
"""This can be the page or tab target ID."""
|
|
108
|
+
panelId: NotRequired['str']
|
|
109
|
+
"""The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance."""
|
|
110
|
+
|
|
111
|
+
class attachToTargetReturns(TypedDict):
|
|
112
|
+
sessionId: 'SessionID'
|
|
113
|
+
"""Id assigned to the session."""
|
|
114
|
+
class attachToBrowserTargetReturns(TypedDict):
|
|
115
|
+
sessionId: 'SessionID'
|
|
116
|
+
"""Id assigned to the session."""
|
|
117
|
+
class closeTargetReturns(TypedDict):
|
|
118
|
+
success: 'bool'
|
|
119
|
+
"""Always set to true. If an error occurs, the response indicates protocol error."""
|
|
120
|
+
|
|
121
|
+
class createBrowserContextReturns(TypedDict):
|
|
122
|
+
browserContextId: 'BrowserContextID'
|
|
123
|
+
"""The id of the context created."""
|
|
124
|
+
class getBrowserContextsReturns(TypedDict):
|
|
125
|
+
browserContextIds: 'List[BrowserContextID]'
|
|
126
|
+
"""An array of browser context ids."""
|
|
127
|
+
defaultBrowserContextId: 'BrowserContextID'
|
|
128
|
+
"""The id of the default browser context if available."""
|
|
129
|
+
class createTargetReturns(TypedDict):
|
|
130
|
+
targetId: 'TargetID'
|
|
131
|
+
"""The id of the page opened."""
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class getTargetInfoReturns(TypedDict):
|
|
135
|
+
targetInfo: 'TargetInfo'
|
|
136
|
+
class getTargetsReturns(TypedDict):
|
|
137
|
+
targetInfos: 'List[TargetInfo]'
|
|
138
|
+
"""The list of targets."""
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class getDevToolsTargetReturns(TypedDict):
|
|
144
|
+
targetId: 'TargetID'
|
|
145
|
+
"""The targetId of DevTools page target if exists."""
|
|
146
|
+
class openDevToolsReturns(TypedDict):
|
|
147
|
+
targetId: 'TargetID'
|
|
148
|
+
"""The targetId of DevTools page target."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Target Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import TargetMethods
|
|
4
|
+
from .events.service import TargetEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Target(TargetMethods, TargetEvents):
|
|
10
|
+
"""
|
|
11
|
+
Supports additional targets discovery and allows to attach to them.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Target domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
TargetMethods.__init__(self, client)
|
|
21
|
+
TargetEvents.__init__(self, client)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""CDP Target 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.browser.types import BrowserContextID
|
|
8
|
+
from cdp.protocol.page.types import FrameId
|
|
9
|
+
|
|
10
|
+
TargetID = str
|
|
11
|
+
SessionID = str
|
|
12
|
+
"""Unique identifier of attached debugging session."""
|
|
13
|
+
class TargetInfo(TypedDict, total=True):
|
|
14
|
+
targetId: 'TargetID'
|
|
15
|
+
type: 'str'
|
|
16
|
+
"""List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22"""
|
|
17
|
+
title: 'str'
|
|
18
|
+
url: 'str'
|
|
19
|
+
attached: 'bool'
|
|
20
|
+
"""Whether the target has an attached client."""
|
|
21
|
+
canAccessOpener: 'bool'
|
|
22
|
+
"""Whether the target has access to the originating window."""
|
|
23
|
+
openerId: NotRequired['TargetID']
|
|
24
|
+
"""Opener target Id"""
|
|
25
|
+
openerFrameId: NotRequired['FrameId']
|
|
26
|
+
"""Frame id of originating window (is only set if target has an opener)."""
|
|
27
|
+
parentFrameId: NotRequired['FrameId']
|
|
28
|
+
"""Id of the parent frame, only present for the "iframe" targets."""
|
|
29
|
+
browserContextId: NotRequired['BrowserContextID']
|
|
30
|
+
subtype: NotRequired['str']
|
|
31
|
+
"""Provides additional details for specific target types. For example, for the type of "page", this may be set to "prerender"."""
|
|
32
|
+
class FilterEntry(TypedDict, total=False):
|
|
33
|
+
"""A filter used by target query/discovery/auto-attach operations."""
|
|
34
|
+
exclude: NotRequired['bool']
|
|
35
|
+
"""If set, causes exclusion of matching targets from the list."""
|
|
36
|
+
type: NotRequired['str']
|
|
37
|
+
"""If not present, matches any type."""
|
|
38
|
+
TargetFilter = List['FilterEntry']
|
|
39
|
+
"""The entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of exclude field in the entry. If filter is not specified, the one assumed is [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}] (i.e. include everything but browser and tab)."""
|
|
40
|
+
class RemoteLocation(TypedDict, total=True):
|
|
41
|
+
host: 'str'
|
|
42
|
+
port: 'int'
|
|
43
|
+
WindowState = Literal['normal','minimized','maximized','fullscreen']
|
|
44
|
+
"""The state of the target window."""
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""CDP Tethering 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 TetheringEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Tethering domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Tethering events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_accepted(self, callback: Callable[[acceptedEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
Informs that port was successfully bound and got a specified connection id.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: acceptedEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Tethering.accepted', callback)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""CDP Tethering Events"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
class acceptedEvent(TypedDict, total=True):
|
|
6
|
+
port: 'int'
|
|
7
|
+
"""Port number that was successfully bound."""
|
|
8
|
+
connectionId: 'str'
|
|
9
|
+
"""Connection id to be used."""
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""CDP Tethering 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 TetheringMethods:
|
|
10
|
+
"""
|
|
11
|
+
Methods for the Tethering domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Tethering methods.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
async def bind(self, params: Optional[bindParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
23
|
+
"""
|
|
24
|
+
Request browser port binding.
|
|
25
|
+
Args:
|
|
26
|
+
params (bindParameters, optional): Parameters for the bind method.
|
|
27
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Dict[str, Any]: The result of the bind call.
|
|
31
|
+
"""
|
|
32
|
+
return await self.client.send(method="Tethering.bind", params=params,session_id=session_id)
|
|
33
|
+
async def unbind(self, params: Optional[unbindParameters]=None,session_id: Optional[str] = None) -> Dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
Request browser port unbinding.
|
|
36
|
+
Args:
|
|
37
|
+
params (unbindParameters, optional): Parameters for the unbind method.
|
|
38
|
+
session_id (str, optional): Target session ID for flat protocol usage.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
Dict[str, Any]: The result of the unbind call.
|
|
42
|
+
"""
|
|
43
|
+
return await self.client.send(method="Tethering.unbind", params=params,session_id=session_id)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""CDP Tethering Methods Types"""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
|
|
4
|
+
|
|
5
|
+
class bindParameters(TypedDict, total=True):
|
|
6
|
+
port: 'int'
|
|
7
|
+
"""Port number to bind."""
|
|
8
|
+
class unbindParameters(TypedDict, total=True):
|
|
9
|
+
port: 'int'
|
|
10
|
+
"""Port number to unbind."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CDP Tethering Domain"""
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
from .methods.service import TetheringMethods
|
|
4
|
+
from .events.service import TetheringEvents
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from ...service import Client
|
|
8
|
+
|
|
9
|
+
class Tethering(TetheringMethods, TetheringEvents):
|
|
10
|
+
"""
|
|
11
|
+
The Tethering domain defines methods and events for browser port binding.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Tethering domain.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
TetheringMethods.__init__(self, client)
|
|
21
|
+
TetheringEvents.__init__(self, client)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""CDP Tracing 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 TracingEvents:
|
|
10
|
+
"""
|
|
11
|
+
Events for the Tracing domain.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, client: "Client"):
|
|
14
|
+
"""
|
|
15
|
+
Initialize the Tracing events.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
client ("Client"): The parent CDP client instance.
|
|
19
|
+
"""
|
|
20
|
+
self.client = client
|
|
21
|
+
|
|
22
|
+
def on_buffer_usage(self, callback: Callable[[bufferUsageEvent,Optional[str]], None]=None) -> None:
|
|
23
|
+
"""
|
|
24
|
+
No description available for bufferUsage.
|
|
25
|
+
Args:
|
|
26
|
+
callback (callable, optional): Function called when the event is fired.
|
|
27
|
+
The callback receives (params: bufferUsageEvent, session_id: Optional[str]).
|
|
28
|
+
"""
|
|
29
|
+
self.client.on('Tracing.bufferUsage', callback)
|
|
30
|
+
def on_data_collected(self, callback: Callable[[dataCollectedEvent,Optional[str]], None]=None) -> None:
|
|
31
|
+
"""
|
|
32
|
+
Contains a bucket of collected trace events. When tracing is stopped collected events will be sent as a sequence of dataCollected events followed by tracingComplete event.
|
|
33
|
+
Args:
|
|
34
|
+
callback (callable, optional): Function called when the event is fired.
|
|
35
|
+
The callback receives (params: dataCollectedEvent, session_id: Optional[str]).
|
|
36
|
+
"""
|
|
37
|
+
self.client.on('Tracing.dataCollected', callback)
|
|
38
|
+
def on_tracing_complete(self, callback: Callable[[tracingCompleteEvent,Optional[str]], None]=None) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.
|
|
41
|
+
Args:
|
|
42
|
+
callback (callable, optional): Function called when the event is fired.
|
|
43
|
+
The callback receives (params: tracingCompleteEvent, session_id: Optional[str]).
|
|
44
|
+
"""
|
|
45
|
+
self.client.on('Tracing.tracingComplete', callback)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""CDP Tracing 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.io.types import StreamHandle
|
|
8
|
+
from cdp.protocol.tracing.types import StreamCompression
|
|
9
|
+
from cdp.protocol.tracing.types import StreamFormat
|
|
10
|
+
|
|
11
|
+
class bufferUsageEvent(TypedDict, total=False):
|
|
12
|
+
percentFull: NotRequired['float']
|
|
13
|
+
"""A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size."""
|
|
14
|
+
eventCount: NotRequired['float']
|
|
15
|
+
"""An approximate number of events in the trace log."""
|
|
16
|
+
value: NotRequired['float']
|
|
17
|
+
"""A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size."""
|
|
18
|
+
class dataCollectedEvent(TypedDict, total=True):
|
|
19
|
+
value: 'List[Dict[str, Any]]'
|
|
20
|
+
class tracingCompleteEvent(TypedDict, total=True):
|
|
21
|
+
dataLossOccurred: 'bool'
|
|
22
|
+
"""Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around."""
|
|
23
|
+
stream: NotRequired['StreamHandle']
|
|
24
|
+
"""A handle of the stream that holds resulting trace data."""
|
|
25
|
+
traceFormat: NotRequired['StreamFormat']
|
|
26
|
+
"""Trace data format of returned stream."""
|
|
27
|
+
streamCompression: NotRequired['StreamCompression']
|
|
28
|
+
"""Compression format of returned stream."""
|
|
File without changes
|