Skip to content

Instantly share code, notes, and snippets.

@jcieslar
Created March 11, 2015 14:48
Show Gist options
  • Save jcieslar/c70422bfa3c9e5a5d4c1 to your computer and use it in GitHub Desktop.
Save jcieslar/c70422bfa3c9e5a5d4c1 to your computer and use it in GitHub Desktop.
Capybara click link with target _blank
click_link 'User'
within_window(page.driver.browser.window_handles.last) do
expect(page).to have_content 'USERNAME'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment