Relative click need solution to click element to the right of another element

@ulrich @Plankton

I need a solution to click an element to the right of another element

Seems there are hidden element in the page (hidden widget) and i can not know the exact number of the element i need to click.

I know the name of the element before I want to click in my case “Carrello” and i need to click “Aggiungi” relative to “Carrello”.

The site is widgets.php page of wordpress.

I search a xpath solution to avoid the focus problems of xclick/xtype.

xpaths anchor element

xpaths element to click



Hi, do you have a link to the website? I assume you already tried the Xpath contains solution?

I search a solution for relative click like imacros TAG R1 (if find first element at right of anchor) or TAG R-1 (it find first element at left of anchor).

With ui vision i do not know a similar command to detect element near another item.

This is the xpath with contains


But how I can detect “Aggiungi” near at right of “Carrello” ?

“Aggiungi” showed me different [n] because in the page there are hidden element.

The secure way to detect it is

FIND “Carrello” (easy to do) (xpath=//h3[contains(.,‘Carrello’)])
After click first element near at right contains “Aggiungi”

But i can not find any solution to click a relative element because ui vision have not relative click (need image recognition green and pink box).

I search a solution similar xclickrelative but with xpath (click)

Imacros have this wonderful feature TAG R1 or TAG R-1 and you can detect every element near another element in ui vision is very hard to do.

Read here this wonderful feature of imacros missed on ui vision

It can detect every element, need only to find an anchor the next element will be detected using a generic xpath.

For table admin provided this solution but work in tables only (better a solution like imacros tag R1 or tag R-1 that work in every site)