Get text from Screen

uiautomation
studio

#1

Hi, I have an application screen like this.
image

We can select it by clicking or up and down keyboard. What I want to do is, I want to get the selected text. How can I get the text (100,200,300,310) ?


#2

Hi @Raspi_Erwin,

Use Google or Microsoft OCR Engine inside “Get OCR Text” Activity to get the text from screen.


#3

what I want is, everytime the robot select the value, The UIPath can get the text.
So what I want to do is to check each value in the screen if it match with my “300”.

So the first time robot click 100, then UIPath check it if 100 = 300, if not, then click 200, then check again. The process is repeated until it found value 300.


#4

Hi @Raspi_Erwin
I think it depends on your app.
If you are lucky, you can get text via Copy Selected Text activity.
And the cursor can goes down via Send Hotkey activity.


#5

I tried that. Not working.

Any other suggestion?


#6

Hi there @Raspi_Erwin,
If you are struggling to achieve this via selectors (or other means), you could potentially use image recognition.

For example, you could use an image of 300 highlighted, then have the robot press ‘Down’, until that image exists.

You will still, however, require a means of determining how many items exist in the list, to prevent it infinitely looping.

Thanks,
Josh