title: Click on link based on text and href attribute protractor
body: <p>This question might be easy for some people.
  I want to click on a link based on href value and text in link.Below is what i am using to search for text in link.</p>
  
  <pre><code>var elementselected = this.coinDataTable.element(by.css('a[href*='+CoinLink+']'));
  </code></pre>
  
  <p>I tried below code but it is not working. Can someone please suggest correct usage?</p>
  
  <pre><code>var elementselected = this.coinDataTable.element(by.css('a[href*="'+CoinLink+'"][text='CoinText'));
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>var elementselected = this.coinDataTable.element(by.css('a[href*='+CoinLink+']')).element(by.linkText('CoinText'));
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var elementselected = this.coinDataTable.element(by.linkText('CoinText')).element(by.css('a[href*='+CoinLink+']'));
  </code></pre>
  
  <p>This link is inside a table. Below is HTML for whole row. There are 2 links in this row. I want to select 2nd one which has CoinText in it.</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;&lt;a href="CoinLink"&gt;&lt;img border="0" src="../../../images/pc_cdlibrary_side_icon_img_lighterbg.gif"&gt;&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;1C&lt;/td&gt;
  &lt;td&gt;MS&lt;/td&gt;
  &lt;td&gt;&lt;a href="CoinLink"&gt;CoinText&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;$15&lt;/td&gt;
  &lt;td&gt;S-12 &lt;/td&gt;
  &lt;td&gt;B-21&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>