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.
Files changed (476) hide show
  1. cdp/__init__.py +4 -0
  2. cdp/domains.py +582 -0
  3. cdp/generator/__init__.py +3 -0
  4. cdp/generator/client_generator.py +246 -0
  5. cdp/generator/constant.py +4 -0
  6. cdp/generator/domain_generator.py +149 -0
  7. cdp/generator/event_generator.py +202 -0
  8. cdp/generator/method_generator.py +215 -0
  9. cdp/generator/service.py +153 -0
  10. cdp/generator/type_generator.py +231 -0
  11. cdp/protocol/__init__.py +0 -0
  12. cdp/protocol/accessibility/__init__.py +0 -0
  13. cdp/protocol/accessibility/events/__init__.py +0 -0
  14. cdp/protocol/accessibility/events/service.py +37 -0
  15. cdp/protocol/accessibility/events/types.py +14 -0
  16. cdp/protocol/accessibility/methods/__init__.py +0 -0
  17. cdp/protocol/accessibility/methods/service.py +109 -0
  18. cdp/protocol/accessibility/methods/types.py +70 -0
  19. cdp/protocol/accessibility/service.py +21 -0
  20. cdp/protocol/accessibility/types.py +89 -0
  21. cdp/protocol/animation/__init__.py +0 -0
  22. cdp/protocol/animation/events/__init__.py +0 -0
  23. cdp/protocol/animation/events/service.py +53 -0
  24. cdp/protocol/animation/events/types.py +20 -0
  25. cdp/protocol/animation/methods/__init__.py +0 -0
  26. cdp/protocol/animation/methods/service.py +131 -0
  27. cdp/protocol/animation/methods/types.py +52 -0
  28. cdp/protocol/animation/service.py +21 -0
  29. cdp/protocol/animation/types.py +79 -0
  30. cdp/protocol/audits/__init__.py +0 -0
  31. cdp/protocol/audits/events/__init__.py +0 -0
  32. cdp/protocol/audits/events/service.py +29 -0
  33. cdp/protocol/audits/events/types.py +10 -0
  34. cdp/protocol/audits/methods/__init__.py +0 -0
  35. cdp/protocol/audits/methods/service.py +76 -0
  36. cdp/protocol/audits/methods/types.py +36 -0
  37. cdp/protocol/audits/service.py +21 -0
  38. cdp/protocol/audits/types.py +293 -0
  39. cdp/protocol/autofill/__init__.py +0 -0
  40. cdp/protocol/autofill/events/__init__.py +0 -0
  41. cdp/protocol/autofill/events/service.py +29 -0
  42. cdp/protocol/autofill/events/types.py +14 -0
  43. cdp/protocol/autofill/methods/__init__.py +0 -0
  44. cdp/protocol/autofill/methods/service.py +65 -0
  45. cdp/protocol/autofill/methods/types.py +22 -0
  46. cdp/protocol/autofill/service.py +21 -0
  47. cdp/protocol/autofill/types.py +54 -0
  48. cdp/protocol/background_service/__init__.py +0 -0
  49. cdp/protocol/background_service/events/__init__.py +0 -0
  50. cdp/protocol/background_service/events/service.py +37 -0
  51. cdp/protocol/background_service/events/types.py +14 -0
  52. cdp/protocol/background_service/methods/__init__.py +0 -0
  53. cdp/protocol/background_service/methods/service.py +65 -0
  54. cdp/protocol/background_service/methods/types.py +17 -0
  55. cdp/protocol/background_service/service.py +21 -0
  56. cdp/protocol/background_service/types.py +32 -0
  57. cdp/protocol/bluetooth_emulation/__init__.py +0 -0
  58. cdp/protocol/bluetooth_emulation/events/__init__.py +0 -0
  59. cdp/protocol/bluetooth_emulation/events/service.py +45 -0
  60. cdp/protocol/bluetooth_emulation/events/types.py +23 -0
  61. cdp/protocol/bluetooth_emulation/methods/__init__.py +0 -0
  62. cdp/protocol/bluetooth_emulation/methods/service.py +186 -0
  63. cdp/protocol/bluetooth_emulation/methods/types.py +81 -0
  64. cdp/protocol/bluetooth_emulation/service.py +21 -0
  65. cdp/protocol/bluetooth_emulation/types.py +45 -0
  66. cdp/protocol/browser/__init__.py +0 -0
  67. cdp/protocol/browser/events/__init__.py +0 -0
  68. cdp/protocol/browser/events/service.py +37 -0
  69. cdp/protocol/browser/events/types.py +28 -0
  70. cdp/protocol/browser/methods/__init__.py +0 -0
  71. cdp/protocol/browser/methods/service.py +230 -0
  72. cdp/protocol/browser/methods/types.py +126 -0
  73. cdp/protocol/browser/service.py +21 -0
  74. cdp/protocol/browser/types.py +57 -0
  75. cdp/protocol/cache_storage/__init__.py +0 -0
  76. cdp/protocol/cache_storage/events/__init__.py +0 -0
  77. cdp/protocol/cache_storage/events/service.py +20 -0
  78. cdp/protocol/cache_storage/events/types.py +3 -0
  79. cdp/protocol/cache_storage/methods/__init__.py +0 -0
  80. cdp/protocol/cache_storage/methods/service.py +76 -0
  81. cdp/protocol/cache_storage/methods/types.py +57 -0
  82. cdp/protocol/cache_storage/service.py +21 -0
  83. cdp/protocol/cache_storage/types.py +49 -0
  84. cdp/protocol/cast/__init__.py +0 -0
  85. cdp/protocol/cast/events/__init__.py +0 -0
  86. cdp/protocol/cast/events/service.py +37 -0
  87. cdp/protocol/cast/events/types.py +12 -0
  88. cdp/protocol/cast/methods/__init__.py +0 -0
  89. cdp/protocol/cast/methods/service.py +87 -0
  90. cdp/protocol/cast/methods/types.py +15 -0
  91. cdp/protocol/cast/service.py +21 -0
  92. cdp/protocol/cast/types.py +9 -0
  93. cdp/protocol/css/__init__.py +0 -0
  94. cdp/protocol/css/events/__init__.py +0 -0
  95. cdp/protocol/css/events/service.py +69 -0
  96. cdp/protocol/css/events/types.py +27 -0
  97. cdp/protocol/css/methods/__init__.py +0 -0
  98. cdp/protocol/css/methods/service.py +428 -0
  99. cdp/protocol/css/methods/types.py +278 -0
  100. cdp/protocol/css/service.py +21 -0
  101. cdp/protocol/css/types.py +451 -0
  102. cdp/protocol/debugger/__init__.py +0 -0
  103. cdp/protocol/debugger/events/__init__.py +0 -0
  104. cdp/protocol/debugger/events/service.py +53 -0
  105. cdp/protocol/debugger/events/types.py +112 -0
  106. cdp/protocol/debugger/methods/__init__.py +0 -0
  107. cdp/protocol/debugger/methods/service.py +362 -0
  108. cdp/protocol/debugger/methods/types.py +250 -0
  109. cdp/protocol/debugger/service.py +21 -0
  110. cdp/protocol/debugger/types.py +91 -0
  111. cdp/protocol/device_access/__init__.py +0 -0
  112. cdp/protocol/device_access/events/__init__.py +0 -0
  113. cdp/protocol/device_access/events/service.py +29 -0
  114. cdp/protocol/device_access/events/types.py +12 -0
  115. cdp/protocol/device_access/methods/__init__.py +0 -0
  116. cdp/protocol/device_access/methods/service.py +65 -0
  117. cdp/protocol/device_access/methods/types.py +16 -0
  118. cdp/protocol/device_access/service.py +21 -0
  119. cdp/protocol/device_access/types.py +13 -0
  120. cdp/protocol/device_orientation/__init__.py +0 -0
  121. cdp/protocol/device_orientation/events/__init__.py +0 -0
  122. cdp/protocol/device_orientation/events/service.py +20 -0
  123. cdp/protocol/device_orientation/events/types.py +3 -0
  124. cdp/protocol/device_orientation/methods/__init__.py +0 -0
  125. cdp/protocol/device_orientation/methods/service.py +43 -0
  126. cdp/protocol/device_orientation/methods/types.py +12 -0
  127. cdp/protocol/device_orientation/service.py +21 -0
  128. cdp/protocol/device_orientation/types.py +3 -0
  129. cdp/protocol/dom/__init__.py +0 -0
  130. cdp/protocol/dom/events/__init__.py +0 -0
  131. cdp/protocol/dom/events/service.py +165 -0
  132. cdp/protocol/dom/events/types.py +97 -0
  133. cdp/protocol/dom/methods/__init__.py +0 -0
  134. cdp/protocol/dom/methods/service.py +593 -0
  135. cdp/protocol/dom/methods/types.py +384 -0
  136. cdp/protocol/dom/service.py +21 -0
  137. cdp/protocol/dom/types.py +151 -0
  138. cdp/protocol/dom_debugger/__init__.py +0 -0
  139. cdp/protocol/dom_debugger/events/__init__.py +0 -0
  140. cdp/protocol/dom_debugger/events/service.py +20 -0
  141. cdp/protocol/dom_debugger/events/types.py +3 -0
  142. cdp/protocol/dom_debugger/methods/__init__.py +0 -0
  143. cdp/protocol/dom_debugger/methods/service.py +109 -0
  144. cdp/protocol/dom_debugger/methods/types.py +51 -0
  145. cdp/protocol/dom_debugger/service.py +21 -0
  146. cdp/protocol/dom_debugger/types.py +36 -0
  147. cdp/protocol/dom_snapshot/__init__.py +0 -0
  148. cdp/protocol/dom_snapshot/events/__init__.py +0 -0
  149. cdp/protocol/dom_snapshot/events/service.py +20 -0
  150. cdp/protocol/dom_snapshot/events/types.py +3 -0
  151. cdp/protocol/dom_snapshot/methods/__init__.py +0 -0
  152. cdp/protocol/dom_snapshot/methods/service.py +54 -0
  153. cdp/protocol/dom_snapshot/methods/types.py +28 -0
  154. cdp/protocol/dom_snapshot/service.py +21 -0
  155. cdp/protocol/dom_snapshot/types.py +220 -0
  156. cdp/protocol/dom_storage/__init__.py +0 -0
  157. cdp/protocol/dom_storage/events/__init__.py +0 -0
  158. cdp/protocol/dom_storage/events/service.py +53 -0
  159. cdp/protocol/dom_storage/events/types.py +22 -0
  160. cdp/protocol/dom_storage/methods/__init__.py +0 -0
  161. cdp/protocol/dom_storage/methods/service.py +87 -0
  162. cdp/protocol/dom_storage/methods/types.py +27 -0
  163. cdp/protocol/dom_storage/service.py +21 -0
  164. cdp/protocol/dom_storage/types.py +15 -0
  165. cdp/protocol/emulation/__init__.py +0 -0
  166. cdp/protocol/emulation/events/__init__.py +0 -0
  167. cdp/protocol/emulation/events/service.py +29 -0
  168. cdp/protocol/emulation/events/types.py +6 -0
  169. cdp/protocol/emulation/methods/__init__.py +0 -0
  170. cdp/protocol/emulation/methods/service.py +494 -0
  171. cdp/protocol/emulation/methods/types.py +261 -0
  172. cdp/protocol/emulation/service.py +21 -0
  173. cdp/protocol/emulation/types.py +132 -0
  174. cdp/protocol/event_breakpoints/__init__.py +0 -0
  175. cdp/protocol/event_breakpoints/events/__init__.py +0 -0
  176. cdp/protocol/event_breakpoints/events/service.py +20 -0
  177. cdp/protocol/event_breakpoints/events/types.py +3 -0
  178. cdp/protocol/event_breakpoints/methods/__init__.py +0 -0
  179. cdp/protocol/event_breakpoints/methods/service.py +54 -0
  180. cdp/protocol/event_breakpoints/methods/types.py +10 -0
  181. cdp/protocol/event_breakpoints/service.py +21 -0
  182. cdp/protocol/event_breakpoints/types.py +3 -0
  183. cdp/protocol/extensions/__init__.py +0 -0
  184. cdp/protocol/extensions/events/__init__.py +0 -0
  185. cdp/protocol/extensions/events/service.py +20 -0
  186. cdp/protocol/extensions/events/types.py +3 -0
  187. cdp/protocol/extensions/methods/__init__.py +0 -0
  188. cdp/protocol/extensions/methods/service.py +87 -0
  189. cdp/protocol/extensions/methods/types.py +46 -0
  190. cdp/protocol/extensions/service.py +21 -0
  191. cdp/protocol/extensions/types.py +6 -0
  192. cdp/protocol/fed_cm/__init__.py +0 -0
  193. cdp/protocol/fed_cm/events/__init__.py +0 -0
  194. cdp/protocol/fed_cm/events/service.py +37 -0
  195. cdp/protocol/fed_cm/events/types.py +18 -0
  196. cdp/protocol/fed_cm/methods/__init__.py +0 -0
  197. cdp/protocol/fed_cm/methods/service.py +98 -0
  198. cdp/protocol/fed_cm/methods/types.py +26 -0
  199. cdp/protocol/fed_cm/service.py +21 -0
  200. cdp/protocol/fed_cm/types.py +25 -0
  201. cdp/protocol/fetch/__init__.py +0 -0
  202. cdp/protocol/fetch/events/__init__.py +0 -0
  203. cdp/protocol/fetch/events/service.py +37 -0
  204. cdp/protocol/fetch/events/types.py +47 -0
  205. cdp/protocol/fetch/methods/__init__.py +0 -0
  206. cdp/protocol/fetch/methods/service.py +120 -0
  207. cdp/protocol/fetch/methods/types.py +85 -0
  208. cdp/protocol/fetch/service.py +21 -0
  209. cdp/protocol/fetch/types.py +41 -0
  210. cdp/protocol/file_system/__init__.py +0 -0
  211. cdp/protocol/file_system/events/__init__.py +0 -0
  212. cdp/protocol/file_system/events/service.py +20 -0
  213. cdp/protocol/file_system/events/types.py +3 -0
  214. cdp/protocol/file_system/methods/__init__.py +0 -0
  215. cdp/protocol/file_system/methods/service.py +32 -0
  216. cdp/protocol/file_system/methods/types.py +14 -0
  217. cdp/protocol/file_system/service.py +21 -0
  218. cdp/protocol/file_system/types.py +28 -0
  219. cdp/protocol/headless_experimental/__init__.py +0 -0
  220. cdp/protocol/headless_experimental/events/__init__.py +0 -0
  221. cdp/protocol/headless_experimental/events/service.py +20 -0
  222. cdp/protocol/headless_experimental/events/types.py +3 -0
  223. cdp/protocol/headless_experimental/methods/__init__.py +0 -0
  224. cdp/protocol/headless_experimental/methods/service.py +32 -0
  225. cdp/protocol/headless_experimental/methods/types.py +22 -0
  226. cdp/protocol/headless_experimental/service.py +21 -0
  227. cdp/protocol/headless_experimental/types.py +12 -0
  228. cdp/protocol/heap_profiler/__init__.py +0 -0
  229. cdp/protocol/heap_profiler/events/__init__.py +0 -0
  230. cdp/protocol/heap_profiler/events/service.py +61 -0
  231. cdp/protocol/heap_profiler/events/types.py +18 -0
  232. cdp/protocol/heap_profiler/methods/__init__.py +0 -0
  233. cdp/protocol/heap_profiler/methods/service.py +153 -0
  234. cdp/protocol/heap_profiler/methods/types.py +73 -0
  235. cdp/protocol/heap_profiler/service.py +21 -0
  236. cdp/protocol/heap_profiler/types.py +32 -0
  237. cdp/protocol/indexed_db/__init__.py +0 -0
  238. cdp/protocol/indexed_db/events/__init__.py +0 -0
  239. cdp/protocol/indexed_db/events/service.py +20 -0
  240. cdp/protocol/indexed_db/events/types.py +3 -0
  241. cdp/protocol/indexed_db/methods/__init__.py +0 -0
  242. cdp/protocol/indexed_db/methods/service.py +120 -0
  243. cdp/protocol/indexed_db/methods/types.py +111 -0
  244. cdp/protocol/indexed_db/service.py +21 -0
  245. cdp/protocol/indexed_db/types.py +74 -0
  246. cdp/protocol/input/__init__.py +0 -0
  247. cdp/protocol/input/events/__init__.py +0 -0
  248. cdp/protocol/input/events/service.py +29 -0
  249. cdp/protocol/input/events/types.py +10 -0
  250. cdp/protocol/input/methods/__init__.py +0 -0
  251. cdp/protocol/input/methods/service.py +164 -0
  252. cdp/protocol/input/methods/types.py +181 -0
  253. cdp/protocol/input/service.py +21 -0
  254. cdp/protocol/input/types.py +46 -0
  255. cdp/protocol/inspector/__init__.py +0 -0
  256. cdp/protocol/inspector/events/__init__.py +0 -0
  257. cdp/protocol/inspector/events/service.py +53 -0
  258. cdp/protocol/inspector/events/types.py +13 -0
  259. cdp/protocol/inspector/methods/__init__.py +0 -0
  260. cdp/protocol/inspector/methods/service.py +43 -0
  261. cdp/protocol/inspector/methods/types.py +3 -0
  262. cdp/protocol/inspector/service.py +21 -0
  263. cdp/protocol/inspector/types.py +3 -0
  264. cdp/protocol/io/__init__.py +0 -0
  265. cdp/protocol/io/events/__init__.py +0 -0
  266. cdp/protocol/io/events/service.py +20 -0
  267. cdp/protocol/io/events/types.py +3 -0
  268. cdp/protocol/io/methods/__init__.py +0 -0
  269. cdp/protocol/io/methods/service.py +54 -0
  270. cdp/protocol/io/methods/types.py +33 -0
  271. cdp/protocol/io/service.py +21 -0
  272. cdp/protocol/io/types.py +6 -0
  273. cdp/protocol/layer_tree/__init__.py +0 -0
  274. cdp/protocol/layer_tree/events/__init__.py +0 -0
  275. cdp/protocol/layer_tree/events/service.py +37 -0
  276. cdp/protocol/layer_tree/events/types.py +18 -0
  277. cdp/protocol/layer_tree/methods/__init__.py +0 -0
  278. cdp/protocol/layer_tree/methods/service.py +120 -0
  279. cdp/protocol/layer_tree/methods/types.py +70 -0
  280. cdp/protocol/layer_tree/service.py +21 -0
  281. cdp/protocol/layer_tree/types.py +73 -0
  282. cdp/protocol/log/__init__.py +0 -0
  283. cdp/protocol/log/events/__init__.py +0 -0
  284. cdp/protocol/log/events/service.py +29 -0
  285. cdp/protocol/log/events/types.py +11 -0
  286. cdp/protocol/log/methods/__init__.py +0 -0
  287. cdp/protocol/log/methods/service.py +76 -0
  288. cdp/protocol/log/methods/types.py +14 -0
  289. cdp/protocol/log/service.py +21 -0
  290. cdp/protocol/log/types.py +40 -0
  291. cdp/protocol/media/__init__.py +0 -0
  292. cdp/protocol/media/events/__init__.py +0 -0
  293. cdp/protocol/media/events/service.py +61 -0
  294. cdp/protocol/media/events/types.py +27 -0
  295. cdp/protocol/media/methods/__init__.py +0 -0
  296. cdp/protocol/media/methods/service.py +43 -0
  297. cdp/protocol/media/methods/types.py +3 -0
  298. cdp/protocol/media/service.py +21 -0
  299. cdp/protocol/media/types.py +42 -0
  300. cdp/protocol/memory/__init__.py +0 -0
  301. cdp/protocol/memory/events/__init__.py +0 -0
  302. cdp/protocol/memory/events/service.py +20 -0
  303. cdp/protocol/memory/events/types.py +3 -0
  304. cdp/protocol/memory/methods/__init__.py +0 -0
  305. cdp/protocol/memory/methods/service.py +142 -0
  306. cdp/protocol/memory/methods/types.py +48 -0
  307. cdp/protocol/memory/service.py +21 -0
  308. cdp/protocol/memory/types.py +34 -0
  309. cdp/protocol/network/__init__.py +0 -0
  310. cdp/protocol/network/events/__init__.py +0 -0
  311. cdp/protocol/network/events/service.py +365 -0
  312. cdp/protocol/network/events/types.py +360 -0
  313. cdp/protocol/network/methods/__init__.py +0 -0
  314. cdp/protocol/network/methods/service.py +384 -0
  315. cdp/protocol/network/methods/types.py +252 -0
  316. cdp/protocol/network/service.py +21 -0
  317. cdp/protocol/network/types.py +691 -0
  318. cdp/protocol/overlay/__init__.py +0 -0
  319. cdp/protocol/overlay/events/__init__.py +0 -0
  320. cdp/protocol/overlay/events/service.py +53 -0
  321. cdp/protocol/overlay/events/types.py +20 -0
  322. cdp/protocol/overlay/methods/__init__.py +0 -0
  323. cdp/protocol/overlay/methods/service.py +307 -0
  324. cdp/protocol/overlay/methods/types.py +144 -0
  325. cdp/protocol/overlay/service.py +21 -0
  326. cdp/protocol/overlay/types.py +198 -0
  327. cdp/protocol/page/__init__.py +0 -0
  328. cdp/protocol/page/events/__init__.py +0 -0
  329. cdp/protocol/page/events/service.py +213 -0
  330. cdp/protocol/page/events/types.py +147 -0
  331. cdp/protocol/page/methods/__init__.py +0 -0
  332. cdp/protocol/page/methods/service.py +560 -0
  333. cdp/protocol/page/methods/types.py +346 -0
  334. cdp/protocol/page/service.py +21 -0
  335. cdp/protocol/page/types.py +379 -0
  336. cdp/protocol/performance/__init__.py +0 -0
  337. cdp/protocol/performance/events/__init__.py +0 -0
  338. cdp/protocol/performance/events/service.py +29 -0
  339. cdp/protocol/performance/events/types.py +13 -0
  340. cdp/protocol/performance/methods/__init__.py +0 -0
  341. cdp/protocol/performance/methods/service.py +54 -0
  342. cdp/protocol/performance/methods/types.py +18 -0
  343. cdp/protocol/performance/service.py +21 -0
  344. cdp/protocol/performance/types.py +10 -0
  345. cdp/protocol/performance_timeline/__init__.py +0 -0
  346. cdp/protocol/performance_timeline/events/__init__.py +0 -0
  347. cdp/protocol/performance_timeline/events/service.py +29 -0
  348. cdp/protocol/performance_timeline/events/types.py +10 -0
  349. cdp/protocol/performance_timeline/methods/__init__.py +0 -0
  350. cdp/protocol/performance_timeline/methods/service.py +32 -0
  351. cdp/protocol/performance_timeline/methods/types.py +7 -0
  352. cdp/protocol/performance_timeline/service.py +21 -0
  353. cdp/protocol/performance_timeline/types.py +46 -0
  354. cdp/protocol/preload/__init__.py +0 -0
  355. cdp/protocol/preload/events/__init__.py +0 -0
  356. cdp/protocol/preload/events/service.py +69 -0
  357. cdp/protocol/preload/events/types.py +49 -0
  358. cdp/protocol/preload/methods/__init__.py +0 -0
  359. cdp/protocol/preload/methods/service.py +43 -0
  360. cdp/protocol/preload/methods/types.py +3 -0
  361. cdp/protocol/preload/service.py +21 -0
  362. cdp/protocol/preload/types.py +56 -0
  363. cdp/protocol/profiler/__init__.py +0 -0
  364. cdp/protocol/profiler/events/__init__.py +0 -0
  365. cdp/protocol/profiler/events/service.py +45 -0
  366. cdp/protocol/profiler/events/types.py +30 -0
  367. cdp/protocol/profiler/methods/__init__.py +0 -0
  368. cdp/protocol/profiler/methods/service.py +120 -0
  369. cdp/protocol/profiler/methods/types.py +45 -0
  370. cdp/protocol/profiler/service.py +21 -0
  371. cdp/protocol/profiler/types.py +65 -0
  372. cdp/protocol/pwa/__init__.py +0 -0
  373. cdp/protocol/pwa/events/__init__.py +0 -0
  374. cdp/protocol/pwa/events/service.py +20 -0
  375. cdp/protocol/pwa/events/types.py +3 -0
  376. cdp/protocol/pwa/methods/__init__.py +0 -0
  377. cdp/protocol/pwa/methods/service.py +98 -0
  378. cdp/protocol/pwa/methods/types.py +43 -0
  379. cdp/protocol/pwa/service.py +21 -0
  380. cdp/protocol/pwa/types.py +15 -0
  381. cdp/protocol/py.typed +0 -0
  382. cdp/protocol/runtime/__init__.py +0 -0
  383. cdp/protocol/runtime/events/__init__.py +0 -0
  384. cdp/protocol/runtime/events/service.py +85 -0
  385. cdp/protocol/runtime/events/types.py +55 -0
  386. cdp/protocol/runtime/methods/__init__.py +0 -0
  387. cdp/protocol/runtime/methods/service.py +274 -0
  388. cdp/protocol/runtime/methods/types.py +226 -0
  389. cdp/protocol/runtime/service.py +21 -0
  390. cdp/protocol/runtime/types.py +194 -0
  391. cdp/protocol/security/__init__.py +0 -0
  392. cdp/protocol/security/events/__init__.py +0 -0
  393. cdp/protocol/security/events/service.py +29 -0
  394. cdp/protocol/security/events/types.py +11 -0
  395. cdp/protocol/security/methods/__init__.py +0 -0
  396. cdp/protocol/security/methods/service.py +54 -0
  397. cdp/protocol/security/methods/types.py +9 -0
  398. cdp/protocol/security/service.py +21 -0
  399. cdp/protocol/security/types.py +102 -0
  400. cdp/protocol/service_worker/__init__.py +0 -0
  401. cdp/protocol/service_worker/events/__init__.py +0 -0
  402. cdp/protocol/service_worker/events/service.py +45 -0
  403. cdp/protocol/service_worker/events/types.py +16 -0
  404. cdp/protocol/service_worker/methods/__init__.py +0 -0
  405. cdp/protocol/service_worker/methods/service.py +153 -0
  406. cdp/protocol/service_worker/methods/types.py +36 -0
  407. cdp/protocol/service_worker/service.py +21 -0
  408. cdp/protocol/service_worker/types.py +38 -0
  409. cdp/protocol/storage/__init__.py +0 -0
  410. cdp/protocol/storage/events/__init__.py +0 -0
  411. cdp/protocol/storage/events/service.py +141 -0
  412. cdp/protocol/storage/events/types.py +139 -0
  413. cdp/protocol/storage/methods/__init__.py +0 -0
  414. cdp/protocol/storage/methods/service.py +428 -0
  415. cdp/protocol/storage/methods/types.py +184 -0
  416. cdp/protocol/storage/service.py +21 -0
  417. cdp/protocol/storage/types.py +236 -0
  418. cdp/protocol/system_info/__init__.py +0 -0
  419. cdp/protocol/system_info/events/__init__.py +0 -0
  420. cdp/protocol/system_info/events/service.py +20 -0
  421. cdp/protocol/system_info/events/types.py +3 -0
  422. cdp/protocol/system_info/methods/__init__.py +0 -0
  423. cdp/protocol/system_info/methods/service.py +54 -0
  424. cdp/protocol/system_info/methods/types.py +27 -0
  425. cdp/protocol/system_info/service.py +21 -0
  426. cdp/protocol/system_info/types.py +71 -0
  427. cdp/protocol/target/__init__.py +0 -0
  428. cdp/protocol/target/events/__init__.py +0 -0
  429. cdp/protocol/target/events/service.py +77 -0
  430. cdp/protocol/target/events/types.py +38 -0
  431. cdp/protocol/target/methods/__init__.py +0 -0
  432. cdp/protocol/target/methods/service.py +219 -0
  433. cdp/protocol/target/methods/types.py +148 -0
  434. cdp/protocol/target/service.py +21 -0
  435. cdp/protocol/target/types.py +44 -0
  436. cdp/protocol/tethering/__init__.py +0 -0
  437. cdp/protocol/tethering/events/__init__.py +0 -0
  438. cdp/protocol/tethering/events/service.py +29 -0
  439. cdp/protocol/tethering/events/types.py +9 -0
  440. cdp/protocol/tethering/methods/__init__.py +0 -0
  441. cdp/protocol/tethering/methods/service.py +43 -0
  442. cdp/protocol/tethering/methods/types.py +10 -0
  443. cdp/protocol/tethering/service.py +21 -0
  444. cdp/protocol/tethering/types.py +3 -0
  445. cdp/protocol/tracing/__init__.py +0 -0
  446. cdp/protocol/tracing/events/__init__.py +0 -0
  447. cdp/protocol/tracing/events/service.py +45 -0
  448. cdp/protocol/tracing/events/types.py +28 -0
  449. cdp/protocol/tracing/methods/__init__.py +0 -0
  450. cdp/protocol/tracing/methods/service.py +87 -0
  451. cdp/protocol/tracing/methods/types.py +54 -0
  452. cdp/protocol/tracing/service.py +21 -0
  453. cdp/protocol/tracing/types.py +34 -0
  454. cdp/protocol/web_audio/__init__.py +0 -0
  455. cdp/protocol/web_audio/events/__init__.py +0 -0
  456. cdp/protocol/web_audio/events/service.py +125 -0
  457. cdp/protocol/web_audio/events/types.py +56 -0
  458. cdp/protocol/web_audio/methods/__init__.py +0 -0
  459. cdp/protocol/web_audio/methods/service.py +54 -0
  460. cdp/protocol/web_audio/methods/types.py +17 -0
  461. cdp/protocol/web_audio/service.py +21 -0
  462. cdp/protocol/web_audio/types.py +66 -0
  463. cdp/protocol/web_authn/__init__.py +0 -0
  464. cdp/protocol/web_authn/events/__init__.py +0 -0
  465. cdp/protocol/web_authn/events/service.py +53 -0
  466. cdp/protocol/web_authn/events/types.py +21 -0
  467. cdp/protocol/web_authn/methods/__init__.py +0 -0
  468. cdp/protocol/web_authn/methods/service.py +164 -0
  469. cdp/protocol/web_authn/methods/types.py +61 -0
  470. cdp/protocol/web_authn/service.py +21 -0
  471. cdp/protocol/web_authn/types.py +54 -0
  472. cdp/py.typed +0 -0
  473. cdp/service.py +184 -0
  474. chromedeveloperprotocol_client-0.1.0.dist-info/METADATA +15 -0
  475. chromedeveloperprotocol_client-0.1.0.dist-info/RECORD +476 -0
  476. chromedeveloperprotocol_client-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,198 @@
