How does Selenium detect iframe?

How does Selenium detect iframe?

Selenium detects iframe elements using the findElement method. This searches for a given element by its text content and returns it as an Element object.

Learn more: How to Handle iFrames in Selenium Webdriver: switchTo()