Set value of a file input in JavaFX web view via java
<p>I have a <code>WebView</code> node in my JavaFX and the page loaded in it has a <code>&lt;input type=file&gt;</code>. I want to set this input's value to a file on disk. I know this is not possible by injecting javascript into the web view. But I'm wondering if I can get access to JavaFX internals in how these input fields are handled and set the value through there. There appears to be no mention of file input controls' handling in the docs so I'm lost on this.</p>

<p>When I click on the file input. JavaFX gives me a native file selector. So, I'm expecting there's some form of handler that is invoked when clicking on a file input, that asks the user to select a file and then <em>fills the file input with this value</em>. That's what I want to do.</p>

<p>I tried just getting the element and setting it's value, but of course, it didn't work.</p>

<pre><code>webEngine.getDocument().getElementById("FileInput")
    .setNodeValue("C:\\attachment.pdf");
</code></pre>

<p>This piece of code does nothing. No error, no result either.</p>

<p>So, any ideas?</p>