[Wtr-general] Can I access caption attribute of a checkbox?

Amitha Shetty amithashettyb at yahoo.co.in
Wed Jun 14 07:06:10 EDT 2006


Hi,
     Can I access caption attribute of a checkbox?
   I want to retrieve the display name of the checkbox and this data is present in the caption attribute in the html source. The checkboxes are in the form of a tree.
  HTML Source is:
  var a = new Array; 
  a[0] = new Array; 
a[0]['id'] = '99999'
a[0]['checkboxName'] ='CNAME_14'
a[0]['caption'] = 'Check Here'  (#This is the data I want to retrieve)
   
   
  ie.checkboxes[1].name gives CNAME_14
  but ie.checkboxes[1].caption throws the following exception:
  undefined method `caption' for #<Watir::CheckBox:0x33c6b38> (NoMethodError)
   
  I want to get the data in caption attribute i.e 'Check Here'. How do I retrieve it?
   
  Thanks,
  Amitha
   
   
  

 
    Thanks,
  Amitha
   
   


 Send instant messages to your online friends http://in.messenger.yahoo.com 

 Stay connected with your friends even when away from PC.  Link: http://in.mobile.yahoo.com/new/messenger/  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060614/c65e50c7/attachment.html 


More information about the Wtr-general mailing list