1
+ """CDP Overlay Types"""
2
+
3
+ from typing import TypedDict, NotRequired, Required, Literal, Any, Dict, Union, Optional, List, Set, Tuple
4
+
5
+ from typing import TYPE_CHECKING
6
+ if TYPE_CHECKING:
7
+ from cdp.protocol.dom.types import NodeId
8
+ from cdp.protocol.dom.types import RGBA
9
+ from cdp.protocol.dom.types import Rect
10
+
11
+ class SourceOrderConfig(TypedDict, total=True):
12
+ """Configuration data for drawing the source order of an elements children."""
13
+ parentOutlineColor: 'RGBA'
14
+ """the color to outline the given element in."""
15
+ childOutlineColor: 'RGBA'
16
+ """the color to outline the child elements in."""
17
+ class GridHighlightConfig(TypedDict, total=False):
18
+ """Configuration data for the highlighting of Grid elements."""
19
+ showGridExtensionLines: NotRequired['bool']
20
+ """Whether the extension lines from grid cells to the rulers should be shown (default: false)."""
21
+ showPositiveLineNumbers: NotRequired['bool']
22
+ """Show Positive line number labels (default: false)."""
23
+ showNegativeLineNumbers: NotRequired['bool']
24
+ """Show Negative line number labels (default: false)."""
25
+ showAreaNames: NotRequired['bool']
26
+ """Show area name labels (default: false)."""
27
+ showLineNames: NotRequired['bool']
28
+ """Show line name labels (default: false)."""
29
+ showTrackSizes: NotRequired['bool']
30
+ """Show track size labels (default: false)."""
31
+ gridBorderColor: NotRequired['RGBA']
32
+ """The grid container border highlight color (default: transparent)."""
33
+ rowLineColor: NotRequired['RGBA']
34
+ """The row line color (default: transparent)."""
35
+ columnLineColor: NotRequired['RGBA']
36
+ """The column line color (default: transparent)."""
37
+ gridBorderDash: NotRequired['bool']
38
+ """Whether the grid border is dashed (default: false)."""
39
+ rowLineDash: NotRequired['bool']
40
+ """Whether row lines are dashed (default: false)."""
41
+ columnLineDash: NotRequired['bool']
42
+ """Whether column lines are dashed (default: false)."""
43
+ rowGapColor: NotRequired['RGBA']
44
+ """The row gap highlight fill color (default: transparent)."""
45
+ rowHatchColor: NotRequired['RGBA']
46
+ """The row gap hatching fill color (default: transparent)."""
47
+ columnGapColor: NotRequired['RGBA']
48
+ """The column gap highlight fill color (default: transparent)."""
49
+ columnHatchColor: NotRequired['RGBA']
50
+ """The column gap hatching fill color (default: transparent)."""
51
+ areaBorderColor: NotRequired['RGBA']
52
+ """The named grid areas border color (Default: transparent)."""
53
+ gridBackgroundColor: NotRequired['RGBA']
54
+ """The grid container background color (Default: transparent)."""
55
+ class FlexContainerHighlightConfig(TypedDict, total=False):
56
+ """Configuration data for the highlighting of Flex container elements."""
57
+ containerBorder: NotRequired['LineStyle']
58
+ """The style of the container border"""
59
+ lineSeparator: NotRequired['LineStyle']
60
+ """The style of the separator between lines"""
61
+ itemSeparator: NotRequired['LineStyle']
62
+ """The style of the separator between items"""
63
+ mainDistributedSpace: NotRequired['BoxStyle']
64
+ """Style of content-distribution space on the main axis (justify-content)."""
65
+ crossDistributedSpace: NotRequired['BoxStyle']
66
+ """Style of content-distribution space on the cross axis (align-content)."""
67
+ rowGapSpace: NotRequired['BoxStyle']
68
+ """Style of empty space caused by row gaps (gap/row-gap)."""
69
+ columnGapSpace: NotRequired['BoxStyle']
70
+ """Style of empty space caused by columns gaps (gap/column-gap)."""
71
+ crossAlignment: NotRequired['LineStyle']
72
+ """Style of the self-alignment line (align-items)."""
73
+ class FlexItemHighlightConfig(TypedDict, total=False):
74
+ """Configuration data for the highlighting of Flex item elements."""
75
+ baseSizeBox: NotRequired['BoxStyle']
76
+ """Style of the box representing the item's base size"""
77
+ baseSizeBorder: NotRequired['LineStyle']
78
+ """Style of the border around the box representing the item's base size"""
79
+ flexibilityArrow: NotRequired['LineStyle']
80
+ """Style of the arrow representing if the item grew or shrank"""
81
+ class LineStyle(TypedDict, total=False):
82
+ """Style information for drawing a line."""
83
+ color: NotRequired['RGBA']
84
+ """The color of the line (default: transparent)"""
85
+ pattern: NotRequired['Literal["dashed", "dotted"]']
86
+ """The line pattern (default: solid)"""
87
+ class BoxStyle(TypedDict, total=False):
88
+ """Style information for drawing a box."""
89
+ fillColor: NotRequired['RGBA']
90
+ """The background color for the box (default: transparent)"""
91
+ hatchColor: NotRequired['RGBA']
92
+ """The hatching color for the box (default: transparent)"""
93
+ ContrastAlgorithm = Literal['aa','aaa','apca']
94
+ class HighlightConfig(TypedDict, total=False):
95
+ """Configuration data for the highlighting of page elements."""
96
+ showInfo: NotRequired['bool']
97
+ """Whether the node info tooltip should be shown (default: false)."""
98
+ showStyles: NotRequired['bool']
99
+ """Whether the node styles in the tooltip (default: false)."""
100
+ showRulers: NotRequired['bool']
101
+ """Whether the rulers should be shown (default: false)."""
102
+ showAccessibilityInfo: NotRequired['bool']
103
+ """Whether the a11y info should be shown (default: true)."""
104
+ showExtensionLines: NotRequired['bool']
105
+ """Whether the extension lines from node to the rulers should be shown (default: false)."""
106
+ contentColor: NotRequired['RGBA']
107
+ """The content box highlight fill color (default: transparent)."""
108
+ paddingColor: NotRequired['RGBA']
109
+ """The padding highlight fill color (default: transparent)."""
110
+ borderColor: NotRequired['RGBA']
111
+ """The border highlight fill color (default: transparent)."""
112
+ marginColor: NotRequired['RGBA']
113
+ """The margin highlight fill color (default: transparent)."""
114
+ eventTargetColor: NotRequired['RGBA']
115
+ """The event target element highlight fill color (default: transparent)."""
116
+ shapeColor: NotRequired['RGBA']
117
+ """The shape outside fill color (default: transparent)."""
118
+ shapeMarginColor: NotRequired['RGBA']
119
+ """The shape margin fill color (default: transparent)."""
120
+ cssGridColor: NotRequired['RGBA']
121
+ """The grid layout color (default: transparent)."""
122
+ colorFormat: NotRequired['ColorFormat']
123
+ """The color format used to format color styles (default: hex)."""
124
+ gridHighlightConfig: NotRequired['GridHighlightConfig']
125
+ """The grid layout highlight configuration (default: all transparent)."""
126
+ flexContainerHighlightConfig: NotRequired['FlexContainerHighlightConfig']
127
+ """The flex container highlight configuration (default: all transparent)."""
128
+ flexItemHighlightConfig: NotRequired['FlexItemHighlightConfig']
129
+ """The flex item highlight configuration (default: all transparent)."""
130
+ contrastAlgorithm: NotRequired['ContrastAlgorithm']
131
+ """The contrast algorithm to use for the contrast ratio (default: aa)."""
132
+ containerQueryContainerHighlightConfig: NotRequired['ContainerQueryContainerHighlightConfig']
133
+ """The container query container highlight configuration (default: all transparent)."""
134
+ ColorFormat = Literal['rgb','hsl','hwb','hex']
135
+ class GridNodeHighlightConfig(TypedDict, total=True):
136
+ """Configurations for Persistent Grid Highlight"""
137
+ gridHighlightConfig: 'GridHighlightConfig'
138
+ """A descriptor for the highlight appearance."""
139
+ nodeId: 'NodeId'
140
+ """Identifier of the node to highlight."""
141
+ class FlexNodeHighlightConfig(TypedDict, total=True):
142
+ flexContainerHighlightConfig: 'FlexContainerHighlightConfig'
143
+ """A descriptor for the highlight appearance of flex containers."""
144
+ nodeId: 'NodeId'
145
+ """Identifier of the node to highlight."""
146
+ class ScrollSnapContainerHighlightConfig(TypedDict, total=False):
147
+ snapportBorder: NotRequired['LineStyle']
148
+ """The style of the snapport border (default: transparent)"""
149
+ snapAreaBorder: NotRequired['LineStyle']
150
+ """The style of the snap area border (default: transparent)"""
151
+ scrollMarginColor: NotRequired['RGBA']
152
+ """The margin highlight fill color (default: transparent)."""
153
+ scrollPaddingColor: NotRequired['RGBA']
154
+ """The padding highlight fill color (default: transparent)."""
155
+ class ScrollSnapHighlightConfig(TypedDict, total=True):
156
+ scrollSnapContainerHighlightConfig: 'ScrollSnapContainerHighlightConfig'
157
+ """A descriptor for the highlight appearance of scroll snap containers."""
158
+ nodeId: 'NodeId'
159
+ """Identifier of the node to highlight."""
160
+ class HingeConfig(TypedDict, total=True):
161
+ """Configuration for dual screen hinge"""
162
+ rect: 'Rect'
163
+ """A rectangle represent hinge"""
164
+ contentColor: NotRequired['RGBA']
165
+ """The content box highlight fill color (default: a dark color)."""
166
+ outlineColor: NotRequired['RGBA']
167
+ """The content box highlight outline color (default: transparent)."""
168
+ class WindowControlsOverlayConfig(TypedDict, total=True):
169
+ """Configuration for Window Controls Overlay"""
170
+ showCSS: 'bool'
171
+ """Whether the title bar CSS should be shown when emulating the Window Controls Overlay."""
172
+ selectedPlatform: 'str'
173
+ """Selected platforms to show the overlay."""
174
+ themeColor: 'str'
175
+ """The theme color defined in app manifest."""
176
+ class ContainerQueryHighlightConfig(TypedDict, total=True):
177
+ containerQueryContainerHighlightConfig: 'ContainerQueryContainerHighlightConfig'
178
+ """A descriptor for the highlight appearance of container query containers."""
179
+ nodeId: 'NodeId'
180
+ """Identifier of the container node to highlight."""
181
+ class ContainerQueryContainerHighlightConfig(TypedDict, total=False):
182
+ containerBorder: NotRequired['LineStyle']
183
+ """The style of the container border."""
184
+ descendantBorder: NotRequired['LineStyle']
185
+ """The style of the descendants' borders."""
186
+ class IsolatedElementHighlightConfig(TypedDict, total=True):
187
+ isolationModeHighlightConfig: 'IsolationModeHighlightConfig'
188
+ """A descriptor for the highlight appearance of an element in isolation mode."""
189
+ nodeId: 'NodeId'
190
+ """Identifier of the isolated element to highlight."""
191
+ class IsolationModeHighlightConfig(TypedDict, total=False):
192
+ resizerColor: NotRequired['RGBA']
193
+ """The fill color of the resizers (default: transparent)."""
194
+ resizerHandleColor: NotRequired['RGBA']
195
+ """The fill color for resizer handles (default: transparent)."""
196
+ maskColor: NotRequired['RGBA']
197
+ """The fill color for the mask covering non-isolated elements (default: transparent)."""
198
+ InspectMode = Literal['searchForNode','searchForUAShadowDOM','captureAreaScreenshot','none']
File without changes
File without changes
@@ -0,0 +1,213 @@
1
+ """CDP Page 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 PageEvents:
10
+ """
11
+ Events for the Page domain.
12
+ """
13
+ def __init__(self, client: "Client"):
14
+ """
15
+ Initialize the Page events.
16
+
17
+ Args:
18
+ client ("Client"): The parent CDP client instance.
19
+ """
20
+ self.client = client
21
+
22
+ def on_dom_content_event_fired(self, callback: Callable[[domContentEventFiredEvent,Optional[str]], None]=None) -> None:
23
+ """
24
+ No description available for domContentEventFired.
25
+ Args:
26
+ callback (callable, optional): Function called when the event is fired.
27
+ The callback receives (params: domContentEventFiredEvent, session_id: Optional[str]).
28
+ """
29
+ self.client.on('Page.domContentEventFired', callback)
30
+ def on_file_chooser_opened(self, callback: Callable[[fileChooserOpenedEvent,Optional[str]], None]=None) -> None:
31
+ """
32
+ Emitted only when `page.interceptFileChooser` is enabled.
33
+ Args:
34
+ callback (callable, optional): Function called when the event is fired.
35
+ The callback receives (params: fileChooserOpenedEvent, session_id: Optional[str]).
36
+ """
37
+ self.client.on('Page.fileChooserOpened', callback)
38
+ def on_frame_attached(self, callback: Callable[[frameAttachedEvent,Optional[str]], None]=None) -> None:
39
+ """
40
+ Fired when frame has been attached to its parent.
41
+ Args:
42
+ callback (callable, optional): Function called when the event is fired.
43
+ The callback receives (params: frameAttachedEvent, session_id: Optional[str]).
44
+ """
45
+ self.client.on('Page.frameAttached', callback)
46
+ def on_frame_detached(self, callback: Callable[[frameDetachedEvent,Optional[str]], None]=None) -> None:
47
+ """
48
+ Fired when frame has been detached from its parent.
49
+ Args:
50
+ callback (callable, optional): Function called when the event is fired.
51
+ The callback receives (params: frameDetachedEvent, session_id: Optional[str]).
52
+ """
53
+ self.client.on('Page.frameDetached', callback)
54
+ def on_frame_subtree_will_be_detached(self, callback: Callable[[frameSubtreeWillBeDetachedEvent,Optional[str]], None]=None) -> None:
55
+ """
56
+ Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
57
+ Args:
58
+ callback (callable, optional): Function called when the event is fired.
59
+ The callback receives (params: frameSubtreeWillBeDetachedEvent, session_id: Optional[str]).
60
+ """
61
+ self.client.on('Page.frameSubtreeWillBeDetached', callback)
62
+ def on_frame_navigated(self, callback: Callable[[frameNavigatedEvent,Optional[str]], None]=None) -> None:
63
+ """
64
+ Fired once navigation of the frame has completed. Frame is now associated with the new loader.
65
+ Args:
66
+ callback (callable, optional): Function called when the event is fired.
67
+ The callback receives (params: frameNavigatedEvent, session_id: Optional[str]).
68
+ """
69
+ self.client.on('Page.frameNavigated', callback)
70
+ def on_document_opened(self, callback: Callable[[documentOpenedEvent,Optional[str]], None]=None) -> None:
71
+ """
72
+ Fired when opening document to write to.
73
+ Args:
74
+ callback (callable, optional): Function called when the event is fired.
75
+ The callback receives (params: documentOpenedEvent, session_id: Optional[str]).
76
+ """
77
+ self.client.on('Page.documentOpened', callback)
78
+ def on_frame_resized(self, callback: Callable[[frameResizedEvent,Optional[str]], None]=None) -> None:
79
+ """
80
+ No description available for frameResized.
81
+ Args:
82
+ callback (callable, optional): Function called when the event is fired.
83
+ The callback receives (params: frameResizedEvent, session_id: Optional[str]).
84
+ """
85
+ self.client.on('Page.frameResized', callback)
86
+ def on_frame_started_navigating(self, callback: Callable[[frameStartedNavigatingEvent,Optional[str]], None]=None) -> None:
87
+ """
88
+ Fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after `frameRequestedNavigation`. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).
89
+ Args:
90
+ callback (callable, optional): Function called when the event is fired.
91
+ The callback receives (params: frameStartedNavigatingEvent, session_id: Optional[str]).
92
+ """
93
+ self.client.on('Page.frameStartedNavigating', callback)
94
+ def on_frame_requested_navigation(self, callback: Callable[[frameRequestedNavigationEvent,Optional[str]], None]=None) -> None:
95
+ """
96
+ Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
97
+ Args:
98
+ callback (callable, optional): Function called when the event is fired.
99
+ The callback receives (params: frameRequestedNavigationEvent, session_id: Optional[str]).
100
+ """
101
+ self.client.on('Page.frameRequestedNavigation', callback)
102
+ def on_frame_started_loading(self, callback: Callable[[frameStartedLoadingEvent,Optional[str]], None]=None) -> None:
103
+ """
104
+ Fired when frame has started loading.
105
+ Args:
106
+ callback (callable, optional): Function called when the event is fired.
107
+ The callback receives (params: frameStartedLoadingEvent, session_id: Optional[str]).
108
+ """
109
+ self.client.on('Page.frameStartedLoading', callback)
110
+ def on_frame_stopped_loading(self, callback: Callable[[frameStoppedLoadingEvent,Optional[str]], None]=None) -> None:
111
+ """
112
+ Fired when frame has stopped loading.
113
+ Args:
114
+ callback (callable, optional): Function called when the event is fired.
115
+ The callback receives (params: frameStoppedLoadingEvent, session_id: Optional[str]).
116
+ """
117
+ self.client.on('Page.frameStoppedLoading', callback)
118
+ def on_interstitial_hidden(self, callback: Callable[[interstitialHiddenEvent,Optional[str]], None]=None) -> None:
119
+ """
120
+ Fired when interstitial page was hidden
121
+ Args:
122
+ callback (callable, optional): Function called when the event is fired.
123
+ The callback receives (params: interstitialHiddenEvent, session_id: Optional[str]).
124
+ """
125
+ self.client.on('Page.interstitialHidden', callback)
126
+ def on_interstitial_shown(self, callback: Callable[[interstitialShownEvent,Optional[str]], None]=None) -> None:
127
+ """
128
+ Fired when interstitial page was shown
129
+ Args:
130
+ callback (callable, optional): Function called when the event is fired.
131
+ The callback receives (params: interstitialShownEvent, session_id: Optional[str]).
132
+ """
133
+ self.client.on('Page.interstitialShown', callback)
134
+ def on_javascript_dialog_closed(self, callback: Callable[[javascriptDialogClosedEvent,Optional[str]], None]=None) -> None:
135
+ """
136
+ Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
137
+ Args:
138
+ callback (callable, optional): Function called when the event is fired.
139
+ The callback receives (params: javascriptDialogClosedEvent, session_id: Optional[str]).
140
+ """
141
+ self.client.on('Page.javascriptDialogClosed', callback)
142
+ def on_javascript_dialog_opening(self, callback: Callable[[javascriptDialogOpeningEvent,Optional[str]], None]=None) -> None:
143
+ """
144
+ Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
145
+ Args:
146
+ callback (callable, optional): Function called when the event is fired.
147
+ The callback receives (params: javascriptDialogOpeningEvent, session_id: Optional[str]).
148
+ """
149
+ self.client.on('Page.javascriptDialogOpening', callback)
150
+ def on_lifecycle_event(self, callback: Callable[[lifecycleEventEvent,Optional[str]], None]=None) -> None:
151
+ """
152
+ Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
153
+ Args:
154
+ callback (callable, optional): Function called when the event is fired.
155
+ The callback receives (params: lifecycleEventEvent, session_id: Optional[str]).
156
+ """
157
+ self.client.on('Page.lifecycleEvent', callback)
158
+ def on_back_forward_cache_not_used(self, callback: Callable[[backForwardCacheNotUsedEvent,Optional[str]], None]=None) -> None:
159
+ """
160
+ Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
161
+ Args:
162
+ callback (callable, optional): Function called when the event is fired.
163
+ The callback receives (params: backForwardCacheNotUsedEvent, session_id: Optional[str]).
164
+ """
165
+ self.client.on('Page.backForwardCacheNotUsed', callback)
166
+ def on_load_event_fired(self, callback: Callable[[loadEventFiredEvent,Optional[str]], None]=None) -> None:
167
+ """
168
+ No description available for loadEventFired.
169
+ Args:
170
+ callback (callable, optional): Function called when the event is fired.
171
+ The callback receives (params: loadEventFiredEvent, session_id: Optional[str]).
172
+ """
173
+ self.client.on('Page.loadEventFired', callback)
174
+ def on_navigated_within_document(self, callback: Callable[[navigatedWithinDocumentEvent,Optional[str]], None]=None) -> None:
175
+ """
176
+ Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
177
+ Args:
178
+ callback (callable, optional): Function called when the event is fired.
179
+ The callback receives (params: navigatedWithinDocumentEvent, session_id: Optional[str]).
180
+ """
181
+ self.client.on('Page.navigatedWithinDocument', callback)
182
+ def on_screencast_frame(self, callback: Callable[[screencastFrameEvent,Optional[str]], None]=None) -> None:
183
+ """
184
+ Compressed image data requested by the `startScreencast`.
185
+ Args:
186
+ callback (callable, optional): Function called when the event is fired.
187
+ The callback receives (params: screencastFrameEvent, session_id: Optional[str]).
188
+ """
189
+ self.client.on('Page.screencastFrame', callback)
190
+ def on_screencast_visibility_changed(self, callback: Callable[[screencastVisibilityChangedEvent,Optional[str]], None]=None) -> None:
191
+ """
192
+ Fired when the page with currently enabled screencast was shown or hidden `.
193
+ Args:
194
+ callback (callable, optional): Function called when the event is fired.
195
+ The callback receives (params: screencastVisibilityChangedEvent, session_id: Optional[str]).
196
+ """
197
+ self.client.on('Page.screencastVisibilityChanged', callback)
198
+ def on_window_open(self, callback: Callable[[windowOpenEvent,Optional[str]], None]=None) -> None:
199
+ """
200
+ Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
201
+ Args:
202
+ callback (callable, optional): Function called when the event is fired.
203
+ The callback receives (params: windowOpenEvent, session_id: Optional[str]).
204
+ """
205
+ self.client.on('Page.windowOpen', callback)
206
+ def on_compilation_cache_produced(self, callback: Callable[[compilationCacheProducedEvent,Optional[str]], None]=None) -> None:
207
+ """
208
+ Issued for every compilation cache generated.
209
+ Args:
210
+ callback (callable, optional): Function called when the event is fired.
211
+ The callback receives (params: compilationCacheProducedEvent, session_id: Optional[str]).
212
+ """
213
+ self.client.on('Page.compilationCacheProduced', callback)
@@ -0,0 +1,147 @@
1
+ """CDP Page 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.dom.types import BackendNodeId
8
+ from cdp.protocol.network.types import LoaderId
9
+ from cdp.protocol.network.types import MonotonicTime
10
+ from cdp.protocol.page.types import BackForwardCacheNotRestoredExplanation
11
+ from cdp.protocol.page.types import BackForwardCacheNotRestoredExplanationTree
12
+ from cdp.protocol.page.types import ClientNavigationDisposition
13
+ from cdp.protocol.page.types import ClientNavigationReason
14
+ from cdp.protocol.page.types import DialogType
15
+ from cdp.protocol.page.types import Frame
16
+ from cdp.protocol.page.types import FrameId
17
+ from cdp.protocol.page.types import NavigationType
18
+ from cdp.protocol.page.types import ScreencastFrameMetadata
19
+ from cdp.protocol.runtime.types import StackTrace
20
+
21
+ class domContentEventFiredEvent(TypedDict, total=True):
22
+ timestamp: 'MonotonicTime'
23
+ class fileChooserOpenedEvent(TypedDict, total=True):
24
+ frameId: 'FrameId'
25
+ """Id of the frame containing input node."""
26
+ mode: 'Literal["selectSingle", "selectMultiple"]'
27
+ """Input mode."""
28
+ backendNodeId: NotRequired['BackendNodeId']
29
+ """Input node id. Only present for file choosers opened via an <input type="file"> element."""
30
+ class frameAttachedEvent(TypedDict, total=True):
31
+ frameId: 'FrameId'
32
+ """Id of the frame that has been attached."""
33
+ parentFrameId: 'FrameId'
34
+ """Parent frame identifier."""
35
+ stack: NotRequired['StackTrace']
36
+ """JavaScript stack trace of when frame was attached, only set if frame initiated from script."""
37
+ class frameDetachedEvent(TypedDict, total=True):
38
+ frameId: 'FrameId'
39
+ """Id of the frame that has been detached."""
40
+ reason: 'Literal["remove", "swap"]'
41
+ class frameSubtreeWillBeDetachedEvent(TypedDict, total=True):
42
+ frameId: 'FrameId'
43
+ """Id of the frame that is the root of the subtree that will be detached."""
44
+ class frameNavigatedEvent(TypedDict, total=True):
45
+ frame: 'Frame'
46
+ """Frame object."""
47
+ type: 'NavigationType'
48
+ class documentOpenedEvent(TypedDict, total=True):
49
+ frame: 'Frame'
50
+ """Frame object."""
51
+ class frameResizedEvent(TypedDict, total=True):
52
+ pass
53
+ class frameStartedNavigatingEvent(TypedDict, total=True):
54
+ frameId: 'FrameId'
55
+ """ID of the frame that is being navigated."""
56
+ url: 'str'
57
+ """The URL the navigation started with. The final URL can be different."""
58
+ loaderId: 'LoaderId'
59
+ """Loader identifier. Even though it is present in case of same-document navigation, the previously committed loaderId would not change unless the navigation changes from a same-document to a cross-document navigation."""
60
+ navigationType: 'Literal["reload", "reloadBypassingCache", "restore", "restoreWithPost", "historySameDocument", "historyDifferentDocument", "sameDocument", "differentDocument"]'
61
+ class frameRequestedNavigationEvent(TypedDict, total=True):
62
+ frameId: 'FrameId'
63
+ """Id of the frame that is being navigated."""
64
+ reason: 'ClientNavigationReason'
65
+ """The reason for the navigation."""
66
+ url: 'str'
67
+ """The destination URL for the requested navigation."""
68
+ disposition: 'ClientNavigationDisposition'
69
+ """The disposition for the navigation."""
70
+ class frameStartedLoadingEvent(TypedDict, total=True):
71
+ frameId: 'FrameId'
72
+ """Id of the frame that has started loading."""
73
+ class frameStoppedLoadingEvent(TypedDict, total=True):
74
+ frameId: 'FrameId'
75
+ """Id of the frame that has stopped loading."""
76
+ class interstitialHiddenEvent(TypedDict, total=True):
77
+ pass
78
+ class interstitialShownEvent(TypedDict, total=True):
79
+ pass
80
+ class javascriptDialogClosedEvent(TypedDict, total=True):
81
+ frameId: 'FrameId'
82
+ """Frame id."""
83
+ result: 'bool'
84
+ """Whether dialog was confirmed."""
85
+ userInput: 'str'
86
+ """User input in case of prompt."""
87
+ class javascriptDialogOpeningEvent(TypedDict, total=True):
88
+ url: 'str'
89
+ """Frame url."""
90
+ frameId: 'FrameId'
91
+ """Frame id."""
92
+ message: 'str'
93
+ """Message that will be displayed by the dialog."""
94
+ type: 'DialogType'
95
+ """Dialog type."""
96
+ hasBrowserHandler: 'bool'
97
+ """True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog."""
98
+ defaultPrompt: NotRequired['str']
99
+ """Default dialog prompt."""
100
+ class lifecycleEventEvent(TypedDict, total=True):
101
+ frameId: 'FrameId'
102
+ """Id of the frame."""
103
+ loaderId: 'LoaderId'
104
+ """Loader identifier. Empty string if the request is fetched from worker."""
105
+ name: 'str'
106
+ timestamp: 'MonotonicTime'
107
+ class backForwardCacheNotUsedEvent(TypedDict, total=True):
108
+ loaderId: 'LoaderId'
109
+ """The loader id for the associated navigation."""
110
+ frameId: 'FrameId'
111
+ """The frame id of the associated frame."""
112
+ notRestoredExplanations: 'List[BackForwardCacheNotRestoredExplanation]'
113
+ """Array of reasons why the page could not be cached. This must not be empty."""
114
+ notRestoredExplanationsTree: NotRequired['BackForwardCacheNotRestoredExplanationTree']
115
+ """Tree structure of reasons why the page could not be cached for each frame."""
116
+ class loadEventFiredEvent(TypedDict, total=True):
117
+ timestamp: 'MonotonicTime'
118
+ class navigatedWithinDocumentEvent(TypedDict, total=True):
119
+ frameId: 'FrameId'
120
+ """Id of the frame."""
121
+ url: 'str'
122
+ """Frame's new url."""
123
+ navigationType: 'Literal["fragment", "historyApi", "other"]'
124
+ """Navigation type"""
125
+ class screencastFrameEvent(TypedDict, total=True):
126
+ data: 'str'
127
+ """Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)"""
128
+ metadata: 'ScreencastFrameMetadata'
129
+ """Screencast frame metadata."""
130
+ sessionId: 'int'
131
+ """Frame number."""
132
+ class screencastVisibilityChangedEvent(TypedDict, total=True):
133
+ visible: 'bool'
134
+ """True if the page is visible."""
135
+ class windowOpenEvent(TypedDict, total=True):
136
+ url: 'str'
137
+ """The URL for the new window."""
138
+ windowName: 'str'
139
+ """Window name."""
140
+ windowFeatures: 'List[str]'
141
+ """An array of enabled window features."""
142
+ userGesture: 'bool'
143
+ """Whether or not it was triggered by user gesture."""
144
+ class compilationCacheProducedEvent(TypedDict, total=True):
145
+ url: 'str'
146
+ data: 'str'
147
+ """Base64-encoded data (Encoded as a base64 string when passed over JSON)"""
File without changes