У меня есть таблица HTML на веб-странице, и таблица пуста. Он не содержит данных, так как данные были удалены предыдущим тестом. Для этого теста я хотел бы проверить, убедиться, что таблица html пуста, она не содержит данных. Как лучше всего это проверить? Я думал об использовании Xpath следующим образом:
//table[@id="data_configuration_edit_data_object_tab_address_rules_tb_level_rules_locality"]//tr//td//div[text()=""]
Фрагмент HTML:
<table id="data_configuration_edit_data_object_tab_address_rules_tb_level_rules_locality" class="GFNQNVHJE border" cellspacing="0" __gwtcellbasedwidgetimpldispatchingfocus="true" __gwtcellbasedwidgetimpldispatchingblur="true" style="min-width: 350px;">
<thead aria-hidden="false">
<colgroup>
<tbody style="display: none;"/>
<tbody>
<tr>
<td align="center" colspan="2">
<div>
<div class="" style="width: 100%; height: 100%; padding: 0px; margin: 0px;" aria-hidden="false">
<div class="" style="width: 100%; height: 100%;" aria-hidden="false">
<div class="gwt-Label">No data to display.</div>
</div>
</div>
<div style="width: 100%; height: 100%; padding: 0px; margin: 0px; display: none;" aria-hidden="true">
<div class="GFNQNVHBE" style="width: 100%; height: 100%; display: none;" aria-hidden="true">
<div class="gwt-Label"></div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
<tfoot style="display: none;" aria-hidden="true"/>
</table>
Спасибо, Риаз.