title: Using javascript to set text for a web element - Selenium Web driver
body: <p>How can text of a web element be set using java script executor? Or is there any other way to do this?</p>
  
  <pre><code>&lt;a class="selectBox selectBox-dropdown selectBox-menuShowing selectBox-active" style="width: 52px; display: inline-block; -moz-user-select: none;" title="" tabindex="0"&gt;
  &lt;span class="selectBox-label" style="width: 13px;"&gt;10&lt;/span&gt;
  &lt;span class="selectBox-arrow"/&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>There are two span elements under the  tag - which is a drop down. User clicks on span[2] and a list is shown which contains data like 10, 20, 30, 40, etc.. User clicks on the number(element) and that is set as the text of span[1] (In this case, 10 is selected). How should I go about solving this?</p>
  
  <p>I tried Action builder and it is not working. Any others suggestions?</p>