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

Function _create_caps

py/selenium/webdriver/remote/webdriver.py:86–102  ·  view source on GitHub ↗

Makes a W3C alwaysMatch capabilities object. Filters out capability names that are not in the W3C spec. Spec-compliant drivers will reject requests containing unknown capability names. Moves the Firefox profile, if present, from the old location to the new Firefox options object.

(caps)

Source from the content-addressed store, hash-verified

84
85
86def _create_caps(caps) -> dict:
87 """Makes a W3C alwaysMatch capabilities object.
88
89 Filters out capability names that are not in the W3C spec. Spec-compliant
90 drivers will reject requests containing unknown capability names.
91
92 Moves the Firefox profile, if present, from the old location to the new Firefox
93 options object.
94
95 Args:
96 caps: A dictionary of capabilities requested by the caller.
97 """
98 caps = copy.deepcopy(caps)
99 always_match = {}
100 for k, v in caps.items():
101 always_match[k] = v
102 return {"capabilities": {"firstMatch": [{}], "alwaysMatch": always_match}}
103
104
105def get_remote_connection(

Callers 1

start_sessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected