title: selenium how to know if one element has a href link or not,if not continue the test
body: <p>I am using selenium java 3.141.59 and testng 6.14.3.<br/>
  The test page may display like</p>
  
  <pre><code>&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td class="S_line1"&gt;
        &lt;strong class="W_f12"&gt;82&lt;/strong&gt;
        &lt;span class="S_txt2"&gt;fans&lt;/span&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td class="S_line1"&gt;
        &lt;a bpfilter="page_frame" class="t_link S_txt1" href="//xx.com/p/1003061291477752/follow?from=page_100306&amp;amp;wvr=6&amp;amp;mod=headfollow#place"&gt;
          &lt;strong class="W_f12"&gt;170&lt;/strong&gt;
          &lt;span class="S_txt2"&gt;fans&lt;/span&gt;
        &lt;/a&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>If "fans" have a href link,then I will click "fans" link. If not I will skip this step and continue to do others. <br/>
  ExpectedConditions.presenceOfElementLocated is not availabe to this situation, because it will throw exeception when not finding href link and stop the test. </p>