At 06:22 AM 10/25/2005, Manish Sapariya wrote:
>I have a app which has multiple links on same page with same
>name. However each of this link is associated with one more
>link which identifies them uniquely. To be very specific its
>the page has list of records which I can edit or delete. The
>links for edit/delete have same name, but they are assciated
>with record name.
>
>Currently I have hacked way as following.
>So I delete the record its name is/or like manish.
>
>-------------------------------------------
> i = 0
> ie.frame("mainFrame").links.each { |l|
> i = i +1
> if l.to_s =~ /manish/ then
> if l.to_s =~ /delete/ then
> print l.to_s
> puts "\n#{i}iiiiiiiiiiiii\n"
> ie.frame("mainFrame").link(:index, i).click
> break;
> end
>
>
> end
> }
>-------------------------------------------
>
>Is there a cleaner solution?
This should do the same thing, in HEAD:
ie.frame("mainFrame").link(:text, /manish.*delete/).click
I'm a little unclear on why you have the comparisons to both /manish/ and
/delete/, so i'm not exactly sure if i've combined them into a regular
expression correctly for your situation.
Bret
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general