title: Get HTML tags in Selenium
body: <pre><code>&lt;html xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema"&gt;
  &lt;head&gt;
       &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
       &lt;title&gt;View Health Report&lt;/title&gt;
  &lt;head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have an HTMl like above, it is inserted inside an iframe. So I have selenium code like below:</p>
  
  <pre><code>//get iframe
  WebDriver frame = getFrame()// Brings iframe driver
  WebElement html = frame.findElement( By.tagName("html") );// works fine I can see HTMl text from html.getText();
  
  //now try to get title
  WebElement title = html.findElement( By.tagName("title"));//title.getText() is always empty.
  </code></pre>
  
  <p>Please let me know what I am missing.</p>