code: public static File takeScreenShot(WebElement iframe, WebElement element) {
      return screenshots.takeScreenshot(driver(), iframe, element);
    }
docs: Take screenshot of WebElement/SelenideElement in iframe
  for partially visible WebElement/Selenide horizontal scroll bar will be present
  @return a temporary file, not guaranteed to be stored after tests complete.