I was able to invoke Chrome Remote Interface functions inside Selenium WebDriver session (Page.captureScreenshot, Emulation.clearDeviceMetricsOverride etc). But I have problem with invoking methods which work on DOM element. The problem is with nodeId parameter. For example this function https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-setFileInputFiles accepts as one of parameters nodeId. I can't figure out how to extract nodeId based on IWebElement (or RemoteWebElement) from SeleniumWebdriver.
How can I find nodeId using Selenium or Javascript?
More info about Chrome Remote Interface could be found here https://chromedevtools.github.io/devtools-protocol/