title: how to handle dynamically changing iframe id using selenium webdriver
body: <p><code>iframe id=pngNewCase1143241142570_IFrame</code>., this id changes dynamically every time how can i handle this in <strong>selenium webdriver java</strong>
  I tried using </p>
  
  <pre><code>driver.switchTo().frame(driver.findElement(By.xpath("Xpath of Iframe which changes dynamically")));
  driver.switchTo().defaultContent();
  </code></pre>
  
  <p>but didn't work for me</p>
  
  <p>also tried </p>
  
  <pre><code>driver.switchTo().frame(driver.findElement(By.Id("pngNewCase1143241142570_IFrame")));
  driver.switchTo().defaultContent();
  </code></pre>
  
  <p>can anyone help me please</p>