title: How to click <a class href > link question using Selenium Python
body: <p>Hi I am new to Selenium Python Webdriver. Trying to click the link <code>Abc</code> by using  <code>find_element_by_link_text</code> which didn't work ,</p>
  <pre><code>&lt;a class=&quot;favorite-link &quot; href=&quot;https://onesource.passporthealth.com/_members/query/osusf/Default.aspx?dlpvid=0000&amp;amp;sid=-111111111&quot;&gt;Abc&lt;/a&gt;
  </code></pre>
  <p>I will appreciate the help. Any idea how to use xpath for this case?</p>
  <pre><code>          &lt;div id=&quot;favCol1&quot; class=&quot;col-md-6 col-sm-6&quot; style=&quot;padding: 2px; margin: 0px;&quot;&gt;
                                      &lt;div id=&quot;favId2861214&quot; class=&quot;elig-item&quot;&gt;
                                          &lt;div title=&quot;Remove payer from favorites list&quot; class=&quot;delete-favorite&quot; data-itemname=&quot;Aetna&quot; data-favid=&quot;2861214&quot; data-dsid=&quot;28&quot; data-lobid=&quot;1&quot;&gt;&lt;/div&gt;
                                          &lt;a class=&quot;favorite-link &quot; href=&quot;https://onesource.passporthealth.com/_members/query/osusf/Default.aspx?dlpvid=1111&amp;amp;sid=-000000&quot;&gt;Abc&lt;/a&gt;
                                          &lt;span class=&quot;side-text&quot;&gt;&lt;/span&gt;
                                      &lt;/div&gt;
  
                                      
                                      &lt;div id=&quot;favId2869169&quot; class=&quot;elig-item&quot;&gt;
                                          &lt;div title=&quot;Remove payer from favorites list&quot; class=&quot;delete-favorite&quot; data-itemname=&quot;CIGNA&quot; data-favid=&quot;2869169&quot; data-dsid=&quot;317&quot; data-lobid=&quot;1&quot;&gt;&lt;/div&gt;
                                          &lt;a class=&quot;favorite-link &quot; href=&quot;https://onesource.passporthealth.com/_members/query/osusf/Default.aspx?dlpvid=0000&amp;amp;sid=-11111133323&quot;&gt;efg&lt;/a&gt;
                                          &lt;span class=&quot;side-text&quot;&gt;&lt;/span&gt;
                                      &lt;/div&gt;
  
                                      
                                      &lt;div id=&quot;favId2861157&quot; class=&quot;elig-item&quot;&gt;
                                          &lt;div title=&quot;Remove payer from favorites list&quot; class=&quot;delete-favorite&quot; data-itemname=&quot;Florida Blue&quot; data-favid=&quot;2861157&quot; data-dsid=&quot;35&quot; data-lobid=&quot;1&quot;&gt;&lt;/div&gt;
                                          &lt;a class=&quot;favorite-link &quot; href=&quot;https://onesource.passporthealth.com/_members/query/osusf/Default.aspx?dlpvid=2323&amp;amp;sid=-1111111&quot;&gt;xyz&lt;/a&gt;
                                          &lt;span class=&quot;side-text&quot;&gt;&lt;/span&gt;
                                      &lt;/div&gt;
  
                                      
                                      &lt;div id=&quot;favId2861963&quot; class=&quot;elig-item&quot;&gt;
                                          &lt;div title=&quot;Remove payer from favorites list&quot; class=&quot;delete-favorite&quot; data-itemname=&quot;Humana&quot; data-favid=&quot;2861963&quot; data-dsid=&quot;82&quot; data-lobid=&quot;1&quot;&gt;&lt;/div&gt;
                                          &lt;a class=&quot;favorite-link &quot; href=&quot;https://onesource.passporthealth.com/_members/query/osusf/Default.aspx?dlpvid=1233&amp;amp;sid=-000021212&quot;&gt;HIJ&lt;/a&gt;
                                          &lt;span class=&quot;side-text&quot;&gt;&lt;/span&gt;
                                      &lt;/div&gt;                             
                                  &lt;/div&gt;
  </code></pre>
  <p>Tried:</p>
  <pre><code>.find_element_by_xpath(&quot;//*[contains(@class, 'favorite-link') and contains(text(), 'Abc')]/a&quot;).click()
  </code></pre>
  <p>update:
  The whole block was embedded in an iFrame. That's why I couldn't access. Had to switch to that frame.</p>