Open link in a new window with Capybara
在水豚,是否有可能在新窗口打开链接,而不是现在的?
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
上一篇: 如何在页面获取用户本地时间
下一篇: 在水豚的新窗口中打开链接