From: Darin Duphorn Date: 2008-02-07T01:08:13+09:00 Subject: Re: how can I use variable as a attribute name wade wrote: > I assume from context that you're using Watir. I'm pretty sure Watir > is expecting a symbol there for the first argument, which is probably > why your attempts aren't working. Maybe try using the to_sym method > of the String class, like this: > > if $ie.button($attribute_nm.to_sym,$attribute_val).exists? > > Good luck, > > > wade Nice! That worked. This will save me tons of extra lines of Code. Thanks Wade, Your the greatest. DD -- Posted via http://www.ruby-forum.com/.