Selenium Java - Handling Windows, Frames, and Alerts
What is wrong with this code snippet?
Assuming "frame2" is a sibling iframe of "frame1" on the main page.
driver.switchTo().frame("frame1");
driver.switchTo().frame("frame2");
String text = driver.findElement(By.id("msg")).getText();Assuming "frame2" is a sibling iframe of "frame1" on the main page.
