I am using selenium RemoteWebDriver to load a web page and to get text from web page I am using getText() api of the web driver. For very few web pages on a site, the getText() API is returning entire HTML. I went through all the resources on net and stack overflow, this seems like unique issue. According to all the resources getText() api will return the text rendered on a web page.
Selenium getText
My code is as simple as below -
content = driver.findElement(By.tagName(Constants.BODY)).getText();
Now this is not happening with all the pages on that site, but very few pages, for example - .html