如何删除xpath属性。我想移除/取消选择样式为display: none attribute的所有对象。
我使用的xpath:
//div[contains(@class,'x-column-header grid-header-ellipses-cls x-column-header') and contains(@style,'auto')]有超过50个元素具有相同的xpath,但我需要使用display: none;消除对象。大约有10个这样的物体。我该如何处理这样的对象。
HTML代码:
style="border-width: 1px; width: 60px; right: auto; left: 433px; margin: 0px; top: 0px; display: none;" 请分享你的建议
发布于 2019-04-06 03:31:40
您可以添加另一个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')]https://stackoverflow.com/questions/55542033
复制相似问题