Hello,

Is it possible to set or clear a check box with a variable?

This works -

emckb = ie.checkbox(:id, 'enableSmtpEmail')

emckb.set
emckb.clear


This does not work -

x = 'set'
y = 'clear'

emckb.x
emckb.y


Why ?
Using a data driven framework and getting the set or clear values from
a data store. Should something like this work ?

We have created a method that will do this but wanted to know if this
can be accomplished in a more direct manner as described above using
the x and y variables.


This works OK

def checkbox_set(box, value)
    if value=='set'
      box.set
    else
      box.clear
    end
  end

checkbox(emckb,x)



Thanks,
Darryl

-- 
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]

Reply via email to