title: Is there any way to get <embed> tag resources in selenium webdriver
body: <p>I'm trying to get a pdf embedded in a html document. <a href="https://pdfobject.com/static.html" rel="noreferrer">https://pdfobject.com/static.html</a> this is the reference site.</p>
  
  <p>A pdf document is embedded using <code>&lt;embed&gt;</code> tag on <code>HTML</code> page</p>
  
  <p>I have following things-</p>
  
  <ol>
  <li><p>If I open the chrome browser (I'm using <code>Version 55.0.2883.87 m</code> ) and do inspect element on that <code>&lt;embed&gt;</code> tag or do click <code>F12</code> and then inspect the same it shows the tag contents as -</p>
  
  <pre><code>&lt;embed src="chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/web/viewer.html?file=https%3A%2F%2Fpdfobject.com%2Fpdf%2Fsample-3pp.pdf#page=2" type="text/html" width="100%" height="100%"&gt;
  </code></pre></li>
  <li><p>But if I use following script to get the <code>embed</code> tag html</p>
  
  <pre><code>System.setProperty("webdriver.chrome.driver", "D:\\Application\\chromedriver.exe");
  driver = new ChromeDriver();
  driver.manage().window().maximize();
  driver.get("https://pdfobject.com/static.html");
  driver.manage().timeouts().implicitlyWait(45, TimeUnit.SECONDS);
  driver.switchTo().frame(1);     
  String tagdata = driver.findElement(By.id("plugin")).getAttribute("outerHTML");     
  System.out.println(tagdata);
  </code></pre>
  
  <p>It retrieve result as -</p>
  
  <pre><code>&lt;embed width="100%" height="100%" name="plugin" id="plugin" src="https://pdfobject.com/pdf/sample-3pp.pdf#page=2" type="application/pdf" internalinstanceid="9"&gt;
  </code></pre></li>
  </ol>
  
  <p>but in <code>chrome</code> opened by <code>chromedriver.exe</code> If i do <code>F12</code> and inspect the embed it shows same as above result but if i do right click on that <code>embed</code> tag and then click <code>inspect element</code>, It opens new developer tool console where I see <code>&lt;embed&gt;</code> tag as - </p>
  
  <pre><code>&lt;embed id="plugin" type="application/x-google-chrome-pdf" src="https://pdfobject.com/pdf/sample-3pp.pdf#page=2" stream-url="blob:chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/e8337a7a-5af1-456c-8f7a-d8132c67fe6d" headers="Accept-Ranges: bytes
  Cache-Control: max-age=2592000
  Content-Length: 49672
  Content-Type: application/pdf
  Date: Wed, 25 Jan 2017 04:51:36 GMT
  Expires: Fri, 24 Feb 2017 04:51:36 GMT
  Last-Modified: Sat, 19 Mar 2016 06:18:44 GMT
  MS-Author-Via: DAV
  Server: Apache
  X-Content-Type-Options: nosniff
  " background-color="0xFF525659" top-toolbar-height="56" top-level-url="https://pdfobject.com/static.html"&gt;
  </code></pre>
  
  <p>Snaps for the same is -</p>
  
  <p><a href="https://i.stack.imgur.com/Hh6u7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Hh6u7.png" alt="enter image description here"></a></p>
  
  <p>I have some few questions here -</p>
  
  <ol>
  <li><p>variation to do inspect element using system installed <code>chrome</code> and <code>chromedriver.exe</code> opened <code>chrome</code> ?</p></li>
  <li><p>Is there any way to get the  result as opened by chromedriver ?</p></li>
  <li><p>Is there any way to get <code>embedded</code> html ?</p></li>
  </ol>