Handling iframes in selenium

There are situations where web controls/elements reside inside an inline frame, the inline frame is another document or dom resides inside current HTML document. iframe can be represented in html as tag name=”iframe”. Elements inside an iframe can not be accessed as normal selenium statement – driver.findelement(By…) need to use, driver.switchTo().frame(…); In selenium, how we…