title: How to click a link whose href has a certain substring in Selenium?
body: <p>The following is a bunch of links <code>&lt;a elements.</code> <strong><em>ONLY one</strong> of them has a substring "long" as a value for the attribute href</em></p>
  
  <pre><code>&lt;a class="c1" href= "very_lpng string" &gt; name1 &lt;/a&gt;
  &lt;a class="g2" href= "verylong string" &gt; name2 &lt;/a&gt;   // The one that I need
  &lt;a class="g4" href= "very ling string" &gt; name3 &lt;/a&gt;
  &lt;a class="g5g" href= "very ng string" &gt; name4 &lt;/a&gt;
  
  ...................
  </code></pre>
  
  <p>I need to click the link whose <code>href</code> has substring "long" in it. How can I do this?</p>
  
  <p>PS: <code>driver.findElement(By.partialLinkText("long")).click();</code> // b/c it chooses by the name</p>