Selector issue- botsDNA

Hi All,

i trying to automate botsDNA active loans use case, where i need to click on each link based on input like (7325)…, img below

what i am doing is i am getting last 4 digit of input(7325) searching on website and clicking on particular link, but selector where i am facing problem for click the link based on input.

how to achieve it.

below is the selector

Hello @Rakesh_Tiwari

Here you need to use dynamic variables for the aaname as you need to click on the row with the id.

So you have to pass that varbale along with wildcard “*”. So you can keep * before and after the variable.

Hi @Rahul_Unnikrishnan ,

Thanks for your support.

now, bot is clicking on each row of link so it download the zip file and then bot clicks on particular file and extract some information from it(opening as notepad) using regex.

but the problem is it should read the same file which it downloads, how to make it dynamic bro?

image

One approach is you need to clear the download folder as the first step of automation. Then when you download there will be only one file.

You can use Directory.getFiles(“FolderPath”)
It will give you the filenames. You can pass it in the Read Text file activity.

Another approach is as in the below post.

i am using directory.getfiles, pls see the img below

image

i have passed “Downloads” as file path, but throws me error


actually, its going to different location i think so, where as actual location is

image

In the for each you need to give foreach file in files.

Also files=Directory.GetFiles(“Yourdownloadfolderpath”,“*.zip”)

changed accordingly but same error

can you please share the screenshot of the workflow?

ok, it’s working now, but again one issue is, the same variable “files” i have passed in read text file activity but throws below error.

image

what i am trying to do is bot should take same file to read and extract the value from it.(the current file everytime.)

Main.xaml (24.5 KB)

files variable is a string array. So it will not work. You need to give file.

i have shared a xaml file with you, please check it. since i am trying to pass the same file which is downloaded by the bot, but it seems i am running out of ideas how to pass it.

checked your workflow. You are deleting the files in the download folder and then outside of the for loop you have used Read Text file?

Are you downloading the file again and then trying to read it?

If yes you need first download the file.
Then use Directory.Getfiles(“folderpath”)
Then use for loop
Inside loop use Read Text file activity.

Thanks

have one doubt, when i am using for each activity it takes the current file but file is in zip format and when bot clicks on it text document appears, so my question is will it try to read zip file or text document. because earlier i had written a code like it will click on zip file and using attach window activity it will extract the information from it.
but now bot doesn’t open the text document and gives me some error like below, not sure whether expr is correct or not or what?

image

Also i don’t want to download each and every file first and process it, i want whichever file is downloaded bot should process and then process second like wise

are you trying to unzip the file?
If yes, you can use the activities to achieve that instead of ui automation.

Thanks

no, i am not trying to unzip, if bot clicks on that file one text document will appear and bot should read that file i think. so that it can extract the value.

see below, after clicking on zip file it gives text document.
image

which needs to be read, i think not zip file

i dont think that is possible. If your file is downloaded in zip format, then you need to unzip it and then need to use Read Text file activity to read the file.

Thanks

ok, how you want me to process like, suppose it is download first zip file then steps will be like this?

1 use zip folder activity- then which folder i will pass?
2 where i should save it(Destination folder)
3 output will folderinfo type
then where it is reading my text file?

bit confused, will ypu pls elaborate how should i proceed?

Hi,

will you pls provide the regex for below img?

image

Also let me know how to build regex, if any tutorial video is available in simple way to build regex.

Hi @Rahul_Unnikrishnan ,

can i pls get the regex for for below one.

EMI(month): 15864

Thanks

Any assistance would be appreciated