I have a navigation menu in which I wish to bold certain areas of the menu using an injection script. I wish to use a generic xpath to bold each of the items in the menu that I want. Problem is, the menu has some selections of the same name that I do not bolded, all in one particular sub-menu.
The menu would look something like this:
<ul class="main-menu">
<li class="sub-menu">Employees</li>
<ul>
<li>Address List</li>
</ul>
<li class="sub-menu">Clients</li>
<ul>
<li>Address List</li>
</ul>
<li class="sub-menu">Contractors</li>
<ul>
<li>Address List</li>
<ul>
</ul>
To find the 'Address list', I might use an Xpath similar to this...
//ul[@class="main-menu"]//li[text()="Address List"]
Problem is, that would highlight all "Address List" items, and I do not want anything in the Employees list.
Keep in mind, this is only a sample menu, and I need to highlight more stuff all over the menu, both in sub-menus and on the main list, but I do not want to highlight anything in the Employees sub-menu, I want to exclude just those items in that list.
I've tried 'except' and 'not' but I guess I'm not getting how to use it or am putting it in the wrong context.