如何删除 xpath 属性。我想删除/取消选择所有对象display: none
属性的样式。
我使用的路径:
//div[contains(@class,'x-column-header grid-header-ellipses-cls x-column-header') and contains(@style,'auto')]
有超过 50 个元素具有相同的 xpath,但我需要使用 display: none;
消除对象。将有大约 10 个这样的对象。我如何处理这样的对象。
网页代码:
style="border-width: 1px; width: 60px; right: auto; left: 433px; margin: 0px; top: 0px; display: none;"
请分享您的建议
您可以添加另一个 AND 运算符并使用 NOT 删除这些结果:
//div[contains(@class,'x-column-header grid-header-ellipses-cls x-column-header') and contains(@style,'auto') and not(contains(@style, 'display: none')]