File path for Image Variable


Is there a way to specify the file path of the image file for Image variable (Uipath.Core.Image) ?
I can use Take Screenshot Activity to capture info to the Image variable, but I have already a bunch of image files in my folder.


Can you provide more details on what you are looking for?

Hi Kannan,

I was trying to play around with the new feature of Screen OCR, and for the Image property under Input, it accepts Image variable. I don’t know if I can specify the file path of the image to that variable.


To get image in a variable, use Load Image activity under Ui Automation >> Image >> File. The activity returns Image object and as input you can give the image file path.


Yes we can pass the image file and get that as a image object
—use assign activity and mention like this
arr_files = Directory.GetFiles(“yourfolderpath”,”*.png”)
Where arr_files is a variable of type array of string

—now use a FOR EACH activity and mention the above variable as input
—inside the loop use LOAD IMAGE activity where mention the file path as item.ToString and get the image variable we want

Cheers @Snowman


Thank you both @KannanSuresh @Palaniyappan, and appreciate your prompt advice over the weekend and Sunday.

I got from you both the solution and practice.


1 Like

Cheers @Snowman

1 Like

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