File Upload dialog is not picked by selenium
<p><a href="https://i.stack.imgur.com/oBL4R.png" rel="nofollow"><img src="https://i.stack.imgur.com/oBL4R.png" alt="enter image description here"></a></p>

<p>I am trying to write a selenium based test in python.
Here, I am trying to select a file for the first text box(<code>PGP Private Key</code>)</p>

<p>Please note - 
1. The text box(<code>PGP Private Key</code>) is read only(I cannot enter any text by keyboard)
2. <code>self.driver.send_keys(file)</code> is not working.</p>

<p>As I mentioned in note, since <code>send_keys()</code> not working, I am trying to get the handle of 'File Upload' dialog.
But <code>self.driver.window_handles</code>returns only one handle. That is of main window.</p>

<p>How to upload the file? Any one of these 2 solutions(send_key or window handle) is fine.</p>

<p>Please note, I am using firefox 28 and selenium 2.41.0</p>

<p>In common case this code should work:</p>

<pre><code>driver.find_element_by_xpath("//input[@id='selectKeys']").send_keys(path_to_file)
</code></pre>

python selenium firefox firebug inspector