title: Selenium WebDriver executeScript not working
body: <p>I am using the script to set the value of the hidden form field variable <code>formContent</code> to the value 'Hello'. Selenium Webdriver doesn't set the value of the hidden form field as it is not visible.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>JavascriptExecutor js = (JavascriptExecutor) driver;
  js.executeScript("return jQuery('input:hidden[id$=\"formContent\"]').val('Hello');");
  </code></pre>
  
  <p>I am getting the script is unresponsive. Could you please tell me what I am doing wrong here. The <code>formContent</code> is defined in my xhtml as follows:</p>
  
  <pre><code>&lt;input type="hidden" id="formContent" name="formContent" value="" /&gt;
  </code></pre>
  
  <p>If use the following lines of code, then it is not setting the value of the hidden form field "formContent":</p>
  
  <pre><code> JavascriptExecutor js = (JavascriptExecutor) driver;
   js.executeScript("jQuery('input:hidden[id$=\"formContent\"]').val('Hello');");
  </code></pre>
  
  <p>Thanks!</p>