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

Method _wrap_value

py/selenium/webdriver/remote/webdriver.py:413–425  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

411 return getattr(client_config, "remote_server_addr", None) or None
412
413 def _wrap_value(self, value):
414 if isinstance(value, dict):
415 converted = {}
416 for key, val in value.items():
417 converted[key] = self._wrap_value(val)
418 return converted
419 if isinstance(value, self._web_element_cls):
420 return {"element-6066-11e4-a52e-4f735466cecf": value.id}
421 if isinstance(value, self._shadowroot_cls):
422 return {"shadow-6066-11e4-a52e-4f735466cecf": value.id}
423 if isinstance(value, list):
424 return list(self._wrap_value(item) for item in value)
425 return value
426
427 def create_web_element(self, element_id: str) -> WebElement:
428 """Creates a web element with the specified `element_id`."""

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected