title: javascript in select in selenium
body: <p>I'm trying set item in select using javascript (in variable I have date)</p>
  
  <p>Here is how I'm trying set this item</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;select&lt;/td&gt;
      &lt;td&gt;Recent-Year&lt;/td&gt;
      &lt;td&gt;value=javascript{d=new Date();d.getYear()}&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>[error] Option with value 'javascript{d=new Date();d.getYear()}' not found 
  </code></pre>
  
  <p>of cource when I'm trying by this:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;select&lt;/td&gt;
      &lt;td&gt;Recent-Year&lt;/td&gt;
      &lt;td&gt;value=2011&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>it works.</p>
  
  <p>What I must to change in this code to set this item?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I don't want to split this command into few commands, because in another testcase I have stored variable birthday </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;storeEval&lt;/td&gt;
      &lt;td&gt;new Date('1966,09,16')&lt;/td&gt;
      &lt;td&gt;dateOfBirth&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and I have 3 selects : Birth-Day, Birth-Month and Birth-Yearand I don't want to create 3 variables. </p>
  
  <p>I want to set items in select like this:</p>
  
  <pre><code>    &lt;tr&gt;
          &lt;td&gt;select&lt;/td&gt;
          &lt;td&gt;Birth-Year&lt;/td&gt;
          &lt;td&gt;value =${dateOfBirth.getFullYear()}&lt;/td&gt;
      &lt;/tr&gt;
  </code></pre>