MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / from_json

Method from_json

py/generate.py:724–733  ·  view source on GitHub ↗

Create a new CDP event instance from a JSON dict.

(cls, json: dict, domain: str)

Source from the content-addressed store, hash-verified

722
723 @classmethod
724 def from_json(cls, json: dict, domain: str):
725 """Create a new CDP event instance from a JSON dict."""
726 return cls(
727 json["name"],
728 json.get("description"),
729 json.get("deprecated", False),
730 json.get("experimental", False),
731 [cast(CdpParameter, CdpParameter.from_json(p)) for p in json.get("parameters", [])],
732 domain,
733 )
734
735 def generate_code(self):
736 """Generate code for a CDP event."""

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
from_jsonMethod · 0.45

Tested by

no test coverage detected