Get attribute - Span Value

Hi Good day,

Am trying to get text from web page, am having same span value for all the selectors, so am trying to get the values using GET attribute but I didn’t get the values.

For example:
Value 1: 110
Value 2: 220
Value 3: 400

for all the above span selector shows:
"html title=’*’ /
webctrl aaname=‘110.00’ idx=‘1’ parentid=‘DetailsBlock’ tag=‘SPAN’ /

html title=’*’ /
webctrl aaname=‘220.00’ idx=‘1’ parentid=‘DetailsBlock’ tag=‘SPAN’ /

html title=’*’ /
webctrl aaname=‘400.00’ idx=‘1’ parentid=‘DetailsBlock’ tag=‘SPAN’ /

Class also same for all the values, try to help me out the same.

Thank you,

HI @gokulvasant,

Try to use Find Children activity to get all the element loop through it
inside loop use the Get Attribute activity to get the answer.

use UiExplorer to get more unique selectors


1 Like


Thank you for your reply, all the elements in different div, and am using UIExplorer only. And for all the span values it shows same selector only as like below:
webctrl aaname=‘110.00’ idx=‘1’ parentid=‘DetailsBlock’ tag=‘SPAN’

No difference in this.

@gokulvasant, Then use Find Children activity to get all the elements within top level element.

Also while using Find children,

Filter - <webctrl tag='SPAN'/>
Output - IEnum<UiElement>

Loop a for each of IEnum<uiElement> and use Get attribute - aaname which gives 110.00, 220.00, 400.00 as output

Note This is just an opinion you can build from here. Refer forum for the posts regarding Find Children, Get attrubute to have a detailed idea.

Dom :wink:

Hi @gokulvasant,

use find children activity select the parent node of the span tag
Apply Filter as <webctrl tag='SPAN'/>

Do For each

Follow the same steps.

Refer this one


@arivu96… just held up with some other work. So can’t reply…

But I tried in all the ways not working as expected… actually all the span values don’t have any unique id… so don’t know how to get the same.

Hi, please check my xaml file, in one find children div, I have multiple SPAN values and I need to capture all to specific variables. Main.xaml (83.7 KB)

Thank you,

Hi @gokulvasant,

In **For Each ** activity change the Type Argument
system.collections.generic.ienumerable<UiPath.Core.Element> to



I didn’t get anything like that, if possible can you change it and send me. Thank you.

Hi @gokulvasant,

Refer this xaml file
Main.xaml (83.7 KB)


Hi @arivu96,

Sorry to disturb u again, am getting following error while running this bot:

“for each : object reference not set to an instance of an object”. Try to help me out.

Thank you,