I’ve the below menu structure in MS Edge (IE based website) where I need to click on the triangles to open their menu, lets take the example for Departments
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/ad9c3820-f52c-437d-8932-2c80b441129f.png)
Below is the inspected element for the triangle button of Departments. How to create a generic xPath so that it works even if there is an addition or removal of items in the list & Departments sequence gets changed
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/5af3c4a1-39ac-4cea-bb3a-d8358363cf61.png)
So here, img tag is for the triangle icon but it doesn’t have any identifier for Departments. span has the identifier but it’s pointing to the label only