Selenium fails to select element by id
<p>Here is the HTML code of the element:</p>

<pre><code>&lt;input maxlength="64" name="pskSecret" class="text" id="pskSecret" value="" size="32" type="text"&gt;
</code></pre>

<p>And here is my python code, which tries to select it:</p>

<pre><code>self.driver.find_element_by_id("pskSecret").clear()
self.driver.find_element_by_id("pskSecret").send_keys(data) # data is variable
</code></pre>

<p>However I got exception, stating that selenium is unable to locate the element. 
Any ideas what may be causing the problem</p>

<p>Edit: Also the element is inside an iframe, however I'm accessing other elements in it which are working correctly.</p>