On Wed, Dec 19, 2012 at 7:18 AM, <[email protected]> wrote: > Please can you define about " to_s " which you wrote in a statement, > becasue i am getting error of it. > > On Friday, April 3, 2009 6:00:59 PM UTC+5, Darin Duphorn wrote: > >> If you want to validate it true or >> false remember to set it to string. >> >> if $ie.checkbox(:name,"blah").**checked?.to_s = 'true' >> >> end >> > You have to use == instead of =, like this:
if $ie.checkbox(:name,"blah").checked?.to_s == 'true' end Also, there is no need for #to_s, this should work too: if $ie.checkbox(:name,"blah").checked? == true end Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
