With Capybara, how do I switch to the new window for links with “_blank” targets?
Capybara >= 2.3 includes the new window management API. It can be used like: new_window = window_opened_by { click_link ‘Something’ } within_window new_window do # code end