How to get an corresponding element of a row in a HTML table of a webpage based on some specific text present in the webpage

for example, I want to get the link on the left side of EX-21,

Any help will be appreciated.

Hi @Mohit_suresh_Patel

Welcome to the UiPath Forum!

To accomplish this, I would do the following:

  • Use data scraping to get the information
  • Use a For Each Row activity on the datatable ouput from the data scraping
  • Use an if statement to check the value of the column “type”
  • Get the value of column “Document” if the type is correct, else move to the next row.

Hope this helps, reach out with any questions.

1 Like

If you don’t want to loop through the whole data table, you could also use a filter datatable activity. Within the filter wizard you can set the column name to “Type”, the operation to equals, and the value to EX-21. Make sure the rows filtering mode is set to keep. Then in the output columns tab type in “Document”. This should be set to keep as well.

1 Like

Hello @nlee1131,

I did the same thing, thanks

Now the issue is I get the column data as text and I want to get the href link in that tag, can you tell me what to do?

1 Like

Not sure if this will get the href tag with it but to get the text of that column, within the for each loop use an assign activity:
row("Document").ToString

Depending how the rest of your workflow is, you will also need to decide the life span of your variables. This example assumes your variable is used within the for loop and recycled each time.

1 Like

I did got the text from the column, but need to get the href hyperlink from that.

Could you post an example of your excel file?

Are the documents hosted on the web?

yes, basically I am trying to get the Link which appears in red color in the left side of EX-21 from the webpage.

But when I stored in the datatable it stores the text of the tag, but I need the href link. Hope you get my point.

What is your full name @nlee1131?

Depending on your use case, you could append your variable to the end of a predetermined string that contains the http://www.mysite.com/***. Then using a ‘Navigate To’ activity, just input the complete variable to get to the link. Otherwise you will still have the full link stored for any other purpose.

-Nate.

Oh yeah, shoot I literally forgot this. Thanks a lot, now I will figure it out.

And do you currently work or a student?

Glad I was able to help you with that. I do both, I’m a student and I work.