I need to build a xpath
that returns Meu elemento
only if Dependencia
is present on the screen.
I'm currently filtering Meu elemento
using the following snippet:
//div[contains(text(), 'Meu elemento')]
...
<div>
<table>
<tbody>
<tr>
<td>
<a>Dependencia</a>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div>Meu elemento</div>
</div>