Desktop Automation - Clicking Specific Button Where 2 Exist

This may be related to my other post.

How would people approach clicking the View/File button for the current day/month in a list. The View/File button for 31 March is correct, I don’t want the 5th April pressed.

Not sure how to proceed with this one.

Thanks
Pat

You must use axes xpath but ui vision do not record these xpaths

You must study and create it using others sites and addons

With axes xpath you can detect an element near another element (preceding and following)

https://www.w3schools.com/xml/xpath_axes.asp

Another solution is use Xclickrelative

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

My apologies @newuserkantu - it’s for desktop rather than web. I really must be more careful in posting…

Try Xclickrelative for desktop automation

Do you know it is always the first button of the two “View/File” buttons? Then use

XClick | button.png@0.5#1

  • button.png is "image "
  • #1 tells UI Vision to use the first button found (from all found buttons that are above the threshold of 0.5)
  • For the second button use XClick | button.png@0.5#2

Or if the date is always the same, use XClickRelative as @newuserkantu suggested:

2 Likes

Works like a charm - nice and easy - thanks very much…

(Sorry for delay - took the weekend off)