Kura Monni
2010-Jan-14 16:56 UTC
Making the distinction between similarly titled links in Cuc
Hoblaa! I''m writing a test for modifying a list structure. Say I have a list of objects in the view along the lines of: Object1 View Edit Delete Object2 View Edit Delete Object3 View Edit Delete Object4 View Edit Delete I want to be able to write a test in Cucumber that''ll perform an action on one of the objects, i.e. Object2. How can I pinpoint the correct View/Edit/Delete link from the list? I can''t really use the standard [code] I follow "View" [/code] because it will just follow the View link for Object1 (I assume). Thanks in advance. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jan-15 02:03 UTC
Re: Making the distinction between similarly titled links in
Kura Monni wrote:> Hoblaa! > > I''m writing a test for modifying a list structure. Say I have a list of > objects in the view along the lines of: > Object1 View Edit Delete > Object2 View Edit Delete > Object3 View Edit Delete > Object4 View Edit Delete > > I want to be able to write a test in Cucumber that''ll perform an action > on one of the objects, i.e. Object2. How can I pinpoint the correct > View/Edit/Delete link from the list? I can''t really use the standard > > [code] I follow "View" > [/code] > > because it will just follow the View link for Object1 (I assume). > > Thanks in advance.I''m about to try dealing with a similar problem. Webrat will match objects by CSS selector; I don''t know yet (because I haven''t yet tried!) whether Cucumber''s default webrat_steps will work with that matching strategy, but if not, it shouldn''t be too hard to write new steps that do work. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.