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

Method _wrap_value

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

Source from the content-addressed store, hash-verified

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

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected