mithwire 0.50.3__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 (76) hide show
  1. mithwire/__init__.py +32 -0
  2. mithwire/cdp/README.md +4 -0
  3. mithwire/cdp/__init__.py +6 -0
  4. mithwire/cdp/accessibility.py +668 -0
  5. mithwire/cdp/animation.py +494 -0
  6. mithwire/cdp/audits.py +1995 -0
  7. mithwire/cdp/autofill.py +292 -0
  8. mithwire/cdp/background_service.py +215 -0
  9. mithwire/cdp/bluetooth_emulation.py +626 -0
  10. mithwire/cdp/browser.py +821 -0
  11. mithwire/cdp/cache_storage.py +311 -0
  12. mithwire/cdp/cast.py +172 -0
  13. mithwire/cdp/console.py +107 -0
  14. mithwire/cdp/crash_report_context.py +55 -0
  15. mithwire/cdp/css.py +2750 -0
  16. mithwire/cdp/database.py +179 -0
  17. mithwire/cdp/debugger.py +1405 -0
  18. mithwire/cdp/device_access.py +141 -0
  19. mithwire/cdp/device_orientation.py +45 -0
  20. mithwire/cdp/dom.py +2257 -0
  21. mithwire/cdp/dom_debugger.py +321 -0
  22. mithwire/cdp/dom_snapshot.py +876 -0
  23. mithwire/cdp/dom_storage.py +222 -0
  24. mithwire/cdp/emulation.py +1779 -0
  25. mithwire/cdp/event_breakpoints.py +56 -0
  26. mithwire/cdp/extensions.py +238 -0
  27. mithwire/cdp/fed_cm.py +283 -0
  28. mithwire/cdp/fetch.py +507 -0
  29. mithwire/cdp/file_system.py +115 -0
  30. mithwire/cdp/headless_experimental.py +115 -0
  31. mithwire/cdp/heap_profiler.py +401 -0
  32. mithwire/cdp/indexed_db.py +528 -0
  33. mithwire/cdp/input_.py +701 -0
  34. mithwire/cdp/inspector.py +95 -0
  35. mithwire/cdp/io.py +101 -0
  36. mithwire/cdp/layer_tree.py +464 -0
  37. mithwire/cdp/log.py +190 -0
  38. mithwire/cdp/media.py +313 -0
  39. mithwire/cdp/memory.py +305 -0
  40. mithwire/cdp/network.py +5342 -0
  41. mithwire/cdp/overlay.py +1468 -0
  42. mithwire/cdp/page.py +3972 -0
  43. mithwire/cdp/performance.py +124 -0
  44. mithwire/cdp/performance_timeline.py +200 -0
  45. mithwire/cdp/preload.py +575 -0
  46. mithwire/cdp/profiler.py +420 -0
  47. mithwire/cdp/pwa.py +278 -0
  48. mithwire/cdp/py.typed +0 -0
  49. mithwire/cdp/runtime.py +1589 -0
  50. mithwire/cdp/schema.py +50 -0
  51. mithwire/cdp/security.py +518 -0
  52. mithwire/cdp/service_worker.py +401 -0
  53. mithwire/cdp/smart_card_emulation.py +891 -0
  54. mithwire/cdp/storage.py +1573 -0
  55. mithwire/cdp/system_info.py +327 -0
  56. mithwire/cdp/target.py +829 -0
  57. mithwire/cdp/tethering.py +65 -0
  58. mithwire/cdp/tracing.py +377 -0
  59. mithwire/cdp/util.py +18 -0
  60. mithwire/cdp/web_audio.py +606 -0
  61. mithwire/cdp/web_authn.py +598 -0
  62. mithwire/cdp/web_mcp.py +293 -0
  63. mithwire/core/_contradict.py +142 -0
  64. mithwire/core/browser.py +923 -0
  65. mithwire/core/cf_templates/cf_dark_checkbox.png +0 -0
  66. mithwire/core/cf_templates/cf_light_checkbox.png +0 -0
  67. mithwire/core/config.py +323 -0
  68. mithwire/core/connection.py +564 -0
  69. mithwire/core/element.py +1205 -0
  70. mithwire/core/tab.py +2202 -0
  71. mithwire/core/util.py +5063 -0
  72. mithwire-0.50.3.dist-info/METADATA +1049 -0
  73. mithwire-0.50.3.dist-info/RECORD +76 -0
  74. mithwire-0.50.3.dist-info/WHEEL +5 -0
  75. mithwire-0.50.3.dist-info/licenses/LICENSE.txt +619 -0
  76. mithwire-0.50.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,141 @@
