如何解决需要从Web表中选择行
我有一个网络表格,其中显示了基于某些搜索过滤条件的一些数据。因此,实际上我们总共有50行。但是,应用过滤器后,表格中只有1个可见。 这里的问题是,在DOM中,它显示了所有50行,包括可见的1行。
<table-row style="height: 32px; line-height: 32px; transform: translateY(0px);">
<table-row style="height: 12px; line-height: 12px; transform: translateY(32px); display:none;">
<table-row style="height: 12px; line-height: 12px; transform: translateY(38px); display:none;">
<table-row style="height: 12px; line-height: 12px; transform: translateY(41px); display:none;">
现在,我唯一的选择是使用属性“ style”的此显示部分。由于我只希望那些不包含此显示选项的行,其style属性中的任何行都尝试使用xpath- 在下面,但不起作用`
//table-row[not(contains(@style,'%display: none%')]
解决方法
您需要删除那些%
前后的符号并添加右括号:
//table-row[not(contains(@style,'display:none;'))]
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。