Find children from url list in csv file

Hi there,

I can’t get around this small problem and would appreciate if you can point me in the right direction.

My URL list is stored in the CSV file.

I will need to open each individual URL and get certain attributes from there.

I cannot indicate element inside browser because URLs in csv file are different.

Since the attributes will be the same for each separate URL, how can I indicate a dynamic element in the Find children activity?

Here is the screenshot of what I am trying to accomplish

Thanks a lot for any assistance provided!

Hi @al009

Welcome to forum

Do u need attribute of browser window of each webpage which u are opening?

Thank you @NIVED_NAMBIAR

Yes, I will need to get a few attributes from each individual URL. The attribute name will be the same, for example “aaname”, but because the URLs are different, I don’t know what element to indicate.

1 Like

Hey @al009,

You can just indicate the browser window which you opened or the body container which should be common for all the URL’s.

For window title attribute just use a wildcard and it will fetch all the child elements for you.

In the find children activity use filter to specify which child elements(with specific attributes) to be retrieved.

You can also use scope options as per your need.

PFB in detail

Thanks, Let know for queries.

1 Like

Hi @al009
Check this workflow
browser_test.xaml (9.5 KB)

I used browser variable here and use to extract the element of each browser window and provided that eleement as input in get attribute activity, since u are trying retrieve the attribute of each url which is being same you can use get attribute activity where i had provided browservariable.Element as in the property panel in get attribute activity

hope it helps

Mark it as solution if you got answer for your query

Regards

Nived N

Happy Automation

Thank you for this suggestion, @Nithinkrishna.

I will try to use the browser window and let you know how it goes.

1 Like

Okay sure.

Hopefully it should work.

If not let me know :slight_smile:

Hi @NIVED_NAMBIAR

Can you please let me know what activity is supposed to show after the delay.

My UiPath can’t load that activity properly.

activity

Hi al009
Please place the file in any of workflow folder and open it from there

Missing activity is get attribute,
image

Property panel

Thank you @NIVED_NAMBIAR

I will give it a try and let you know.

1 Like

Sure please let me know if it works @al009

Hi @Nithinkrishna

I think I tried your suggestion and I was able to iterate through the URL list. (see the screenshots in case I made a mistake).

I added a filter condition to look for “DL” tag which has the values that I am looking for. (“DT” and “DD”)

Thank you very much for this suggestion.

A new problem I ran into now is it can’t seem to find “aaname” attributes.

It returns some gibberish in the get attribute results (like \t\t\t\t\t\t\t\ instead of a value that’s inside the "DT and “DD” tags).

Will you have some suggestions on how to retrieve correct get attribute results?

show 3

1 Like

Hi @NIVED_NAMBIAR

I tried to implement your code, but ran into some issues:

  1. I had to use ‘for each row’ instead of your suggested ‘for each’ activity because my data sits in the datatable and not in the string.

  2. I changed the attribute from your suggested “url” to “aaname” because that is the attribute I
    was looking for.

Unfortunately, I could not retrieve attribute values. I was getting empty value instead.

I appreciate your further suggestions.

no2

Hi @al009 if you check the local panel you can find the seelctor of window
please check it

Hi @NIVED_NAMBIAR

Please have a look at this screenshot and let me know if this is what you meant.

Selector seems correct in that it shows the title of the first URL as well as the filter from find children

@NIVED_NAMBIAR I re-checked it again this time using your solution and here is the selector that I see. Also the children local is null.

Try removing id attribute from the filter and let it have only tag attribute.

Thanks @Nithinkrishna

I went with @NIVED_NAMBIAR’s solution and modified it slightly.

I started with getting the url attribute and only then continued with find children activity.

I decided not to add the filter property, but instead changed the selector to include the url from the previous get property activity.

Something like this: “”

This sequence allowed me to iterate through url list, grab each url attribute and then find children for each url.

Thank you!

2 Likes

Hi @Nived,

Thanks a lot for pointing me in the right direction.

I slightly modified your solution and it worked.

I started with getting the url attribute (as you suggested) and only then continued with find children activity.

I decided not to add the filter property, but instead changed the selector to include the url from the previous get property activity.

Something like this: html app=‘chrome.exe’ url=’"+url+"’ / webctrl id=‘awr_details_header_container’ tag=‘DL’ /

This sequence allowed me to iterate through url list, grab each url attribute and then find children for each url.

Thank you!

1 Like

Glad to know my answer helps you @al009

1 Like