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.
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
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 & 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
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
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
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.
@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!