title: How to select a Radio button in Watir with label text?
body: <p>The cheatsheets and docs on Watir show something like this to set a radio button</p>
  
  <pre><code>b.radio(:id =&gt; "radio").set
  </code></pre>
  
  <p>How can I select a Radio button <em>based on the text next to it</em>? </p>
  
  <p>Sometimes this text is inside the label tag , sometimes its just inside some div/form tag. How do we handle this in Watir??</p>
  
  <p><em>(Label texts in CAPS in below examples)</em></p>
  
  <p><strong>Example 1:</strong></p>
  
  <pre><code>&lt;form action=""&gt;
  &lt;input type="radio" value="male" name="sex"/&gt;
  MALE
  &lt;br/&gt;
  &lt;input type="radio" value="female" name="sex"/&gt;
  FEMALE
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Example 2 :</strong></p>
  
  <pre><code>&lt;div class="isoversixteen_false_container"&gt;
  &lt;input id="isoversixteen_false" class="radio" type="radio" value="0" name="isoversixteen" autocomplete="off"/&gt;
  &lt;label class="isoversixteen_false_label" for="isoversixteen_false"&gt;
  &lt;span class="label_main"&gt;UNDER 16&lt;/span&gt;
  &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="isoversixteen_true_container"&gt;
  &lt;input id="isoversixteen_true" class="radio" type="radio" value="1" name="isoversixteen" autocomplete="off" checked="checked"/&gt;
  &lt;label class="isoversixteen_true_label" for="isoversixteen_true"&gt;
  &lt;span class="label_main"&gt;16 OR OVER&lt;/span&gt;
  &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>