title: Selenium Webdriver: JavascriptExecutor to push play on video
body: <p>How to execute play function on page's javascript jquery code using JavascriptExecutor?</p>
  
  <p>This is the code from the website:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(document).ready(function($) {
  $('#wp_mep_1').mediaelementplayer({
  m:1
  ,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
  });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is a basic initiation of JavascriptExecutor:</p>
  
  <pre><code>    JavascriptExecutor js = (JavascriptExecutor) driver;
      Object o = js.executeScript("return '123'");
  </code></pre>
  
  <p>I may be way off, but I feel like I should be setting "o" in this example to $('#wp_mep_1').mediaelementplayer and then passing ("playpause").  </p>
  
  <p>Something like:</p>
  
  <pre><code>    JavascriptExecutor js = (JavascriptExecutor) driver;
      Object $('#wp_mep_1').mediaelementplayer = js.executeScript('playpause');
  </code></pre>
  
  <p>I don't have experience with Javascript or jquery, and advice would be most helpful.</p>