Disappearing Autocomplete automation


I need to scrape all the values that comes in the autocomplete drop down once I enter 2 characters (say “bo”) in the ‘From’ field. The drop down disappears as soon as the focus is removed from the page, so this is not allowing me to record or ‘Select Item’. I’m relatively new to UIPath and after searching all the forums, couldn’t find anything similar.
It’d be great if someone is able to help on this topic.

Website link: https://www.railyatri.in/

Hi @devbitun
While recording, you could press F2 key, this will disable/stop the recording for 3 secs. Try this, it should work.

Thanks @sawaseem . I tried it but on debugging, it cannot click on the selection. Attached my file.

Could u plz attach the file.

Sorry, had to provide a screenshot as the forum says that new users cannot upload attachments.

do you have any delay after type into city name? also, can you show the selector you have for Click ‘Li ui-id-80’?

No delays after the city name is typed - the list is coming up instantly. The selector is below:

I can upload projects now. Please find attached.Test.xaml (7.6 KB)

No delays. please find attachedTest.xaml (7.6 KB) the XAML.

cant help you more with that code… is this web site public?

first Prototype was working

give me some mins and I will share some implementation hints with you

Kindly note:
Goal of this quick and dirty prototype was

  • to check if the destination list is retrievable
  • Chrome is not available on my system I did it with Firefox (But the general steps are the same)

Type Into Activty
with indicate on screen configured to the textfield (From) and typed into Mu to invoke the suggestion list

Find children
first step: indicate on screen to the first suggestion entry (In case Suggestion list is gone it was reinvoked with the help of F2 and retyped manually again Mu)

second step: using Uiexplorer and reconfigured the selector to the LI tag
<html app='firefox.exe' title='Indian Railways Train Enquiry, Insights &amp; IRCTC eTicket booking *' />
<webctrl id='ui-id-10' tag='UL' />

opening standalone UiExplorer (Design>UiExplorer) and grabbing the selector to the first suggestion entry
(help of F2 etc. if needed)
found: <webctrl id='ui-id-1002' tag='LI' /> and reworked to following filter statement
"<webctrl tag='LI' />"

Output set to Variablename: uiSuggestions

So i retrieved the LI Elements and the suggested values are retrieved

Assign Activity
Using statement: uiSuggestions.Select(function (u) u.Get(“innertext”).toString).toArray
and retrieved a string array with the suggested values ready for further processing

I would suggest for enhancement:
incorporate a retry scope between type into and find children and get sync on the displayed suggestion list

  • allows you to handle some delays of displayed suggestion list

Make the selectors more solid

  • currently they would fail if e.g. a 'ui-id-1002 will have a change on its number part

And sure adopt it all to Chrome within the selector and browser specific parts

Happy Automation :+1

1 Like

Yes, it is a public website. You can access it.

Thank you for all the guidance. However, I’m a beginner with coding and the below error message is thrown when I try to implement the same.

Test.xaml (9.5 KB)

The listDestinations variable is a IEnumerable type

give me some mins please will come back soon to you

please do following:

  • import the linq namespace

check your assign: listDestinations.Select(function (u) u.Get(“innertext”).toString).toArray
that is correct, no comma inside ( I saw one)
maybe add the brackets after ToArray like this:
listDestinations.Select(function (u) u.Get(“innertext”).toString).toArray()

Change the Object type of the for each activity to string

Let me know your feedback on the fixes

Thank you for all the guidance. I made all the changes which is making the compilation error go away. However, on completion of the workflow, the values are not getting fetched.

I checked the logs and found that there are no “item” being picked up, which to me, means that the “Find Children” activity is unable to find the list of destinations. Please let me know your thoughts.

Attaching the revised workflow and the log file for your reference.2019-10-31_Execution.txt (15.8 KB) Test.xaml (11.6 KB)

One good thing is that it was running at my end, so we only have to get it run at your end
Your xamls are not readable at my box, however we will findout whats going wrong

Find children is empty, so please post your selectors from findchildren and what was used for the filter
Can you please also post a screenshot of your worflow


@ppr Finally I am able to make it work. There were a few tag changes that I was doing wrong at my end. I updated the tags exactly as mentioned by you and it worked! Please find the screenshots of the final workflow.
Thank you so much for all your help. Really appreciate it!

Test.xaml (9.2 KB)