In Capybara, is it possible to open a link in a new window, rather than the current one?
If this element is a link you can just get its href and open it in a new window:
url = find('.some_link')[:href]
within_window open_new_window do
# do something
end
open_new_window
has been added in Capybara 2.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With