Xpath clicks incorrect area

I have defined a full xpath for a particular element on the web page in the selector.
Sometimes this xpath points to the correct element but randomly it clicks the area approx 2 cm above the intended element.
It is happening with the elements inside a menu like the given image -
image

What can I do to make sure it always points to the same element?

is the page done loading ?
is this a menu that is animated ?
Why are you not using virtual clicks ?

yes, the page is done loading
the menu opens on click. sorry, what is an animated menu?
When I used virtual clicks, the element to be clicked was not reached at all, so I rather went with Animated mouse = True and Virtual Click = False

Add a delay between opening the menu and clicking the menu item.

Okay, I will try this and share my results here.
Thank you for your prompt reply

Hi, you can also try to use an alternativ Selector. If you install the UI Vision Plugin to your Browser, you can inspect the Webpage, and if you selected the right target, you get a list of all possible xpath-selectors for this area.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.