TestProject Forum

When position of expected icons is dynamic

Position of expected icons is dynamic,how do I handle t.his?
there are two icons
Recipes
FAQs

In the scenario,it should click on Recipes but now its clicking on FAQs.
How do I handle this?Its affecting all my scenarios.
How do I find xpath by text?

Hello @tanvi.lohakare
You can use a dynamic Xpath with contains text, for example:
image
You can use any other Attributes as well, just double-click the Shift button when you are on the item that will open the menu for you to see them.


If you want to click on the element then use this locator within the click action