Add clickrelative for regular xpath

Hi @admin

I suggest you to add a command for click relative similar green and pink box but that work with xpath

A similar command like this xclickrelative

https://ui.vision/rpa/docs/xclick#relative

There are a large cases when this command can hekp to detect an element, need only to find an anchor, the next element will be detect with near command.

This is a simple case:

If i want to click or store my image profile in the post in this forum how I can detect it ?

I know my username “newuserkantu” in the post but how I can click first image at left my username ?

With a relative click is very easy to do.

If you see the image of username on post do not contains my username “newuserkantu”

The very easy solution willl be:

Detect anchor:
xpath=(//a[@href=‘/u/newuserkantu’][contains(.,‘newuserkantu’)])

Click first element at left of anchor
xpath=(//img[@class=‘avatar’])

It click my image profile in the post and recognize it relative to my username and can not fails.

But i do not see any command to click relative to near another element anchor in ui vision with regular xpath.

I very appreciate a solution to help in this cases.

Thanks

Click first element at left of anchor
xpath=(//img[@class=‘avatar’])

Interesting. But the challenge will be to find the image “left” of the anchor. I do not think there is an XPath solution that works for all websites. The beauty of the visual solution is that it works for all websites.

Imacros have relative click from 10 years and workin well in all sites.

I use it from year 2010 and working like a charm in every site, you need to find anchor only that not change in the page, next element will be automatically detected.

Read here
https://wiki.imacros.net/V7_Relative_positioning

In 10 years with imacros i have not any difficult to click an element in the web.

The visual solution is slow (to save image, create green and pink box), if you change resolution or monitor can’t work, require xmodules and require focus too 4 disadvantages.

In ui vision there are more command similar imacros but relative position never introduced.

If you have an idea to have a similar command help me.

Relative position of imacros working in all sites well, fast and easy I hope a similar feature in ui vision (Xclickrelative with green and pink box is a bad imation of relative position of imacros only).

This is Imacros relative position to detect every element in every site

'Anchor to the header row (xpath in ui vision with anchor)
TAG POS=4 TYPE=TR ATTR=TXT:USDGBP*

'Element detected via R1 (relative) from anchor and generic TXT *
TAG POS=R1 TYPE=TR ATTR=TXT:*

I think to create in ui vision a similar command need to set the first xpath to have a limit for search element, after you add a second xpath that can be found in the range

Example:
Anchor
xpath=//h3[contains(.,‘Carrello’)]

I set relative left

Now my area is from start page to xpath=//h3[contains(.,‘Carrello’)]

I search another xpath xpath=//h3[contains(.,‘Carrello2’)]

Carrello2 will be searched from start page to xpath=//h3[contains(.,‘Carrello’)] (for left)

For right search from xpath=//h3[contains(.,‘Carrello’)] to end of page

Need to combine only 2 xpath in sequential with a limite area to search.

After long researches i found some special xpath to find element near

1 Like