Try accessing the checkbox in a more absolute path like browser.form(:name => 'registerForm').div(:id => "termsAgree").div(:class => 'input').label(:class => 'checkbox').span(:class => 'sprite').checkbox(:name => 'termsAgree').set
P.S. I know it's a late reply :P. might help someone who come to this thread On Thursday, November 7, 2013 3:34:42 AM UTC+5:30, Mihir Dhandhusaria 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/d/optout.
