I am trying to hide div with Value2. I tried many things but no success so far. Below is sample HTML code
<thead class="line-item-grid-header">
<tr>
<th>
<div>Value1</div>
</th>
<th>
<div>Value2</div>
</th>
</tr>
</thead>
i am trying to hide the second div specifically.
Any ideas?
Normally, you would identify a
<table>first, but without that information:Note that the above will look for “Value2” as part of any other text, so “Value21” will cause it to match too.
For something more robust, that strictly matches “Value2”, as well as ignoring leading and trailing whitespace, then: