[Wtr-general] $ie.button replacing with $ie.b?

2007-07-07 Thread mihai
cand i do something like this, and how: b=button puts $ie.b(:index,1) instead of puts $ie.button(:index,1) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] $ie.button replacing with $ie.b?

2007-07-07 Thread Charley Baker
I'm not quite sure why you'd want to do that, maybe you could explain it. Here are a couple of random possibilities: 1. use the string and eval it, makes the code less readable but there are some good uses for this: b = button eval(puts $ie.#{b}(:index, 1)) 2.wrap the code in a method, cleaner

Re: [Wtr-general] $ie.button replacing with $ie.b?

2007-07-07 Thread mihai
i want to do something like this: def check_elements(ie,elements,btn,lnk) for i in 1 .. elem[1,0] if ( ie.elements[0,0](:index,btn[i-1,0]).exist? and ie.elements[0,0](:value,btn[i-1,1]) and ie.elements[0,0](:name,btn[i-1,2]) ) then write(The button

Re: [Wtr-general] $ie.button replacing with $ie.b?

2007-07-07 Thread hhwwpssp
Try the send method, which invokes the method named by the first argument and passes it any succeeding parameters. To use your example: b = 'button' puts $ie.send(b, :index,1) ___ Wtr-general mailing list Wtr-general@rubyforge.org