How to look for a value in a web application datatable and click on it?

Hi all!

I would like to look for a contract number in an application web based on a list I got from excel.
If I find this number then I check its statu, if the statu is good then I click on the contract number.

  1. Get a datatable from excel (read range workbook)
  2. Connect to an application (click and type into)
  3. Look for a contract number in the browser application (click and type into)
  4. Look for the same contract number in a table than suggest several results
  5. Once number contract found, depending on its statu click on the number
    If the statu is not the wanted on then you start again.

I have several issues:

  • Type into : “the UiElement is no longer valide uipath”, wich is weird since I have the same selector each time I run the robot plus I cannot “repair” it.
  • The loop is not continuing; Event though it’s OK or KO, the loop doesn’t go on and check the rest of the contract number.

Thank you all in advance :pray:

The way I would troubleshoot this would be to use the Find Children activity on your table returned after you have searched for a contract number. Set this to Find Descendants.

Then output the selector string for every element on that table. This way, you’ll be able to identify the structure behind it and how you will be able to build selectors which are dynamic enough for you to eventually use.

This may help explain how to use the activity for your needs: How to get all selectors from one web page

Hi @ronanpeter,

Thank you for your help!
I’m not sure I really understand how does it work.
Do you have any xaml example?

What I started to do is:
Extract datatable from excel
Assign the value of the row from this datatable (variable)
Extract second datatable from webapplication
For each row of this second datatable, I get row item (variable2)
In a IF activity I compare the first variable to the second one.
However, it’s not recognising the matching value …

Do you think it could come from the sentence I’ve used in the condition?
variable2.ToString=variable.Tostring

Are you sure it is the IF statement that is causing the issue? Is the workflow finishing without error? If no errors are being returned then it would suggest that the IF statement is fine, but rather the variables you are passing are never matching. You should troubleshoot this by putting in a break point just before the IF statement and running in debug mode to check their values at that point.

If an error is being returned, please post it here and indicate which activity is throwing it

Indeed, you’re right. There is not error on the If activity.
It might come from the variables directly.

Hi everyone!

To @andrzej.kniola @vvaidya @palindrome, sorry for disturbing but I would be very grateful if you had an idea on this!
Do you have any idea on how I could find a value in a datatable from webscraping?

Thank you all in advance for your time on this :pray:

Please use Datable.Select to find particular row of web datatable in excel datatable.

Hi all,

I’ve used a dynamic selector which includes “string.format”.
Now it’s good :slight_smile: Thank you all for your help!

Find children was though an alternative!

Have a nice day :slight_smile:

1 Like

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