Data from Excel to web and store result back to Excel

Hi Guys,

I’m very new here and was trying to create a project where it can get data from Excel (multiple rows of company names) and store it as a ‘Data table’ and using the stored value - would search specified website to get text from the search result and store it back to original excel file on a next column.
The problem i’m facing is that if a company does not exist on the website the project fails saying - Get Text ‘SPAN’: Could not find the UI element corresponding to this selector.

What can I do to make the project move on to next search storing “search failed” instead of failing the project?

U can use element exist activitiy to check if there is Data or not

I will tell you with an example

When u searching for company u got results like this

Company Code : 10056

So the company code is one u need to.extrct

So uisng get text u can extract it very easily

But consider a case when company is not available after search so could not find Company Code keyword there

So prior to indicating the Get text to extract the text use element exist to check whether the company code is there or not if it is there then u can extract company data and if not then move to next comapany data or do Accordingly

This is an example so.that u can understand with ease

Hope the idea helps you

Mark it as solution if it resolves ur query

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

help full could you please share any workflow example nived

Hi @KL1

Besides @NIVED_NAMBIAR suggestion… you could also surround Get Text within a Try-Catch activity.

Place the Get Text in Try section, Catch section is catching selector not found exception, Finally section contains an If activity.

If activity checks the value of CompanyNotFoundException and add to datarow if no exception otherwise reset the variable and skip to next for each



3 Likes

Hi @GreenTea
Thank you so much for detailed solution!
I cant seem to find reset function on my Uipath. was this an additional package I have to install?
if so, which package do I need to install? Thank you so much in advance

Here’s what I did to find it work without reset function.
Thank you for all your support guys appreciate it! Cheers :slight_smile:

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