Sudhansu--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/uJ3PD0BSOzQJ.
For more options, visit https://groups.google.com/groups/opt_out.
Sudhansu
Using driver.switchTo().defaultContent() *only* has meaning for frames/iframes. It puts the frame focus within a window to the top-level frame in the window. It has no effect on which browser window is being actively manipulated.
No, I'm sorry, but there is some serious misinformation being disseminated in this thread. If you have a web application that uses multiple browser windows, you must switch WebDriver's "focus" between those windows. In Java, you do this by driver.switchTo().window(). When you close any of your browser windows using driver.close(), you *must* use driver.switchTo().window() to put that focus on another window. WebDriver has *no* concept of a "main" window to switch focus back to.
Using driver.switchTo().defaultContent() *only* has meaning for frames/iframes. It puts the frame focus within a window to the top-level frame in the window. It has no effect on which browser window is being actively manipulated.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/dwDYnExeuKsJ.