Hi,
I am using latest watir version i.e 1.4.1.
When I say ie.frame(:index,3).checkboxes[1].attribute_value("caption") ,
it throws exception saying
"undefined method `attribute_value' for #<Watir::CheckBox:0x2e27498> (NoMethodError)"
How do I proceed?
Thanks,
Amitha
Angrez Singh <[EMAIL PROTECTED]> wrote:
Angrez Singh <[EMAIL PROTECTED]> wrote:
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
On 6/15/06, Amitha Shetty <[EMAIL PROTECTED]> wrote:Hi,Sorry thats the javascipt which I had given.Checkboxes on this page are generated by a third party tool which uses the following _javascript_s:<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>Is there way to access the html generated this way?I want to get the display name of the checkbox which is present as caption in the view source page as"a[0]['children'][0]['children'][0]['children'][0]['caption']='CHILD_A2;"
I want the text "CHILD_A2"View Source of the page looks like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<title>CHECK</title><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><script type="text/_javascript_">function init() {
myTree = new Bs_Tree();
myTree.imageDir = './images/';
myTree.useCheckboxSystem = true;
myTree.useAutoSequence = false;
myTree.checkboxSystemWalkTree = 3;
myTree.initByArray(a);
myTree.drawInto('treeDiv1');
}</script><script type = "text/_javascript_">
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)a[0]['isOpen'] = true
a[0]['children'] = new Array;
a[0]['children'][0] = new Array;
a[0]['children'][0]['id']='51';
a[0]['children'][0]['caption']='CHILD_A';
a[0]['children'][0]['checkboxName']='VELOZ_51';
a[0]['children'][0]['children'] = new Array;
a[0]['children'][0]['children'][0] = new Array;
a[0]['children'][0]['children'][0]['id']='52';
a[0]['children'][0]['children'][0]['caption']='CHILD_A1;
a[0]['children'][0]['children'][0]['checkboxName']='ID_52';
a[0]['children'][0]['children'][0]['children'] = new Array;
a[0]['children'][0]['children'][0]['children'][0] = new Array;
a[0]['children'][0]['children'][0]['children'][0]['id']='54';
a[0]['children'][0]['children'][0]['children'][0]['caption']='CHILD_A2;a[0]['children'][0]['children'][0]['children'][0]['checkboxName']='ID_54';
</script><body ><div style="margin-top:5px;margin-left:5px;" id="treeDiv1"></div>
</body>
</html>Thanks,AmithaYou have <input type="checkbox" caption="Check Here" />? It is not valid html. Check it for yourself at http://validator.w3.org/._______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-generalHi,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_14but 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,AmithaSend 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/
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
Yahoo! India Answers: Share what you know. Learn something new Click here
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
