Have you solved this one already? While you are having problems with 
setting the value, I have problems accessing/verifying whether checkbox is 
checked or not.
 
Though I have the ff code:

<label class="custom-checkbox checked" data-bind="css: { checked: 
isDependent() }, click: toggleAsDependent">
<span>Dependent to an existing member?</span>
<input type="checkbox"/>
<i/>
</label>


checkbox        :dependent_checkbox, xpath: 
'//label[@class="custom-checkbox"][contains(@data-bind, "css: { checked: 
isDependent()")]/input[@type="checkbox"]'

    def pick_member_dependent dependent
        unless dependent.eql? "N/A"
              if dependent.eql? "Yes"
                check_covered_on_parent_policy
                sleep 1
              end
        end        
    end

this works and actually checks the checkbox. Give it a go :)

On Thursday, January 8, 2015 at 4:26:20 PM UTC+8, mc060200778 wrote:
>
> HI,
>
> I want to set following checkbox but it is 
> shadowed by Label For element. So i can't execute b.checkbox().set 
> method... it is giving an error. How do i set checbox in this case?
>
> <input type="checkbox" id="DailySummaryCompleted" class="checkbox col-lg-1 
> ng-pristine ng-untouched ng-valid" 
> data-ng-model="jobReport.DailySummaryCompleted">
> <label for="DailySummaryCompleted"> </label>
>
> Further, is it still valid issue? "It is not possible to find the 
> checkbox by its label (as it appears to be comparing a Watir::Label 
> object):"
> https://github.com/watir/watir-classic/issues/56
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to