Help adding 2 items of Data from excel to website loop

Hey folks,

Hoping I can get some help for what seems like a simple approach.

Attempting to create something that takes an identification number, enters it onto a website, which then prompts you to enter a date. The process is just that; take id number and add to webpage, press enter, add date to next page and repeat.

These two items are on the same row and I want it to loop through but I’m struggling to find the best solution for this.

Have a look at this thread, it should help,

Thanks,
Rammohan B.

2 Likes

Hi @DarkHorse

Welcome to UiPath community buddy

Fine, kindly follow the below steps that could help you resolve ths issue
–use excel application scopr and pass the file path as input
–use read range activity and get the output of the activity with a variable of type datatable named outdt
–use for each row loop and pass the above variable as input
–inside the for each row loop use open browser and mention the url of that website
–within that that open browser use a assign activity mention like this
out_identificationnumber = row(“identificationnumbercolumnname”) .ToString
–use a type into activity to type this value in the field you want
and along the text input in the type into activity we can mention like [K(enter)] or after entering the value in typeinto input field you can find a plus symbol + at the right end of the input field, press that and add enter key…once after adding this make sure you have enabled the sendwindowmessage property in the type into activity and disabled the simulate type property
–then gt the date value similarly
out_datevalue = row(“datecolumnname”).ToString
repeat the same as mentioned previously
now as all these activities are in loop it will open the browser and enter the details from each row one by one
Kindly try this and let know whether this works or not
Cheers @DarkHorse

1 Like

did that work buddy @DarkHorse

1 Like

Thanks for the posts both, very nice instructions @Palaniyappan - I have an issue where the website times out and cannot access the page. Not sure how to work around but other than that I’m sure you provided would pretty much work.

1 Like

what was the actual issue with the website buddy @DarkHorse

Essentially it has a fast time out where it requests login, so when launching a new session sometimes the page is accessible and sometimes it says go to home page to login (which would then take to the correct page)

we can handle that with a element exists activity like
–use this activity once after getting to the page where you want to go and select the element that usually appears once logged in(any element that appears always)
if the page is accessible the element will appear and this activity will give us true value, i.e., a boolean value
–we can use a if condtion to validate this and if it passes we can continue with THEN part or we can login again to the page and the related activities in ELSE part

Hope this would help you
Cheers @DarkHorse

1 Like

Hi @Palaniyappan sorry for the slow response. I think I’ve mostly sorted this, website has random load times that vary and logs out randomly too if you’ve not logged in recently. So what I’ve done is launch CFR browser as private (incognito) so it logs in each time.

It seems to work ok, but I haven’t been able to add the date without a timestamp (timestamp isnt in the data and adds as date followed by 00:00:00. The format also seems american, e.g. adding 03/04/2019 instead of 04/03/2019

1 Like

NO worries
Fine you can save them. like this
"yourfilenamewithoutextenssion"+“now.ToString(“hh_mm_ss_tt”)”+".yourfileextension"

Kindly try this and let know buddy
Cheers

Sorry @Palaniyappan I wasnt clear enough and made a typo. So in the excel spreadsheet are UK dates, and when the bot enters them onto the website it is american format and it adds a timestamp.

What I want is for the bot to add the UK date with no time stamp. Is there a way to convert this so it just enters UK date alone?

so you mean like you want to enter the date from excel which is in UK dates to the website with same UK dates format…(not in american format)
am i right buddy @DarkHorse

1 Like

Spot on @Palaniyappan. I have been googling but not sure I’ve found what I’ve needed, many thanks for your help so far, very resourceful stuff.

well did this get resolved then
@DarkHorse

Not yet @Palaniyappan. I’m wondering on what is best practice to enter UK date. Rather than it converting to US and adding timestamp

@Palaniyappan I was hoping using assign activity to convert my date variable to a new variable so that its Date1 = Date2.ToString(“dd/MM/yyyy”) — but this then throws a compiler error around string to integer conversion.

Any thoughts?