1
I need to build a xpath
that returns the Meu elemento
only if the Dependencia
is present on the screen.
I am currently making the filter of Meu elemento
using the section below:
//div[contains(text(), 'Meu elemento')]
...
<div>
<table>
<tbody>
<tr>
<td>
<a>Dependencia</a>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div>Meu elemento</div>
</div>
As you mentioned, any structure that was changed in XML would result in losing the final result. It seemed to me a good solution, but hard coded.
– user34594