How to create a loop for the type into option

Hi,

I created a workflow where uipath fils in a search button with account number. but i have 20 different accounts that need to be filled in. after filling in an account number a screen apear that uipath takes a screenshot of and saves it to a file location.

image
how can i make it in a way where al 20 accounts are being screenshoted and saved.

@E.E,

You can use while loop like below,
intNo = 1
while intNo <= 20 {
// loop until intNo variable becomes false(21)
// Type in text field and save screenshot
// Increase it by 1
intNo = intNo + 1
}

@Pankaj.Patil thank you for the response. Can you please explain what I need to fill in where.

image
Where can i store the accounts numbers? for example these are a few accountnumbers (0120, 0160, 0199, 1329, 1330)

@E.E,

No problem…

You can store them in excel file. plz follow below file and also see variables in properties,

_Test.xaml (9.5 KB)

Hi @Pankaj.Patil ,

thank you, the excel file with accountnumbers stored is working. Also type in to search field is working. Only thing is, it is not looping.

image
all numbers from the excel file are filled in once and one screenshot is taken. i want to fill in one number than take screenshot and save and then to the next account number. so fill in 1930 take screenshot of result save image. Then fill in 0120 take screenshot of result save image. is there a way to get this working?

Thanks in advance.

@E.E - Before executing the process, please do the minor change in “Type into” activities under properties, try to enable the check box “Empty field”.

image

Happy Learning :slightly_smiling_face:

Hi @saijagadesh06 ,

thank you, that option is working. Only thing now is that it only takes a screenshot and saves it for the last accoutnumber that is typed in. Is there a way to take and save for every accountnumber that is filled in?

@E.E - Dynamically change the file name, then it will save the every screenshot.

In save image activity under properties section “Filename” variable should be dynamic value.

image

Happy Learning :slightly_smiling_face:

@saijagadesh06 thank you, i did the following ;

image
after running i got the following error;
|Save Image: Save image failed. Check if the file name is a valid path|

path does exist i got the error after adding +row(0).ToString

Hi @E.E ,

Can you please replace the file path with the below text.

“C:\Users\e.e\OneDrive\Desktop\RPA_CR\image”+row(0).ToString+“.png”

the file name is invalid in your file path text, after the .png extension you are not supposed to keep any string next to it.

@Shivaraju thank you! it is working now.

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