The README.rdoc (http://github.com/bret/watir/blob/master/README.rdoc
) says:
Actual text:
> Setting and clearing a radio button
>
> browser.radio(:value => "watir").set
> browser.radio(:value => "watir".clear
Closing parenthesis is missing, should be
> browser.radio(:value => "watir").clear
Additionally the example page (http://bit.ly/watir-example
) as given in the code/README actually is:
...
<label class="ss-q-help" for="entry_2">Radio buttons</label>
<ul class="ss-choices"><li class="ss-choice-item"><label class="ss-choice-label"><input type="radio" name="entry.2.group" value="Watir" class="ss-q-radio" id="group_2_1">
Watir</label></li> <li class="ss-choice-item"><label class="ss-choice-label"><input type="radio" name="entry.2.group" value="Selenium" class="ss-q-radio" id="group_2_2">
Selenium</label>
...
This uses 'Watir' while the example code is 'watir' which in turn raises an exception:
> ...
> Watir::Exception::UnknownObjectException: Unable to locate element, using {:value=>"watir"}
Thank you for these observations!
Fixed http://github.com/bret/watir/commit/110abca79293d9da90a939fc3b0e17421dd3bcf1
And closed.