Datascraping getting first attribute value from row

I am currently trying to use data extraction to retrieve data from a table.
Yet somehow I cannot get an attribute that i set on the row item itself. It is possible to get any attribute from child elements. I am currently writing in the metadata itself.

My metadata is the following:

<extract>
	<row exact='1'>
		<webctrl tag='tr' />
	</row>
	**<column name='otype' attr='otype' exact='1'>**
**		<webctrl tag='tr' />**
**	</column>**
	<column name='URL' exact='1' attr='id' name2='Titel' attr2='text'>
		<webctrl tag='tr' />
		<webctrl tag='td' idx='3' />
		<webctrl tag='nobr' idx='1' />
		<webctrl tag='a' idx='1' />
	</column>
	<column name='Test' exact='1' attr='rawlookupitemname'>
		<webctrl tag='tr' />
		<webctrl tag='td' idx='4' />
	</column>
	<column name='Medlemsnummer' exact='1' attr='text'>
		<webctrl tag='tr' />
		<webctrl tag='td' idx='5' />
		<webctrl tag='nobr' idx='1' />
		<webctrl tag='span' idx='1' />
	</column>
	<column name='Aktivitetstype' exact='1' attr='text'>
		<webctrl tag='tr' />
		<webctrl tag='td' idx='6' />
		<webctrl tag='nobr' idx='1' />
		<webctrl tag='span' idx='1' />
	</column>
	<column name='Aktivitetsstatus' exact='1' attr='text'>
		<webctrl tag='tr' />
		<webctrl tag='td' idx='7' />
		<webctrl tag='nobr' idx='1' />
		<webctrl tag='span' idx='1' />
	</column>
</extract>

The issue lies within not being able to get the otype attribute from the tablerow div itself.

@sdyre
welcome to the forum

Have a look here (we can also do in modern design)
[HowTo] Data Scraping - Advanced Configuration - Text Field, Image Source, Url, CSS Classname, Hover text - News / Tutorials - UiPath Community Forum

Thanks Peter, I have actually seen this, but it did not solve my current issue :frowning:

can you share with us a screenshot of the element structures with its details? Thanks

then be also very specific (which application type) and share with us the details as requested above. Thanks

The application is Edge browser. currently I can retrieve all data columns but not the:

	<column name='otype' attr='otype' exact='1'>
		<webctrl tag='tr' />
	</column>**

which just doesnt appear in the datatable I get.

buggyElementStructure

The extraction selector points at the tbody and seems to work fine. Somehow I cannot extract the otype from each of the three rows on the screenshot

Any suggestions are much appreciated :slight_smile:

Are you getting other values when passed in

this is one important config part
the second important config part is the row/loop definition (row config)

it could be the case that we cannot configure extractions at the loop element level

That is also what I have concluded so far… hoping to be wrong.

I have attempted to move the loop element level up once, making it target the datatable in the HTML instead of the DT. Doing so would of course result in it looping incorrectly but atleast getting one row with values.
This did work and i did get the otype value.

So now i just wonder if it is possible to get the attr itself at root level of a dataextraction function. :thinking:

*…Instead of the TR (tablerow)
my bad

in such a case we would also check if it is faster to setup the custom table extractor with:

  • find children + LINQ + UiElement API and findFirst method

OR

1 Like