driver.switchTo().frame("editor-frame"); // Perform actions inside frame driver.switchTo().defaultContent(); // Back to main window