How to get aaname from UiElement

Hello All,

First, I use Find Children ‘SELECT’ to get item from Select.

The UiElement item looks like this:

2020-06-29 164635

I would like to get the aaname from the item in For Each activity. I try to use Get Attribute Activity. I set Target->Element as item. However it failed.

The error is as follows:
Get Attribute: Error HRESULT E_FAIL has been returned from a call to a COM component.

Really appreciate on how to solve this.

@bluesnam
it could be the case that one of the clicks made the uielements invalid.
Check if for the first item the aaname is retrieved by doing it like following:
set breakpoint on Get Attribute and debug
when it stops the go to watch box and type in following expression: item.

Get("aaname").toString

Hi ppr,

Thanks for quickly replying. I follow your idea, and the result is as follows:

Cannot evaluate ‘item.Get(“aaname”).ToString’ at current context.

ensure that the it is properly entered into the body. add a second watch expression with dumping out the item only. Check for each type argument if it is set to uiElement

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.