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

Method from_json

py/generate.py:723–732  ·  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

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