For test runtime in Capybara 2.2.4 version, you can achieve this by doing. before do. handle = Capybara.page.driver.current_window_handle.
確定! 回上一頁