Reputation: 49
How can I remove xpath attribute. I want to remove/deselect all object with
a style of display: none
attribute.
xpath I used:
//div[contains(@class,'x-column-header grid-header-ellipses-cls x-column-header') and contains(@style,'auto')]
There are over 50 elements with this same xpath, but I am required to eliminated object with display: none;
. There will be about 10 such objects. How can I handle such object.
HTML code:
style="border-width: 1px; width: 60px; right: auto; left: 433px; margin: 0px; top: 0px; display: none;"
Please share your suggestion
Upvotes: 0
Views: 557
Reputation: 1119
You can add another AND operator and use NOT to remove those results:
//div[contains(@class,'x-column-header grid-header-ellipses-cls x-column-header') and contains(@style,'auto') and not(contains(@style, 'display: none')]
Upvotes: 2