title: i need to click on the iframe video
body: <p>i need to click on this iframe video, </p>
  
  <pre><code>&lt;div class="videoWrapper" style="" xpath="1"&gt; 
  &lt;iframe width="854" height="480" src="xxxxxxx" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Code for switching to frame</p>
  
  <pre><code>driver.switchto().frame("videoWrapper");
  </code></pre>
  
  <p>i tried with these Logic's ,</p>
  
  <p>Logic 1 :</p>
  
  <pre><code>WebElement video = driver.findElement(By.xpath("//*[@id='player_uid_840828282_1']/div[4]/div[1]"));
  
  JavascriptExecutor js = (JavascriptExecutor) driver;
  js.executeScript("arguments[0].play();", video);
  </code></pre>
  
  <p>Logic 2 :</p>
  
  <pre><code>JavascriptExecutor js = (JavascriptExecutor) driver;
  js .executeScript("document.getElementById(\"video\").play()");
  </code></pre>
  
  <p>But it is not Working , please clear me this out guys!</p>