List<WebElement> frameList=driver.findElements(By.tagName("iframe"));
System.out.println("no of frames on page: "+ frameList.size());
frameList=driver.findElements(By.tagName("body"));
System.out.println("no of body tag on page is: "+ frameList.size());
((JavascriptExecutor)driver).executeScript("window.scrollTo(0," +driver.findElement(By.xpath("//div[@id='midContainer']/form/table[2]/tbody/tr[11]/td[2]/div/div[2]/iframe")).getLocation().y+")");
WebElement descriptionElement = driver.findElement(By.xpath("//div[@id='midContainer']/form/table[2]/tbody/tr[11]/td[2]/div/div[2]/iframe"));
driver.switchTo().frame(descriptionElement);
WebElement editable= driver.switchTo().activeElement();
System.out.println(editable.getTagName()); //////output is body
editable.findElement(By.tagName("body")).sendKeys("abc");
// editable.sendKeys("abc");
driver.switchTo().defaultContent();
O/P:
no of frames on page: 1
no of body tag on page is: 1
org.openqa.selenium.NoSuchElementException: Unable to find element with tag name == body (WARNING: The server did not provide any stacktrace information)