Currently if we do
driver.findElement(By.tagName('title')).getText() // it will return the value of the title tag.
Why I think this is wrong
Other elements in <HEAD> are treated as invisible so if I do
driver.findElement(By.tagName('meta')).getText() // it returns ''
I can see how if there are no frames this can be useful since
title = driver.findElement(By.tagName('title')).getText()
realTitle = driver.getTitle();
assert title == realTitle
Since it is "visible" in the title bar of the window. However the minute we have frames and we aren't on TOP then the title isn't visible and breaks our visibility rules for text.
Proposal
Change getText() to return '' for any element in <HEAD>
David