Populate Validation Extracted Results variable for testing

Hi
I am running tests on my workflows for Document Understanding.
I would like to test my Extracted Data workflow which takes in a
UIPath.DocumentProcessing.Contracts.Results.ExtactionResult variable .

I have exported the results from a previous Validation Station Extraction and saved it to a text file .
Is there a way of getting this data from the text file into the above variable ?
As this would remove the need for running the whole document understanding process for testing .

Any help would be greatly appreciated.
Regards
Rachael

Hi @rachael.sherry!
You need to deserialize to turn the text in ExtractionResult:

JsonConvert.DeserializeObject(of ExtractionResult)(strText)

1 Like

Thanks @mmcruzRPA
Can you tell what package I need to install to use JsonConvert.

Thanks

Import the namespace Newtonsoft.Json @rachael.sherry

Hi @mmcruzRPA
I have imported the namespace

However the JsonConvert does not seem to be available.
image

Thanks

Isn’t from there…you need to go to imports tab and import the namespace that I mentioned.

@rachael.sherry
have a look on the academy course debugging. Pay special attention the section introducing the watch / immediate panel. Maybe manipulating the variable values during the debugging can serve your needs

grafik

1 Like

Thanks @mmcruzRPA have it working now. :grinning: :grinning:

1 Like

Thanks @ppr have tried that a few times, works well too

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.