private void switchToWindow ( String key , String handleToKeep ) { Context . addWindow ( key , handleToKeep ) ; Context . setMainWindow ( key ) ; Context . getDriver ( ) . switchTo ( ) . window ( handleToKeep ) ; }
switchToWindow switch to an other Window .