title: Selenium onChange not working
body: <p>I have tried a number of things to try and get Selenium to pick up an 'onchange' event from a drop down menu, none of which has worked.</p>
  
  <p>The offending HTML is:</p>
  
  <pre><code>&lt;select onchange="doOpperation(this.options[this.selectedIndex]); this.selectedIndex = 0;" name="opps_ondemand" id="opps_ondemand"&gt;
    &lt;option value="none" id="ondemand"&gt;Mark as...&lt;/option&gt;
    &lt;option cmd="blah1" value="add"&gt;Something&lt;/option&gt;
    &lt;option cmd="blah2" value="remove"&gt;None&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I have read that Selenium IDE doesn't record some on* events, and so it would be wise to use fireEvent():</p>
  
  <pre><code>$this-&gt;click("opps_ondemand");
  $this-&gt;select("opps_ondemand", "label=Mark as...");
  $this-&gt;click("//option[@value='add']");
  sleep(3);
  $this-&gt;fireEvent("//select[@id='opps_ondemand']", "change");
  </code></pre>
  
  <p>However, this does not work (with or without the fireEvent).  I have also tried using</p>
  
  <pre><code>$this-&gt;fireEvent("locator", "click");
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>$this-&gt;click("locator");
  </code></pre>
  
  <p>but this did nothing.</p>
  
  <p>Selenium does not complain about these locators not existing so I am assuming it can see the select/option elements fine.  The problem seems to be the onChange event.</p>
  
  <p>Does anyone know how to resolve this?</p>
  
  <p>Thanks.</p>