Hello all,
I am relatively new to Watir. I am really having very tough time in
handling a custom checkbox control on a form, this is using JQuery CSS
checkbox.
Following is the HTML snippet how the checkbox looks. I have tried
iterating thru the table cells and checking the check box, it says it
checked, but it is not really doing that, I have written a class to
handle it to select all the checkboxes, it still does not. When I try
to record the actions for this control it crashes. Any help is
appreciated.
I tried xpath also without success.
Rendered HTML for control
##############################
<tr>
<td class="check" align="center">
<a class="checkBox" href="blank.html" onclick="return
false">Precious</a>
<input checked="checked" name="personKeys"
type="checkbox" value="<#=personKey#>" style="display: none;"></input>
</td>
<td class="person">
<#=childName#>
</td>
</tr>
###############################################################
class I have written
class ClxCheckBoxSet
def initialize(parent, name)
$checkboxes = []
$origValue = ''
parent.checkboxes.each { |c|
if(c.name == name)
$checkboxes << c
if(c.ole_object.checked)
$origValue = c.value
end
end
}
end
def Select(value)
$checkboxes.each { |c|
puts c.to_s
if(c.value == value)
c.ole_object.checked = true
else
c.ole_object.checked = false
end
}
end
end
####################################
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---