1

I have searched the net upside down for this answer, but I can't seem to find it. I've tried various methods but they aren't working.

Goal: Using ruby cucumber, to click a link within an email I have received. Seems simple right?

Using the gmail gem, something like:

When(/^I click the link$/) do
(insert code here)

I can get the body of the email back with

mail.inbox.emails(:from => "rubycucumber")do |email|
  puts email.html_part.body.decoded
end

But how do I navigate to/click the link (which is in A HREF tag when I view the email body after running step above)?

It seems the gmail gem is really awesome at counting, labeling, marking as read, etc, but this piece is giving me trouble :(

orde
  • 5,233
  • 6
  • 31
  • 33
MelissaH
  • 11
  • 1
  • Look like you want to navigate a dynamically generated link. This answer might help you. http://stackoverflow.com/questions/6810287/creating-dynamic-cucumber-steps-to-check-for-links-on-a-page – aarti Feb 25 '14 at 21:08

0 Answers0