Web view has multiple iFrames, how do I get all the iFrames' ID?

My web view has multiple iFrames, how do I get all the iFrames’ ID?

I am unable to do so, anyone can kindly assist me please?

I am very weak in programming, pardon me if I am asking something easy.

Please use the below custom keyword to achieve it.

/*
This keyword is used to get below attributes of an iframe.
1.Total no of frames
2.Frame id
3.Name
4.Class
5.Src
*/

import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement

import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.webui.driver.DriverFactory

public class Frame {

@Keyword
public static void info(){

  WebDriver driver = DriverFactory.getWebDriver()

  System.out.println("******************************************************************");
  int iframe_Size = driver.findElements(By.tagName("iframe")).size();
  System.err.println("iFrame size is: " + iframe_Size);
  int FRAME_Size = driver.findElements(By.tagName("frame")).size();
  System.err.println("FRAME size is: " + FRAME_Size);
  System.out.println("******************************************************************");



  List <WebElement> totalIframe=driver.findElements(By.tagName("iframe"));


  for (int i = 0; i < totalIframe.size(); i++) {
  	System.out.println("");

  	System.err.println("--------------------------");
  	System.out.println("Frame id of index     -->  " + i + " is " + totalIframe.get(i).getAttribute("id"));
  	System.out.println("Frame name of index   -->  " + i + " is " + totalIframe.get(i).getAttribute("name"));
  	System.out.println("Frame class of index  -->  " + i + " is " + totalIframe.get(i).getAttribute("class"));
  	System.out.println("Frame src of index    -->  " + i + " is " + totalIframe.get(i).getAttribute("src"));
  	System.err.println("-------------------------");

  	System.out.println("");
  }

}
}