just_add_watir | Advanced recipes for Watir
7Aug/08Off

Q. How do I check/uncheck a checkbox?

A. Use a the .checkbox in conjunction with .set(true/false)
Example html:

<form>
   <input name="checkbox" type="checkbox" />I love just_add_watir !
</form>

Example watir to activate:

@b.checkbox(:name, "checkbox").set(true)

Example watir to deactivate:

@b.checkbox(:name, "checkbox").set(false)
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.