Yes Selenium do handle window popups .There is a method available in selenium
driver.getWindowHandle() which returns GUID of the current opened browser as String ,
and driver.getWindowHandles() which returns the GUID's of all the opened windows as Set of Strings.In order to swich in between the windows
driver.switchTo.window(Id);//pass the String Id of the window you want to switch to as parameter