Can't use submit() with Selenium (Python)
<p>I have used <code>driver.find_element_by_id('SearchProductName')</code> to find the element with the following HTML:</p>

<pre><code>&lt;input autocomplete="off" name="SearchProductName" id="SearchProductName"
class="sg-input headerSearchBox ac_input" placeholder="Search for a 
product" tabindex="0"&gt;
</code></pre>

<p>It has recognised this element correctly and I have been able to <code>send_keys</code> to it, but when I try to <code>submit()</code>, I get the following error.</p>

<pre><code>selenium.common.exceptions.NoSuchElementException: Message: 
Element was not in a form so couldn't submit
</code></pre>

<p>I don't understand how if the element is a textbox which I can <code>send_keys</code> to, it is not then a form which I can submit. How do I fix this problem so that I use submit on this element?</p>