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

mihai forum-watir-users at openqa.org
Sat Jul 7 15:58:27 EDT 2007


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 with value: "+ btn[i-1,2] + " exist and not disabled",1)
                else
                      write("The button with value: "+ btn[i-1,2] + " does not exist ",0) # write is a def with file.puts...
          end # if exist
                    
   end # for i 

end #def

elements=Matrix[ 
                         ["button","link","select_list"...]
                         [2,6,1....] #number of buttons,links etc
]

buttons=Matrix[
[1,"","Web Search"],  # index, name and value
[2,"","Go"],
]

links=Matrix....

check_elements(ie,elements,buttons,links....)


I want to verify all elements just by calling check_elements procedure and editing an txt file where the buttons, links ..indexes, values and names are
This is just a simple example; the check_elements procedure it will be more complex, at least that i want.
Tnx for help


More information about the Wtr-general mailing list