switch to any element of the frame, just use driver.switchTo().frame("framename");
As soon as we switch to one frame, if we need to switch to another frame, we need to switch to the parent frame. To do this, use
driver.switchTo().parentFrame();
driver.switchTo().defaultContent();, .
driver.switchTo().parentFrame();, .