Click OCR text: Text from clipboard

Hi there,

Quick question: How can I make the text that is being looked for and clicked (with Click OCR text), always the text that I copied, so the text that’s on my clipboard?

Thanks in advance,

Hello @Philip,

Refer below mentioned UiPath activities,

Set To Clipboard - To set any value to clipboard

Get From Clipboard - To get value from clipboard into variable

You can use the variable inside Click OCR Text activity.

Regards
Madhura

Thank you for responding, however I don’t know how to setup the “Get from clipboard” activity so that it will put the value from clipboard into a variable. What I’m trying to do is make the computer copy names out of excel and then click on them in a web browser, the names will change constantly. Maybe the context will help you a bit more.

Hi Phillip,

Please see attached an example of setting and getting a variable using UiPath. I have used an object type variable as at the point the value is set to clipboard, UiPath does not know what this will be.

Also, if you’re using this multiple times it is worth initially setting the value of clipboard to empty. However, in previous versions this hasn’t always worked and it may be required use Powershell to clear the clipboard.

Regards,
Richard

Main.xaml (5.3 KB)

Also I have re-read your problem and you do not actually need to use clipboard at all. You should read the file into a datatable and then dynamically update your selectors to click on various items in the Web Page.

2 Likes

First of all thanks for your help so far. I thought there would be a smarter way to do this, but I’m not that experienced with UiPath. If it’s not too much trouble could you maybe upload a quick example of the solution that you are describing. By the way, I’m now getting the error: Activity timeout exceeded for the ‘Click OCR text’, could this be because it takes too long scanning the page for the value?

First question : are you working with Citrix? If not then I would recommend avoiding using Click OCR activities as they are for surface automation. If you use a simple click are you able to view the selector information?

Richard

No I am not working in Citrix. If I use a simple click I can indeed Enter a VB expression for the Selector. Thanks for helping.

Philip