Hi,
 I installed watir 1[1].5.1.gem.
When I say  ie.frame(:index,1).checkboxes[1].attribute_value("caption")
 it prints nill. 
But when I say ie.frame(:index,1).checkboxes[1].attribute_value("name")
it prints 'ID_1'.
Still I am not able to retrieve the actual display name of the checkbox i.e 'Male'.


Zeljko Filipin <[EMAIL PROTECTED]> wrote:
That is the latest official version, but I think Angrez was reffering to development build. You can get it here:
http://wiki.openqa.org/display/WTR/Development+Builds

On 6/19/06, Amitha Shetty <[EMAIL PROTECTED]> wrote:

 I am using latest watir version i.e 1.4.1.

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
Hi,

Which watir version are you using? Latest version has a method called 'attribute_value' that you can try that to get the value of 'caption' attribute. So you try the following:

ie.checkboxes[1].attribute_value("caption")

Regards,
Angrez


Hi,
  I see a screen with checkboxes(in a tree strucuture) and labels beside the checkboxes. Developers are using third party libraries(_javascript_s) to generate these checkboxes and they are placing a label beside the checkbox.
 
When I do a view source on this page I see the following code which has the actual label(Male).
 
var a = new Array;
a[0] = new Array;
a[0]['id'] = '1'
a[0]['checkboxName'] =''ID_1''
a[0]['caption'] = 'Male'(#This is the data I want to retrieve)
a[0]['isOpen'] = true
a[0]['children'] = new Array;
a[0]['children'][0] = new Array;
a[0]['children'][0]['id']='2';
a[0]['children'][0]['caption']=''Female';
a[0]['children'][0]['checkboxName']='ID_2';
but when I say
ie.checkboxes[1].name , it returns the text ID_1.
But I am interested in the caption of the checkbox i.e Male
 
How do I retrieve this caption?
 
Third party libraries used for generating the checkboxes as found in View Source:
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script>
 
 
Thanks,
Amitha


Yahoo! India Answers: Share what you know. Learn something new Click here
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to