【Ruby】window_handles・・・複数のウインドウハンドルを取得する
http://www.seleniumqref.com/api/ruby/window_get/Ruby_window_handles.html

Selenium WebDriver の、
driver.switch_to.window(ウィンドウ・ハンドル)