Perhaps this isn\'t actually the issue I\'m experiencing, but it seems that when I \"click_link\" a link with target=\"_blank\", the session keeps the focus on the current w
I know this is old post, but for what its worth in capybara 2.4.4
within_window(switch_to_window(windows.last)) do
# in my case assert redirected url from a prior click action
expect(current_url).to eq(redirect['url'])
end