1
+ # DO NOT EDIT THIS FILE!
2
+ #
3
+ # This file is generated from the CDP specification. If you need to make
4
+ # changes, edit the generator and regenerate all of the modules.
5
+ #
6
+ # CDP domain: DeviceAccess (experimental)
7
+
8
+ from __future__ import annotations
9
+ import enum
10
+ import typing
11
+ from dataclasses import dataclass
12
+ from .util import event_class, T_JSON_DICT
13
+
14
+
15
+ class RequestId(str):
16
+ '''
17
+ Device request id.
18
+ '''
19
+ def to_json(self) -> str:
20
+ return self
21
+
22
+ @classmethod
23
+ def from_json(cls, json: str) -> RequestId:
24
+ return cls(json)
25
+
26
+ def __repr__(self):
27
+ return 'RequestId({})'.format(super().__repr__())
28
+
29
+
30
+ class DeviceId(str):
31
+ '''
32
+ A device id.
33
+ '''
34
+ def to_json(self) -> str:
35
+ return self
36
+
37
+ @classmethod
38
+ def from_json(cls, json: str) -> DeviceId:
39
+ return cls(json)
40
+
41
+ def __repr__(self):
42
+ return 'DeviceId({})'.format(super().__repr__())
43
+
44
+
45
+ @dataclass
46
+ class PromptDevice:
47
+ '''
48
+ Device information displayed in a user prompt to select a device.
49
+ '''
50
+ id_: DeviceId
51
+
52
+ #: Display name as it appears in a device request user prompt.
53
+ name: str
54
+
55
+ def to_json(self) -> T_JSON_DICT:
56
+ json: T_JSON_DICT = dict()
57
+ json['id'] = self.id_.to_json()
58
+ json['name'] = self.name
59
+ return json
60
+
61
+ @classmethod
62
+ def from_json(cls, json: T_JSON_DICT) -> PromptDevice:
63
+ return cls(
64
+ id_=DeviceId.from_json(json['id']),
65
+ name=str(json['name']),
66
+ )
67
+
68
+
69
+ def enable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
70
+ '''
71
+ Enable events in this domain.
72
+ '''
73
+ cmd_dict: T_JSON_DICT = {
74
+ 'method': 'DeviceAccess.enable',
75
+ }
76
+ json = yield cmd_dict
77
+
78
+
79
+ def disable() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
80
+ '''
81
+ Disable events in this domain.
82
+ '''
83
+ cmd_dict: T_JSON_DICT = {
84
+ 'method': 'DeviceAccess.disable',
85
+ }
86
+ json = yield cmd_dict
87
+
88
+
89
+ def select_prompt(
90
+ id_: RequestId,
91
+ device_id: DeviceId
92
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
93
+ '''
94
+ Select a device in response to a DeviceAccess.deviceRequestPrompted event.
95
+
96
+ :param id_:
97
+ :param device_id:
98
+ '''
99
+ params: T_JSON_DICT = dict()
100
+ params['id'] = id_.to_json()
101
+ params['deviceId'] = device_id.to_json()
102
+ cmd_dict: T_JSON_DICT = {
103
+ 'method': 'DeviceAccess.selectPrompt',
104
+ 'params': params,
105
+ }
106
+ json = yield cmd_dict
107
+
108
+
109
+ def cancel_prompt(
110
+ id_: RequestId
111
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
112
+ '''
113
+ Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
114
+
115
+ :param id_:
116
+ '''
117
+ params: T_JSON_DICT = dict()
118
+ params['id'] = id_.to_json()
119
+ cmd_dict: T_JSON_DICT = {
120
+ 'method': 'DeviceAccess.cancelPrompt',
121
+ 'params': params,
122
+ }
123
+ json = yield cmd_dict
124
+
125
+
126
+ @event_class('DeviceAccess.deviceRequestPrompted')
127
+ @dataclass
128
+ class DeviceRequestPrompted:
129
+ '''
130
+ A device request opened a user prompt to select a device. Respond with the
131
+ selectPrompt or cancelPrompt command.
132
+ '''
133
+ id_: RequestId
134
+ devices: typing.List[PromptDevice]
135
+
136
+ @classmethod
137
+ def from_json(cls, json: T_JSON_DICT) -> DeviceRequestPrompted:
138
+ return cls(
139
+ id_=RequestId.from_json(json['id']),
140
+ devices=[PromptDevice.from_json(i) for i in json['devices']]
141
+ )
@@ -0,0 +1,45 @@
1
+ # DO NOT EDIT THIS FILE!
2
+ #
3
+ # This file is generated from the CDP specification. If you need to make
4
+ # changes, edit the generator and regenerate all of the modules.
5
+ #
6
+ # CDP domain: DeviceOrientation (experimental)
7
+
8
+ from __future__ import annotations
9
+ import enum
10
+ import typing
11
+ from dataclasses import dataclass
12
+ from .util import event_class, T_JSON_DICT
13
+
14
+
15
+ def clear_device_orientation_override() -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
16
+ '''
17
+ Clears the overridden Device Orientation.
18
+ '''
19
+ cmd_dict: T_JSON_DICT = {
20
+ 'method': 'DeviceOrientation.clearDeviceOrientationOverride',
21
+ }
22
+ json = yield cmd_dict
23
+
24
+
25
+ def set_device_orientation_override(
26
+ alpha: float,
27
+ beta: float,
28
+ gamma: float
29
+ ) -> typing.Generator[T_JSON_DICT,T_JSON_DICT,None]:
30
+ '''
31
+ Overrides the Device Orientation.
32
+
33
+ :param alpha: Mock alpha
34
+ :param beta: Mock beta
35
+ :param gamma: Mock gamma
36
+ '''
37
+ params: T_JSON_DICT = dict()
38
+ params['alpha'] = alpha
39
+ params['beta'] = beta
40
+ params['gamma'] = gamma
41
+ cmd_dict: T_JSON_DICT = {
42
+ 'method': 'DeviceOrientation.setDeviceOrientationOverride',
43
+ 'params': params,
44
+ }
45
+ json = yield cmd_dict