How generate loop from excel (row) & print & search for website

assignment is => to take single medicine from excel sheet 1 by 1 & then print it at website search bar & then dropdown list will open & from that dropdown list click on the medicine, then page will re-direct to next page of medicine which has full details. stay at details page for 2-3 seconds & then return back to main page & then run a loop for other medicine listed in EXCEL sheet until end of list.

Project details what I made in UiPath sequence:


  1. read range excel, given path of excel documents

  2. open browser, added url of given website

  3. do for each row in data table, added variable CurrentRow

  4. body => added type into => added website search click

  5. at text wrote formula for excel as "CurrentRow.Item (“DrugName”).ToString

  6. send hotkey => down

  7. after this its list is opening

  8. send hotkey => enter (here error is coming & not going to next medicine details page)

  9. delay 2 seconds at medicine details page

  10. click back & land at main medicine webpage


at point 8. send hotkey => enter (here error is coming & not going to next medicine details page) after that not working

Result needed :

when medicine name is printed at search bar, after hotkey down,

it should click at 1st medicine & then re-direct to next page of medicine details & then click back & then load main page.

note: website search bar has find button, but it does not works as not provided by client.

only enter medicine name at search bar & at dropdown click on medicine & then land to next details medicine page

  1. Find help me to find solution to run the loop

Good Morning Mustafa!
Have you tried to use the keyboard shortcut?
Can you send a print of your hotkey activity properties?

Hi @mustafa.diwanji

Try to add a delay activity before step 8 only for troubleshooting purpose. If it works, probably SEND HOTKEY activity is runnning before list is openning.

If so, you can try

Use Check App State activity to check if the list elements are present

Change activity properties > Target > Wait for page load → Interactive or Complete

Use modern activity Keyboard Shortcuts instead


please find attach file of my project till end.

screenshot 1

screenshot 2

please find attached file of my project till end
screenshot 1
screenshot 2

@mustafa.diwanji as @rikulsilva just said. I can see only two ways to solve your problem:
First: Verify if you need a delay before the activity;
Second: Change activity properties.
If you need some help, please send a screenshot of the properties

Hi @mustafa.diwanji

I suggest move the workflow to Modern Activities that you will have much more features like Set Focus, For Each UI Element.

If you want to continue using Classic one, make sure to change the property WaitForReady for Send Hotkey to wait page loads completely.

Also, it is alway a good practice check the element before perfome some action over it. For Classic activity, you can use Element Exists, On Element Appear etc.

Another point… from your screenshot, you didn’t indicated the element you want to press the keys, so the press key affects the element that is in focus.

You can try run the workflow in debug mode going through each activity and with Highlight Elements option enabled to check if the focus is in the correct element before each press key.


I applied WaitForReady for send hotkey,
applied delay times where required,
applied Highlight Elements options & it all helped v well. thanks for this.

At send hotkey as I did not indicate informative screenshot which does not break my project anywhere.

I remove back button click at last & replace it with click on website name (at 2nd page of medicine search) to re-direct at main page - which is also working fine.

working status =>
Now, my 1st name in excel sheet & its flow is working fine at 1st time.
it is typing name from excel, listing down the names with down hotkey, enter on name by hotkey & re-directing to medicine description (2nd page) & then after delay 3-4 second, clicking on website name it is landing at main page of website


at 2nd time when it re-directs to website 1st page, it is not extracting name from excel sheet & not typing on search bar of website & loop is ending at Type Into INPUT at 2nd time with error at INPUT (screenshot attached)
It is not typing name of 2nd medicine & flow ends with error

please help me find solution for this.

Hi @mustafa.diwanji

You can try make your selector more dynamic

Add a wildcard (*) in rc_select_1 at id attribute

Change to this


Hello @rikulsilva

V v thanks for this wildcard * for selector (rc_select_*)

I used this in selector & its working perfectly

it is extracting & printing medicine name 1 by 1 from excel data in sheet & in loop till end

Thank you very much for full support to resolve my assignment project

Best Regards,

Glad to know @mustafa.diwanji

Kindly mark the help answer as solution to close the loop


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