title: Why can't I "send_keys" to text box with selenium? AttributeError: 'NoneType'
body: <p>I am having serious difficulty filling in text boxes on this website. The element is type="text". It keeps returning as AttributeError: 'NoneType'. </p>
  
  <p>I used a try clause to see if it was actually being clicked on, and it is not erring out. In addition, the textbox is selected and when I leave it as my front window, I can type in the text box without clicking anything after the error occurs. </p>
  
  <p>I tried extending the pause before the click by 1 minute to no effect. </p>
  
  <p>I tried selecting by xpath, same results. </p>
  
  <p>I tried clicking the object, pausing 10 seconds, and clicking the object again. Nothing. </p>
  
  <p>my code:</p>
  
  <pre><code>def Search(driver,productID):
      print "Initiate Search"
  
      #Fill in current product ID
      #/html/body/table[3]/tbody/tr/td/table/tbody/tr/td[2]/div[2]/form/table/tbody/tr/td/input
  
      try: inputElement = driver.find_element_by_name("CategoryName").click()
      except: print "could not click"
      print "Clicked Product ID"
  
      time.sleep(5)
      inputElement.send_keys(str(productID))  ##Line 105 - Errors out here
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/ME/Documents/PYTHON/Creating Static Attributes/StaticWAttributes_1.py", line 246, in &lt;module&gt;
      Search(driver,productID)
    File "/Users/ME/Documents/PYTHON/Creating Static Attributes/StaticWAttributes_1.py", line 105, in Search
      inputElement.send_keys(str(productID))
    AttributeError: 'NoneType' object has no attribute 'send_keys'
  </code></pre>
  
  <p>Last Output Print Statement:</p>
  
  <pre><code>Initiate Search
  Clicked Product ID
  </code></pre>
  
  <p>HTML: </p>
  
  <pre><code>  &lt;table cellSpacing="0" cellPadding="0" border="0"&gt;
          &lt;tr&gt;
            &lt;td class="actionrow"&gt;Search Products by  
            &lt;select name="categorytype"&gt;
                          &lt;option selected value="name"&gt;Product Name or Description&lt;/option&gt;
                          &lt;option  value="catid"&gt;Product ID&lt;/option&gt;
                    &lt;/select&gt; &lt;input type="text" name="CategoryName" value="" size="20"&gt;&lt;? &lt;&lt;-- I AM TRYING TO CLICK THIS ?&gt;
                    &amp;nbsp;in&amp;nbsp;
                    &lt;select name="ddlproductType" ID="Select2"&gt;
                      &lt;option selected value="100"&gt;All&lt;/option&gt;
                          &lt;option  value="1"&gt;Versioned&lt;/option&gt;
  
                              &lt;option  value="7"&gt;Variable&lt;/option&gt;
  
                          &lt;option  value="5"&gt;Static with Attributes&lt;/option&gt;
              &lt;option  value="11"&gt;PowerPoint&lt;/option&gt;
                    &lt;/select&gt;&amp;nbsp;
                  &lt;input type="submit" value="Go" name="action" onClick="javascript:resetAll();"&gt; 
            &lt;/td&gt;
          &lt;/tr&gt;
    &lt;/table&gt;
  </code></pre>