我有一个用Extjs代码填充的动态网格,其元素ID不可见。有人可以让我知道如何找到我使用selenium webdriver代码的元素。提前谢谢。
我添加了HTML代码,因为我无法粘贴为图片。此HTML是用于显示动态网格的网格区域。
除了正文元素
<div id="ext-comp-1117" class=" x-panel"> <div id="ext-gen127" class="x-panel-bwrap"> <div id="ext-gen128" class="x-panel-tbar x-panel-tbar-noheader"> <div id="ext-comp-1118" class="x-toolbar x-small-editor x-toolbar-layout-ct"> <table class="x-toolbar-ct" cellspacing="0"> <tbody> <tr> <td class="x-toolbar-left" align="left"> <table cellspacing="0"> <tbody> <tr class="x-toolbar-left-row"></tr> </tbody> </table> </td> <td class="x-toolbar-right" align="right"></td> </tr> </tbody> </table> </div> </div> <div id="ext-gen129" class="x-panel-body x-panel-body-noheader"></div> </div> </div> </div> </div> </div>
答案 0 :(得分:0)
我无法添加评论,但是请您提供更多信息: 1. html示例? 2.元素不可见,但它们是否存在于html中?
感谢
答案 1 :(得分:0)
尝试使用Ext.ComponentQuery.query在运行时获取id。