Clicking Links for Data Entry - Was using iMacros to do this

Hello,

I was using iMacros to do this, but now imacros software has been discontinued. I have a list of items on a website I need to click, but I only have the javascript link data (I think that’s what it’s called), not the actual text of the item to be clicked on. So for example, the text on the link would say “John Smith” and when you hover the mouse over the hyperlink text “John Smith” you’ll see the url data in the browser info bar, it says something like “javascript user id=123456”

So for example, “John Smith” ID is that number in there. I was using imacros to click these links using a command in imacros like:
TAG POS=1 TYPE=A ATTR=ID:Link_123456

How do I do this in UI.Vision?

1 Like

I found that the iMacros TYPE=A ATTR=ID command can usually be replaced with the CLICK | XPath command.

UIvision has also a Record & Replay feature.So the easiest approach would be to re-record that click and then pick the best suggested locator and modify it as needed.

imacros alternative

Or: Generate XPath from scratch:

To locate a link ( a element) by its id attribute using XPath, you can use the following expression:

//a[@id='your-link-id']

This will select the a element whose id attribute is equal to 'your-link-id' .

For example, if you have the following HTML:

<a id="my-link" href="https://www.ui.vision">RPA</a>

You can locate this link using the following XPath expression:

//a[@id='my-link']

This will select the a element with the id of 'my-link' .

=> So the UI.Vision command is:

CLICK | xpath=//a[@id='my-link']

(This is the same as the Selenium IDE syntax)