Switching to another window if inside inner frame



  • If I am inside a inner frame and there is button if I click on that button a new window will open. Will it be possible to switch to newly open window doing driver.switchTo().defaultContent(). ?



  • You do not need to switch between frames, you do however, need to switch between windows.

    for(String winHandle : driver.getWindowHandles()){ 
    driver.switchTo().window(winHandle);     
     } 
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2