Extract data from selected text

Hi all,
I’m new to Uipath. I need to extract the text from selected item in combo box.
Please provide me a solution.

1 Like

I think you are needing to utilize the Get Attribute Activity.
Get Attribute

2 Likes

Thank you @rstaylor62
I’m working in citrix environment,get attribute is not working.Is there any another approach to solve this?.

1 Like

I think using Copy Selected Text Activity might be the simplest option.
Documentation Link

Just keep in mind it has a bit of a weird quirk. If there is no text selected it will return an error so you might want to surround it with a Try Catch activity or a Retry Activity.

3 Likes

Thank you@ Cosmin_Ion_Nicolae @rstaylor62
I had tried using Copy Selected Text activity, but my citrix not allows to copy or paste the text into it.
So please solve this issue.

Some Citrix Environments have Copy / Paste turned off or is not allowed, so either you would have to get it enabled., or would have to find an alternative.

1 Like

Hi @rstaylor62
I can’t enable it because it is restricted and there is no chance to modify it. Is there any other option to go further.

you should try the OCR activities.

1 Like

Thank you @carmen
I had used Get OCR text activity, but how to select required items in combo box.

well is quite difficult but not impossible … I did it.

Here I explained how I did it. Hope that could help you.

1 Like

Hi @carmen
How did you scrap each item in the Combo box and compare it with your input?
Can you please suggest me…

as I suggest before …using OCR …

  1. With Get OCR Text Actitity you can get the data of your first position.
  2. Save that information in a variable and then you are able to compare with your input.
  3. if doen’t match go to the next element. How? First do click in your combobox and send hot key down and you will get now the next element. and repeat again the 1st step and then compare again.

the only difficult here is to find the perfect scale to match every element in your combobox. You will need to try severals times …keep in mind that sometimes if you choose a region to scrape with a pixel more or a pixel less could be a different result.

1 Like

Thanks a lot @carmen,
test1
I will try as per your suggestion, I’m using Get OCR Text Activity for the first 7 records individually.but one thing I could not understand is I have to select all the records with suffixes +1,+2,so on. and after selecting all the required records by holding ‘shift’ key.how to stop the iteration when it selects the different record.

well … How do you know that you finished to select all the different record? that should be your condition to stop your iteration.

After completing the selection of required element, I need not to scrape the other elements.

But I am asking you as human being … How do you know that are you finished?

I’m little bit confused, what i’m saying is bot after selecting the requested record and if it selects the another record which is not our requested.It should stop the scraping remaining elements.

what I mean is that you should first to know how a human make that process and then create your bot. If you do that probably you will find easier to create your bot.

1 Like

test1
I think you have not understood clearly what i’m trying to say, Let me explain once again. I’m going to check all the records in the combo box and if requested record found then will select the records which has suffixes.

Suppose in the above screenshot,my requested record is 323319. So I will select all the records of 323319 serially. The records will come in Ascending order(i.e., All 323319 records would be at sequential wise).After 323319+5 record there will be a chance of another record and in that scenario, scarping all the remaining items will increase the time.

there you have your answer then … You will stop when the next element that you read is different to 323319.

1 Like