Unsuccessfully trying to use select Item Activity or Find element Activity with a variable

Hi Friends,

I’m trying to select an element from a treeview using either Select Item activity (preferably) or Find Element activity + Click activity.

When I do it statically it works fine with either activities
image

The issue is when I change the InnerText in a variable it does not find the UI element to be selected.

Do you have any Idea how can I solve this Issue?

In advance thank you

Hi @aminekacem

Aman you please share how are you providing the variable for inner text and does that variable contains the same value that is visible in selector screenshot?

Hi @sonaliaggarwal47

Well I would say yes, the variable contains the same value, I’m using a write line activity before the select Item so I can check if the value is correct

And here how I’m providing the variable for the inner text
image

Hello @aminekacem ,
You are almost there some time innertext have some whitespaces could you try do this
In inner text put=‘*your_var*’ and try again.
If it doesn’t work could you open uiexplorer and find more reliable tags I.e aaname or something.
Or just open ui explorer and select the value you want to select and get us screenshot so we could help you.

@aminekacem

Few things here

  1. The parent id might be different for elements
  2. There can be extra spaces or so just to verify try to select same name and check
  3. If its dynamic dropdown then you might need to first click to open and then use select item

Cheers

2 Likes