I want to click button of a row who has a <td /> element containing a specific text in the same row. This is the architecture:
<tbody xpath="1">
<tr role="row" class="odd">
<td class=" grdIslemlerYanYana" tabindex="0" style="width: 110.767px;">
<div class="btn-group btn-group-sm">
<a class="btn btn-ajaxbutton btn-sm btn-primary" data-ajaxsendmethod="post" data-url="..."> <i class="fa fa-search"></i> İncele </a>
</div>
</td>
<td>766964</td>
<td class="sorting_1">997149</td>
<td>BLABLA</td>
<td>Genel Destek Programı</td>
<td>18/04/2017</td><td>Onaylandı</td>
<td>Aktif</td>
<td>BLABLA</td>
<td style="display: none;">BLABLA</td>
<td style="display: none;"></td>
</tr>
<tr role="row" class="even">
<td class=" grdIslemlerYanYana" tabindex="0" style="width: 110.767px;">
<div class="btn-group btn-group-sm">
<a class="btn btn-ajaxbutton btn-sm btn-primary" data-ajaxsendmethod="post" data-url="...">
<i class="fa fa-search"></i> İncele </a>
</div>
</td>
<td>766964</td>
<td class="sorting_1">997149</td>
<td>BLABLA</td>
<td>Mikro ve Küçük İşletmelere Hızlı Destek Programı</td>
<td>10/01/2022</td>
<td>Onaylandı</td>
<td>Aktif</td>
<td>BLABLA</td>
<td style="display: none;">BLABLA</td>
<td style="display: none;">3</td>
</tr>
<tr role="row" class="odd">
<td class=" grdIslemlerYanYana" tabindex="0" style="width: 110.767px;">
<div class="btn-group btn-group-sm">
<a class="btn btn-ajaxbutton btn-sm btn-primary" data-ajaxsendmethod="post" data-url="...>
<i class="fa fa-search"></i> İncele
</a>
</div>
</td>
<td>766964</td>
<td class="sorting_1">997149</td><td>BLABlA</td>
<td>İşletme Geliştirme Destek Programı</td>
<td>20/01/2022</td><td>Onaylandı</td>
<td>Aktif</td><td>BLABlA</td>
<td style="display: none;">BLABlA</td>
<td style="display: none;"></td>
</tr>
</tbody>
Also I am attaching the SS here, showing what I am trying to do:
Format is like this(without any logic currently): driver.find_element(By.XPATH, "//td[contains(text(),'Mikro ve Küçük İşletmelere Hızlı Destek Programı')]").click()
I got very confused. I am trying to click the blue "INCELE" button which is inside the same row having a <td /> containing string of "Mikro ve Küçük İşletmelere Hızlı Destek Programı" (I mean the second button on this page, but its place differs on different pages, therefore I should get the row with this text only).
Any help?
