I have experienced too that some times we need to trigger the checkbox
event with jquery instead of simple watir methods..

Try this, might work..

*$browser.execute_script("$('input:checkbox[name=\"termsAgree\"]').attr('checked',
'checked');")*


On Thu, Nov 7, 2013 at 9:04 AM, Mihir Dhandhusaria <[email protected]>wrote:

> This is my html
>
> <label for="termsAgree" class="checkbox">
>     <span class="sprite"></span>
>     <input type="checkbox" name="termsAgree" data-original-title=""
> title="">
>     <span class="message">I agree to the <a href="/termsandconditions"
> target="_blank" class="inline" title="Terms and Conditions">Terms and
> Conditions</a></span>
> </label>
>
> I tired following things and none of them seems to be working.
>
> Option 1:
>   $browser.label(:class => 'checkbox').parent.checkbox(:name =>
> 'termsAgree').set
>
> Option 2:
>  $browser.checkbox(:name => 'termsAgree').focus
>
>
> Any help is appreciated.
>
> Thanks
>
>
>
>  --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.

Reply via email to