Skip to content

cdp_dispatch

Dispatch a Redux action and optionally read state afterward — all in a single synchronous JS execution. Use for atomic dispatch+verify operations (e.g. dispatch “tasks/softDelete” then read “tasks.pendingDelete”). NOTE: Best used for state verification, not UI interaction testing — React components may not re-render immediately after CDP-dispatched actions. For UI testing, use device_press/device_find to trigger the action through the UI instead.

NameTypeRequiredDefaultConstraintsDescription
actionstringYesRedux action type (e.g. “tasks/softDelete”, “cart/addItem”)
payloadanyNoAction payload
readPathstringNoDot-path to read from store after dispatch (e.g. “tasks.pendingDelete”)
cdp_dispatch(action: <string>)