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

Method get_constructor

py/generate.py:189–194  ·  view source on GitHub ↗

Return the code to construct a value for a given CDP type.

(cls, cdp_type, val)

Source from the content-addressed store, hash-verified

187
188 @classmethod
189 def get_constructor(cls, cdp_type, val):
190 """Return the code to construct a value for a given CDP type."""
191 if cdp_type == "any":
192 return val
193 cons = cls[cdp_type].value
194 return f"{cons}({val})"
195
196
197@dataclass

Callers 1

generate_from_jsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected