What is the difference between defaultcontent() and Parentframe() method in selenium webDriver?
What is the difference between defaultcontent() and Parentframe() method in selenium webDriver? What is difference between below two methods : driver.switchTo().parentFrame(); driver.switchTo().defaultContent(); 3 Answers 3 As per the specifications, driver.switchTo().parentFrame(); invokes the following: driver.switchTo().parentFrame(); Where, the Switch to Parent Frame command sets the current browsing context for future commands to the parent of the current browsing context . As per the Java Docs parentFrame() method changes the focus to the parent context. If the current context is the top level browsing context, the context remains unchanged. As per the Java Docs , defaultContent() method selects either the first frame on the page, or the main document when a page contains iframes. That mean for example If i have 3 frames which are nested frames i1, i2, i3. I...
