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

Method execute_cdp_cmd

py/selenium/webdriver/remote/webdriver.py:435–453  ·  view source on GitHub ↗

Execute Chrome Devtools Protocol command and get returned result. The command and command args should follow chrome devtools protocol domains/commands: - https://chromedevtools.github.io/devtools-protocol/ Args: cmd: Command name. cmd_args: Command

(self, cmd: str, cmd_args: dict)

Source from the content-addressed store, hash-verified

433 return value
434
435 def execute_cdp_cmd(self, cmd: str, cmd_args: dict):
436 """Execute Chrome Devtools Protocol command and get returned result.
437
438 The command and command args should follow chrome devtools protocol domains/commands:
439 - https://chromedevtools.github.io/devtools-protocol/
440
441 Args:
442 cmd: Command name.
443 cmd_args: Command args. Empty dict {} if there is no command args.
444
445 Returns:
446 A dict, empty dict {} if there is no result to return. To
447 getResponseBody: {'base64Encoded': False, 'body': 'response body
448 string'}
449
450 Example:
451 `driver.execute_cdp_cmd("Network.getResponseBody", {"requestId": requestId})`
452 """
453 return self.execute("executeCdpCommand", {"cmd": cmd, "params": cmd_args})["value"]
454
455 def execute(
456 self,

Callers

nothing calls this directly

Calls 1

executeMethod · 0.95

Tested by

no test coverage detected