Selenium Java - Handling Windows, Frames, and Alerts
You want to verify text inside a nested frame structure where
The element with id "msg" is inside
frame1 contains frame2. You wrote:driver.switchTo().frame("frame1");
String text = driver.findElement(By.id("msg")).getText();
The element with id "msg" is inside
frame2. What is the best fix?