Get attribute of particular column using LInq

Hi Everyone,

I have a scenario where i have to get attribute of a element in first column in web table.
First i am extracting table to DT1 after that i want to get specific attribute lets say “aaname” of Column1 for all the rows in that page. I have done this through For loop already which is taking time to process all records.
So i want to do this with the help of LInQ. Could anyone help me with this.
@ppr @Raghavendraprasad @ClaytonM @supermanPunch @sarathi125 @Yoichi @arivu96
@PrankurJoshi @indra @poorna_nayak07 @Palaniyappan @Nithinkrishna

some more details would help us, as the case has the potential to get solved with alternates.

A general building block could look like this:

  • find children activity - for getting all elements | output variable: uiChildren
  • Assign activity:
    arrValues = uiChildren.Select(Function (x) x.Get(YourAttributeName).toString).toArray

I have a table like below image, i am extracting to Datatable DT1.
After that i have to get status like below image “Trailer not yet assigned”,that status basically comes when we hover on element. So we are getting value from attribute using get attribute.
As we have many rows we used for loop. but i want to do the same using linq to attribute value of all rows of that particular element.

image

image

Hi @Satish_Ch ,
Look into it

we can grab the hover text with datascrapping:

We had already used Get attribute and in the for loop for all the rows as we have to get for all rows. We need with Linq

Could you please show us your For-loop sequence?

Here in your case, we have to hover on element which is in column but i have to hover inside element of column1.
I just tried your scenario, its not working for me.
Thanks Anyway @ppr :slight_smile:

Could you help me with the linq query only.

when some things are not working in the first round we just do another one.

Can you share some structure details to the hover text (e.g. Browser F12 Webtools Screenshot) Thanks

as mentioned here:

1 Like

This will give for only one row right. I need for all rows thats y i am asking for linq.

with find children we collect all elements

Hey @Satish_Ch

This is a bit tricky one. Let’s go step by step please.

Kindly could you please confirm if the hover text is available in the html code (check by inspecting the page) without doing the mouse hover itself!

If the above is true, then we are good to go !

Please confirm.

Thanks
#nK

yes hover text is available Nithin @Nithinkrishna

we would assume under the title attribute, right?

Cool @Satish_Ch

Now find children should work perfectly.

Kindly show the inspect screenshot once pls.

Thanks
#nK

@ppr @Nithinkrishna

Perfect @Satish_Ch

Now just use find children and indicate the table container.

Use the filter as <webctrl tag='DIV' class='asset-box' />

From that we can easily get the attribute, so once you achieve the above please let us know.

Thanks
#nK

yes Performed this step.But when i am trying to get attributes from it, i am unable to do so

1 Like