Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ __pycache__
/test_*
/*.log
.idea
.DS_Store
.DS_Store
.claude
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python CDP
#### Currently supports CDP [r1429850][2].
#### Currently supports CDP [r1602427][2].

Python CDP Generator (shortened to PyCDP) is a library that provides
Python wrappers for the types, commands, and events specified in the [Chrome
Expand Down Expand Up @@ -151,7 +151,7 @@ PyCDP is licensed under the MIT License.
<hr>

[1]: https://chromedevtools.github.io/devtools-protocol/
[2]: https://github.com/ChromeDevTools/devtools-protocol/tree/e1bdcc8cda9709838002a1516058ec8b266cbe88
[2]: https://github.com/ChromeDevTools/devtools-protocol/tree/169ca38d7bea8be83155ffb3062d42d40e60fe14
[3]: docs/getting_started.rst
[4]: https://github.com/hyperiongray/trio-chrome-devtools-protocol
[5]: https://python-poetry.org/docs/
Expand Down
66 changes: 57 additions & 9 deletions docs/api/audits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PerformanceIssueType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PerformanceIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: MixedContentResolutionStatus
:members:
:undoc-members:
Expand Down Expand Up @@ -129,11 +139,6 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: LowTextContrastIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CorsIssueDetails
:members:
:undoc-members:
Expand All @@ -154,6 +159,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: UnencodedDigestError
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: ConnectionAllowlistError
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: AttributionReportingIssueDetails
:members:
:undoc-members:
Expand All @@ -179,6 +194,16 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: UnencodedDigestIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: ConnectionAllowlistIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: GenericIssueErrorType
:members:
:undoc-members:
Expand Down Expand Up @@ -249,12 +274,12 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: SelectElementAccessibilityIssueReason
.. autoclass:: ElementAccessibilityIssueReason
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: SelectElementAccessibilityIssueDetails
.. autoclass:: ElementAccessibilityIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json
Expand All @@ -279,6 +304,31 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: UserReidentificationIssueType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: UserReidentificationIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PermissionElementIssueType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PermissionElementIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: SelectivePermissionsInterventionIssueDetails
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: InspectorIssueCode
:members:
:undoc-members:
Expand Down Expand Up @@ -311,8 +361,6 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands <getting-started-commands>`.

.. autofunction:: check_contrast

.. autofunction:: check_forms_issues

.. autofunction:: disable
Expand Down
64 changes: 63 additions & 1 deletion docs/api/bluetooth_emulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: GATTOperationType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CharacteristicWriteType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CharacteristicOperationType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: DescriptorOperationType
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: ManufacturerData
:members:
:undoc-members:
Expand All @@ -40,6 +60,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CharacteristicProperties
:members:
:undoc-members:
:exclude-members: from_json, to_json

Commands
--------

Expand All @@ -52,17 +77,54 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands <getting-started-commands>`.

.. autofunction:: add_characteristic

.. autofunction:: add_descriptor

.. autofunction:: add_service

.. autofunction:: disable

.. autofunction:: enable

.. autofunction:: remove_characteristic

.. autofunction:: remove_descriptor

.. autofunction:: remove_service

.. autofunction:: set_simulated_central_state

.. autofunction:: simulate_advertisement

.. autofunction:: simulate_characteristic_operation_response

.. autofunction:: simulate_descriptor_operation_response

.. autofunction:: simulate_gatt_disconnection

.. autofunction:: simulate_gatt_operation_response

.. autofunction:: simulate_preconnected_peripheral

Events
------

*There are no events in this module.*
Generally, you do not need to instantiate CDP events
yourself. Instead, the API creates events for you and then
you use the event's attributes.

.. autoclass:: GattOperationReceived
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CharacteristicOperationReceived
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: DescriptorOperationReceived
:members:
:undoc-members:
:exclude-members: from_json, to_json
9 changes: 9 additions & 0 deletions docs/api/browser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PrivacySandboxAPI
:members:
:undoc-members:
:exclude-members: from_json, to_json

Commands
--------

Expand All @@ -79,6 +84,8 @@ commands, and ``z`` is the return type you should pay attention
to. For more information, see
:ref:`Getting Started: Commands <getting-started-commands>`.

.. autofunction:: add_privacy_sandbox_coordinator_key_config

.. autofunction:: add_privacy_sandbox_enrollment_override

.. autofunction:: cancel_download
Expand Down Expand Up @@ -107,6 +114,8 @@ to. For more information, see

.. autofunction:: reset_permissions

.. autofunction:: set_contents_size

.. autofunction:: set_dock_tile

.. autofunction:: set_download_behavior
Expand Down
21 changes: 15 additions & 6 deletions docs/api/css.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ yourself. Instead, the API creates objects for you as return
values from commands, and then you can use those objects as
arguments to other commands.

.. autoclass:: StyleSheetId
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: StyleSheetOrigin
:members:
:undoc-members:
Expand Down Expand Up @@ -114,6 +109,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: ComputedStyleExtraFields
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CSSStyle
:members:
:undoc-members:
Expand Down Expand Up @@ -149,6 +149,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CSSNavigation
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CSSScope
:members:
:undoc-members:
Expand Down Expand Up @@ -204,7 +209,7 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: CSSFontPaletteValuesRule
.. autoclass:: CSSAtRule
:members:
:undoc-members:
:exclude-members: from_json, to_json
Expand Down Expand Up @@ -276,6 +281,8 @@ to. For more information, see

.. autofunction:: get_computed_style_for_node

.. autofunction:: get_environment_variables

.. autofunction:: get_inline_styles_for_node

.. autofunction:: get_layers_for_node
Expand Down Expand Up @@ -304,6 +311,8 @@ to. For more information, see

.. autofunction:: set_media_text

.. autofunction:: set_navigation_text

.. autofunction:: set_property_rule_property_name

.. autofunction:: set_rule_selector
Expand Down
22 changes: 22 additions & 0 deletions docs/api/dom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ arguments to other commands.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: StyleSheetId
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: BackendNode
:members:
:undoc-members:
Expand Down Expand Up @@ -134,6 +139,8 @@ to. For more information, see

.. autofunction:: focus

.. autofunction:: force_show_popover

.. autofunction:: get_anchor_element

.. autofunction:: get_attributes
Expand Down Expand Up @@ -236,6 +243,11 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: AdoptedStyleSheetsModified
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: AttributeRemoved
:members:
:undoc-members:
Expand Down Expand Up @@ -291,6 +303,16 @@ you use the event's attributes.
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: AdRelatedStateUpdated
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: AffectedByStartingStylesFlagUpdated
:members:
:undoc-members:
:exclude-members: from_json, to_json

.. autoclass:: PseudoElementRemoved
:members:
:undoc-members:
Expand Down
Loading