Type into not wotking due to random idx value


#1

I’m working on win32 application trying to input a value into the field,
the problem i’m having is the idx value keeps changing every time the application refreshes.


This idx value keep changing everytime.
I already tried attaching as a live element and try to put in an anchor to read the element as well. Both options are not working.
Appreciate if someone can help.


#2

Hi @chukz,
Remove the idx field from the selector and try again

Or

Idx='*'

Or

use uiexplorer select all parent selector also then may get unique one

Regards,
Arivu


#3

Hello Chukz,

Just give a try above solution given by @arivu96.

Regards,
Pankaj


#4

The solution provided by @arivu96 , should work


#5

idx value is not reliable. When session change same idx value will represent another element.
So, please pick up another stable value other than idx.


#6

Thanks for the quick reply.
Thanks arivu96 for the suggestions.
I did remove the idx, and tried adding .Idx=’*’, these options did not work.
I tried adding below did not work as well.

When I try to select the parent selector there’s a lot of parent selectors, as attached image.

Any other options?, appreciate your help.


#7

@chukz, ok you can choose all the parent tags and remove the IDX value in the selector

Regards,
Arivu


#8

Hi Arivu96,
I tried following items, when I select everything in the selector it display as per below,
wnd app=‘javaw.exe’ cls=‘SWT_Window0’ title=‘xmedia’ />
wnd cls=‘SWT_Window0’ idx=‘14’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘348’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘3’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘18’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘12’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘5’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘Edit’ />

then I modified in the selector as per below,
wnd app=‘javaw.exe’ cls=‘SWT_Window0’ title=‘xmedia’ />
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘SWT_Window0’/>
wnd cls=‘Edit’ />

what happens is that the selector is unable to find the item, in this case.
I also tried adding idx=’*’ to all the items as well. no luck.


#9

Hi @chukz,

if you are selecting all the parent nodes no need to remove the idx value.

Regards,
Arivu


#10

Thanks, Arivu96,
The problem I see here is that every time the application refreshes the idx’s keep changing, I refresh the application twice and took the values, you can see some idx’s keep changing. When I remove all idx’s it cannot identify the object.

Refresh1
wnd app=‘javaw.exe’ cls=‘SWT_Window0’ title=‘xmedia’ />
wnd cls=‘SWT_Window0’ idx=‘14’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘476’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘3’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘18’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘12’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘5’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘Edit’ />

Refresh2
wnd app=‘javaw.exe’ cls=‘SWT_Window0’ title=‘xmedia’ />
wnd cls=‘SWT_Window0’ idx=‘14’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘769’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘283’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘18’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘12’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘1’ />
wnd cls=‘SWT_Window0’ idx=‘5’ />
wnd cls=‘Edit’ />


#11

HI @chukz,

you do recording and image automation textbox and type it,

else use send hot key to TAB and type your value

Refer this one

Regards,
Arivu