Im working with CDP(Chrome Devtools Protocol) and im getting nodeId's with DOM.querySelector
. After getting Runtime.RemoteObject
with DOM.resolveNode
from nodeId, i want to execute scripts with Runtime.evaluate
like elem.click()
in javascript. Can i pass Runtime.RemoteObject
as an elem
here?
ex:
chrome: PyChromeDevTools.ChromeInterface
node_id = "<node-id-of-an-element>"
remote_object = chrome.DOM.resolveNode(node_id)['result']
chrome.Runtime.evaluate("arguments[0].click()", remote_object)