Get Text and find anchor between selected tags

Hi All,

I got a question, I am looking for a way to extract data from a website with an achor. But I need to search between two selected tags. Does someone know what kind of activity I need to “mark” those Tags and how do I make sure that the Anchor is looking between those Tags.

For your information:
You see “Plaats” between “Privegegevens” and “Bedrijfsgegevens”, but there is also another one between “Bedrijfsgegevens” and “Extra Informatie”.
https://www.stichtingrtgs.nl/Tolken/details/tid/105

Extra information this cannot be selected by columns or rows this can varies.
See also: Stichting RTGS > Zoek een tolk > details
That’s why I should look between two tags for the selected “Plaats” to extract this on the right spot.

There are several ways for a work around, but I am looking for this way. I am sure there should be an option to do this (gut feelings). If not, than I know this cannot be done on this way in UiPath. And should implement an other way of working with this.

I hope some of you can help me out. I’m still learning, and am challenging myself to solve this on this way.

For your information too, there are no specific “row” names for “Plaats” in the website where I could led a convertor to. On other rows this is sometimes an option, but not for “Plaats”.

Two ways come to the top of the head

  1. You can use Try and Catch approach. Where you supply the first tag once, if it fails you give it the second anchor tag in catch

  2. You can get the selector and use a switch case. based on which case is detected the apporpriate anchor kicks in

Point 2 will not work because there is no proper selector.

Is there an possibility to have 2 tags for the try and catch? Because it should not be possible to find the second “Plaats” in stead of the first one. So need also something that stops or ends the search. Or search above or below a specific Tag.

I will give it a try.

You can make nested try and catches (as many as you want) so each time you try an anchor and it doesn;t find it , the catch anchor kicks in.

Thanks I will check switch case, I thought you was talking about selectors.
And will take a look for try and catch! :slight_smile:

Let you know or it works. Probably the answer will follow later when I know more.

Thanks for your answer and give me to possibility to learn en know more about UiPath! :slight_smile:

1 Like

Still cannot find a solution to extract the right emailadres or number etc.
I know I picked one of the hardest website to train myself haha.

The first rows got a good reference for the targets and selectors. But the last rows it’s almost impossible to have good “selectors” so should work between “Privegegevens” and “Bedrijfsgegevens”, but there is also another one between “Bedrijfsgegevens” and “Extra Informatie”.
For example “Plaats”, “Mobiel” and “Email” are the same name labels for the rows.

Because some of these information got exactly the same name and anchors/selectors.

See the differences in the websites:
https://www.stichtingrtgs.nl/Tolken/details/tid/105
https://www.stichtingrtgs.nl/Tolken/details/tid/403
https://www.stichtingrtgs.nl/Tolken/details/tid/441

Looping through all of this in de list is working, also not the usual way of working.
Try and Catch should possibly work I think but still not succeed on this.

Hope someone can help me out, so that I can learn more about the possibilities. If not possible than I know I should work with a work around.

It is a bit unclear to me - do you need to find the values of all right hand column cells with “Plaats” in the left column, no matter which rowheader it is under?

Hi,

I have decided to use RegEx at the moment.
But still not figure it out on how I can extract the group in stead of full tekst.
Via Matches in Uipath:

^(?:privegegevens\s)(?:.)(?:(?:.|\n))(?:Plaats:\s)(.)(?:(?:.|\n))(?:bedrijfsgegevens\sbedrijfsgegevens)$

via: https://regex101.com/ . And one full tekst via datascraping into excel.

And than I have used For Each, item.
But I still get the full match not the group 1.

image