Selenium Java - Handling Windows, Frames, and Alerts
Consider this code snippet:
What is the expected output if the iframe "frame1" contains <h1>Hello</h1> and the main page contains <div id="footer">Bye</div>?
driver.switchTo().frame("frame1");
String header = driver.findElement(By.tagName("h1")).getText();
driver.switchTo().defaultContent();
String footer = driver.findElement(By.id("footer")).getText();
System.out.println(header + " - " + footer);What is the expected output if the iframe "frame1" contains <h1>Hello</h1> and the main page contains <div id="footer">Bye</div>?
