title: XPATH- How to select radio button and text in a single xpath expression?
body: <p>I have Radio button with value as "<code>CREDIT_CARD</code>" and the text of the radio button as "<code>New</code>". Now i need to select a radio button which has text "New".</p>
  
  <pre><code>&lt;div&gt;
  &lt;input type="radio" onchange="javascript:toggleAdvancedDisplay('pay_detail','CREDIT_CARD');" value="CREDIT_CARD" name="payment_type" style="margin:0; vertical-align: middle;"/&gt;
  &lt;span class="value"&gt;New&lt;/span&gt;
  </code></pre>
  
  <p>I tried the below xpath, but it doesn't locate the expected element. </p>
  
  <pre><code>/fieldset[1]/div/div/div[2]/input[@value='CREDIT_CARD']/fieldset[1]/div/div/div[2]/span[contains(text(), 'New')]
  </code></pre>
  
  <p>What is it i am doing wrong here?</p>