For Each UI Element does not work with this website

For Each UI Element does not work with this website Gartner Special Reports | Gartner, is there any other option I can select each title of each card here?

image

I want to use for each ui element to extract each title for each card, is there a solution for this?

Hi @hjie30

Error says table extraction is not possible…are you trying to give this selector to a extract tabledata? If so thats the mistake…you can use it will get text or so to get the value and use in for each children

Hi @Anil_G

Ohh so the For each UI element does not work here, is there an alternative way to extract data using for loop without manually using Get Text

HI @hjie30

Have you tried with Data Scrapping method

Regards
Gokul

Hi @Gokul001, alright I will give a try and come back here later, thank you.

Hi @Gokul001,

May I know why the Data Scraping is not in the design tab? Is it related to the version of UiPath?

This is from the guide

This is from me

Hi @hjie30

You are using Studio X?

Go to Project tab → Setting → general → Disable the Modern design

Regards
Gokul

@hjie30
in your case it is the Table Extraction item from the ribbon menue

Hi @hjie30

You can still use for each element but use get text or get attribute to get the values as these are not tables…there are sequence elements may be a div or span

Cheers

@Gokul001 Yes I am using StudioX but it doesn’t have this setting

@ppr The Table Extraction item from the ribbon menu doesn’t work either

@Anil_G May I know how?

Sorry I had reached the maximum limit of reply for today

needs some manually post edits. Just give us a little time for further analysis

Preview:
grafik

technically we can do:
Let the main selector target the parent div of the articles
with a manually postedited metadata extract xml:

<extract>
	<row exact="1">
		<webctrl tag="div" class="individual-block tile page-1  " />
	</row>
	<column exact="1" name="Type" attr="data-type">
		<webctrl tag="a" idx="1"/>
	</column>
	<column exact="1" name="Title" attr="text">
		<webctrl tag="a" idx="1"/>
		<webctrl tag="div" />
		<webctrl tag="div" />
		<webctrl tag="div" />
		<webctrl tag="h4" idx="1"/>
	</column>
	<column exact="1" name="Url" attr="href">
		<webctrl tag="a" idx="1"/>
	</column>
</extract>

we get:

And can also do the needful when working with the modern design offered Table Extraction

As an alternative we can work with find children / For Each UI Element and modeling the extraction of the article parts

Hi @hjie30

Please look at the below method. This is how you can achieve it. You need to loop through all the elements eitehr by identifying children or by identifying a common selector which only by incrementing idx value can be used in a for loop

cheers

@ppr @Anil_G
May I know how can I access this Window known as Local value? And my Table Extraction won’t work, which part should I click on the Gartner Special Report website ya? I am a bit blurred
grafik

Hi @hjie30

When you run your bot in debug mode and pause or add a break point to an activity… then bot pauses and you will see a locals tab on left…which will contain all current variablea and its values. You can click on magnifier beside each variable to open this local value box

Cheers

But I cannot use the “For Each UI Element” or “Extract Table Data” on the website, it don’t allow me to select. “This element type is not eligible for table extraction. Please select elements which are part of a table.”

Hi @hjie30

For table extraction you need a table tag or cell to be identified but for other elements dont select table but select pattern and identify the dic you want.

Else construct your ui element and increment idx to get to eqch element

Check this

Cheers

have a look here:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum