My question looks similar to XPath with multiple contains on different elements, but i try solution and cant get correct result. May be I do some wrong. So i have table:
<div id="openTrades" style="display: block"><table>
<tbody>
<tr>
<td>95326</td>
<td>BRENT_OIL</td>
<td>2019-10-29 11:51:14</td>
<td>1</td>
<td>20</td>
<td>60.67</td>
<td>buy</td>
</tr>
<tr>
<td>95325</td>
<td>SILVER</td>
<td>2019-10-29 10:38:26</td>
<td>1</td><td>20</td>
<td>17.545</td>
<td>sell</td>
</tr>
</tbody>
</div>
So i try get all cells with date "2019-10-29" and "sell" status. I try to use x-path:
'//*[@id="openTrades"]//tr[contains(td,"buy") and contains(td,"2019-10-29")]'
and
'//*[@id="openTrades"]/table/tbody//tr/*[contains(td,"sell") and contains(td,"2019-10-29")]'
i cant get no one element.
Also for
'//*[@id="openTrades"]/table/tbody//tr/*[self::td[contains(.,"sell")] or self::td[contains(.,"2019-10-29")]]'
i get 58 elements - 57 with contains(.,"2019-10-29") and 1 with contains(.,"sell") but when i use
'//*[@id="openTrades"]/table/tbody//tr/*[self::td[contains(.,"sell")] and self::td[contains(.,"2019-10-29")]]'
i cant get no one.
Please, help me.