Skip to main content

Execute CDP Command

Command description

Execute a Chrome DevTools Protocol (CDP) method on the specified webpage through chrome.debugger.sendCommand. Only the methods supported by that API are available.

Command Input Parameters

input parametersInput parameter typeDescription
Webpage ObjectWebPageExecute CDP command on this web page
CommandstrCDP command name, such as Page.printToPDF, Input.dispatchMouseEvent, etc.
ArgumentsPythonExpressionCDP parameters are automatically serialized to JSON and then deserialized into JavaScript objects.
Maximum Execution TimenumberMaximum time allowed for the CDP command, in seconds

Command Output Parameters

Output parametersOutput parameter typeDescription
Execution ResultanyThe return value of the CDP command will be automatically serialized and deserialized.

JSON workflow parameter value rules

  • Command is a string literal. In a generated JSON workflow, write it as a Python string expression, such as "Command": "'Page.navigate'".
  • Arguments are Python expressions, which will be automatically serialized into JSON and passed to CDP. When you need to pass an object literal, write it as a Python mapping expression string, for example "Arguments": "{'url': 'https://example.com'}"; when there are no parameters, write "Arguments": "None".
  • Maximum Execution Time is a number or numeric expression, for example "Maximum Execution Time": "10".

Supported commands

  • Runtime.evaluate

  • Runtime.callFunctionOn

  • Runtime.getProperties

  • Runtime.enable

  • Page.enable

  • Page.navigate

  • Page.reload

  • Page.captureScreenshot

  • Page.printToPDF

  • DOM.enable

  • DOM.getDocument

  • DOM.querySelector

  • DOM.getBoxModel

  • DOM.resolveNode

  • Input.dispatchMouseEvent

  • Input.dispatchKeyEvent

  • Input.insertText

  • Network.enable

  • Network.getResponseBody

  • Network.setExtraHTTPHeaders

  • Network.clearBrowserCache

  • Fetch.enable

  • Fetch.continueRequest

  • Fetch.fulfillRequest

  • Fetch.failRequest

  • Emulation.setDeviceMetricsOverride

  • Emulation.setUserAgentOverride

  • Emulation.setGeolocationOverride

  • Target.getTargets

  • Target.setAutoAttach

  • Target.attachToTarget

  • Target.detachFromTarget

  • Debugger.enable

  • Debugger.setBreakpointByUrl

  • Debugger.resume

  • Debugger.pause

  • CSS.enable

  • CSS.getMatchedStylesForNode

  • CSS.setStyleTexts

  • Storage.clearDataForOrigin

  • Storage.getStorageKeyForFrame

  • Performance.enable

  • Performance.getMetrics

  • Tracing.start

  • Tracing.end

Type definition reference

tip
  • Runavelo browser extension 3.1.0 or later
  • Runavelo 8.9.0 or later

FAQ

See Web Automation FAQ