How to click a link in mail with Capybara
Oct 28, 2020
When you want to do “click link test in mail” with capybara, what do you do? Capybara has a very useful module for this, which is EmailSpec.
In this module, click_email_link_matching method is prepared.
How to use is like below.
mail = open_email("example@gmail.com")
click_email_link_matching(/^http:/, mail) #regexp